/* =====================================================
   ROOT VARIABLES (BRAND SYSTEM)
   ===================================================== */
:root {
    --brand-primary: #0f4c81;
    --brand-secondary: #2a7ab9;
    --brand-accent: #e6f0f8;

    --text-heading: #1f2937;
    --text-body: #374151;
    --text-muted: #6b7280;

    --bg-page: #f3f6fb;
    --bg-section: #f7f9fb;

    --border-light: #e5e7eb;

    /* Menu */
    --menu-text: #374151;
    --menu-hover-bg: #e6f0f8;
    --menu-hover-text: #0f4c81;
    --menu-active-bg: #0f4c81;
    --menu-active-text: #ffffff;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-body);
    background-color: var(--bg-page);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4 {
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
}

h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 70px 0;
}

.section-light {
    background-color: var(--bg-section);
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
    background: linear-gradient(
        135deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
    color: #ffffff;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}



/* =====================================================
   MAIN NAVIGATION
   ===================================================== */
.main-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav .menu > li {
    position: relative;
}

.main-nav .menu > li > a {
    display: block;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--menu-text);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.main-nav .menu > li > a:hover {
    background-color: var(--menu-hover-bg);
    color: var(--menu-hover-text);
    text-decoration: none;
}

.main-nav .menu > li > a.active {
    background-color: var(--menu-active-bg);
    color: var(--menu-active-text);
    font-weight: 600;
}

/* Dropdown indicator */
.main-nav li.has-dropdown > a::after {
    content: " ▾";
    font-size: 11px;
    opacity: 0.6;
}

/* Dropdown menu */
.main-nav .menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 8px 0;
    display: none;
    z-index: 1000;
}

.main-nav .menu li:hover > ul {
    display: block;
}

.main-nav .menu li ul li a {
    padding: 10px 18px;
    font-size: 13px;
    color: var(--text-body);
    display: block;
}

.main-nav .menu li ul li a:hover {
    background-color: var(--menu-hover-bg);
    color: var(--menu-hover-text);
}

/* =====================================================
   MOBILE MENU
   ===================================================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #ffffff;
}


/* =====================================================
   HOME PAGE
   ===================================================== */
.home-hero {
    background: linear-gradient(
        135deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
    color: #ffffff;
    padding: 90px 0;
    text-align: center;
}

.home-hero h1 {
    font-size: 38px;
    margin-bottom: 18px;
}

.home-hero .hero-text {
    font-size: 16px;
    max-width: 720px;
    margin: auto;
    line-height: 1.7;
    color: #eef4fa;
}

/* Highlights */
.highlight-grid ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    padding: 0;
}

.highlight-grid li {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 44px 22px 22px;
    text-align: center;
    position: relative;
}

.highlight-grid li::before {
    content: "✔";
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--brand-accent);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   STATS BAR
   ===================================================== */
.stats-bar {
    background-color: var(--brand-secondary);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.stats-grid strong {
    font-size: 28px;
    display: block;
}

/* =====================================================
   CMS CONTENT
   ===================================================== */
.cms-content {
    max-width: 900px;
    margin: auto;
    padding: 40px 20px;
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.breadcrumbs {
    background-color: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.breadcrumbs .container {
    padding: 10px 20px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--brand-primary);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background-color: var(--bg-section);
    border-top: 1px solid var(--border-light);
    padding: 18px 0;
    margin-top: 60px;
}

.site-footer p {
    margin: 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}



/* Title text */
.site-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
}





/* =========================================
   HEADER SPACING FIX
   ========================================= */

.site-header {
    padding: 18px 0 22px;   /* ⬅ more breathing room */
}

/* Space before menu */
.main-nav {
    margin-top: 8px;        /* ⬅ visual separation */
    padding-top: 6px;
}

/* =========================================
   FIX: HOMEPAGE FEATURE / HIGHLIGHT CARDS
   ========================================= */

.highlight-grid {
    margin-top: 40px;
}

.highlight-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.highlight-grid li {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 48px 26px 30px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover lift (Geetanjali feel) */
.highlight-grid li:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

/* Icon circle */
.highlight-grid li::before {
    content: "★";
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================
   FEATURE CARDS (GEETANJALI STYLE)
   ===================================== */

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin: 50px 0;
}

.feature-cards .card {
    background: #e0e2e0;
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 14px 40px rgba(7, 58, 50, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-cards .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.14);
}

.feature-cards .card h3 {
    margin: 16px 0 10px;
    font-size: 18px;
    color: var(--brand-primary);
}

.feature-cards .card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}




.has-dropdown > a::after {
    content: "▾";
    float: right;
    transition: transform 0.2s ease;
}

.has-dropdown ul.open + a::after {
    transform: rotate(180deg);
}

.main-nav .menu li ul {
    transition: max-height 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 64px;          /* desktop */
    width: auto;
    display: block;
    position: relative;   /* NOT absolute */
    background: transparent;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    position: relative;
}

.menu-toggle {
    position: relative;
    z-index: 2000;
}

.logo {
    z-index: 1000;
}


/* ===============================
   MOBILE MENU VISIBILITY FIX
   =============================== */

@media (max-width: 992px) {
    /* 1. Ensure the toggle button is visible and dark enough to see */
    .menu-toggle {
        display: block !important;
        color: var(--brand-primary); 
        padding: 10px;
        margin-left: auto; /* Pushes button to the right */
    }

    /* 2. HIDE the menu by default */
    .main-nav .menu {
        display: none !important; /* Forces it to hide initially */
        flex-direction: column;
        width: 100%;
        background-color: #ffffff;
        border-top: 1px solid var(--border-light);
    }

    /* 3. SHOW the menu ONLY when .open is added via JavaScript */
    .main-nav .menu.open {
        display: flex !important;
    }

    /* 4. Formatting for mobile list items */
    .main-nav .menu > li {
        width: 100%;
    }

    .main-nav .menu > li > a {
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid var(--border-light);
    }

    /* 5. Handle sub-menus on mobile so they don't float */
    .main-nav .menu li ul {
        position: static;
        display: block; 
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background-color: #f9f9f9;
    }
}

/* ===============================
   FACULTY GRID
   =============================== */

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.faculty-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-light);
}

.faculty-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.faculty-image {
    width: 100%;
    height: 250px;
    background-color: var(--bg-section);
}

.faculty-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps headshots proportional */
    filter: grayscale(20%); /* Modern medical aesthetic */
}

.faculty-card:hover .faculty-image img {
    filter: grayscale(0%);
}

.faculty-info {
    padding: 20px;
}

.faculty-info h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: var(--brand-primary);
}

.designation {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-heading);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specialty {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.qualification-badge {
    display: inline-block;
    background: var(--brand-accent);
    color: var(--brand-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

.btn-profile {
    display: block;
    font-size: 13px;
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-profile:hover {
    background: var(--brand-primary);
    color: white;
    text-decoration: none;
}

/* =====================================
   FACULTY GRID – FINAL REFINED STYLE
   ===================================== */

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px 20px;
    margin: 50px 0;
}

.faculty-card {
    text-align: center;
    background: transparent !important;
}

/* The circular container */
.fac-img-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    /* This prevents the white box if the image is missing */
    background: transparent !important; 
}

/* Single selector for the image to prevent conflicts */
.fac-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;    /* Fills the circle */
    object-position: top; /* Focuses on the face */
    transition: transform 0.3s ease;
    /* Soft shadow only on the image circle */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.faculty-card:hover img {
    transform: scale(1.08);
}

/* Typography */
.faculty-card h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: var(--brand-primary);
    font-weight: 700;
}

.fac-designation {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.department, .qualification, .experience {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0;
    line-height: 1.4;
}

/* Qualification styling */
.qualification {
    font-style: italic;
    color: var(--brand-secondary);
}


/* =====================================
   NEWS AND EVENTS GRID
   ===================================== */

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.news-card { background: #fff; padding: 30px; border-radius: 16px; border: 1px solid var(--border-light); transition: 0.3s; position: relative; }
.news-card.highlight { background: var(--brand-primary); color: #fff; }
.news-card.highlight h3, .news-card.highlight .news-link { color: #fff; }
.news-tag { display: inline-block; padding: 4px 10px; background: var(--brand-accent); color: var(--brand-primary); border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; }
.news-link { display: inline-block; margin-top: 15px; font-weight: 600; color: var(--brand-primary); }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }


/* =====================================
   ABOUT US
   ===================================== */

.timeline { position: relative; max-width: 800px; margin: 40px auto; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 0; height: 100%; width: 2px; background: var(--border-light); }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot { position: absolute; left: -28px; top: 5px; width: 16px; height: 16px; background: var(--brand-primary); border: 4px solid var(--brand-accent); border-radius: 50%; z-index: 1; }
.timeline-date { font-weight: 700; color: var(--brand-secondary); font-size: 1.1rem; margin-bottom: 5px; }
.timeline-content { background: #fff; padding: 20px; border-radius: 10px; border: 1px solid var(--border-light); }
.timeline-content h3 { margin: 0 0 10px; font-size: 18px; }

/* =====================================
   DEPARTMENTS
   ===================================== */


.dept-tabs-container { margin: 40px 0; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
/* .tab-buttons { display: flex; gap: 10px; border-bottom: 2px solid var(--border-light); margin-bottom: 20px; } */
.tab-buttons {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    
    /* ADD THESE LINES */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x; /* Allows horizontal swipe but captures vertical taps */
    padding-bottom: 5px; /* Space for the active border */
}

/* .tab-btn { padding: 12px 24px; border: none; background: none; cursor: pointer; font-weight: 600; color: var(--text-muted); transition: 0.3s; border-bottom: 3px solid transparent; margin-bottom: -2px; } */
.tab-btn.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
/* Update these specific lines in your existing block */
.tab-content {
    display: none; 
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tab-content.active {
    display: block !important; /* Force display when active */
    opacity: 1;
}

/* Ensure buttons don't zoom the page on mobile tap */
.tab-btn {
    touch-action: manipulation;
    position: relative;
    z-index: 10; 
    pointer-events: auto !important; 
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Removes the gray box on tap */
}
.dept-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; list-style: none; padding: 0; }
.dept-list a { display: block; padding: 10px; background: var(--bg-page); border-radius: 6px; color: var(--text-heading); transition: 0.2s; }
.dept-list a:hover { background: var(--brand-accent); color: var(--brand-primary); text-decoration: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


.dept-intro h3 {
    color: var(--brand-primary);
    font-size: 24px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.dept-intro h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-secondary);
}

.section-divider h2 {
    font-size: 28px;
    color: var(--text-heading);
    margin-bottom: 10px;
}

/* Responsive adjustment for the news-grid when used as services */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================
   DEPARTMENTS - MOBILE RESPONSIVE FIX
   ===================================== */

.tab-buttons {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
    
    /* FIX FOR MOBILE: Allows horizontal scrolling if tabs are too wide */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    scrollbar-width: none; /* Hides scrollbar on Firefox */
}

/* Hide scrollbar for Chrome/Safari */
.tab-buttons::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    
    /* FIX FOR MOBILE: Prevents text from wrapping/shrinking */
    flex-shrink: 0; 
    font-size: 14px; 
}

/* Mobile grid adjustment for the department list */
@media (max-width: 600px) {
    .dept-list {
        grid-template-columns: 1fr; /* Single column on very small phones */
        gap: 10px;
    }
    
    .dept-tabs-container {
        padding: 10px; /* Reduce padding to save space */
    }
}