/* CSS Variables and WP Scope Isolation */
:root {
    --hp-base-bg: #F7F6E5;
    --hp-dentistry-accent: #E8F9FF; /* User requested light blue */
    --hp-psychiatry-accent: #FFDACE; /* User requested light peach/orange */
    --hp-text-dark: #1A1A1A;
    --hp-text-light: #F0F0F0;
    --hp-font-heading: 'Nunito', sans-serif;
    --hp-font-body: 'Georgia', serif;
    --transition-speed: 0.6s;
}

/* Reset to prevent conflicts if WP theme is aggressive */
.hp-landing-wrapper, .hp-landing-wrapper *,
.hp-subpage-wrapper, .hp-subpage-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.hp-landing-wrapper,
body.hp-subpage-wrapper {
    font-family: var(--hp-font-body);
    background-color: var(--hp-base-bg);
    width: 100%;
    min-height: 100vh;
    color: var(--hp-text-dark);
    /* Transition background color dynamically */
    transition: background-color var(--transition-speed) ease-in-out;
}

/* Main Layout Grid (Mobile First) */
.hp-main-layout {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    height: auto; /* Let content grow on mobile instead of forcing 100vh */
    overflow-x: hidden;
    overflow-y: visible; /* ALWAYS use the native window scrollbar, no inner nested scrolling! */
    padding-top: 80px; /* offset for fixed header */
    display: flex;
    flex-direction: column; /* Stack vertically on small screens */
    pointer-events: none; /* Let background canvas get events where needed */
}

/* Allow subpages to scroll naturally if content exceeds 100vh */
.hp-subpage-wrapper .hp-main-layout {
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
}

/* Left Column Text Area */
.hp-left-col {
    width: 100%;
    display: flex;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem; /* Reduced top padding */
    pointer-events: auto;
    z-index: 11;
}

/* Text Base & Hover State */
.hp-hero-text {
    cursor: default;
    padding-top: 0; /* Removed extra padding */
}

.hp-hero-text h1,
.hp-hero-text h2 {
    font-family: var(--hp-font-heading);
    font-size: 2.5rem; /* Mobile size */
    font-weight: 700;
    line-height: 1.1;
    color: #383838;
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.hp-hero-text h1 .highlight,
.hp-hero-text h2 .highlight {
    color: #383838; /* STRICT: No other colors, matches parent */
    transition: color 0.4s ease;
}

.hp-hero-text p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #383838;
    max-width: 100%;
    transition: color 0.4s ease;
}

/* Removed text color change on hover, keeping the original dark text color */

/* Right Column: Canvas & Buttons (75% / 25% Split) */
.hp-right-col {
    width: 100%;
    height: 100vh; /* Base height for landing page visuals */
    min-height: 450px; /* STRICT rule: Prevent image from squishing into a thin strip on mobile */
    position: relative;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

/* Subpages shouldn't inherit the strict 100vh right column image bounding box on mobile */
.hp-subpage-wrapper .hp-right-col {
    height: auto;
    min-height: unset;
    padding: 1.5rem;
}

/* Constrained Canvas container (Full Screen Background) */
#canvas-container.constrained-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through to background if needed, but UI is higher z-index */
}

/* Header Area */
.hp-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem; /* Reduced horizontal padding for mobile */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    pointer-events: auto;
}

.hp-header-brand {
    display: flex;
    align-items: center;
    gap: 1rem; /* Tighter gap on mobile */
}

.hp-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hp-logo {
    max-width: 45px; /* Ensures logo fits well on mobile */
    height: auto;
}

.hp-title-container {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hp-title {
    font-family: var(--hp-font-heading);
    font-size: 1rem; /* Smaller title for mobile */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--hp-text-dark);
    line-height: 1.1;
    white-space: nowrap; /* Prevent ugly wrapping on tiny screens */
}

.hp-subtitle {
    font-family: var(--hp-font-body);
    font-size: 0.55rem; /* Smaller subtitle for mobile */
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #555;
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Hamburger Menu Button */
.hp-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above mobile menu */
}

.hp-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--hp-text-dark);
    transition: all 0.3s ease;
}

/* Mobile Nav Hidden by Default */
.hp-nav {
    position: fixed;
    top: 80px; /* Below exact mobile header height */
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-150%); /* Hidden via transform */
    transition: transform 0.4s ease;
    z-index: 999;
}

.hp-nav.open {
    transform: translateY(0);
}

.hp-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
}

.hp-nav a {
    font-family: var(--hp-font-heading);
    text-decoration: none;
    color: var(--hp-text-dark);
    font-weight: 800; /* Bolder text */
    font-size: 0.9rem; /* Smaller text */
    letter-spacing: 1px;
    transition: color var(--transition-speed) ease;
}

.hp-nav a:hover {
    color: #FF5A5A; /* Red hover for links */
}

/* Booking Button Specific Styles */
.hp-nav a.hp-btn-booking {
    background-color: #FF5A5A;
    color: #ffffff;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    border: 1px solid #FF5A5A;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hp-nav a.hp-btn-booking:hover {
    background-color: #ffffff;
    color: var(--hp-text-dark); /* Default dark gray text */
    border-color: rgba(26,26,26,0.1);
}

/* Clinic Visual Container */
.hp-clinic-visual {
    position: relative;
    width: 100%;
    flex: 1 1 auto; /* Flex natively handles height */
    padding: 0;
    margin: 0;
    z-index: 5;
    pointer-events: none; 
}

/* Image Wrappers for Ken Burns */
.img-wrapper {
    position: absolute;
    top: 0; left: 1.5rem; right: 1.5rem; bottom: 0; /* Left/Right inset for mobile */
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, box-shadow 0.3s ease;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15); /* Matched exact elegant shadow from subpages */
}

/* Subtle Load Reveal Animation for Index Page */
@keyframes revealIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.img-wrapper.default-img.reveal-on-load {
    animation: revealIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.0);
    transition: transform 10s ease-out; /* Slow Ken burns */
}

/* Default State */
.img-wrapper.default-img { opacity: 1; }
.img-wrapper.default-img img { transform: scale(1.1); } /* Constant slow zoom when active */

/* Choice Zone Bottom Buttons */
.hp-choice-zone.bottom-buttons {
    position: relative;
    width: 100%;
    flex: 0 0 auto; /* Native height */
    z-index: 10;
    display: flex;
    flex-direction: row !important; /* Force side-by-side */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0 2rem 0; /* Added 2rem bottom padding to prevent hover scrollbar! */
    margin: 0;
    pointer-events: auto;
}

.hp-choice-btn {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(26, 26, 26, 0.1);
    padding: 1rem 1.8rem; /* Proper padding globally */
    font-family: var(--hp-font-heading);
    font-size: 1rem; /* Proper text size globally */
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--hp-text-dark);
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(4px);
    transition: border-color var(--transition-speed) ease, color var(--transition-speed) ease, transform 0.3s ease, box-shadow var(--transition-speed) ease;
    border-radius: 10px; 
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); /* Stronger shadow */
    flex: 0 1 auto; /* Don't stretch too far */
    min-width: 160px; /* Sensible minimum */
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: color var(--transition-speed) ease;
    white-space: nowrap; /* Prevent wrap globally */
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Mobile Button Fixes */
@media (max-width: 768px) {
    .hp-choice-zone.bottom-buttons {
        gap: 0.75rem;
        padding: 1.5rem 1.5rem 2rem 1.5rem; /* Better side padding and bottom padding */
        box-sizing: border-box;
    }
    .hp-choice-btn {
        padding: 0.8rem 1rem;
        min-width: 0; /* Remove min-width */
        flex: 1; /* Allow equal stretching */
    }
    .btn-text {
        font-size: 0.9rem; /* Increase mobile font slightly */
        white-space: nowrap; /* Force 1 row */
        gap: 0.4rem;
    }
}

.btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1;
    transform: translateY(100%);
    transition: transform var(--transition-speed) ease-in-out;
}

/* Hover States driven by JavaScript or CSS */
.hp-choice-btn.btn-dentistry:hover {
    border-color: #FF5A5A;
    box-shadow: 0 10px 25px rgba(255, 90, 90, 0.2); /* Colored shadow on hover */
    /* Removed transform: translateY to avoid scrollbar jitter on short screens */
}
.hp-choice-btn.btn-dentistry:hover .btn-bg {
    transform: translateY(0);
    background-color: #FF5A5A; /* Red hover */
}

.hp-choice-btn.btn-psychiatry:hover {
    border-color: #FF5A5A;
    box-shadow: 0 10px 25px rgba(255, 90, 90, 0.2);
    /* Removed transform: translateY to avoid scrollbar jitter on short screens */
}
.hp-choice-btn.btn-psychiatry:hover .btn-bg {
    transform: translateY(0);
    background-color: #FF5A5A; /* Red hover */
}

/* Add subtle colored glow to the image overlay to match the button */
.hp-landing-wrapper.state-dentistry .dentistry-img { 
    opacity: 1; 
    box-shadow: 0 12px 35px rgba(255, 90, 90, 0.15); 
}
.hp-landing-wrapper.state-psychiatry .psychiatry-img { 
    opacity: 1; 
    box-shadow: 0 12px 35px rgba(255, 90, 90, 0.15); 
}

/* Transitions for Ken Burns overlays based on wrapper state */
.hp-landing-wrapper.state-dentistry .default-img { opacity: 0; }
.hp-landing-wrapper.state-dentistry .dentistry-img { opacity: 1; }
.hp-landing-wrapper.state-dentistry .dentistry-img img { transform: scale(1.1); }

.hp-landing-wrapper.state-psychiatry .default-img { opacity: 0; }
.hp-landing-wrapper.state-psychiatry .psychiatry-img { opacity: 1; }
.hp-landing-wrapper.state-psychiatry .psychiatry-img img { transform: scale(1.1); }

/* When active (via JS), keep text dark if contrast is needed, or light */
.hp-landing-wrapper.state-dentistry .btn-dentistry,
.hp-landing-wrapper.state-psychiatry .btn-psychiatry {
    color: #fff;
    transform: scale(1.05);
}

/* Desktop Enhancements (min-width 1024px) */
@media (min-width: 1024px) {
    .hp-main-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-content: center; /* Center the grid row within 100vh */
        position: relative;
        height: calc(100vh - 38px); /* Restore strict 1-screen fit for Landing Page desktop minus top bar */
        margin-top: 38px; /* Offset the top bar height so grid aligns under the header */
        overflow: hidden; /* Prevent scrolling entirely for perfect single-screen look */
    }
    
    /* Safely allow subpage text to expand the row and scroll without top-clipping */
    .hp-subpage-wrapper .hp-main-layout {
        height: auto;
        margin-top: 0;
        align-content: stretch;
        align-items: center; /* Vertically center children */
    }

    .hp-header {
        padding: 1rem 3rem; /* Tighter side padding to prevent nav wrap */
    }
    
    .hp-header-brand {
        gap: 1rem; /* Tighter gap */
    }

    .hp-left-col {
        width: 100%;
        display: block; /* Remove flex centering to bound tightly to text */
        padding: 0 2rem 0 5rem; /* Strict bounds, ZERO Top/Bottom padding for perfect grid match */
    }
    
    .hp-subpage-wrapper .hp-left-col {
        padding-top: 140px; /* Clear fixed header safely */
        padding-bottom: 80px;
    }

    .hp-right-col {
        width: 100%;
        height: 100%; /* Stretch to precisely match height of left column content */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Ensure things like forms align exactly with the top of the left column */
        padding: 0 5rem 0 2rem; /* ZERO Top/Bottom padding */
    }
    
    .hp-subpage-wrapper .hp-right-col {
        padding-top: 140px; 
        padding-bottom: 80px;
    }
    
    .img-wrapper {
        top: 0; left: 0; right: 0; bottom: 0; /* Fully fill the column width on desktop */
    }
    
    .hp-hero-text h1,
    .hp-hero-text h2 {
        font-size: 4.5vw; /* Fully responsive to window width */
        margin-top: 0;
        margin-bottom: 1.5rem;
        line-height: 1.1;
    }
    
    .hp-hero-text p {
        font-size: 1.6vw; /* Increased fully responsive to window width */
        line-height: 1.7; /* Extra breathing room */
        margin-bottom: 0;
        max-width: 90%;
    }
    
    /* Header Sizing Restored for Desktop */
    .hp-logo {
        max-width: 80px;
    }
    .hp-title {
        font-size: 1.8rem;
    }
    .hp-subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
    
    /* Hide Hamburger, Show Nav */
    .hp-menu-toggle {
        display: none;
    }
    
    .hp-nav {
        position: static;
        width: auto;
        transform: translateY(0);
        background-color: transparent;
        box-shadow: none;
    }

    .hp-nav-list {
        flex-direction: row;
        padding: 0;
        gap: 1.5rem; /* Reduced gap to prevent wrapping on 1024px screens */
    }
    
    .hp-nav a {
        font-size: 0.8rem; /* Smaller desktop text */
        position: relative;
    }

    .hp-nav a:not(.hp-btn-booking)::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -4px;
        left: 0;
        background-color: #FF5A5A; /* Red underline */
        transition: width 0.3s ease;
    }

    .hp-nav a:not(.hp-btn-booking):hover::after {
        width: 100%;
    }
    
    .hp-choice-zone.bottom-buttons {
        gap: 1.5rem;
        padding: 1rem 0 0 0; /* Clear desktop gap between image and buttons */
    }
    
    .hp-choice-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: auto;
    }
}

/* ========================================= */
/* SUBPAGES: ABOUT US & CONTACT US */
/* ========================================= */

.hp-subpage-wrapper {
    font-family: var(--hp-font-body);
    background-color: var(--hp-base-bg);
    color: var(--hp-text-dark);
    /* We don't hide overflow here so we can natively scroll long content */
    min-height: 100vh;
}

#subpage-canvas-container.constrained-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6; /* Subtler than landing page */
}

/* Subpage Core Typography */
.hp-hero-text.subpage-text h1,
.hp-hero-text.subpage-text h2 {
    font-size: 2.2rem;
    color: #1A1A1A;
    margin-bottom: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
}
@media (min-width: 768px) {
    .hp-hero-text.subpage-text h1,
    .hp-hero-text.subpage-text h2 {
        font-size: 3rem; /* Tablet size */
    }
}
@media (min-width: 1024px) {
    .hp-hero-text.subpage-text h1,
    .hp-hero-text.subpage-text h2 {
        font-size: 3.5rem; /* Desktop size matched */
    }
}

.hp-hero-text.subpage-text.about-text-block p {
    font-size: 1.15rem; /* Slightly larger text for About Us left column */
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #333;
    max-width: 95%; 
}

.hp-hero-text.subpage-text p {
    font-size: 1.15rem; /* Unify subpage text size to match About Us left column exactly */
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #444;
    max-width: 100%; 
}

/* Subpage Unified Visual Container */
.subpage-visual-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* Inherit the exact aspect ratio from index page visuals */
    max-height: 80vh;
    border-radius: 20px; /* Matched from index page */
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15); /* Matched exact elegant shadow from index page */
}

.img-wrapper.about-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    transition: opacity 2s ease-in-out; /* Slow fade */
    z-index: 1;
}

.img-wrapper.about-slide.active {
    opacity: 1;
    z-index: 2;
}

.img-wrapper.about-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 6s linear; /* Smooth continuous pan/zoom */
}

.img-wrapper.about-slide.active img {
    transform: scale(1.1); /* Ken burns applied when active */
}

/* Contact Page Specifics */
.contact-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item h4 {
    font-family: var(--hp-font-heading);
    font-size: 1.2rem;
    color: #FF5A5A;
    margin-bottom: 0.5rem;
}

.contact-item p {
    font-size: 1.15rem; /* Unify exactly with the subpage intro text */
    line-height: 1.7;
    margin-bottom: 0;
    color: #444;
}

.hp-contact-form-wrapper {
    background: rgba(255, 255, 255, 0.4); /* High transparency for strong glass effect */
    backdrop-filter: blur(25px); /* Deep blur */
    -webkit-backdrop-filter: blur(25px);
    padding: 3rem; /* Beautifully spacious padding on all sides */
    border-radius: 20px; /* Match elegant corner radius of index images */
    box-shadow: 0 15px 50px rgba(0,0,0,0.1); /* Match premium shadow */
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8); /* Sharp white inline border for glass edge */
    margin-top: 0; /* Form is now top-aligned with no text above it */
}

.contact-form-heading {
    font-family: var(--hp-font-heading);
    font-size: 1.5rem; /* Smaller, cleaner size on mobile */
    margin-bottom: 1.5rem;
    color: var(--hp-text-dark);
}

@media (min-width: 768px) {
    .contact-form-heading {
        font-size: 2rem; /* Standard title size on larger screens */
        margin-bottom: 2rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    font-family: var(--hp-font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.form-group label.required-field::after {
    content: " *";
    color: #FF5A5A; /* Matches the theme red */
    font-size: 1.1em;
    font-weight: 800;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: var(--hp-font-body);
    font-size: 1rem;
    background: rgba(255,255,255,0.8);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF5A5A;
    box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.1);
}

.submit-btn {
    background-color: #FF5A5A;
    color: #ffffff;
    font-family: var(--hp-font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 90, 90, 0.3);
    background-color: #e54c4c;
}

/* Subpages Desktop Enhancements */
@media (min-width: 1024px) {
    .hp-hero-text.subpage-text.about-text-block p {
        font-size: 1.15vw; /* Slightly larger than standard, but tight enough to fit 100vh */
        line-height: 1.7;
        max-width: 95%; /* Make it fill more column width naturally */
    }

    .hp-hero-text.subpage-text p,
    .contact-item p {
        font-size: 1.15vw; /* Perfectly matching text size scaling across all subpages */
        line-height: 1.7;
        max-width: 95%; /* Clean layout filling */
    }
}

/* Doctors Page Specifics */
.hp-doctors-layout {
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto !important; /* Extremely important to override 100vh grid limits */
    min-height: 100vh;
    overflow: visible !important;
}

.doctors-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 1.5rem;
    width: 100%;
}

.doctors-header p {
    margin: 0 auto;
    max-width: 800px;
}

.doctors-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.doctor-profile-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.doctor-profile-card.flex-layout {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    gap: 3rem;
}

.doctor-left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.doctor-image-wrapper.non-rectangular {
    position: relative;
    z-index: 100;
    pointer-events: auto;
    width: 250px;
    height: 250px;
    margin-bottom: 2rem;
    overflow: hidden;
    /* Beautiful organic shape instead of a square */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    box-shadow: 0 20px 45px rgba(0,0,0,0.3); /* Stronger default shadow */
    border: 5px solid rgba(255, 255, 255, 0.8);
    transition: all 500ms ease; /* Slower, smoother transition for a "slow grow" */
}

.doctor-image-wrapper.non-rectangular img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 500ms ease;
}

.doctor-image-wrapper.non-rectangular:hover {
    /* Shape morphs on hover */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40% !important;
    transform: translateY(-12px) scale(1.06) !important; /* Emphasized slow grow and lift */
    box-shadow: 0 30px 60px rgba(0,0,0,0.4) !important; /* Even heavier shadow on hover */
}

.doctor-image-wrapper.non-rectangular:hover img {
    transform: scale(1.1) rotate(2deg) !important;
}

.doctor-contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.doc-contact-item {
    font-family: var(--hp-font-body);
    font-size: 0.95rem; /* Smaller font as requested */
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.doc-contact-item svg {
    color: #FF5A5A; /* Accent color for the icons */
}

.doc-contact-item a {
    color: #444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.doc-contact-item a:hover {
    color: #FF5A5A;
}

.doc-btn-booking {
    display: inline-block;
    position: relative;
    z-index: 100;
    pointer-events: auto;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background-color: #FF5A5A;
    color: #fff;
    font-family: var(--hp-font-heading);
    font-weight: 800;
    text-decoration: none;
    border-radius: 30px; /* Pill shape for buttons */
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* Slower, bigger bouncy hover */
}

.doc-btn-booking:hover {
    background-color: #e54c4c !important;
    transform: translateY(-6px) scale(1.08) !important; /* More exciting, slower pop */
    box-shadow: 0 15px 30px rgba(255, 90, 90, 0.45) !important;
}

.doctor-right-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.doctor-name {
    font-family: var(--hp-font-heading);
    font-size: 2rem;
    color: var(--hp-text-dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.doctor-qual {
    font-size: 1.2rem;
    color: #FF5A5A;
    font-weight: 700;
}

.doctor-credentials {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doctor-credentials li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--hp-font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
}

.doctor-credentials li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #FF5A5A;
    font-size: 1.5rem;
    line-height: 1;
    top: 2px;
}

/* Desktop Doctors Enhancement */
@media (min-width: 1024px) {
    .doctors-grid {
        gap: 6rem;
    }
    
    .doctor-profile-card.flex-layout {
        flex-direction: row;
        align-items: center;
        padding: 4rem;
        gap: 5rem;
    }
    
    .doctor-left-col {
        width: 35%;
        border-right: 1px solid rgba(0,0,0,0.1);
        padding-right: 3rem;
    }

    .doctor-image-wrapper.non-rectangular {
        width: 25vw;
        height: 25vw;
        max-width: 350px;
        max-height: 350px;
    }
    
    .doctor-right-col {
        width: 65%;
    }
    
    .doctor-credentials li {
        font-size: 1.15vw; /* Match subpage typography scaling */
        line-height: 1.7;
    }
}

/* ========================================= */
/* DEPARTMENTS PAGE SPECIFICS */
/* ========================================= */

.hp-departments-layout {
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}

.departments-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 1.5rem;
    width: 100%;
}

.departments-header p {
    margin: 0 auto;
    max-width: 800px;
}

.departments-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.department-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.dept-left-col {
    flex: 1;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.dept-image-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

.dept-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.department-card:hover .dept-image-wrapper img {
    transform: scale(1.05);
}

.dept-right-col {
    flex: 1.2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dept-name {
    font-family: var(--hp-font-heading);
    font-size: 1.6rem;
    color: #FF5A5A;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.dept-overview {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 2rem;
}

.dept-services h4 {
    font-family: var(--hp-font-heading);
    font-size: 1.3rem;
    color: #1A1A1A;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 90, 90, 0.2);
    display: inline-block;
}

.dept-services ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dept-services li {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.dept-services li::before {
    content: "•";
    color: #FF5A5A;
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.dept-services li strong {
    color: #333;
    font-family: var(--hp-font-heading);
    font-weight: 700;
}

/* Desktop Departments Enhancement */
@media (min-width: 1024px) {
    .departments-grid {
        gap: 6rem;
    }
    
    .department-card.flex-layout {
        flex-direction: row;
    }
    
    .department-card.flex-layout.reverse-layout {
        flex-direction: row-reverse;
    }
    
    .dept-left-col {
        min-height: auto;
    }
    
    .dept-right-col {
        padding: 4rem;
    }
    
    .dept-name {
        font-size: 2.2rem;
    }

    .dept-overview {
        font-size: 1.15vw; /* Match general subpage scaling */
    }

    .dept-services li {
        font-size: 1.05vw; /* Slightly smaller than overview text */
    }
}

/* ========================================= */
/* BOOKING PAGE SPECIFICS */
/* ========================================= */

.hp-booking-layout {
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}

.booking-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1.5rem;
    width: 100%;
}

.booking-header p {
    margin: 0 auto;
    max-width: 800px;
    margin-bottom: 2rem;
}

.booking-cta-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.booking-phone-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #FF5A5A 0%, #e54c4c 100%);
    color: #ffffff;
    font-family: var(--hp-font-heading);
    font-size: 1.5rem; /* Smaller heading font per user request */
    font-weight: 800;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(255, 90, 90, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5); /* Subtle border for glass-like premium feel */
}

.booking-phone-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 90, 90, 0.5);
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #ffffff;
}

.booking-phone-btn .phone-icon {
    width: 32px;
    height: 32px;
}

/* Mobile scaling for the big button */
@media (max-width: 767px) {
    .booking-phone-btn {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }
    .booking-phone-btn .phone-icon {
        width: 24px;
        height: 24px;
    }
}

.booking-timetable-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hp-timetable {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-family: var(--hp-font-body);
}

.hp-timetable thead {
    background-color: #D4D2B2; /* Themed darker footer bottom color */
    color: #1A1A1A;
}

.hp-timetable th {
    font-family: var(--hp-font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.2rem 1rem;
    text-align: left;
    letter-spacing: 0.5px;
}

.hp-timetable th.col-num {
    text-align: center;
    width: 60px;
}

.hp-timetable tbody tr {
    transition: background-color 0.3s ease;
    background-color: #F7F6E5; /* Base light bg */
}

/* Creating the alternating lighter/darker striping matching footer themes */
.hp-timetable tbody tr:nth-child(even) {
    background-color: #EBEAD2; 
}

.hp-timetable tbody tr:hover {
    background-color: #D4D2B2; /* Hover matching darkest footer color */
}

.hp-timetable td {
    padding: 1rem;
    font-size: 1.05rem;
    color: #1A1A1A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.hp-timetable td.col-num {
    background-color: #D4D2B2; /* Darker bottom color */
    color: #1A1A1A;
    font-family: var(--hp-font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    text-align: center;
}

/* Mobile Responsive Table styling (Card format) */
@media (max-width: 767px) {
    .hp-timetable, 
    .hp-timetable thead, 
    .hp-timetable tbody, 
    .hp-timetable th, 
    .hp-timetable td, 
    .hp-timetable tr { 
        display: block; 
    }
    
    .hp-timetable thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .hp-timetable tbody tr { 
        border-radius: 12px;
        margin-bottom: 1.5rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        border: 1px solid rgba(255, 255, 255, 0.6);
        overflow: hidden;
    }
    
    .hp-timetable td { 
        border: none;
        position: relative;
        padding-left: 45%; 
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        font-size: 1rem;
    }
    
    .hp-timetable td.col-num {
        display: none; /* Hide the index number column entirely on mobile cards for a cleaner look */
    }
    
    .hp-timetable td::before { 
        position: absolute;
        top: 0.8rem;
        left: 1rem;
        width: 40%; 
        padding-right: 10px; 
        white-space: nowrap;
        font-weight: 700;
        color: #1A1A1A;
        content: attr(data-label);
    }
}

/* ========================================= */
/* UNIVERSAL FOOTER SPECIFICS */
/* ========================================= */

.hp-footer {
    background-color: #EBEAD2; /* Slightly darker than var(--hp-base-bg) #F7F6E5 */
    position: relative;
    z-index: 1000;
    font-family: var(--hp-font-body);
    margin-top: 20px;
    padding: 10px;
}

.hp-footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    width: 100%;
    margin: 0;
}

@media (min-width: 768px) {
    .hp-footer-top {
        grid-template-columns: 1fr 1fr;
    }
}
@media (min-width: 1024px) {
    .hp-footer-top {
        grid-template-columns: 1fr 1.5fr 1.5fr; /* 3-column layout */
    }
}

/* Column 1: Logo & Name */
.hp-footer-col {
    padding: 1.5rem 2%; /* Tighter internal padding */
}

.hp-footer-col.logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align logo to top */
    text-align: center;
    background-color: transparent; /* match footer bg based on blend mode */
    padding: 1.5rem 2%;
}

.hp-footer-logo {
    width: 250px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply; /* Blends pure white background away */
}

/* Column 2: Tagline & Quick Links */
.hp-footer-col h3 {
    font-family: var(--hp-font-heading);
    font-size: 1.2rem;
    color: #1A1A1A;
    margin-bottom: 1rem;
    font-weight: 800;
}

.footer-mission {
    font-family: var(--hp-font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.quick-links li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
}

.quick-links li::before {
    content: "•";
    color: #444;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: -2px;
}

.quick-links a {
    color: #333;
    text-decoration: none;
    font-family: var(--hp-font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: #FF5A5A; /* Red hover theme */
}

/* Column 3: Contact Info */
.footer-cursive {
    font-family: var(--hp-font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #1A1A1A;
    margin-bottom: 0.3rem;
}

.footer-sub {
    font-family: var(--hp-font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 2rem;
}

.hp-footer-col h4 {
    font-family: var(--hp-font-heading);
    font-size: 1.1rem;
    color: #1A1A1A;
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.contact-detail {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.contact-detail strong {
    font-family: var(--hp-font-heading);
    color: #1A1A1A;
}

.contact-detail a {
    color: #FF5A5A;
    text-decoration: none;
    font-weight: 700;
}

.contact-detail-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.contact-detail-icon svg {
    color: #FF5A5A;
    min-width: 18px;
}

.contact-detail-icon a {
    color: #FF5A5A;
    text-decoration: none;
    font-weight: 700;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #FF5A5A; /* Theme red */
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    background-color: #e54c4c;
}

/* Bottom Bar - using user's updated feedback color */
.hp-footer-bottom {
    background-color: #D4D2B2; /* An even darker, richer shade of the footer theme base #EBEAD2 */
    padding: 0.2rem 2rem; /* Minimal padding */
}

.bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-family: var(--hp-font-heading);
    font-size: 0.85rem;
    color: #1A1A1A; /* Dark contrast text */
    font-weight: 600;
}

@media (min-width: 768px) {
    .bottom-content {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
    .separator-dash {
        display: inline-block;
    }
}
@media (max-width: 767px) {
    .separator-dash {
        display: none;
    }
}

.bottom-content a {
    color: #FF5A5A; /* Themed red link */
    text-decoration: underline;
    font-weight: 800;
}

.bottom-content a:hover {
    color: #e54c4c;
}

/* ========================================= */
/* BLOG POST CARD (SEO PAGES) */
/* ========================================= */

.blog-post-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 3rem 4rem;
    margin: 40px; /* STRICT requirement: 40px margin on all sides */
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    font-family: var(--hp-font-body);
    color: #333;
    line-height: 1.8;
}

.blog-post-card h1 {
    font-family: var(--hp-font-heading);
    font-size: 2.8rem;
    color: #1A1A1A;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.2;
}

.blog-post-card h2 {
    font-family: var(--hp-font-heading);
    font-size: 2.2rem;
    color: #FF5A5A;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.blog-post-card h3 {
    font-family: var(--hp-font-heading);
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1A1A1A;
}

.blog-post-card p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
}

.blog-post-card ul, .blog-post-card ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    font-size: 1.15rem;
}

.blog-post-card li {
    margin-bottom: 0.8rem;
}

.blog-post-card img.content-img {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.doc-inline-img {
    float: right;
    margin: 0 0 1.5rem 2.5rem;
    width: 320px;
    z-index: 10;
    position: relative;
}

@media (max-width: 768px) {
    .blog-post-card {
        margin: 20px 10px; /* Reduced margin safely for mobile */
        padding: 2rem 1.5rem;
    }
    .blog-post-card h1 {
        font-size: 2.2rem;
    }
    .blog-post-card h2 {
        font-size: 1.8rem;
    }
    
    /* Ensure floating profile image drops down beautifully on mobile */
    .blog-post-card .doc-inline-img {
        float: none;
        width: 100%;
        max-width: 300px;
        margin: 1.5rem auto;
        display: block;
    }
}

/* ========================================= */
/* TOP CONTACT BAR SPECIFICS */
/* ========================================= */

.hp-top-bar {
    display: none; /* Hidden on mobile by default to save precious space */
}

/* Desktop Enhancements for Top Bar & Layout Offsets */
@media (min-width: 1024px) {
    .hp-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 38px;
        background-color: #EBEAD2; /* Mathces footer .hp-footer exactly */
        z-index: 1001; /* Slightly above strictly header to guarantee clean overlay */
        padding: 0 3rem;
        font-family: var(--hp-font-heading);
        font-size: 0.75rem; /* Slightly smaller size per request */
        color: #555;
    }
    
    .top-bar-contact {
        display: flex;
        gap: 1.5rem;
    }
    
    .top-bar-contact a {
        color: #555;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        transition: color 0.3s ease;
        font-weight: 600; /* Thinner font weight per request */
        letter-spacing: 0.5px;
    }
    
    .top-bar-contact a:hover {
        color: #FF5A5A; /* Accent color */
    }
    
    .top-bar-contact svg {
        color: #FF5A5A; /* Accent icon */
        margin-top: -2px; 
    }

    .top-bar-social {
        display: flex;
        gap: 0.8rem; /* Slightly tighter gap for smaller icons */
        align-items: center;
    }
    
    .top-bar-social a {
        /* Mirroring footer social icon filled format exactly */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px; /* Scaled down version of footer 36px */
        height: 24px;
        background-color: #FF5A5A; /* Theme red fill */
        color: white; /* White icon inside */
        border-radius: 50%;
        text-decoration: none;
        transition: transform 0.3s ease, background-color 0.3s ease;
    }
    
    .top-bar-social a:hover {
        transform: translateY(-2px);
        background-color: #e54c4c;
    }
    
    /* Make the svg fit cleanly in the filled circle */
    .top-bar-social a svg {
        width: 12px;
        height: 12px;
    }

    /* Push the main header down by the exactly the height of the top bar */
    .hp-header {
        top: 38px !important; 
    }

    /* Subpage layout padding updates to account for the extra 38px */
    .hp-subpage-wrapper .hp-left-col,
    .hp-subpage-wrapper .hp-right-col,
    .hp-doctors-layout, 
    .hp-departments-layout, 
    .hp-booking-layout,
    .privacy-container {
        padding-top: calc(140px + 38px) !important;
    }
}
