/* =========================================
   DR. ANSHUL'S DIABETES CLINIC - MASTER STYLESHEET
   Constraint: Strict Completeness (No Lazy Code)
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    /* Clinical Authority Color Palette */
    --brand-primary: #0056D2;       /* Trust Medical Blue */
    --brand-secondary: #00B4D8;     /* Tech Health Cyan */
    --brand-dark: #0A192F;          /* Deep Navy Backgrounds */
    --brand-accent: #10B981;        /* Success Green */
    --brand-alert: #EF4444;         /* Urgent Red */
    --text-main: #1E293B;           /* Heavy Slate */
    --text-light: #64748B;          /* Muted Slate */
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;            /* Clinical Gray Wash */
    --bg-blue-tint: #EFF6FF;        /* Soft Blue Background */
    --border-soft: #E2E8F0;
    --border-hard: #CBD5E1;
    
    /* System Typography */
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif; /* For authoritative medical quotes/headers */
    
    /* Layout Constants */
    --max-width: 1280px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 86, 210, 0.1);
    --shadow-lg: 0 20px 40px -5px rgba(0, 86, 210, 0.15);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   BASE RESET & GLOBAL
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--brand-primary);
    transition: var(--transition-fast);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.section-padding {
    padding: 8rem 0;
}

.section-bg-light { background: var(--bg-light); }
.section-bg-tint { background: var(--bg-blue-tint); }

/* =========================================
   TYPOGRAPHY & UTILITIES
========================================= */
.h1, .h2, .h3, .h4 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-meta {
    display: inline-block;
    background: rgba(0, 86, 210, 0.1);
    color: var(--brand-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.section-title .highlight {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* =========================================
   BUTTON SYSTEMS (Aggressive CTAs)
========================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0042A5 100%);
    color: var(--bg-white);
    padding: 1.1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 86, 210, 0.25);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 86, 210, 0.4);
    background: linear-gradient(135deg, #0042A5 0%, #003688 100%);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--brand-primary);
    padding: 1.1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--brand-primary);
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-3px);
}

/* =========================================
   GLOBAL NAVIGATION (Sticky Medical Theme)
========================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    padding: 1rem 0;
}

.site-header.is-scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand-logo .icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-logo svg {
    width: 24px;
    height: 24px;
}

.brand-logo .text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.1;
}

.brand-logo .text span {
    display: block;
    font-size: 0.8rem;
    color: var(--brand-primary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: var(--brand-primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--brand-primary);
}

/* =========================================
   PAGE HERO SECTIONS (Ultra-Premium No-Shade)
========================================= */
.page-hero {
    padding: 12rem 0 7rem;
    background: linear-gradient(145deg, #F8FAFC 0%, #EFF6FF 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative Background Geometry */
.page-hero::before {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
}

.page-hero h1 {
    color: var(--brand-dark);
    font-size: clamp(3rem, 4.5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    line-height: 1.15;
}

/* Force solid color for Hero highlights, no fading to background */
.page-hero h1 .highlight {
    color: var(--brand-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

.page-hero p {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 90%;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

/* Premium Image Treatment */
.hero-visual img {
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 86, 210, 0.25);
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 8px solid white;
}

.hero-visual::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -20px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, var(--brand-secondary) 10%, transparent 11%);
    background-size: 20px 20px;
    opacity: 0.3;
    z-index: -1;
}

/* =========================================
   MEDICAL SERVICES & STATS GRIDS
========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-secondary);
}

.stat-num {
    font-size: 3rem;
    font-weight: 900;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

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

.service-img {
    height: 240px;
    background: var(--bg-light);
    position: relative;
}

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

.service-body {
    padding: 2.5rem;
}

.service-body h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--brand-dark);
}

.service-body p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}
.service-link:hover {
    gap: 1rem;
    color: var(--brand-secondary);
}

/* =========================================
   AGGRESSIVE BREAKOUT CTA
========================================= */
.breakout-cta {
    position: relative;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    padding: 10rem 0;
    text-align: center;
    border-top: 4px solid var(--brand-secondary);
    overflow: hidden;
}

.breakout-cta::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(0, 180, 216, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.breakout-cta h2 {
    position: relative;
    z-index: 2;
    color: white;
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.breakout-cta p {
    position: relative;
    z-index: 2;
    color: rgba(255,255,255,0.85);
    font-size: 1.35rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.8;
}

.cta-actions {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.btn-white {
    background: white;
    color: var(--brand-primary);
    padding: 1.1rem 2.5rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    transition: var(--transition-fast);
}
.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-3px);
}

/* =========================================
   SIMULATED AI CHATBOT SYSTEM (Medical)
========================================= */
.ai-bot-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ai-bot-trigger {
    position: relative;
    width: 65px;
    height: 65px;
    background: var(--brand-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 3px solid white;
}

.ai-bot-trigger:hover {
    transform: scale(1.05) translateY(-5px);
    background: var(--brand-dark);
}

.notification-dot {
    position: absolute;
    top: -5px; right: 0;
    background: var(--brand-alert);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-white);
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-smooth);
}

.notification-dot.is-active {
    opacity: 1;
    transform: scale(1);
}

.ai-bot-window {
    background: var(--bg-white);
    width: 350px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
    margin-bottom: 20px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.ai-bot-window.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ai-bot-header {
    background: var(--brand-dark);
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-bot-header strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
}

.ai-status {
    font-size: 0.75rem;
    color: var(--brand-accent);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.2rem;
}
.ai-status::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--brand-accent);
    border-radius: 50%;
}

#ai-bot-close {
    background: transparent;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.ai-bot-body {
    padding: 1.2rem;
    background: var(--bg-light);
    height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-msg {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
    line-height: 1.5;
}

.ai-msg.bot-msg {
    background: white;
    border: 1px solid var(--border-soft);
    color: var(--brand-dark);
    font-weight: 500;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

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

.ai-typing {
    background: white;
    border: 1px solid var(--border-soft);
    padding: 1rem;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    display: none;
    gap: 5px;
    align-items: center;
}

.ai-typing .dot {
    width: 6px; height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.ai-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity:0.5;}
    40% { transform: scale(1.1); opacity:1;}
}

.ai-bot-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-soft);
    display: flex;
    gap: 0.5rem;
}

.ai-bot-input-area input {
    flex: 1;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}
.ai-bot-input-area button {
    background: var(--brand-primary);
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* =========================================
   GLOBAL FOOTER
========================================= */
.site-footer {
    background: var(--brand-dark);
    color: white;
    padding: 6rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .brand-logo .text { color: white; }
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 1rem; line-height: 1.7; }

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
}
.footer-col ul li a:hover {
    color: var(--brand-secondary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.social-links a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: white;
    transition: var(--transition-fast);
}
.social-links a:hover {
    background: var(--brand-primary);
    transform: translateY(-3px);
}

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

/* =========================================
   RESPONSIVE DESIGN (Medical)
========================================= */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-nav, .header-cta { display: none; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    .page-hero { padding: 10rem 0 5rem; }
    .hero-grid { 
        grid-template-columns: 1fr; 
        text-align: center;
        gap: 2rem;
    }
    .page-hero h1 { font-size: 2.8rem; }
    .page-hero p { margin: 0 auto 2rem; }

    .breakout-cta { padding: 6rem 0; }
}
