/* --- Global Styles --- */
:root {
    --primary-color: #0a4275; /* Deep Medical Blue */
    --secondary-color: #219ebc; /* Soft Cyan */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --bg-light: #f9f9fb;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
.navbar {
    background: var(--white);
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #0a4275 0%, #1a5a92 100%);
    color: var(--white);
    padding: 100px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.badge {
    background: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin: 15px 0;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 15px;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #1a8a9e;
}

.hero-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 5px solid rgba(255,255,255,0.1);
}

/* --- Quick Info Cards --- */
.quick-info {
    margin-top: -50px;
    padding-bottom: 50px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid var(--secondary-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- Footer --- */
.footer {
    background: #222;
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-cta {
        justify-content: center;
    }
    .nav-links {
        display: none; /* Add a toggle menu later for mobile */
    }
}

/* --- Page Banner --- */
.page-banner {
    background: #eef2f6;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.page-banner h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* --- Timeline Styling --- */
.experience-section {
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    padding: 20px 0 20px 50px;
    position: relative;
    background-color: inherit;
    width: 100%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 12px;
    background-color: var(--white);
    border: 3px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.hospital-name {
    display: block;
    font-style: italic;
    color: #666;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 15px;
    }
    .timeline-item {
        padding-left: 40px;
    }
    .timeline-item::after {
        left: 7px;
    }
}

/* --- Education Page Styles --- */
.education-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 20%;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.edu-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-left: 5px solid var(--primary-color);
}

.edu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.edu-card.highlighted {
    background: linear-gradient(to right bottom, #ffffff, #f0f7ff);
    border-left: 5px solid var(--secondary-color);
}

.edu-date {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.edu-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.edu-card .degree {
    color: #555;
    font-size: 1rem;
    line-height: 1.4;
}

/* --- Practice Page Styles --- */
.practice-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    padding: 60px 0;
    align-items: center;
}

.practice-info h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin: 15px 0;
}

.practice-features {
    list-style: none;
    margin: 20px 0 30px 0;
}

.practice-features li {
    padding: 8px 0 8px 30px;
    position: relative;
    font-weight: 500;
}

.practice-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.map-box {
    background: #e0e7ff;
    height: 300px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
    border: 2px dashed var(--secondary-color);
}

/* Expertise Grid */
.expertise-areas {
    background: var(--white);
    padding: 80px 0;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.expertise-card {
    padding: 30px;
    border-radius: 12px;
    background: var(--bg-light);
    text-align: center;
    transition: var(--transition);
}

.expertise-card:hover {
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.expertise-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.expertise-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- Academic Page Styles --- */
.academic-section {
    padding: 80px 0;
}

.academic-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.academic-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.academic-item h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.institution {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.research-focus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.focus-card {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.focus-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.conference-list {
    list-style: none;
    padding: 0;
}

.conference-list li {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    position: relative;
    padding-left: 30px;
}

.conference-list li::before {
    content: '🌐';
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .research-focus {
        grid-template-columns: 1fr;
    }
}

/* --- News Page Styles --- */
.news-section {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.news-image-placeholder {
    height: 200px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.news-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.admin-login-link {
    text-align: center;
    margin-top: 40px;
    opacity: 0.6;
}

.admin-login-link a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Awards & Memberships Styles --- */
.awards-section {
    padding: 80px 0;
}

.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.membership-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--secondary-color);
}

.membership-card img {
    margin-bottom: 15px;
}

.membership-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-item {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.course-info h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.cert-tag {
    background: #e0f2f1;
    color: #00796b;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .course-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* --- Contact Page Styles --- */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.contact-info-panel h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-details {
    margin: 30px 0;
}

.info-item {
    margin-bottom: 20px;
}

.info-item strong {
    display: block;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.info-item p, .info-item a {
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    padding: 10px 20px;
    background: #eef2f6;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Form Styling */
.contact-form-panel {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    /* Modern Medical Palette */
    --primary: #0a2540;      /* Deep Navy (Trust) */
    --accent: #c39d63;       /* Sophisticated Gold (Expertise) */
    --text-main: #333d47;    /* Soft Black */
    --bg-light: #f6f9fc;     /* Modern Off-white */
    --white: #ffffff;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, sans-serif; /* Cleaner typography */
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Navbar Modernization */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Modern frosted glass effect */
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* The Primary Button Style */
.btn-primary {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px; /* Modern pill shape */
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.3);
}

/* --- UI Rules & Variables --- */
:root {
    --primary: #0a2540;      /* Midnight Blue */
    --accent: #c39d63;       /* Gold Foil */
    --bg-soft: #f8fafc;      /* Sky Gray */
    --text-light: #64748b;
    --shadow-sm: 0 10px 15px -3px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
}

/* --- Hero Section Styling --- */
.hero {
    padding: 100px 0;
    background: radial-gradient(circle at top right, #f1f5f9 0%, #ffffff 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.badge-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    background: rgba(195, 157, 99, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-outline {
    border: 1px solid #e2e8f0;
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 25px;
}

.hero-text h1 span {
    color: var(--accent);
}

/* --- Image Graphics --- */
.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    position: relative;
}

.image-accent {
    position: absolute;
    width: 110%;
    height: 110%;
    background: var(--bg-soft);
    border-radius: 30px;
    top: -5%;
    left: -5%;
    z-index: 0;
    border: 1px solid #e2e8f0;
}

.experience-tag {
    position: absolute;
    bottom: 30px;
    left: -30px;
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3;
}

.experience-tag .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

/* --- Info Cards --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -60px; /* Overlap effect */
}

.info-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    border-bottom: 4px solid transparent;
}

.info-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--accent);
}

/* --- Modern Footer --- */
.footer {
    background: var(--primary);
    color: white;
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 50px;
}

.footer-brand .logo { color: white; }
.footer-brand p { color: #94a3b8; margin-top: 15px; }

/* --- Timeline Container --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 60px auto;
    padding: 20px 0;
}

/* Central Vertical Line */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent) 0%, #e2e8f0 100%);
    z-index: 0;
}

/* Individual Item Wrapper */
.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alternate Layout (Left/Right) */
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-date {
    width: 40%;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    text-align: right;
}
.timeline-item:nth-child(even) .timeline-date { text-align: left; }

.timeline-content {
    width: 45%;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

/* The "Pulse" Graphic Marker */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(195, 157, 99, 0.2);
}

.pulse-ring {
    position: absolute;
    top: -10px; left: -10px;
    width: 30px; height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Hospital Name Decoration */
.hospital-name {
    display: block;
    color: var(--primary);
    font-weight: 600;
    margin-top: 10px;
}

.role-tag {
    font-size: 0.75rem;
    background: var(--bg-soft);
    padding: 4px 12px;
    border-radius: 50px;
    color: var(--text-light);
}

/* --- 1. Fix the Description Text --- */
.hero-text p {
    color: #475569; /* A sophisticated Slate Gray */
    font-size: 1.15rem;
    margin-bottom: 30px;
    max-width: 550px;
    line-height: 1.7;
}

/* --- 2. Fix the "Download CV" Button --- */
.hero-cta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap; /* Keeps it neat on mobile */
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Spaces the SVG icon and text */
    color: var(--primary); /* Dark Navy text */
    background: transparent;
    border: 2px solid var(--primary); /* Navy outline */
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white; /* Inverts to white text on navy background when hovered */
    transform: translateY(-2px);
}

/* --- 3. Fix the "Years of Excellence" Text --- */
.experience-tag .text {
    color: var(--primary); /* Dark Navy text */
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

/* --- Practice Areas Section --- */
.practice-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.practice-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid transparent; /* Hidden border for hover effect */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Lifts up and shows gold border */
.practice-card:hover {
    transform: translateY(-10px);
    border-top-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.practice-icon {
    width: 65px;
    height: 65px;
    background: rgba(195, 157, 99, 0.1); /* Soft gold background */
    color: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: var(--transition);
}

.practice-card:hover .practice-icon {
    background: var(--accent);
    color: white;
    transform: scale(1.1) rotate(5deg); /* Slight pop effect */
}

.practice-card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.practice-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* --- Publications & Conferences Section --- */
.publications-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
}

.section-title {
    margin-bottom: 40px;
}

.section-title h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* --- Research Grid Cards --- */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.pub-card {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}

.pub-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px) !important; /* overrides JS inline style after load */
}

.pub-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pub-date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.pub-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.pub-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* --- Badges --- */
.pub-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pub-badge.research { background: rgba(10, 37, 64, 0.1); color: var(--primary); }
.pub-badge.course { background: rgba(195, 157, 99, 0.15); color: #b08a53; }
.pub-badge.conference { background: #e2e8f0; color: #475569; margin-bottom: 10px; display: inline-block; }

/* --- Conference List --- */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-list-item {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pub-list-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(10px) !important;
}

.pub-date-box {
    background: var(--primary);
    color: white;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.pub-date-box .month {
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--accent);
}

.pub-date-box .year {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.pub-list-content {
    padding: 25px 30px;
    flex: 1;
}

.pub-list-content h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.pub-location {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .pub-grid { grid-template-columns: 1fr; }
    .pub-list-item { flex-direction: column; }
    .pub-date-box { padding: 15px; flex-direction: row; gap: 10px; min-width: auto; }
    .pub-date-box .year { font-size: 1.2rem; }
}

/* --- Certifications & Awards Section --- */
.awards-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* --- Board Certifications Grid --- */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.board-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
    z-index: 1;
}

/* The "Premium Gold" variant for his highest certification */
.board-card.premium-gold {
    background: linear-gradient(145deg, #ffffff 0%, #fffbf0 100%);
    border-color: rgba(195, 157, 99, 0.4);
    box-shadow: 0 15px 35px rgba(195, 157, 99, 0.1);
}

.board-card.premium-gold::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
}

.board-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.board-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1;
}

.board-date {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.board-card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.board-issuer {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.board-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Advanced Masterclass Grid --- */
.accreditation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.acc-card {
    display: flex;
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    align-items: center;
    transition: var(--transition);
}

.acc-card:hover {
    transform: translateX(10px);
    border-left-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.acc-year {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    padding-right: 30px;
    margin-right: 30px;
    border-right: 2px solid var(--bg-soft);
}

.acc-content h4 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 5px;
}

.acc-location {
    display: block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.acc-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* --- Animation Classes --- */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .acc-card { flex-direction: column; align-items: flex-start; }
    .acc-year { padding-right: 0; margin-right: 0; border-right: none; border-bottom: 2px solid var(--bg-soft); padding-bottom: 15px; margin-bottom: 15px; width: 100%; }
}

/* --- News & Updates Section --- */
.news-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
    min-height: 60vh;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

/* --- News Cards --- */
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(195, 157, 99, 0.3);
}

.news-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: var(--primary);
}

/* Premium abstract background for posts without images */
.abstract-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
    position: relative;
    opacity: 0.9;
    transition: transform 0.6s ease;
}

.abstract-bg::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(195, 157, 99, 0.15) 0%, transparent 60%);
}

.news-card:hover .abstract-bg {
    transform: scale(1.08); /* Zoom effect on hover */
}

.news-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.news-title {
    font-size: 1.4rem;
    color: var(--primary);
    line-height: 1.4;
    margin-bottom: 25px;
    font-weight: 700;
}

.read-more {
    margin-top: auto; /* Pushes button to bottom of card */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.read-more svg {
    transition: transform 0.3s ease;
}

.news-card:hover .read-more {
    color: var(--accent);
}

.news-card:hover .read-more svg {
    transform: translateX(5px); /* Arrow shoots right on hover */
}

/* --- Skeleton Loading Animation (High-End UX) --- */
.skeleton {
    pointer-events: none;
}

.skeleton-img {
    height: 220px;
    background: #e2e8f0;
    animation: pulse-bg 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 15px;
    animation: pulse-bg 1.5s infinite;
}

.skeleton-text.short { width: 30%; height: 12px; margin-bottom: 20px; }
.skeleton-text.title { width: 90%; height: 24px; margin-bottom: 30px; }

@keyframes pulse-bg {
    0% { background-color: #e2e8f0; }
    50% { background-color: #cbd5e1; }
    100% { background-color: #e2e8f0; }
}

/* --- Empty State --- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
}

.empty-state h3 { color: var(--primary); margin-bottom: 10px; }
.empty-state p { color: var(--text-light); }

/* --- Contact Section --- */
.contact-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

/* Contact Info Side */
.contact-info h2 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.contact-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.info-card:last-child {
    border-bottom: none;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.info-card h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-card p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* Form Container */
.contact-form-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.form-wrapper h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

/* Modern Form Elements */
.modern-form .input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.modern-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(195, 157, 99, 0.15);
}

.w-100 {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    padding: 14px;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

/* Map Wrapper */
.map-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 4px solid white;
}

/* Animation */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Education Section --- */
.education-section {
    padding: 80px 0 120px;
    background-color: var(--bg-soft);
}

.edu-pathway {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 850px;
    margin: 0 auto;
}

.edu-card {
    display: flex;
    background: white;
    padding: 35px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary);
    align-items: flex-start;
    gap: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.edu-card.premium-edu {
    border-left: 5px solid var(--accent);
    background: linear-gradient(145deg, #ffffff 0%, #fffbf0 100%);
}

.edu-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.edu-icon {
    width: 60px;
    height: 60px;
    background: rgba(10, 37, 64, 0.05);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-card.premium-edu .edu-icon {
    background: rgba(195, 157, 99, 0.1);
    color: var(--accent);
}

.edu-content {
    flex: 1;
}

.edu-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    background: var(--bg-soft);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.edu-card.premium-edu .edu-date {
    background: rgba(195, 157, 99, 0.15);
    color: var(--accent);
}

.edu-content h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.edu-university {
    display: block;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.edu-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Animation */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .edu-card {
        flex-direction: column;
        gap: 20px;
        padding: 25px;
    }
}

/* --- Enhanced Navigation Links & Active State --- */
.nav-links li a {
    position: relative;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* Hover and Active Text Color */
.nav-links li a:hover,
.nav-links li a.active {
    color: var(--accent); /* This should be your gold/brand color */
}

/* The Active Page Underline Indicator */
.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Make sure the Contact button doesn't get the underline if it's active */
.nav-links li a.btn-primary.active {
    color: white;
    background-color: var(--accent);
    box-shadow: 0 4px 12px rgba(195, 157, 99, 0.3);
}

.nav-links li a.btn-primary.active::after {
    display: none;
}

/* --- Fix for the Contact Button in the Navbar --- */
.nav-links li a.btn-primary {
    display: inline-block;
    padding: 10px 28px !important; /* Forces enough breathing room on the left and right */
    border-radius: 50px;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    white-space: nowrap; /* Prevents the text from squishing or breaking outside the box */
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* Ensure the active state keeps the correct padding and shape */
.nav-links li a.btn-primary.active,
.nav-links li a.btn-primary:hover {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(195, 157, 99, 0.3);
}

/* Remove the gold underline specifically for the button */
.nav-links li a.btn-primary::after,
.nav-links li a.btn-primary.active::after {
    display: none !important;
}

/* --- Hero Section (Home Page) --- */
.hero-section {
    padding: 80px 0 60px;
    background: linear-gradient(to right, var(--bg-soft), #ffffff);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-subtitle {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allows buttons to stack on small screens */
}

.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    background-color: transparent;
    color: var(--primary);
    font-weight: 600;
    border: 2px solid var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

/* Image Placeholder styling */
.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: #e2e8f0;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    box-shadow: var(--shadow-md);
}

/* --- Highlights Section --- */
.highlights-section {
    padding: 60px 0;
    background-color: white;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.highlight-card {
    background: var(--bg-soft);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    border-top: 4px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.highlight-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.highlight-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Mobile Navigation (Hamburger Menu) --- */
/* Hide the hamburger icon on desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 100;
}

/* Style the 3 lines of the hamburger */
.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary); /* Navy color */
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* --- Mobile Breakpoint --- */
@media (max-width: 768px) {
    /* Show the hamburger icon */
    .menu-toggle {
        display: flex;
    }

    /* Hide the normal nav links and turn them into a dropdown */
    .nav-links {
        position: absolute;
        top: 100%; /* Push it right below the nav bar */
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        
        /* Smooth dropdown animation using clip-path */
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.4s ease-out;
    }

    /* When the Javascript adds the 'active' class, reveal the menu */
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }

    /* Space out the links in the dropdown */
    .nav-links li {
        margin: 15px 0;
    }

    /* Animate the Hamburger icon into an 'X' when open */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0; /* Hide the middle line */
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- MOBILE RESPONSIVENESS FIXES --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-desc {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr; /* Stacks the 3 cards vertically on phones */
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 120px 0 40px; /* Extra padding top for the mobile header */
    }
}

/* --- Mobile Footer Responsiveness --- */
@media (max-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr; /* This forces the 3 sections to stack vertically */
        text-align: center; /* Centers the text for a cleaner mobile look */
        gap: 30px; /* Adds nice breathing room between the stacked sections */
    }

    /* Center the quick links on mobile so they don't awkwardly align to the left */
    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .footer-links li {
        margin-bottom: 10px;
    }
}

/* --- Keep the original placeholder shape but hide overflowing image corners --- */
.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5; /* Keeps the elegant portrait rectangle shape */
    background-color: #e2e8f0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    overflow: hidden; /* CRUCIAL: This cuts off the sharp corners of the image */
}

/* --- Make the image perfectly fill the frame --- */
.hero-image-placeholder .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Forces the image to fill the box without distorting the face */
    display: block;
}

/* --- Post Modal (Popup) Styles --- */
.post-modal {
    display: flex; /* Keeps it in the DOM so it can actually animate */
    visibility: hidden; /* Hides it visually */
    pointer-events: none; /* Stops you from accidentally clicking it while hidden */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
}

/* When active, fade the background in */
.post-modal.show {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

/* The actual white box inside the popup */
.post-modal-content {
    background-color: #fff;
    border-radius: 20px;
    width: 90%;
    height: 90%;
    max-width: 1000px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    
    /* Animation: Starts invisible, smaller, and slightly lower */
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    /* The cubic-bezier gives it that premium "spring" effect */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

/* Trigger the spring animation for the white box */
.post-modal.show .post-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* The 'X' Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--accent); /* Turns gold on hover */
    transform: scale(1.1);
}

/* Header image inside the popup */
.modal-header img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Text spacing inside the popup */
.modal-body-content {
    padding: 50px;
}

.modal-text {
    margin-top: 25px;
    line-height: 1.8;
    color: var(--text-main);
    font-size: 1.1rem;
}

/* Make sure Markdown elements (paragraphs, lists) look good */
.modal-text p { margin-bottom: 20px; }
.modal-text h2, .modal-text h3 { color: var(--primary); margin: 30px 0 15px; }
.modal-text ul { margin-left: 20px; margin-bottom: 20px; }
.modal-text img { max-width: 100%; border-radius: 12px; margin: 20px 0; }

/* Mobile fixes for the modal */
@media (max-width: 768px) {
    .modal-body-content { padding: 30px 20px; }
    .modal-header img { height: 250px; }
}

/* --- Skeleton Loading Animation --- */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* The shimmer effect applied to the grey boxes */
.skeleton-img, .skeleton-text {
    background: #f6f7f8;
    background-image: linear-gradient(
        to right,
        #f6f7f8 0%,
        #edeef1 20%,
        #f6f7f8 40%,
        #f6f7f8 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear forwards;
}

/* Image Placeholder Shape */
.skeleton-img {
    height: 200px;
    width: 100%;
}

/* Text Placeholder Shapes */
.skeleton-text {
    height: 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    width: 100%;
}

.skeleton-text.short {
    width: 30%; /* For the date */
    height: 12px;
    margin-bottom: 20px;
}

.skeleton-text.title {
    width: 80%; /* For the headline */
    height: 24px;
    margin-bottom: 20px;
}

/* Give the skeleton content area some padding to match the real cards */
.skeleton .news-content {
    padding: 25px;
}

/* --- Homepage Summary Sections --- */
.home-summaries {
    padding: 60px 0;
}

.summary-block {
    margin-bottom: 80px;
}

.summary-header {
    margin-bottom: 30px;
}

/* Make the heading a beautiful, interactive link */
.summary-header .hover-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.summary-header .hover-link svg {
    transition: transform 0.3s ease;
}

.summary-header .hover-link:hover {
    color: var(--accent); /* Changes to your accent color on hover */
}

.summary-header .hover-link:hover svg {
    transform: translateX(5px); /* Arrow slides right gracefully */
}

.summary-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 5px;
}

/* Grid Layouts */
.summary-grid {
    display: grid;
    gap: 30px;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Preview Cards */
.preview-card {
    background: #fdfdfd;
    border-left: 4px solid var(--accent);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.preview-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.preview-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* Tinted Background Box for Variety */
.tint-box {
    background-color: #f8fafc;
    padding: 50px;
    border-radius: 20px;
}

.white-card {
    background: #ffffff;
    border-left: none;
    border-top: 4px solid var(--accent);
}

/* Badges & Links */
.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-weight: bold;
}

.text-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--accent);
}

/* List Preview for Awards & Publications */
.list-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.list-icon {
    font-size: 1.5rem;
}

.text-muted {
    color: #777;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .tint-box {
        padding: 30px 20px;
    }
}