/* CSS Variables */
:root {
    --primary-color: #0047AB;
    --secondary-color: #00A8E8;
    --accent-color: #FF4B4B;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-dark: #2D3436;
    --text-light: #636E72;
    --bg-light: #F8F9FA;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --navbar-height: 80px;
}

/* Base Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--navbar-height);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 255);
    backdrop-filter: blur(10px);
    z-index: 1030;
    transition: var(--transition);
    padding: 0;
}

.navbar .container {
    background: rgba(255, 255, 255, 255);
}

.navbar-scrolled {
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--navbar-height));
    background-color: var(--primary-color);
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: var(--navbar-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.hero-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero-image.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    position: relative;
    width: 100%;
    z-index: 2;
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 3;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
    fill: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-4 {
    font-size: calc(1.8rem + 2vw);
    font-weight: 700;
    line-height: 1.2;
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom right, transparent 49%, #fff 50%);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
    overflow: hidden;
}

.card-hover {
    cursor: pointer;
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 71, 171, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

/* Department Cards */
.department-card {
    background: #fff;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.department-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.department-card:hover .card-overlay {
    opacity: 1;
}

/* Doctor Cards */
.doctor-card {
    background: #fff;
    border-radius: var(--border-radius-md);
}

.doctor-info {
    padding: 1rem 0;
}

.doctor-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.doctor-info i {
    color: var(--primary-color);
}

/* Package Cards */
.package-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    position: relative;
    z-index: 1;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    border-radius: var(--border-radius-lg);
}

.package-card:hover {
    transform: translateY(-5px);
}

.package-card:hover::before {
    opacity: 0.05;
}

.package-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    text-align: center;
}

.package-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 1.5rem 0;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.package-features i {
    color: var(--success-color);
}

/* Search and Filter */
.search-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.form-control {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 71, 171, 0.25);
}

.form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* FAQ Accordion */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.accordion-button {
    padding: 1.25rem;
    font-weight: 500;
    border: none;
    background: var(--bg-light);
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background: var(--bg-light);
}

.accordion-body {
    padding: 1.25rem;
    background: white;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out;
}

/* Department Quick Links */
.department-link {
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
}

.department-link:hover {
    transform: translateY(-5px);
}

.department-link .card {
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    transition: var(--transition);
}

.department-link:hover .card {
    box-shadow: var(--shadow-md);
}

.department-link i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Accessibility Improvements */
:focus {
    outline: 3px solid rgba(0, 71, 171, 0.5);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Footer Section */
.footer-section {
    background: linear-gradient(135deg, #2D3436 0%, #1E272E 100%);
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section h5 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-links {
    margin-bottom: 2rem;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 0.2rem 0;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.working-hours li {
    margin-bottom: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: -60px;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    z-index: 999;
}

.back-to-top.show {
    bottom: 2rem;
    opacity: 1;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-header {
        padding: 3rem 0;
    }

    .display-4 {
        font-size: calc(1.6rem + 1.5vw);
    }

    .package-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .section-header {
        padding: 2rem 0;
    }

    .display-4 {
        font-size: calc(1.4rem + 1vw);
    }

    .search-section {
        flex-direction: column;
        gap: 1rem;
    }

    .doctor-card .card-image-wrapper {
        padding-top: 75%; /* 4:3 Aspect Ratio for mobile */
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
    }

    .package-price {
        font-size: 2rem;
    }

    .card-image-wrapper {
        padding-top: 75%; /* 4:3 Aspect Ratio for mobile */
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }

    .card {
        break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}
