/* ========================================
   Elite Spinal Chiropractic - Styles
   Neutral color palette with subtle teal accents
   ======================================== */

:root {
    --primary: #5a9a94;
    --primary-dark: #3d7a75;
    --primary-light: #f0f5f4;
    --accent: #7ab5af;
    --navy: #2c3e50;
    --text: #3a3a3a;
    --text-light: #6b6b6b;
    --white: #ffffff;
    --off-white: #faf9f7;
    --cream: #f5f3f0;
    --gray-light: #e8e6e3;
    --warm-gray: #9a9590;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.10);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-sub {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: var(--navy);
    letter-spacing: 1px;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text);
}

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

.nav-phone {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
}

.nav-phone:hover {
    background: var(--primary-dark);
}

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

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #5a9a94 0%, #3d6b66 50%, #2c3e50 100%);
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 400'%3E%3Cpath d='M50 20 Q60 50 50 80 Q40 110 50 140 Q60 170 50 200 Q40 230 50 260 Q60 290 50 320 Q40 350 50 380' stroke='rgba(255,255,255,0.1)' stroke-width='8' fill='none'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

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

.about-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--gray-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.dr-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.about-text .subtitle {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.about-text .btn {
    margin-top: 16px;
}

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

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 60px;
}

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

.service-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-light);
}

/* Service Categories & Pricing */
.service-category {
    margin-bottom: 48px;
}

.category-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.category-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.price-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.price-info {
    display: flex;
    flex-direction: column;
}

.service-name {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.price {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    margin-left: 16px;
}

/* Why Us Section */
.why-us {
    padding: 100px 0;
    background: #3a4a5c;
    color: var(--white);
}

.why-us h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 60px;
}

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

.feature {
    text-align: center;
}

.feature-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.5;
    display: block;
    margin-bottom: 16px;
}

.feature h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature p {
    opacity: 0.8;
}

/* Patient Reviews */
.reviews {
    padding: 100px 0;
    background: var(--cream);
}

.reviews h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.reviews-rating {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reviews-rating-text {
    color: var(--text-light);
    font-size: 1rem;
}

.stars {
    color: #e8b04b;
    letter-spacing: 2px;
    font-size: 1.1rem;
    line-height: 1;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.review {
    background: var(--white);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.review p {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.7;
    flex-grow: 1;
}

.review cite {
    font-style: normal;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

/* Our Office */
.office {
    padding: 100px 0;
    background: var(--off-white);
}

.office h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.office-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 620px;
    margin: 0 auto 48px;
}

/* 6-column base so a row can hold either 3 portraits (span 2)
   or 2 landscapes (span 3) without leaving a gap */
.office-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.office-item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.office-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.office-item img {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* portrait photos - narrower cell, taller crop */
.office-item-tall {
    grid-column: span 2;
}

.office-item-tall img {
    height: 340px;
}

/* subject sits high in frame - trim from the bottom, not evenly */
.office-item img.pos-high {
    object-position: center 25%;
}

/* landscape photos - wider cell, shorter crop */
.office-item-wide {
    grid-column: span 3;
}

.office-item-wide img {
    height: 300px;
}

.office-item figcaption {
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 32px;
}

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

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--navy);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.contact-item a {
    color: var(--primary);
}

.contact-item a:hover {
    color: var(--primary-dark);
}

.hours-list p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.book-online-wrapper {
    background: var(--primary);
    padding: 48px 40px;
    border-radius: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.book-online-wrapper h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 12px;
}

.book-online-wrapper p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.2rem;
}

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

.book-online-wrapper .btn-primary:hover {
    background: var(--navy);
    color: var(--white);
}

.social-links {
    margin-top: 32px;
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
}

.contact-form-wrapper {
    background: var(--off-white);
    padding: 40px;
    border-radius: 20px;
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Map */
.map {
    width: 100%;
    background: var(--gray-light);
}

.map iframe {
    display: block;
}

/* Footer */
.footer {
    background: var(--navy);
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand .logo-sub {
    color: var(--accent);
}

.footer-brand p {
    margin-top: 8px;
    opacity: 0.6;
}

.footer-logo {
    height: 60px;
    width: auto;
    background: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    opacity: 0.6;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* 2-up: every tile spans half of the 6-col base */
    .office-item-tall,
    .office-item-wide {
        grid-column: span 3;
    }

    .office-item-tall img,
    .office-item-wide img {
        height: 280px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    /* without wrapping, the 6-link row forced ~789px of sideways
       scroll on the whole page at phone widths */
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .review-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* single column: every tile spans the full 6-col base */
    .office-item-tall,
    .office-item-wide {
        grid-column: span 6;
    }

    .office-item-tall img,
    .office-item-wide img {
        height: 260px;
    }

    .reviews h2,
    .office h2 {
        font-size: 2rem;
    }
}

/* ============================================
   Inline links and category-level "Learn more"
   ============================================ */
.text-link,
.inline-link,
.category-link {
    color: var(--primary, #2c5e6e);
    text-decoration: none;
    font-weight: 500;
}
.text-link:hover,
.inline-link:hover,
.category-link:hover {
    text-decoration: underline;
}
.category-title .category-link {
    font-size: 0.7em;
    font-weight: 500;
    margin-left: 12px;
    white-space: nowrap;
}
.service-name .inline-link {
    font-size: 0.85em;
    margin-left: 8px;
    white-space: nowrap;
}

/* ============================================
   Informational sub-pages (techniques, light-therapy,
   foot-detox, ultrasound, massage, faq)
   ============================================ */
.info-page {
    padding: 120px 0 80px;
    background: #fafafa;
}
.info-page .container {
    max-width: 860px;
}
.info-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: var(--navy, #1a3a4a);
    margin-bottom: 12px;
}
.info-page .lead {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.6;
}
.info-page h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--navy, #1a3a4a);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary, #2c5e6e);
}
.info-page h3 {
    font-size: 1.2rem;
    color: var(--navy, #1a3a4a);
    margin-top: 28px;
    margin-bottom: 10px;
}
.info-page p {
    line-height: 1.7;
    color: #333;
    margin-bottom: 14px;
}
.info-page ul,
.info-page ol {
    line-height: 1.7;
    color: #333;
    margin: 12px 0 18px 22px;
}
.info-page li {
    margin-bottom: 6px;
}

/* Image blocks on info pages */
.info-figure {
    margin: 24px 0;
    text-align: center;
}
.info-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.info-figure figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}
.info-figure-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}
@media (max-width: 640px) {
    .info-figure-pair {
        grid-template-columns: 1fr;
    }
}

/* Color swatches for light therapy wavelengths */
.wavelength-list {
    list-style: none;
    margin-left: 0;
    padding: 0;
}
.wavelength-list li {
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border-left: 6px solid #ccc;
}
.wavelength-list li.red    { border-left-color: #d83a3a; }
.wavelength-list li.yellow { border-left-color: #f4c430; }
.wavelength-list li.green  { border-left-color: #4cae4c; }
.wavelength-list li.cyan   { border-left-color: #00bcd4; }
.wavelength-list li.white  { border-left-color: #e0e0e0; background: #fafafa; }
.wavelength-list li.purple { border-left-color: #8e44ad; }
.wavelength-list li.blue   { border-left-color: #2c5e9e; }
.wavelength-list strong {
    display: inline-block;
    min-width: 130px;
}

/* Protocol blocks on foot detox page */
.protocol-block {
    background: #fff;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.protocol-block h3 {
    margin-top: 0;
    color: var(--primary, #2c5e6e);
}

/* FAQ page */
.faq-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.faq-item h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.25rem;
}

/* Massage page contact-card */
.contact-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 30px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.contact-card a { color: var(--primary, #2c5e6e); }

/* Back-to-home link */
.back-home {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary, #2c5e6e);
    text-decoration: none;
    font-weight: 500;
}
.back-home:hover { text-decoration: underline; }

/* Responsive figure portrait sizing */
.info-figure.portrait img {
    max-width: 360px;
}
