/* 
    SMILE FIRST DENTAL CARE - Premium Design System
    Inspired by: https://dental-care.framer.website/
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #1BA2BB;
    --primary-dark: #158599;
    --primary-light: #e8f6f8;
    --text-main: #111827;
    --text-muted: #4B5563;
    --bg-white: #FFFFFF;
    --bg-alt: #F9FAFB;
    --white: #FFFFFF;
    --black: #000000;
    
    --font-serif: 'Noto Serif', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 4px; /* Minimal border radius for medical precision */
    --container-max-width: 1200px;
    
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
}

p {
    font-family: var(--font-sans);
    color: var(--text-muted);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(27, 162, 187, 0.2);
}

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

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Navigation */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0 2rem;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 70px;
}

.container.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: auto;
    gap: 1rem;
}

.logo img {
    height: 50px;
    width: auto;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.brand-name {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.1;
}

.brand-caption {
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--primary);
    font-size: 0.75rem;
    line-height: 1;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

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

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-cta .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-cta .btn-outline {
    border: 2px solid var(--primary);
}

.nav-cta .btn-primary {
    min-width: 120px;
}

.nav-cta .btn-outline {
    min-width: 100px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 15px;
    margin-right: -15px;
    background: transparent;
    border: none;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--bg-alt);
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 4rem;
    overflow: hidden;
}

.hero-content {
    flex: 1.2;
    z-index: 2;
    max-width: 650px;
    padding-right: 2rem;
}

.hero h1 {
    font-size: 3.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: var(--text-muted);
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hero-btns .btn {
    min-width: 200px;
}

.hero-image {
    flex: 1;
    height: 500px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 20px 20px 0 var(--primary-light);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.hero-image:hover img {
    transform: scale(1.05);
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    padding: 2rem;
    transition: var(--transition);
    display: none; /* Absolute fix for layout overflow */
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.mobile-drawer.active {
    display: flex;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.drawer-header .logo img {
    height: 40px;
}

.close-drawer {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-links {
    list-style: none;
    margin-bottom: 3rem;
}

.mobile-links li {
    margin-bottom: 1.5rem;
}

.mobile-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-serif);
}

.drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Gallery - Mobile Rule: Responsive grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 999;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.contact-card {
    flex: 1;
    min-width: 320px;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-map {
    flex: 1.5;
    min-width: 320px;
    height: auto;
    min-height: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-icon {
    background: var(--primary-light);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.info-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.info-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.social-connect {
    border-top: 1px solid #f1f1f1;
    padding-top: 2rem;
    text-align: center;
}

.social-connect h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(27, 162, 187, 0.3);
}

/* Section Overrides from Inline */
.trust-bar {
    background-color: var(--primary);
    color: white;
    padding: 4rem 0;
}

.trust-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-alt);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 20px 20px 0 var(--primary);
}

.about-text {
    flex: 1;
    min-width: 280px;
}

.about-subtitle {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

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

.about-features div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-features i {
    color: var(--primary);
}

/* Animations */
section, .service-card, .testimonial-card, .gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Card Hover Effects */
.service-card:hover, .testimonial-card:hover, .contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

/* Hero Container Fix */
.hero .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

/* Responsive */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
        margin-left: auto;
    }
    
    .hero-image {
        min-width: auto;
        height: 400px;
    }
    
    .hero {
        padding-top: 120px;
    }
}

@media (max-width: 768px) {
    .nav-cta {
        display: none; /* Hide desktop CTA on mobile */
    }
    
    header {
        padding: 0 1.25rem;
    }

    header.scrolled {
        height: 65px;
    }

    .hero .container {
        flex-direction: column !important;
        padding-top: 100px !important; /* Fixed offset from 80px header */
        padding-bottom: 40px;
        text-align: center;
        width: 100%;
        overflow: hidden;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .hero {
        min-height: auto !important;
        padding-top: 0 !important;
    }

    .hero-content {
        margin-top: 0 !important;
        padding-right: 0;
        margin-bottom: 2.5rem;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.15rem;
        line-height: 1.2;
        margin-bottom: 1.25rem;
        word-break: break-word;
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-btns .btn {
        width: 100%;
        min-width: unset;
    }

    .hero-image {
        width: 100%;
        height: 250px;
        box-shadow: 10px 10px 0 var(--primary-light);
    }

    section {
        padding: 50px 0;
        overflow-x: hidden;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 1.25rem;
        max-width: 100vw;
    }

    .about-container {
        gap: 2rem;
    }

    .trust-bar .container {
        gap: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }

    .contact-card {
        padding: 2rem 1rem;
    }
    
    .contact-wrapper {
        gap: 1.5rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .trust-bar .stat-item h3 {
        font-size: 2.25rem;
    }
}
