/* --- Modern Medical Color Palette --- */
:root {
    --medical-blue: #005b96;     /* Deep, trusting blue */
    --calm-teal: #48cae4;        /* Soft, approachable teal */
    --clean-white: #ffffff;      /* Pure white */
    --light-gray: #f4f7f6;       /* Soft background gray */
    --text-dark: #333333;        /* Easy to read text */
}

/* --- Basic Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--text-dark);
}

/* --- Navigation Bar --- */
.navbar {
    background-color: var(--clean-white);
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--medical-blue);
    
    /* Add this line so the change is smooth, not instant */
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease; 
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px; /* This magically aligns it with your hero card! */
    margin: 0 auto;
    padding: 15px 0; /* Keeps top/bottom padding but removes side padding */
    position: relative;
}

/* The new class we will trigger with JavaScript */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.85); /* 85% solid white */
    backdrop-filter: blur(10px); /* The frosted glass effect */
    /* We simply deleted the padding rule from here! */
}

.logo {
    font-size: 24px;
}

.logo h1 {
    font-size: 1.5rem; /* Matches the 24px size of the previous logo container */
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

/* Keeps the clickable logo looking like a logo, not a standard link */
.logo a {
    display: flex; /* Added from later rule */
    align-items: center; /* Added from later rule */
    gap: 10px; /* Added from later rule */
    text-decoration: none;
    color: var(--medical-blue);
    font-weight: bold;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: var(--calm-teal);
}

.nav-icon {
    height: 40px; /* Explicitly sets the height of the navbar icon */
    width: auto;   /* Maintains the icon's original proportions */
    flex-shrink: 0; /* Prevents the icon from stretching or squishing */
}

/* Makes the header container stick to the top of the screen */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 1000; /* This ensures the header stays on TOP of other images/text when scrolling */
}

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

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

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

/* --- Main Content --- */
main {
    padding: 20px 50px 20px;
    text-align: center;
}
/* --- Hero Section --- */
/* --- Hero Section --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* CHANGED: Makes the text column exactly as tall as the image */
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--clean-white);
    padding: 60px 60px 30px; 
    border-radius: 12px;
    gap: 50px;
    text-align: left;
}
.hero-text {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Ensures trust badges and buttons align left */
    text-align: left;
}



.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative; /* Needed for the glow effect below */
}

.hero-image img {
    width: 100%;
    max-width: 380px; /* Limits the width */
    height: 450px; /* Fixed height creates a consistent 'frame' */
    object-fit: cover; /* This ensures the photo fills the frame completely with no gaps */
    border-radius: 12px;
    border: 4px solid var(--clean-white); /* Thicker white frame for a premium look */
    box-shadow: 0 20px 40px rgba(0, 91, 150, 0.1);
    position: relative; /* REQUIRED for z-index to work! */
    z-index: 2; /* Keeps him in front of the glow */
}
/* This creates a soft blue circle behind the doctor */
.hero-image::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 40px; /* Positions the glow behind the doctor's head and shoulders */
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(72, 202, 228, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-text h1 {
    color: var(--medical-blue);
    font-size: 2.85rem;
    margin-top: 0; /* NEW: Removes hidden browser spacing at the very top */
    font-weight: bold;
    margin-bottom: 15px; 
}

.hero-text h2 {
    color: var(--calm-teal);
    font-size: 1.15rem;
    font-weight: 600;
    
    /* Increase this margin to push the second title down */
    margin-bottom: 12px; 
    line-height: 1.4; /* Adds breathing room inside the text */
    
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-text h3 {
    color: var(--calm-teal);
    font-size: 1.15rem;
    font-weight: 600;
    
    /* Pushes the welcome paragraph down */
    margin-bottom: 30px; 
    line-height: 1.4;
    
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Ensure the welcome text doesn't stretch too wide */
.hero-text p {
    text-align: left;
    margin-bottom: 20px;
    max-width: 90%; 
}

.trust-badges {
    display: flex;
    justify-content: flex-start; /* Aligns the row to the left */
    gap: 30px;
    margin: 10px 0 35px 0;
    width: 100%;
}

.badge {
    border-left: 3px solid var(--calm-teal);
    padding-left: 12px;
    
    /* NEW: Prepares the badge for animation */
    opacity: 0; 
    transform: scale(0);
    
    /* Applies the animation we just created */
    /* 0.6s is the speed, 'forwards' tells it to stay visible when done */
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
}

/* Stagger Effect: Tells each badge when to start */
.badge:nth-child(1) {
    animation-delay: 0.3s; /* Waits 0.3 seconds after page load */
}

.badge:nth-child(2) {
    animation-delay: 0.5s; /* Waits slightly longer so it pops second */
}

.badge strong {
    display: block;
    color: var(--medical-blue);
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 4px;
}

.badge span {
    font-size: 0.85rem;
    color: var(--text-dark);
    opacity: 0.8;
}
/* --- New Split Layout Footer --- */
footer {
    background-color: var(--medical-blue);
    color: var(--clean-white);
    padding: 40px 20px 20px;
    margin-top: 20px;
}

/* The container holding the left and right sides */
.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto 30px; /* Centers the row and adds space below it */
    gap: 30px;
}

/* Left Side: Horizontal Links */
.footer-quick-links {
    display: flex;
    flex-wrap: wrap; /* Prevents them from squishing too much */
    gap: 20px;
    flex: 1;
}

.footer-quick-links a {
    color: var(--clean-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-quick-links a:hover {
    color: var(--calm-teal);
}

/* Right Side: Contact Info */
.footer-quick-contact {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Pushes the inner container to the right */
}

.footer-quick-contact p {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--clean-white);
    opacity: 0.9;
}

.footer-contact-info {
    text-align: left; /* Ensures the text lines are uniformly left-aligned */
}

.footer-quick-contact a {
    color: inherit; /* Inherits white color and opacity from the parent <p> */
    text-decoration: none;
}

.footer-quick-contact a:hover {
    text-decoration: underline;
}

/* Bottom Center: Copyright */
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* A very faint, classy dividing line */
    padding-top: 20px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* --- Contact Page --- */
.contact-section {
    display: block;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--clean-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    gap: 40px;
    text-align: left;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-info h2 {
    color: var(--medical-blue);
    font-weight: bold;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.6;
}

.info-details p {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

/* Clickable Map/Image on Contact Page */
.contact-image-link {
    display: block;
    margin-top: 30px; /* Gives it breathing room from the text above */
    border-radius: 12px;
    border: 4px solid var(--clean-white);
    box-shadow: 0 20px 40px rgba(0, 91, 150, 0.1);
    overflow: hidden; /* Keeps the image neatly inside the rounded borders */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-image-link img {
    width: 100%;
    height: auto;
    display: block; /* Removes the tiny invisible space browsers put under images */
}

/* The hover animation */
.contact-image-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: var(--calm-teal); /* Highlights the border to show it's clickable */
}
/* --- Compact Schedule Timeline --- */
.schedule-timeline {
    margin-top: 30px;
    max-height: 300px; 
    overflow-y: auto;  
    padding-right: 15px; 
    /* Removed the left-border and padding from here! */
}

/* Custom Scrollbar */
.schedule-timeline::-webkit-scrollbar {
    width: 6px;
}
.schedule-timeline::-webkit-scrollbar-thumb {
    background-color: var(--calm-teal);
    border-radius: 10px;
}
.schedule-timeline::-webkit-scrollbar-track {
    background-color: var(--light-gray);
}

.schedule-timeline h3 {
    color: var(--medical-blue);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.1rem;
    /* Removed the negative left margin so the title sits flush */
}

/* NEW: The track that holds the line and entries */
.timeline-track {
    border-left: 3px solid var(--calm-teal);
    padding-left: 20px;
    margin-left: 12px; /* Creates the space on the left so dots don't clip! */
    padding-bottom: 10px;
}

.timeline-entry {
    position: relative;
    margin-bottom: 12px;
    background-color: var(--clean-white);
    border: 1px solid var(--light-gray);
    padding: 10px 15px; 
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* The Timeline "Dot" */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: -28px; /* Aligns perfectly with the teal line */
    top: 15px;
    width: 10px; 
    height: 10px;
    background-color: var(--clean-white);
    border: 3px solid var(--medical-blue);
    border-radius: 50%;
}

.timeline-date {
    font-weight: bold;
    color: var(--medical-blue);
    margin-bottom: 4px;
    font-size: 0.95rem; /* Smaller, neater font */
    text-transform: capitalize;
}

.timeline-details {
    color: var(--text-dark);
    font-size: 0.85rem;
    line-height: 1.4;
}
/* Form Styling */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--medical-blue);
    font-weight: bold;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit; /* Makes sure the text box matches our website font */
    resize: vertical; /* Allows vertical growth but protects the horizontal layout */
}

/* Makes the text box border turn teal when you click inside it */
.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--calm-teal);
    box-shadow: 0 0 5px rgba(72, 202, 228, 0.3);
}

.submit-btn {
    background-color: var(--medical-blue);
    color: var(--clean-white);
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center;
}

/* Changes button color slightly when hovering over it */
.submit-btn:hover {
    background-color: var(--calm-teal);
}
/* --- Blog & Shared Titles --- */
.section-title {
    text-align: center;
    color: var(--medical-blue);
    font-weight: bold;
    margin: 60px 0 30px; /* Gives space between the hero and the blogs */
    font-size: 2rem;
}

.page-title {
    text-align: center;
    color: var(--medical-blue);
    font-weight: bold;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 40px;
}

/* Blog Grid System */
.blog-grid {
    display: grid;
    /* This magic line makes the grid responsive. It fits as many 300px cards in a row as it can! */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Individual Blog Cards --- */
.blog-card {
    background-color: var(--clean-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 4px solid var(--calm-teal); 
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden; /* <-- NEW: Keeps the image tucked inside the rounded corners */
    display: flex;
    flex-direction: column; /* Stacks image on top of text */
}


/* NEW: The Image Styling */
.blog-card-image {
    width: 100%;
    height: 200px; /* Forces all images to be the exact same height */
    object-fit: cover; /* Zooms/crops the image cleanly so it never squishes */
    border-bottom: 1px solid var(--light-gray);
}

/* NEW: The Text Wrapper */
.blog-card-content {
    padding: 25px; /* We moved the padding here! */
    display: flex;
    flex-direction: column;
    text-align: left; /* Align text to the left */
    flex: 1; /* Helps push the read-more link to the bottom */
}

.blog-card:hover {
    transform: translateY(-5px); /* Gentle lift effect when hovering */
}

.blog-card h3 {
    color: var(--medical-blue);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.3rem; 
}

.blog-card .date {
    font-size: 0.9rem;
    color: var(--calm-teal);
    font-weight: 600;
    margin-bottom: 15px;
    text-align: left; /* Align date to the left */
}

.blog-card p {
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.5;
}
/* --- Blog Page Heading Section --- */
.blog-page {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 40px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.section-header h2 {
    color: var(--medical-blue);
    font-weight: bold;
    font-size: 1.8rem;
    margin: 0;
    position: relative;
}

/* Optional: Adding a small teal accent line under the active heading */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--calm-teal);
}

.subtitle-eng {
    color: #888;
    font-size: 1rem;
    font-weight: 400;
}

/* Ensure the grid doesn't have extra top margin now */
.blog-grid {
    margin-top: 20px;
}

.read-more {
    text-decoration: none;
    color: var(--calm-teal);
    font-weight: bold;
    margin-top: auto;
    align-self: center;
}

.read-more:hover {
    text-decoration: none;
}
/* --- Stretched Link Magic --- */
.read-more::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
/* --- Single Article Page --- */
.single-article {
    max-width: 800px; /* Narrower for comfortable reading */
    margin: 0 auto;
    background-color: var(--clean-white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--medical-blue);
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    color: var(--calm-teal);
}

/* Specifically for the "Back" arrow to move left on hover */
.back-link .arrow {
    margin-left: 0;
    margin-right: 8px;
}

.back-link:hover .arrow {
    transform: translateX(-5px);
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 20px;
}

.article-header h1 {
    color: var(--medical-blue);
    font-weight: bold;
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-meta {
    color: #777;
    font-size: 0.95rem;
    font-style: italic;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8; /* Extra breathing room between lines */
    color: var(--text-dark);
    margin-bottom: 20px;
}

.article-content h2 {
    color: var(--medical-blue);
    font-weight: bold;
    margin: 40px 0 15px;
    font-size: 1.6rem;
}

.article-content ul {
    margin-bottom: 25px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}
/* --- Biography Page --- */
.bio-page {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--clean-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    gap: 50px;
    text-align: left;
}

.bio-image-col {
    flex: 1;
}

.bio-image-col img {
    width: 100%;
    border-radius: 12px;
    border: 4px solid var(--clean-white);
    box-shadow: 0 20px 40px rgba(0, 91, 150, 0.1);
    margin-bottom: 20px;
}

.credentials-box {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--medical-blue);
}

.credentials-box h3 {
    color: var(--medical-blue);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.credentials-box ul {
    list-style-type: none;
    padding-left: 0;
}

.credentials-box li {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.bio-text-col {
    flex: 2; /* Takes up twice as much space as the image column */
}

.bio-text-col h1 {
    color: var(--medical-blue);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.bio-text-col h2 {
    color: var(--calm-teal);
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 500;
}

/* NEW: Styling for h3 subheadings within the biography text column */
.bio-text-col h3 {
    color: var(--medical-blue); /* Consistent with main headings */
    font-size: 1.3rem;
    font-weight: bold; /* Makes subheadings stand out */
    margin-top: 1.5rem; /* Adds space above the subheading */
    margin-bottom: 1rem; /* Adds space below the subheading before the list */
}

/* NEW: Styling for unordered lists within the biography text column */
.bio-text-col ul {
    list-style-type: disc; /* Ensures standard bullet points */
    padding-left: 20px; /* Indents the list items */
    margin-bottom: 1.5rem; /* Adds space after the entire list */
}
.bio-text-col h4 {
    color: var(--calm-teal);
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.bio-text-col p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* NEW: Styling for list items within the biography text column */
.bio-text-col li {
    margin-bottom: 0.5rem; /* Adds slight space between list items */
    line-height: 1.6; /* Improves readability of list text */
}

.specialties-list {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.7;
}

/* --- Biography CTA Box (Homepage) --- */
.bio-cta {
    background-color: var(--medical-blue);
    color: var(--clean-white);
    display: flex;
    align-items: stretch; /* Forces the text area to match the image height */
    gap: 50px;
    text-align: left;
    padding: 40px 60px;
    border-radius: 12px;
    max-width: 1000px;
    margin: 0 auto; /* Centers it; top margin is now handled by the divider */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Global Section Divider --- */
.section-divider {
    border: none;
    height: 1px;
    background: #e9ecef;
    margin: 30px auto;
    max-width: 1000px;
}

/* --- Scroll Fade-In Effect --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bio-cta-image {
    flex: 1;
}

.bio-cta-image img {
    width: 100%;
    border-radius: 12px;
    border: 4px solid var(--clean-white);
    box-shadow: 0 20px 40px rgba(0, 91, 150, 0.1);
    display: block;
}

.bio-cta-text {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Keeps h2 and p aligned to the left */
}

.bio-cta h2 {
    color: var(--clean-white);
    margin-bottom: 15px;
    font-size: 2rem;
}

.bio-cta p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Overriding our normal button so it looks good on a dark background */
.submit-btn.cta-btn {
    background-color: var(--clean-white);
    color: var(--medical-blue);
    display: inline-block;
    text-decoration: none;
    align-self: center; /* Centers the button horizontally in the text area */
    margin-top: auto;   /* Pushes the button to the bottom of the container */
}

.submit-btn.cta-btn:hover {
    background-color: var(--calm-teal);
    color: var(--clean-white);
}

/* --- Schedule CTA (Homepage) --- */
.schedule-cta {
    background-color: var(--clean-white);
    border: 2px solid var(--medical-blue);
    padding: 32px 24px;
    border-radius: 12px;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.schedule-cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.schedule-cta h2 {
    color: var(--medical-blue);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 2rem;
}

.schedule-cta p {
    margin-bottom: 20px;
    color: var(--text-dark);
    max-width: 700px;
}

.schedule-cta-text .submit-btn {
    align-self: center; /* Centers the button between the image and the edge */
    display: inline-block;
}

/* --- Arrow Animation --- */
.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.submit-btn:hover .arrow,
.cta-btn:hover .arrow,
.read-more:hover .arrow,
.secondary-btn:hover .arrow {
    transform: translateX(5px); /* Moves the arrow slightly to the right */
}
.hero-buttons {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    gap: 25px;
    width: 100%;
    margin-top: auto; /* NEW: Magically pushes the buttons to the very bottom! */
}

.secondary-btn {
    text-decoration: none;
    color: var(--medical-blue);
    font-weight: bold;
    transition: color 0.3s ease;
}

.secondary-btn:hover {
    color: var(--calm-teal);
}
/* --- Responsive Design (Mobile & Tablet) --- */
@media (max-width: 768px) {
    
    main {
        padding: 20px 15px; /* Added more vertical breathing room */
    }

    .section-divider {
        margin: 25px auto; /* Slightly more space between sections */
    }

    .hero-text h1, .bio-text-col h1, .page-title {
        font-size: 1.8rem; /* Scaled down further to fit comfortably on narrow screens */
    }

    /* 1. Header: Stack the logo and links */
    .nav-content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .logo {
        display: none;
    }

    .nav-links {
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap; /* Allows links to wrap cleanly on narrow screens */
    }

    /* 2. Hero Section: Stack text on top of image */
    .hero {
        flex-direction: column; /* Changes to standard top-down stack */
        align-items: flex-start; /* Aligns content to the left */
        padding: 15px 20px 25px; /* Reduced top padding to sit closer to navbar */
        text-align: left; /* Aligns text to the left */
        gap: 1rem; /* Drastically reduce the gap between main elements */
    }

    .hero-text {
        display: contents; /* "Dissolves" the container so children can be reordered with the image */
    }

    /* Reordering for Mobile Flow */
    .hero-text h1 { order: 1; margin-bottom: 0.5rem; } /* Reduced: Main Heading */
    .hero-text .specialty-badge { 
        order: 2; /* Positioned directly below the name */
        margin-bottom: 1rem; /* Reduced: Light Blue Badge */
    }
    .hero-image { 
        order: 3; /* Moved below the badge */
        margin-bottom: 1.5rem; /* Reduced: Profile Image margin-bottom */
        align-self: center; /* Centers the image while text stays left-aligned */
    }
    .hero-text p { display: none; } /* Completely removes the welcome text on mobile */
    .hero-text .trust-badges { 
        order: 5; 
        margin: 1.5rem 0; /* Reduced: Stats Container top and bottom margin */
    }
    .hero-text .hero-buttons { 
        order: 6; 
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0; /* Already 0, no change needed here for gap */
        margin-top: 0; /* Ensure no excessive top margin */
    }

    .hero-buttons .submit-btn {
        width: 100%;
        padding: 12px;
        text-align: center;
    }

    .hero-buttons .secondary-btn {
        margin-top: 0.75rem; /* Reduced: Margin between button and link */
        display: block;
        text-align: center;
    }

    .trust-badges {
        display: flex;
        justify-content: space-around;
        align-items: center;
        text-align: center;
    }

    .hero-image img {
        max-width: 280px; /* Smaller image for smaller screens */
    }
    
    /* Responsive adjustments for schedule-cta */
    .schedule-cta {
        padding: 24px 15px;
    }

    /* 3. Biography & Contact: Stack columns */
    .bio-page, .contact-section {
        flex-direction: column;
        padding: 20px;
    }

    /* 4. Footer: Stack links and contact info */
    .footer-top-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-quick-contact {
        justify-content: center; /* Centers the whole group on mobile screens */
    }

    .footer-quick-links {
        justify-content: center;
    }

    .bio-cta {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding: 40px 20px; /* Increased padding */
    }

    .bio-cta-text {
        align-items: flex-start; /* Aligns text to the left */
    }

    .recent-articles h2 {
        margin-bottom: 20px !important; /* Reduces space above article cards */
    }
}
/* --- Animations --- */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    80% {
        transform: scale(1.1); /* The "bounce" overshoot */
        opacity: 1;
    }
    100% {
        transform: scale(1); /* Settles into normal size */
        opacity: 1;
    }
}
/* --- Hero Specialty Badge --- */
.specialty-badge {
    display: inline-flex; 
    flex-direction: column; 
    
    /* The light blue background from your palette */
    background-color: #48cae4; 
    
    padding: 8px 20px;
    border-radius: 6px; 
    margin-bottom: 20px; 
    box-shadow: 0 4px 10px rgba(72, 202, 228, 0.2); 
}

/* Force the text inside to be dark blue and visible */
.specialty-badge h2,
.specialty-badge .author-badge-text {
    color: var(--clean-white); /* The dark medical blue */
    font-size: 0.95rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin: 0; 
    line-height: 1.2;
}

/* Adds a tiny bit of breathing room if there's a second line in the badge */
.specialty-badge h2 + .author-badge-text {
    margin-top: 4px;
    opacity: 0.9;
}

/* Ensure the Doctor's Name below has correct spacing */
.hero-content h1 {
    color: var(--medical-blue);
    font-size: 3rem; /* Keep it dominant */
    margin-top: 0; /* Clear default top margin */
    margin-bottom: 15px; /* Space before the subtitle */
}

/* --- Contact Page Grid Layout --- */
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 50px; /* Space between left and right columns */
    align-items: start; /* Keeps items aligned to the top */
}

/* Mobile Responsiveness: Stack columns neatly on smaller screens */
@media (max-width: 850px) {
    .contact-row {
        grid-template-columns: 1fr; /* Switch to 1 column */
        gap: 40px;
    }
}

/* --- Adjusting the White Card Spacing --- */
.contact-section {
    /* 1. Pull the white box much closer to the navbar */
    margin-top: 25px !important; 
    
    /* 2. Add thick padding inside the box to push "Контакти" and the Map away from the edges */
    padding: 50px !important; 
}

/* Ensure the padding shrinks nicely on mobile phones */
@media (max-width: 850px) {
    .contact-section {
        padding: 30px 20px !important;
        margin-top: 20px !important;
    }
}
/* --- Equalize Form and Timeline Heights --- */

/* 1. Tell the grid to stretch both columns to match whichever is tallest */
.contact-row {
    align-items: stretch !important; 
}

/* 2. Tell the white form box to fill its new stretched column */
.contact-form {
    height: 100%;
    box-sizing: border-box;
}

/* 3. Remove any restricting scrollbars from the timeline so it can grow */
.schedule-timeline {
    max-height: 620px !important; /* Matches the natural height of your form */
    overflow-y: auto !important; /* Turns the vertical scrollbar back on */
    height: auto !important;
    padding-right: 15px; /* Gives the text breathing room from the scrollbar */
}

/* --- Form Checkbox Styling --- */
.checkbox-group {
    display: flex;
    align-items: flex-start; /* Aligns box with the top line of text */
    gap: 10px; /* Space between box and text */
    margin-bottom: 20px;
}

/* Prevent the checkbox from stretching to 100% width */
.checkbox-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px; 
    cursor: pointer;
}

/* Style the consent text */
.checkbox-group label {
    font-size: 0.85rem;
    color: #555; /* Slightly softer text color */
    line-height: 1.4;
    cursor: pointer;
    font-weight: normal; /* Ensures it isn't bold like the input labels */
}

/* --- Navbar Icon Styling --- */
.logo a {
    display: flex;
    align-items: center; /* This magically aligns the image and text vertically */
    gap: 10px; /* Puts a nice little space between the icon and the name */
    text-decoration: none;
}

.nav-icon {
    height: 40px; /* Adjust this number to make the icon bigger or smaller */
    width: auto; /* Keeps the proportions perfect */
}

/* --- Delete Message Button Styling (Admin Panel) --- */
.delete-msg-btn {
    background-color: #dc3545; /* Red color for delete */
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Prevents button text from wrapping */
}

.delete-msg-btn:hover {
    background-color: #c82333; /* Darker red on hover */
}


/* --- Gallery Section --- */
.gallery-section {
    max-width: 1000px;
    margin: 40px auto 60px;
    background-color: var(--clean-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.gallery-section .section-title {
    margin-top: 0; /* Removes extra space now that it is inside a padded box */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Lightbox / Modal --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    user-select: none;
}

.lightbox.active { display: flex; }

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3.5rem;
    cursor: pointer;
    padding: 20px;
    transition: color 0.2s;
}

.lightbox-nav:hover { color: var(--calm-teal); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.close-btn { position: absolute; top: 20px; right: 30px; color: white; font-size: 3rem; cursor: pointer; }