/* ============================================
   Family Practice Associates — Custom Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    --forest-dark: #064e3b;
    --forest-mid: #065f46;
    --forest-light: #059669;
    --forest-pale: #d1fae5;
    --forest-ultra-pale: #ecfdf5;
    --off-white: #fafaf9;
    --warm-white: #f5f5f4;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --gradient-hero-start: #064e3b;
    --gradient-hero-mid: #065f46;
    --gradient-hero-end: #0f766e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--stone-800);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Typography
   ============================================ */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--forest-light);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--stone-900);
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--stone-500);
    max-width: 600px;
    line-height: 1.7;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-header.center .section-description {
    margin: 0 auto;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--forest-dark);
    color: #fff;
    border-color: var(--forest-dark);
}

.btn-primary:hover {
    background: var(--forest-mid);
    border-color: var(--forest-mid);
}

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

.btn-outline:hover {
    background: var(--forest-dark);
    color: #fff;
}

.btn-white {
    background: #fff;
    color: var(--forest-dark);
    border-color: #fff;
}

.btn-white:hover {
    background: var(--forest-pale);
    border-color: var(--forest-pale);
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--stone-200);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

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

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--forest-dark);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--stone-900);
    line-height: 1.2;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--stone-600);
    transition: color var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--stone-700);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--off-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--stone-600);
    cursor: pointer;
    line-height: 1;
}

.mobile-menu-overlay ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mobile-menu-overlay a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--stone-700);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--forest-dark) 0%,
        var(--forest-mid) 40%,
        var(--forest-light) 70%,
        #0f766e 100%
    );
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: 
        radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, #fff 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 32px;
    backdrop-filter: blur(4px);
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 24px;
}

.hero-subheadline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-actions .btn-primary {
    background: #fff;
    color: var(--forest-dark);
    border-color: #fff;
}

.hero-actions .btn-primary:hover {
    background: var(--forest-pale);
    border-color: var(--forest-pale);
}

.hero-actions .btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.hero-actions .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

.trust-item svg {
    color: rgba(255,255,255,0.6);
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: 100px 0;
    background: var(--off-white);
}

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

.service-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    border: 1px solid var(--stone-200);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--forest-light);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--forest-ultra-pale);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--forest-dark);
    margin-bottom: 20px;
    transition: all var(--transition);
}

.service-card:hover .service-icon {
    background: var(--forest-dark);
    color: #fff;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--stone-900);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--stone-500);
    line-height: 1.7;
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 100px 0;
    background: var(--warm-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image-wrapper img {
    border-radius: var(--radius-xl);
    width: 100%;
    height: 500px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.about-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: var(--forest-pale);
    border-radius: var(--radius-xl);
    z-index: -1;
}

.about-content .section-title {
    margin-bottom: 24px;
}

.about-text {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--stone-200);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--forest-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--stone-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Patient Info Section
   ============================================ */
.patients {
    padding: 100px 0;
    background: var(--off-white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--stone-200);
    transition: all var(--transition);
}

.info-card:hover {
    border-color: var(--forest-light);
    box-shadow: var(--shadow-lg);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.info-card-header svg {
    color: var(--forest-dark);
}

.info-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--stone-900);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--stone-100);
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list li span:first-child {
    color: var(--stone-500);
    font-weight: 500;
}

.info-list li span:last-child,
.info-list li a {
    color: var(--stone-800);
    font-weight: 600;
}

.info-list a:hover {
    color: var(--forest-dark);
}

.info-address {
    font-style: normal;
    font-size: 1rem;
    color: var(--stone-700);
    line-height: 1.7;
    margin-bottom: 8px;
}

.info-note {
    font-size: 0.8125rem;
    color: var(--stone-400);
    margin-top: 8px;
}

.email-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--forest-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--forest-pale);
    text-underline-offset: 3px;
}

.email-link:hover {
    text-decoration-color: var(--forest-dark);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--forest-dark) 0%,
        var(--forest-mid) 50%,
        var(--forest-light) 100%
    );
}

.cta .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 100px 0;
    background: var(--warm-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-text {
    font-size: 1.0625rem;
    color: var(--stone-500);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    gap: 16px;
}

.contact-detail svg {
    width: 20px;
    height: 20px;
    color: var(--forest-dark);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stone-500);
    margin-bottom: 4px;
}

.contact-detail p,
.contact-detail a {
    font-size: 1rem;
    color: var(--stone-800);
    line-height: 1.6;
}

.contact-detail a:hover {
    color: var(--forest-dark);
}

/* Contact Form */
.contact-form-wrapper {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--stone-900);
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--stone-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: 12px 16px;
    border: 1.5px solid var(--stone-200);
    border-radius: var(--radius-sm);
    color: var(--stone-800);
    background: var(--off-white);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--forest-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--stone-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--forest-dark);
}

.form-success svg {
    color: var(--forest-light);
}

.form-success p {
    font-size: 1rem;
    color: var(--stone-600);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--stone-900);
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text {
    color: #fff;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4,
.footer-hours h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links ul,
.footer-hours ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.6);
}

.footer-links a:hover {
    color: #fff;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    gap: 16px;
}

.footer-hours li span:first-child {
    color: rgba(255,255,255,0.5);
}

.footer-hours li span:last-child {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 24px 0;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom a {
    color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }
    
    .hero-headline {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }
    
    .services {
        padding: 60px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .about-image-wrapper img {
        height: 300px;
    }
    
    .about-stats {
        gap: 24px;
    }
    
    .patients {
        padding: 60px 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cta {
        padding: 60px 0;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact {
        padding: 60px 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 48px 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 80px 16px 40px;
    }
    
    .service-card {
        padding: 24px 20px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
