/* The Chiro Rehab - Homepage layout refinements
   Load this file AFTER assets/style.css and the page's existing inline styles. */

:root {
    --chiro-ink: #123e49;
    --chiro-deep: #092c35;
    --chiro-teal: #16818a;
    --chiro-mint: #9de2db;
    --chiro-paper: #f2f8f7;
    --chiro-muted: #647b80;
}

/* Compact page rhythm: reduce unnecessary empty gaps */
.section {
    padding-top: clamp(38px, 4.2vw, 62px) !important;
    padding-bottom: clamp(38px, 4.2vw, 62px) !important;
}
.sectionhead {
    margin: 0 auto 25px !important;
}
.sectionhead h2,
.why-intro h2 {
    margin-top: 6px !important;
    margin-bottom: 9px !important;
}
.sectionhead p,
.why-intro > p {
    line-height: 1.65 !important;
}
.services-intro {
    margin-top: 0 !important;
    margin-bottom: 22px !important;
}
.services-intro > p {
    margin-bottom: 17px !important;
    line-height: 1.7 !important;
}
.aboutgrid,
.whygrid,
.appointgrid,
.contactgrid {
    gap: clamp(22px, 3.6vw, 48px) !important;
}
.gallerygrid,
.testimonialgrid {
    gap: 13px !important;
}
.why-intro {
    margin-bottom: 27px !important;
}
.why-point-card {
    min-height: 0 !important;
    padding: 16px !important;
}

/* Consistent section heading treatment */
.sectionhead,
.why-intro {
    position: relative;
}
.sectionhead .eyebrow,
.why-intro .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.sectionhead .eyebrow:before,
.sectionhead .eyebrow:after,
.why-intro .eyebrow:before,
.why-intro .eyebrow:after {
    content: "";
    display: inline-block;
    width: 22px;
    height: 2px;
    border-radius: 5px;
    background: currentColor;
    opacity: .65;
}

/* Dark speciality area and patient feedback carousel */
.speciality {
    padding-top: clamp(42px, 4.6vw, 64px) !important;
    padding-bottom: clamp(42px, 4.6vw, 64px) !important;
    background: linear-gradient(135deg, #092c35 0%, #123e49 58%, #17636b 100%) !important;
}
.speciality .sectionhead {
    margin-bottom: 25px !important;
}
.patient-feedback {
    margin-top: 30px !important;
    padding-top: 27px !important;
    border-top: 1px solid rgba(255,255,255,.18);
}
.feedback-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 17px;
}
.feedback-heading h2 {
    color: #fff !important;
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3vw, 36px);
    margin: 5px 0 6px !important;
}
.feedback-heading p {
    color: rgba(255,255,255,.74);
    margin: 0;
    font-size: 14px;
}
.feedback-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.feedback-controls button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 50%;
    background: rgba(255,255,255,.09);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}
.feedback-controls button:hover {
    background: var(--chiro-mint);
    border-color: var(--chiro-mint);
    color: var(--chiro-deep);
}
.feedback-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 28px) / 3);
    gap: 14px;
    overflow-x: auto;
    padding: 3px 2px 13px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.35) transparent;
}
.feedback-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 210px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.10);
    scroll-snap-align: start;
}
.feedback-stars {
    color: #ffd27a;
    letter-spacing: 3px;
    font-size: 14px;
}
.feedback-quote {
    position: absolute;
    right: 18px;
    top: 12px;
    color: rgba(255,255,255,.18);
    font: 64px/1 Georgia, serif;
}
.feedback-card p {
    color: rgba(255,255,255,.88);
    font-size: 13px;
    line-height: 1.7;
    margin: 12px 0 17px;
}
.feedback-person {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: #fff;
    font-size: 14px;
}
.feedback-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--chiro-mint);
    color: var(--chiro-deep);
    font-weight: 700;
}

/* Contact details panel: dark colour treatment beside the map */
.contact.section {
    padding-top: 42px !important;
    padding-bottom: 42px !important;
    background: linear-gradient(135deg, #eaf3f1, #f5f9f8) !important;
}
.contactgrid {
    align-items: stretch;
    gap: 20px !important;
}
.contact-info-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(24px, 3vw, 38px) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 18px !important;
    color: #fff !important;
    background: linear-gradient(145deg, #082a33 0%, #123e49 58%, #17636b 100%) !important;
    box-shadow: 0 16px 38px rgba(8,42,51,.2) !important;
}
.contact-info-panel:after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 270px;
    height: 270px;
    right: -150px;
    bottom: -150px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 50px rgba(255,255,255,.02);
}
.contact-info-panel h2 {
    color: #fff !important;
}
.contact-info-panel p {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.82) !important;
    padding: 11px 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.13);
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.contact-info-panel p:last-of-type {
    border-bottom: 0;
}
.contact-info-panel a {
    color: #b8eee5 !important;
}
.contact-info-panel .textlink {
    display: inline-flex;
    margin-top: 14px;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    color: #fff !important;
    text-decoration: none;
}
.contact-info-panel .textlink:hover {
    background: rgba(255,255,255,.1);
}
.mapbox {
    min-height: 350px;
    overflow: hidden;
    border: 1px solid rgba(18,62,73,.12);
    border-radius: 18px;
    background: #123e49;
    box-shadow: 0 12px 32px rgba(18,62,73,.13);
}
.mapbox iframe {
    display: block;
    width: 100%;
    min-height: 350px;
    height: 100%;
    border: 0;
}
.mapplaceholder {
    min-height: 350px;
    display: grid;
    place-items: center;
    padding: 25px;
    color: #fff;
    text-align: center;
    background: linear-gradient(145deg, #123e49, #17636b);
}

/* Mobile and tablet */
@media (max-width: 900px) {
    .feedback-track {
        grid-auto-columns: calc((100% - 14px) / 2);
    }
}
@media (max-width: 600px) {
    .section {
        padding-top: 34px !important;
        padding-bottom: 34px !important;
    }
    .sectionhead {
        margin-bottom: 20px !important;
    }
    .feedback-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .feedback-track {
        grid-auto-columns: 88%;
    }
    .feedback-card {
        min-height: 190px;
        padding: 17px;
    }
    .patient-feedback {
        margin-top: 24px !important;
        padding-top: 22px !important;
    }
    .contactgrid {
        gap: 14px !important;
    }
    .contact-info-panel {
        padding: 22px !important;
    }
    .mapbox,
    .mapbox iframe,
    .mapplaceholder {
        min-height: 280px;
    }
}
