/* ========================================================================
   DR. RAMYA'S DENTISTRY - PREMIUM STYLESHEET
   Version: 3.0 (Award-Winning / Performance Optimized)
   ======================================================================== */

/* =========================================
   1. PREMIUM VARIABLES
   ========================================= */
:root {
    /* Brand Identity: Elegant Copper/Gold */
    --primary-accent: #C4704F; 
    --primary-hover: #A35A3D;
    
    /* Structural Colors */
    --background-color: #FFFFFF;
    --surface-color: #F5F5F7; /* Signature silver-gray */
    --surface-hover: #EBEBEF;
    
    /* Typography */
    --text-color: #1D1D1F; /* Deep charcoal */
    --text-muted-color: #6e6e73;
    --text-on-dark: #FFFFFF;
    
    /* Fonts */
    --font-serif: 'Cormorant Garamond', serif; /* Luxury Headings */
    --font-sans: 'Inter', sans-serif; /* Clean UI */
    
    /* UI Elements */
    --border-color: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.85);
    --bento-radius: 24px;
    
    /* Motion (Apple/iOS Spring Physics) */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s var(--ease-out-expo);
    --transition-slow: 0.8s var(--ease-out-expo);
}

/* Dark Mode Override (Surgical/Cinema Mode) */
html.dark-mode {
    --primary-accent: #D48566; 
    --primary-hover: #E09E85;
    
    --background-color: #050505; /* True Black for OLED */
    --surface-color: #151516;
    --surface-hover: #222224;
    
    --text-color: #F5F5F7;
    --text-muted-color: #A1A1A6;
    
    --border-color: rgba(255, 255, 255, 0.12);
    --header-bg: rgba(0, 0, 0, 0.85);
}

/* =========================================
   2. BASE & RESET
   ========================================= */
*, ::after, ::before { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--background-color);
}

::selection { background: var(--primary-accent); color: #ffffff; }

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; 
    transition: background-color 0.3s ease, color 0.3s ease;
}

img, picture, svg, iframe { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
ul { list-style: none; }

.container { width: 90%; max-width: 1280px; margin: 0 auto; }
.container-narrow { max-width: 800px; margin: 0 auto; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.justify-center { justify-content: center; }

/* =========================================
   3. TYPOGRAPHY (The "Editorial" Look)
   ========================================= */
h1, h2, h3, h4 { 
    font-family: var(--font-serif);
    font-weight: 600; 
    color: var(--text-color);
    line-height: 1.1;
}

.display-title {
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 500; /* Thinner weight feels more premium */
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.lead-text {
    font-family: var(--font-sans);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 540px;
    margin-left: auto; margin-right: auto;
}

.section-title h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 0.5rem; }
.section-subtitle { font-size: 1.15rem; color: var(--text-muted-color); font-family: var(--font-sans); }

/* =========================================
   4. BUTTONS & UI
   ========================================= */
.button-primary {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-accent);
    color: #ffffff !important;
    padding: 16px 36px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-weight: 500; font-size: 1.05rem;
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease-out-expo), background 0.3s ease;
    cursor: pointer;
}
.button-primary:hover { transform: scale(1.02); background: var(--primary-hover); }

.button-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--text-color);
    padding: 16px 36px;
    border-radius: 999px;
    font-weight: 500; font-size: 1.05rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
.button-secondary:hover { border-color: var(--text-color); }

/* Glass Button (Hero) */
.button-secondary.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}
.button-secondary.glass-effect:hover { background: rgba(255, 255, 255, 0.25); border-color: #ffffff; }

/* =========================================
   5. NAVIGATION
   ========================================= */
.main-header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 1.5rem 0;
    transition: padding 0.3s ease;
}
.main-header.scrolled { padding: 0.75rem 0; }

.nav-minimal {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--header-bg);
    backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
    padding: 0.75rem 1.75rem;
    border-radius: 999px; 
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
    max-width: 1000px; margin: 0 auto;
}

.logo-text { color: var(--text-color); transition: color 0.3s ease; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted-color); }
.nav-links a:hover, .nav-links a.active { color: var(--text-color); }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-bento {
    position: relative;
    height: 100vh; min-height: 700px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: #000;
}
.hero-background img {
    width: 100%; height: 100%; object-fit: cover;
    animation: slowZoom 20s linear infinite alternate;
}

@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.05); } }

.hero-overlay-gradient {
    position: absolute; inset: 0;
    /* This is overridden by inline styles in HTML, but kept as fallback */
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    z-index: 1; pointer-events: none;
}

.hero-content { position: relative; z-index: 2; margin-top: 5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =========================================
   7. BENTO GRID (Architecture)
   ========================================= */
.services-bento-section { padding: 6rem 0; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 380px; /* Fixed height for consistency */
    gap: 24px;
    margin-top: 3rem;
}

.bento-card {
    background: var(--surface-color);
    border-radius: var(--bento-radius);
    height: 100%; width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    /* Flexbox for content positioning */
    display: flex; flex-direction: column;
}

.bento-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: rgba(196, 112, 79, 0.3);
}

/* Image Handling (Absolute Positioning for Aspect Ratio Control) */
.bento-img-wrapper {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%;
}
.bento-img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}
.bento-card:hover .bento-img-wrapper img { transform: scale(1.08); }

/* Content Overlay */
.bento-content {
    position: relative; z-index: 2;
    padding: 32px;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end; /* Text at bottom */
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
    color: #fff;
    pointer-events: none; /* Let clicks pass to the link-overlay */
}

.bento-content h3 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #fff; }
.bento-content p { font-size: 1rem; color: rgba(255,255,255,0.9); font-weight: 400; line-height: 1.5; }

/* Light Card Variation (No Image) */
.card-light { background: var(--surface-color); }
.card-light .bento-content {
    background: none; color: var(--text-color); justify-content: space-between;
}
.card-light .bento-content h3 { color: var(--text-color); }
.card-light .bento-content p { color: var(--text-muted-color); }

/* Grid Spanning */
.item-large { grid-column: span 2; grid-row: span 2; }
.item-wide { grid-column: span 2; grid-row: span 1; }

.card-link-overlay { position: absolute; inset: 0; z-index: 10; cursor: pointer; }

/* =========================================
   8. MATTERPORT & MEDIA
   ========================================= */
.matterport-split {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: center;
    background: var(--surface-color);
    padding: 4rem; border-radius: var(--bento-radius);
    border: 1px solid var(--border-color);
}

.play-button-circle {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.matterport-facade:hover .play-button-circle { transform: scale(1.1); }
html.dark-mode .play-button-circle { background: rgba(30,30,30,0.95); }

/* =========================================
   9. TESTIMONIALS (Editorial Style)
   ========================================= */
.testimonial-minimal { border-top: 1px solid var(--border-color); }

.massive-quote {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 2rem;
}
.quote-author {
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted-color);
}

/* =========================================
   10. FOOTER
   ========================================= */
.minimal-footer { 
    padding: 6rem 0 2rem; 
    border-top: 1px solid var(--border-color); 
    background: var(--surface-color); 
}
.footer-grid-minimal { display: flex; justify-content: space-between; margin-bottom: 4rem; }
.footer-phone { font-family: var(--font-serif); font-size: 1.8rem; color: var(--text-color); }
.footer-nav ul { display: flex; gap: 2.5rem; }
.footer-bottom { 
    padding-top: 2rem; border-top: 1px solid var(--border-color); 
    display: flex; justify-content: space-between; 
    color: var(--text-muted-color); font-size: 0.9rem;
}

/* =========================================
   11. UTILITIES & ANIMATIONS
   ========================================= */
.reveal-wrapper { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s var(--ease-out-expo); }
.reveal-wrapper.visible { opacity: 1; transform: translateY(0); }

/* Back to Top */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem;
    width: 48px; height: 48px;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 990;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-accent); color: white; border-color: var(--primary-accent); }

/* =========================================
   12. MOBILE RESPONSIVE
   ========================================= */
.mobile-sticky-bar { display: none; } /* Hidden on desktop */
.hamburger { display: none; }

@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .item-large, .item-wide { grid-column: span 2; }
    .matterport-split { grid-template-columns: 1fr; padding: 2rem; }
}

@media (max-width: 768px) {
    /* Nav */
    .nav-minimal { padding: 0.75rem 1.25rem; border: none; background: rgba(255,255,255,0.95); box-shadow: 0 1px 0 var(--border-color); border-radius: 0; }
    html.dark-mode .nav-minimal { background: rgba(0,0,0,0.95); }
    
    .nav-links {
        position: fixed; top: 0; right: 0; height: 100vh; width: 100%;
        background: var(--background-color);
        flex-direction: column; justify-content: center;
        transform: translateY(-100%); transition: transform 0.5s var(--ease-out-expo);
        z-index: 999;
    }
    .nav-links.active { transform: translateY(0); }
    .nav-links a { font-size: 1.5rem; font-family: var(--font-serif); }
    .hamburger { display: flex; z-index: 1001; }

    /* Bento Grid */
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 300px; gap: 16px; margin-top: 2rem; }
    .item-large, .item-wide { grid-column: span 1; grid-row: span 1; }
    
    /* Footer & Sticky Bar */
    .footer-grid-minimal { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-nav ul { flex-direction: column; gap: 1rem; }
    .main-footer { padding-bottom: 7rem; } /* Space for sticky bar */

    /* Sticky Action Bar */
    .mobile-sticky-bar {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        padding: 16px 20px; z-index: 2000; border-top: 1px solid var(--border-color);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    }
    html.dark-mode .mobile-sticky-bar { background: rgba(20,20,20,0.9); }
    
    .sticky-btn {
        width: 100%; padding: 14px;
        border-radius: 99px;
        background: var(--primary-accent); color: white;
        display: flex; justify-content: center; gap: 8px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(196, 112, 79, 0.4);
    }
    
    .back-to-top { bottom: 5.5rem; right: 1.5rem; }
}