/* =========================================
   RAJESH DENTAL CLINIC - PREMIUM CSS
   ========================================= */

/* --- 1. CSS VARIABLES (DESIGN SYSTEM) --- */
:root {
    /* Colors */
    --primary: #0077b6; /* Deep professional blue */
    --primary-light: #caf0f8;
    --primary-dark: #03045e;
    --accent: #ffb703; /* Gold/Yellow for badges/stars */
    
    --bg-main: #ffffff;
    --bg-light: #f8f9fa;
    --bg-overlay: rgba(255, 255, 255, 0.85);
    
    --text-main: #2b2d42;
    --text-muted: #6c757d;
    --text-light: #ffffff;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --padding-section: clamp(4rem, 8vw, 6rem);
    --container-width: 1200px;
    --gap-base: 2rem;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 25px 30px -5px rgba(0, 119, 182, 0.15);
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* Zero horizontal scroll */
}

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

h1, h2, h3, h4, .logo-title {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

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

/* --- 3. UTILITIES --- */
.container {
    width: 90%;
    margin: 0 auto;
    max-width: var(--container-width);
}

.section-padding {
    padding: var(--padding-section) 0;
}

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

.text-center { text-align: center; }
.text-primary { color: var(--primary) !important; }
.font-medium { font-weight: 500; }
.ml-2 { margin-left: 0.5rem; }
.mt-4 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-700 { max-width: 700px; }
.img-fluid { width: 100%; object-fit: cover; }
.rounded-premium { border-radius: var(--radius-lg); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* --- 4. COMPONENTS --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 50px; /* Pill shape */
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 119, 182, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

/* Section Headers */
.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1.25rem;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- 5. HEADER & NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-slow);
    padding: 1.5rem 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

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

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    font-size: 1rem;
}

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

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

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

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 3px;
    transition: var(--transition-base);
}

.menu-toggle.active .hamburger-line:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.menu-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* --- 6. HERO SECTION --- */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1.5rem 0;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.trust-badge i { color: var(--accent); font-size: 1.2rem; }

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    gap: 2rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.hero-meta i {
    color: var(--primary);
    margin-right: 0.25rem;
}

.hero-image {
    position: relative;
    padding-right: 2rem;
}

.hero-image img { aspect-ratio: 4/5; object-position: center; }

.experience-badge {
    position: absolute;
    bottom: -2rem;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 6px solid white;
    text-align: center;
}

.exp-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.exp-text {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- 7. TRUST BAR --- */
.trust-bar { padding: 3rem 0; }
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.trust-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.trust-item i { font-size: 2.5rem; }
.trust-info h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.trust-info p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* --- 8. ABOUT SECTION --- */
.about-images { position: relative; padding-bottom: 4rem; padding-right: 2rem; }
.img-main { border-radius: var(--radius-lg); aspect-ratio: 1; }
.img-overlap {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55%;
    border-radius: var(--radius-md);
    border: 8px solid white;
}

.about-features { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}
.feature-item i { font-size: 1.5rem; background: var(--primary-light); padding: 0.5rem; border-radius: 50%; }

/* --- 9. SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

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

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-title { font-size: 1.25rem; margin-bottom: 1rem; }
.service-desc { color: var(--text-muted); margin-bottom: 1.5rem; }

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}
.service-link i { transition: var(--transition-fast); }
.service-link:hover i { transform: translateX(5px); }

/* --- 10. REVIEWS SECTION --- */
.rating-overall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--accent);
    font-size: 1.25rem;
    margin-top: 1rem;
}

.rating-overall span { color: var(--text-main); font-size: 1rem; }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.review-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    position: relative;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.review-stars { color: var(--accent); font-size: 0.9rem; }
.review-body { font-style: italic; color: var(--text-muted); line-height: 1.7; }

/* --- 11. GALLERY SECTION --- */
.gallery-grid {
    column-count: 3;
    column-gap: 1rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: inline-block; /* Prevents breaking across columns */
    width: 100%;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 119, 182, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: var(--transition-base);
}

.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay i { transform: scale(1); }

/* --- 12. CTA BANNER --- */
.cta-banner {
    padding: 6rem 0;
    background: var(--primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.cta-banner h2 { color: white; margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3rem); }
.cta-banner p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }
.cta-banner .btn-primary { background: white; color: var(--primary); }
.cta-banner .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* --- 13. FOOTER --- */
/* --- 12.5. CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: stretch;
}

.contact-details {
    background: var(--bg-light);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.contact-details .contact-info li {
    margin-bottom: 2rem;
}
.contact-details .contact-info li:last-child {
    margin-bottom: 0;
}
.contact-details .contact-info p {
    color: var(--text-muted);
}
.contact-map {
    height: 100%;
}
.contact-map iframe {
    height: 100% !important;
    min-height: 350px;
}
.footer {
    background: #0b132b;
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem;
}

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

.footer-logo .logo-title { color: white; margin-left: 0.5rem; }
.footer-logo i { background: transparent; padding: 0; }
.footer-desc { margin: 1.5rem 0; max-width: 300px; }

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

.footer-heading {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.footer-links a:hover { color: white; padding-left: 5px; }

.contact-info { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info i { color: var(--accent); font-size: 1.25rem; margin-top: 3px; }

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

/* --- 14. FLOATING WA --- */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 100;
    transition: var(--transition-base);
    animation: pulse 2s infinite;
}

.floating-wa:hover { transform: scale(1.1); }

/* --- 15. ANIMATIONS (Scroll Reveals via JS classes) --- */
.reveal-up { opacity: 0; transform: translateY(40px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }

.reveal-up.active, .reveal-scale.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.bounce { animation: bounce 4s infinite ease-in-out; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-15px) translateX(5px); }
}
.float-animation { animation: float 6s infinite ease-in-out; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- 16. RESPONSIVE DESIGN --- */

/* Tablet Optimization (1024px and below) */
@media (max-width: 1024px) {
    .container { width: 95%; }
    .grid-2-col { gap: 2rem; }
    
    .hero { padding-top: 7rem; }
    
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-item:nth-child(3) { grid-column: span 2; justify-self: center; }
    
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .review-card:nth-child(3) { display: none; /* Hide 3rd on tablet array for balance */ }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-col:nth-child(3) { grid-column: span 2; }
    
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-map iframe { min-height: 300px; }

    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 350px;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: var(--transition-slow);
        padding: 2rem;
    }
    
    .nav-links.active { right: 0; }
    .nav-link { font-size: 1.25rem; }
}

/* Mobile First Adjustments (768px and below) */
@media (max-width: 768px) {
    .grid-2-col { grid-template-columns: 1fr; }
    
    .hero { text-align: center; }
    .hero-actions { justify-content: center; flex-direction: column; }
    .hero-meta { justify-content: center; flex-direction: column; gap: 0.5rem; }
    .hero-image { padding-right: 0; margin-top: 2rem; }
    .experience-badge { right: auto; left: 50%; transform: translateX(-50%); bottom: -1rem; width: 110px; height: 110px; }
    .exp-number { font-size: 2rem; }
    .exp-text { font-size: 0.7rem; }
    
    .trust-grid { grid-template-columns: 1fr; }
    .trust-item:nth-child(3) { grid-column: span 1; }
    
    .about-images { padding-right: 0; }
    .img-overlap { width: 65%; transform: translateX(-20px); }
    
    .services-grid { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
    .review-card:nth-child(3) { display: block; /* Show back on mobile stack */ }
    
    .gallery-grid { column-count: 2; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-col:nth-child(3) { grid-column: span 1; }
    
    .floating-wa { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 1.5rem; }
}

/* Very Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hero-title { font-size: 2.25rem; }
    .section-title { font-size: 1.75rem; }
    .service-card { padding: 1.5rem; }
    .btn { width: 100%; justify-content: center; }
    .gallery-grid { column-count: 1; }
}
