@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Plus+Jakarta+Sans:wght@300;400;600;700&display=swap');

:root {
    --primary: #0891b2;
    /* Deep Professional Cyan */
    --secondary: #22d3ee;
    /* Bright Cyan Accent */
    --accent: #06b6d4;
    /* Intermediate Cyan */
    --light: #f0fdff;
    /* Cyan-tinted White */
    --dark: #164e63;
    /* Very Dark Cyan for text */
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 32px 0 rgba(8, 145, 178, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(8, 145, 178, 0.1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 0.8rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

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

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

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #0b3d4f;
    /* Darker for better contrast */
    font-weight: 600;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

/* Grid Layouts */
.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 40px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(8, 145, 178, 0.3)), url('hero-bg-new.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(34, 211, 238, 0.1), transparent 50%);
    pointer-events: none;
}

.hero-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2.5rem 2.5rem;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    text-align: center;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.specialty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.specialty-badge i {
    font-size: 1rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -1px;
    font-weight: 800;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 1.8rem;
    color: #555;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(8, 145, 178, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    color: var(--primary);
    border: 2px solid var(--primary);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services */
.services {
    padding: 60px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.service-card {
    padding: 3rem 2.5rem;
    background: var(--light);
    border-radius: 24px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    background: var(--white);
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Why Choose Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.feature-item {
    text-align: center;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(8, 145, 178, 0.05);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(8, 145, 178, 0.1);
}

.feature-item h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.testimonial-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 253, 255, 0.9));
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(8, 145, 178, 0.15);
    border: 1px solid rgba(8, 145, 178, 0.2);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    color: rgba(8, 145, 178, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(8, 145, 178, 0.25);
    border-color: var(--accent);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.8rem;
    color: #333;
    font-size: 1.05rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(8, 145, 178, 0.1);
}

.patient-info strong {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

/* FAQ Accordion */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1.5rem;
    background: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0, 1, 0, 1);
    background: var(--light);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 1000px;
    transition: all 0.5s cubic-bezier(1, 0, 1, 0);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Chatbot */
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: var(--transition);
    max-width: 90vw;
    max-height: 80vh;
    /* Prevent header overflow */
}

@media (max-width: 480px) {
    .chat-window {
        position: fixed;
        /* Break out of container positioning */
        bottom: 80px;
        /* Above the toggle button */
        right: 1rem;
        left: 1rem;
        /* Stretch across screen */
        width: auto;
        /* Override fixed width */
        height: 60vh;
        border-radius: 20px;
        transform-origin: bottom right;
        /* Keep animation definition */
        z-index: 10000;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        /* Adjust if needed to match container */
        right: 20px;
    }

    #chatbot-container {
        /* Ensure container doesn't trap the fixed window if using transforms */
        bottom: 20px;
        right: 20px;
    }
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.9rem;
}

.message.bot {
    background: var(--light);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--primary);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--light);
    padding: 0.75rem;
    border-radius: 25px;
    outline: none;
}

.chat-send {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--light);
    border-radius: 15px;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    width: fit-content;
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    opacity: 0.6;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Only Utilities */
.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1.5rem;
        /* Reduced side padding */
    }

    .mobile-only {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Reduce global section padding */
    .services,
    #achievements,
    #testimonials,
    #contact,
    #faq {
        padding: 40px 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Header & Nav */
    header .container {
        /* Keep row direction for logo and toggle */
        flex-direction: row;
    }

    header .container .btn-primary {
        display: none;
        /* Hide header button on mobile */
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        clip-path: circle(0% at 100% 0);
        transition: all 0.5s ease-in-out;
        pointer-events: none;
        display: flex;
        /* Ensure flex is applied for centering */
        justify-content: center;
    }

    .nav-menu.active {
        clip-path: circle(150% at 100% 0);
        pointer-events: all;
    }

    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a.btn {
        width: 100%;
        display: inline-flex;
        justify-content: center;
    }

    /* Hero Section */
    .hero {
        padding-top: 100px;
        /* More space for header */
        padding-bottom: 40px;
        min-height: 100vh;
        /* height: auto;  Allow it to grow if needed */
        text-align: center;
    }

    .hero-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 0 1rem;
    }

    .specialty-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    /* Grids */
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Adjust contact grid specific items */
    .contact-grid>div:nth-child(2) {
        height: auto;
        /* Let it grow with content */
        min-height: unset;
    }

    /* Ensure images in about grid don't overflow */
    .about-grid img {
        width: 100%;
        height: auto;
    }

    /* Footer Mobile Adjustments */
    .footer-content {
        gap: 2rem;
        margin-bottom: 2rem;
    }
}

/* Achievements & Success Stories */
#achievements {
    background: var(--light);
    padding: 60px 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.achievement-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(8, 145, 178, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.achievement-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    transition: var(--transition);
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(8, 145, 178, 0.15);
}

.contact-info-box {
    background: var(--light);
    padding: 2rem;
    border-radius: 20px;
    height: 100%;
    /* Force full height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center content if map is taller */
    border: 1px solid rgba(8, 145, 178, 0.05);
    /* Match other cards */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Inner highlight */
}

.map-container {
    width: 100%;
    /* Remove aspect-ratio on desktop to allow height matching */
    height: 100%;
    min-height: 350px;
    background: var(--light);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(8, 145, 178, 0.05);
    /* Match other cards */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Ensure the reveal wrapper expands to fill the grid cell */
.contact-grid .reveal {
    height: 100%;
}

/* Contact Section */
#contact {
    padding-top: 20px;
}

/* Small Mobile Devices (iPhone 12 Pro and similar) */
@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
        /* Slightly reduced side padding */
    }

    /* Force single column for all grids */
    .services-grid,
    .features-grid,
    .testimonials-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Reduce card padding to show larger images */
    .achievement-card,
    .service-card,
    .feature-item,
    .testimonial-card,
    .hero-card {
        padding: 1.5rem 1.25rem;
    }

    /* Ensure images fill the card width */
    .achievement-card img {
        width: 100%;
        height: auto;
        /* Allow aspect ratio to vary */
        max-height: 350px;
        object-fit: cover;
    }

    /* Restore aspect ratio for map on mobile only */
    .map-container {
        aspect-ratio: 1/1;
        min-height: 300px;
    }

    /* Typography Adjustments */
    .hero h1 {
        font-size: 2rem;
        /* Reduce slightly to prevent overflow/too much wrap */
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    /* Tighter spacing for mobile sections */
    .services,
    #achievements,
    #testimonials,
    #contact,
    #faq {
        padding: 30px 0;
    }

    /* Hero Background Adjustment */
    .hero {
        background-position: 80% center;
    }
}