/* ===== PREMIUM VIP MEDICAL COLOR SCHEME (Teal & White) ===== */
:root {
    /* Primary: Deep Teal (Trust, Medical, Hygiene) */
    --primary-color: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #2dd4bf;
    --primary-rgb: 13, 148, 136;

    /* Secondary: Clean White & Soft Grays */
    --bg-color: #ffffff;
    --bg-secondary: #f0fdfa;
    /* Very light teal tint */
    --bg-card: #ffffff;

    /* Text Colors */
    --text-primary: #111827;
    /* Soft black */
    --text-secondary: #4b5563;
    /* Dark gray */
    --text-tertiary: #9ca3af;
    /* Light gray */

    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    --gradient-hero: linear-gradient(135deg, #ccfbf1 0%, #ffffff 100%);
    --gradient-card: linear-gradient(145deg, #ffffff, #f0fdfa);

    /* Border & Shadow - Glassmorphism */
    --border-color: #e5e7eb;
    --shadow-sm: 0 4px 6px -1px rgba(13, 148, 136, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(13, 148, 136, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(13, 148, 136, 0.15);
    --shadow-xl: 0 25px 50px -12px rgba(13, 148, 136, 0.25);

    /* Border Radius */
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;

    /* Transitions */
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --header-height: 80px;
}

/* Dark Mode - Premium Dark Blue/Teal Theme */
.dark-mode {
    --primary-color: #2dd4bf;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --primary-rgb: 45, 212, 191;

    --bg-color: #0f172a;
    /* Slate Navy */
    --bg-secondary: #111827;
    --bg-card: #1e293b;

    --text-primary: #f8fafc;
    /* Force White Text in Dark Mode */
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --gradient-primary: linear-gradient(135deg, #0d9488, #0f766e);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-card: linear-gradient(145deg, #1e293b, #0f172a);

    --border-color: #334155;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-color);
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND FLOATING ANIMATIONS ===== */
.floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    animation: backgroundPulse 20s infinite ease-in-out;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.08;
    }
}

.floater {
    position: absolute;
    font-size: 2rem;
    opacity: 0.06;
    animation: floatSlowly 30s infinite linear;
    filter: blur(1px);
}

.bubble {
    position: absolute;
    font-size: 3rem;
    opacity: 0.05;
    animation: riseUp 25s infinite ease-in;
    bottom: -100px;
    color: var(--primary-color);
}

@keyframes floatSlowly {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.06;
    }

    90% {
        opacity: 0.06;
    }

    100% {
        transform: translateY(-120vh) translateX(50px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes riseUp {
    0% {
        transform: translateY(0) scale(0.8) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.05;
    }

    100% {
        transform: translateY(-130vh) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ===== UTILITY CLASSES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

section {
    padding: clamp(60px, 8vw, 100px) 0;
    /* Responsive Padding */
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    /* Fluid Font Size */
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 0;
}

/* ===== 3D FLIP CARDS ===== */
.card-scene {
    perspective: 1500px;
    height: 100%;
    min-height: 480px;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.3s;
    overflow-y: auto;
}

.card-face.back {
    transform: rotateY(180deg);
    background: var(--gradient-card);
    border: 1px solid var(--primary-color);
    align-items: flex-start;
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.3);
}

.card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.back-details {
    width: 100%;
    text-align: left;
}

.back-details ul {
    list-style: none;
}

.back-details li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.back-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.flip-hint {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
}

/* ===== HEADER ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.dark-mode .main-header {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.pmdc-badge {
    font-size: 0.7rem;
    background: var(--bg-secondary);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle,
.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
}

/* ===== HERO SECTION ===== */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    padding-top: var(--header-height);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(13, 148, 136, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    /* Fluid Typing */
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 10px 20px -5px rgba(37, 211, 102, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
}

.hero-stats {
    margin-top: 40px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

/* .doctor-photo {
    width: 380px;
    height: 380px;
    max-width: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: url("https://instasize.com/p/a50de7ecb7019a85f6f90f4e8010123c950935433c1480907c87aeb2779b747f") center/cover;
    box-shadow: var(--shadow-xl);
    border: 5px solid var(--bg-card);
    animation: morph 8s ease-in-out infinite;
    z-index: 2;
} */
.doctor-photo {
    width: 380px;
    height: 380px;
    max-width: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background-image: url("./assets/images/profile.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: var(--shadow-xl);
    border: 5px solid var(--bg-card);
    animation: morph 8s ease-in-out infinite;
    z-index: 2;
}
.hero-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes morph {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===== GRIDS & SERVICE CARDS ===== */
.about-grid,
.services-grid,
.certifications-grid {
    display: grid;
    /* Responsive Grid: Cards min 280px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

.timeline-content {
    width: 45%;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 5;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 50%;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -14px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -14px;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 15px;
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 8px;
}

/* ===== APPOINTMENT FORM ===== */
.appointment-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
}

.form-section {
    padding: 50px;
}

.info-section {
    background: var(--gradient-primary);
    color: white;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.info-item {
    margin-bottom: 24px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.info-item i {
    font-size: 1.2rem;
    margin-top: 5px;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.service-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.service-option {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.service-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.other-service-input {
    display: none;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    /* Prevents iOS Zoom */
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* ===== FOOTER ===== */
.main-footer {
    background: #111827;
    color: #f8fafc;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE DESIGN SYSTEM
   ========================================= */

/* --- Tablet (max-width: 992px) --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-image {
        order: -1;
        margin-bottom: 30px;
    }

    .hero-stats {
        justify-content: center;
    }

    .appointment-wrapper {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }

    .timeline-content::after {
        left: -50px !important;
        right: auto !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Navigation */
    .mobile-menu-btn {
        display: flex !important;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-card);
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.2rem;
        display: block;
        text-align: center;
        padding: 10px;
        width: 100%;
    }

    /* Hero */
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-item {
        flex: 1 1 40%;
    }

    /* 2 per row */

    .doctor-photo {
        width: 280px;
        height: 280px;
    }

    .hero-blob {
        width: 300px;
        height: 300px;
    }

    /* Appointment */
    .info-section {
        order: -1;
        padding: 30px;
    }

    .form-section {
        padding: 30px 20px;
    }

    .service-options {
        justify-content: center;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-brand {
        order: 0;
    }
}

/* --- Small Phones (max-width: 480px) --- */
@media (max-width: 480px) {
    .btn {
        width: 100%;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .doctor-photo {
        width: 240px;
        height: 240px;
    }

    .card-scene {
        min-height: 420px;
    }

    .stat-item {
        flex: 1 1 100%;
    }

    /* Stack stats */

    /* Adjust text size for readability */
    p {
        font-size: 0.95rem;
    }
}