/* ========================================
   THE JOINT CHIROPRACTIC — LIVERMORE
   Bold Editorial Design System
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-forest-dark: #1B4332;
    --color-forest-green: #2D6A4F;
    --color-forest-light: #40916C;
    --color-offwhite: #F5F0EB;
    --color-cream: #EDE8E3;
    --color-accent-gold: #D4A574;
    --color-accent-gold-light: #E8C9A0;
    --color-text-dark: #1A1A1A;
    --color-text-muted: #6B6B6B;
    --color-white: #FFFFFF;
    
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --shadow-elegant: 0 4px 40px rgba(27, 67, 50, 0.08);
    --shadow-card: 0 2px 20px rgba(27, 67, 50, 0.06);
    --shadow-hover: 0 8px 40px rgba(27, 67, 50, 0.12);
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Selection --- */
::selection {
    background: var(--color-accent-gold);
    color: var(--color-forest-dark);
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    background: rgba(27, 67, 50, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-link, .mobile-nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent-gold);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--color-white);
}

.nav-cta-btn {
    transition: var(--transition-smooth) !important;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

/* Mobile Menu */
.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu {
    animation: slideDown 0.3s ease;
}

.mobile-menu.hidden {
    display: none;
}

.mobile-nav-link {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
}

.mobile-nav-cta {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #0D2818 0%, #1B4332 30%, #2D6A4F 60%, #1B4332 100%);
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(212, 165, 116, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(45, 106, 79, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(64, 145, 108, 0.1) 0%, transparent 60%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
}

/* Decorative elements */
.hero-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-deco-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-deco-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(64, 145, 108, 0.15) 0%, transparent 70%);
    bottom: 15%;
    left: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

.hero-deco-3 {
    width: 150px;
    height: 150px;
    border: 1px solid rgba(212, 165, 116, 0.15);
    top: 30%;
    right: 10%;
    animation: spin 20s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    padding-top: 80px;
    padding-bottom: 160px;
}

.hero-badge {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Hero Stats */
.hero-stats {
    animation: fadeInUp 0.6s ease 0.6s forwards;
    opacity: 0;
}

.hero-stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========================================
   BUTTONS
   ======================================== */
.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-accent-gold);
    color: var(--color-forest-dark);
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent-gold-light), var(--color-accent-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.cta-primary:hover::before {
    opacity: 1;
}

.cta-primary span {
    position: relative;
    z-index: 1;
}

.cta-primary .cta-arrow {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.cta-primary:hover .cta-arrow {
    transform: translateX(4px);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
}

.cta-arrow-down {
    transition: transform 0.3s ease;
}

.cta-secondary:hover .cta-arrow-down {
    transform: translateY(3px);
}

/* CTA Light (for dark green backgrounds) */
.cta-cta-primary-light {
    background: var(--color-white);
    color: var(--color-forest-dark);
}

.cta-cta-primary-light::before {
    background: linear-gradient(135deg, #ffffff, #f0ebe5);
}

.cta-secondary-light {
    padding: 16px 24px;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section {
    position: relative;
}

.section-header {
    margin-bottom: 0;
}

.section-label {
    font-family: var(--font-sans);
}

.section-title {
    font-family: var(--font-serif);
}

.section-subtitle {
    font-family: var(--font-sans);
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services-section {
    background-color: var(--color-offwhite);
}

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

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.service-card-inner {
    background: var(--color-white);
    padding: 2.5rem;
    height: 100%;
    border: 1px solid rgba(27, 67, 50, 0.06);
    transition: var(--transition-smooth);
    position: relative;
}

.service-card:hover .service-card-inner {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 165, 116, 0.2);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest-green));
    border-radius: 14px;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--color-forest-green), var(--color-forest-light));
}

.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-accent-gold);
}

.service-title {
    font-family: var(--font-serif);
}

.service-desc {
    font-size: 0.95rem;
}

.service-divider {
    height: 2px;
    background: linear-gradient(to right, var(--color-accent-gold), transparent);
    border-radius: 2px;
    width: 40px;
    transition: width 0.4s ease;
}

.service-card:hover .service-divider {
    width: 80px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
    background-color: var(--color-forest-dark);
}

.about-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 165, 116, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(64, 145, 108, 0.1) 0%, transparent 50%);
}

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

.about-image-main {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
}

.about-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-image-wrapper:hover .about-image-main img {
    transform: scale(1.03);
}

.about-image-accent {
    position: absolute;
    bottom: -30px;
    right: -20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
    border: 4px solid var(--color-forest-dark);
    z-index: 2;
}

.about-image-accent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-experience-badge {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--color-accent-gold);
    color: var(--color-forest-dark);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    z-index: 2;
    box-shadow: var(--shadow-elegant);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 116, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
}

.about-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent-gold);
}

/* ========================================
   BENEFITS SECTION
   ======================================== */
.benefits-section {
    background-color: var(--color-cream);
}

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

.benefits-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-elegant);
}

.benefits-floating-card {
    position: absolute;
    bottom: 30px;
    left: -20px;
    background: var(--color-white);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.floating-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest-green));
    border-radius: 12px;
    flex-shrink: 0;
}

.floating-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent-gold);
}

.benefit-item {
    transition: var(--transition-fast);
}

.benefit-item:hover {
    transform: translateX(8px);
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonials-section {
    background-color: var(--color-offwhite);
}

.testimonials-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(27, 67, 50, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(212, 165, 116, 0.05) 0%, transparent 40%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    border-radius: 16px;
    overflow: hidden;
}

.testimonial-card-inner {
    background: var(--color-white);
    padding: 2.5rem;
    height: 100%;
    border: 1px solid rgba(27, 67, 50, 0.06);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover .testimonial-card-inner {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.testimonial-quote-icon {
    width: 40px;
    height: 40px;
    color: var(--color-accent-gold);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.testimonial-text {
    flex: 1;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(27, 67, 50, 0.08);
}

.testimonial-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-accent-gold);
}

.testimonial-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--color-forest-green) 0%, var(--color-forest-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(212, 165, 116, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 70% 50%, rgba(64, 145, 108, 0.2) 0%, transparent 60%);
}

.cta-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 33% 33%, rgba(255,255,255,0.03) 1px, transparent 1px),
        radial-gradient(circle at 67% 67%, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px, 35px 35px;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    background-color: var(--color-offwhite);
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest-green));
    border-radius: 12px;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-accent-gold);
}

/* Contact Form */
.contact-form-wrapper {
    border: 1px solid rgba(27, 67, 50, 0.08);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(27, 67, 50, 0.12);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-text-dark);
    background: var(--color-offwhite);
    transition: var(--transition-fast);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.form-input:focus {
    border-color: var(--color-forest-green);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B6B6B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

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

.form-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest-green));
    color: var(--color-white);
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.form-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-forest-green), var(--color-forest-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-submit-btn:hover::before {
    opacity: 1;
}

.form-submit-btn span,
.form-submit-btn .form-submit-arrow {
    position: relative;
    z-index: 1;
}

.form-submit-btn .form-submit-arrow {
    transition: transform 0.3s ease;
}

.form-submit-btn:hover .form-submit-arrow {
    transform: translateX(4px);
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 67, 50, 0.25);
}

/* Form Success */
.form-success {
    text-align: center;
    padding: 3rem 1rem;
    animation: fadeInUp 0.5s ease;
}

.form-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest-green));
    border-radius: 50%;
}

.form-success-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-accent-gold);
}

/* ========================================
   MAP SECTION
   ======================================== */
.map-section {
    position: relative;
}

.map-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--color-offwhite));
    pointer-events: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--color-forest-dark);
}

.footer-brand {
    transition: var(--transition-fast);
}

.footer-brand:hover {
    opacity: 0.9;
}

.footer-link {
    transition: var(--transition-fast);
}

.footer-link:hover {
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 767px) {
    .about-image-accent {
        right: 0;
        bottom: -20px;
    }
    
    .about-experience-badge {
        left: 0;
        top: -15px;
        padding: 1rem;
    }
    
    .about-experience-badge .about-exp-number {
        font-size: 2.5rem;
    }
    
    .about-experience-badge .about-exp-text {
        font-size: 0.7rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .benefits-floating-card {
        left: 10px;
        bottom: 20px;
        padding: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero-scroll-indicator {
        bottom: 130px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .about-image-accent {
        right: -10px;
        bottom: -15px;
    }
}
