/* CheckMate refresh, September 2026.
   Light polish layered on top of styles.css. The original layout, colours and
   texts are unchanged; delete this file to return to the previous look. */

/* ---------- Global ---------- */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 110px; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Header stays reachable while scrolling */
.header {
    position: sticky;
    top: 12px;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(2, 12, 27, 0.06);
}

/* Dead mobile background (file never existed); the <img> already shows the hands */
.why-us-image-container { background-image: none !important; }

/* ---------- Desktop and tablet ---------- */
@media (min-width: 768px) {

    /* Hero: the portrait now sits under the wordmark, so the K stays visible */
    .hero-title { margin-bottom: 28px; }

    .hero-content-box {
        height: auto;
        min-height: 440px;
    }

    .hero-doctor-container {
        width: min(460px, 42%);
        height: auto;
        bottom: 0;
    }

    .hero-doctor-image {
        display: block;
        width: 100%;
        height: auto;
    }

    .hero-left-content { top: 0; }

    .hero-description { line-height: 1.45; }

    .hero-right-content {
        top: 50%;
        transform: translateY(-50%);
    }

    /* Services: clearer call to action and a soft lift on hover */
    .service-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .service-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(2, 12, 27, 0.08);
    }

    .service-book {
        color: var(--color-primary);
        font-weight: 600;
        text-decoration: none;
    }

    .service-book::after {
        content: " \2192";
        display: inline-block;
        transition: transform 0.2s ease;
    }

    .service-book:hover::after { transform: translateX(4px); }

    /* About: both columns read left to right and the two photos line up */
    .about-text-dr { text-align: left; }

    .about-left,
    .about-right {
        display: flex;
        flex-direction: column;
    }

    .about-clinic-image-container,
    .about-doctor-image-container { margin-top: auto; }

    /* Booking: intro text centred against the form instead of floating at the top */
    .booking-content { align-self: center; }

    /* Testimonials: same lift as the service cards */
    .testimonial-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .testimonial-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(2, 12, 27, 0.08);
    }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {

    /* Big section titles fit the screen instead of being cut off */
    .services-title-container .section-title::before,
    .beauty-left::before,
    .testimonials-section::before {
        font-size: clamp(34px, 11vw, 52px);
    }

    .services-title-container .section-title .text-green {
        font-size: clamp(34px, 11vw, 52px) !important; /* original rule uses !important */
        line-height: 1.2;
    }

    /* Before and after slider stays inside the page margins */
    .before-after-main,
    .before-after {
        max-width: 100%;
    }

    /* Testimonials: swipeable cards, next card peeks in, no cut-off text */
    .testimonials-grid {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .testimonial-card {
        flex: 0 0 84%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 170px;
        padding: 16px 18px 24px;
        scroll-snap-align: start;
    }
}

/* ---------- Tablet (768 to 1024) ---------- */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-links { gap: 20px; }
    .nav-link { font-size: 16px; white-space: nowrap; }
    .nav-cta { white-space: nowrap; font-size: 15px; padding: 10px 16px; }
    .logo-icon { width: 170px; }

    .hero-content-box { padding-top: 40px; }
    .hero-doctor-container { width: min(360px, 38%); }
}

/* ---------- Refresh 2: icons, question panel, logo consistency ---------- */

/* Service icons: one consistent line style in the brand teal */
.service-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #E7F2F2;
    color: var(--color-primary);
    margin-bottom: var(--spacing-4);
}

/* Footer uses the same logo lockup as the header, in white */
.footer-logo {
    display: block;
    width: 190px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Booking form: service choice matches the other fields */
.form-field select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-small);
    border: 1px solid var(--color-gray-200);
    font-size: var(--font-size-base);
    font-family: inherit;
    color: inherit;
    background-color: var(--color-white);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(19, 119, 123, 0.15);
}

.field-optional { font-weight: 400; color: var(--color-gray-500, #8a8a8a); }

/* Hero question card: direct contact options */
.question-card-contacts {
    width: 219px;
    height: 113px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--color-white);
    border-radius: var(--radius-small);
    padding: 0 10px;
}

.qc-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.qc-link svg {
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 50%;
    background: #E7F2F2;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.qc-link:hover svg,
.qc-link:focus-visible svg {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Question popup: clinic-owned contact panel */
.deftform-modal .deftform,
.qa-panel {
    overflow: auto;
}

.qa-panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 26px 24px 20px;
    font-family: var(--font-family);
}

.qa-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-black);
    margin: 0 28px 6px 0;
}

.qa-intro {
    font-size: 14px;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0 0 16px;
}

.qa-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.qa-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border: 1px solid #DCE9E9;
    border-radius: 10px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.qa-action:hover,
.qa-action:focus-visible {
    background: #E7F2F2;
    border-color: var(--color-primary);
}

.qa-form {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #EEE;
    padding-top: 14px;
}

.qa-label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin: 8px 0 4px;
}

.qa-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #DADADA;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
}

.qa-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(19, 119, 123, 0.15);
}

.qa-submit {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
}

.qa-status { font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.qa-status.success { color: var(--color-primary); }
.qa-status.error { color: #B3261E; }

.qa-hours {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin: 12px 0 0;
}

@media (max-width: 767px) {
    .service-icon-svg { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 12px; }
    .footer-logo { width: 160px; }
    .qa-panel { padding: 22px 18px 16px; }
}

@media (max-width: 767px) {
    /* Question popup sits centred and scrolls inside the screen on phones */
    #deftform-wrapper[aria-hidden="false"] { align-items: center; justify-content: center; padding: 16px; }
    #deftform-wrapper .deftform-modal { width: 100%; height: auto; left: auto; right: auto; bottom: auto; top: auto; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
}

/* ---------- Refresh 3 (September 2026) ---------- */

/* About: the clinic sign fills its frame without being squashed */
.about-clinic-image {
    object-fit: cover;
    object-position: center;
    background: #2f8f92;
}

/* STI card: small "Immediate results" badge */
.service-card { position: relative; }

.service-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #E7F2F2;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.service-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* About: welcome video, opened from the clinic sign photo */
.about-clinic-image-container { position: relative; }

.about-video-btn {
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f2d33;
    font: 600 15px/1.2 "Poppins", sans-serif;
    box-shadow: 0 8px 24px rgba(2, 12, 27, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(2, 12, 27, 0.2);
}

.about-video-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    padding-left: 2px;
}

.about-video-time {
    margin-left: 4px;
    font-weight: 400;
    color: #5b6b70;
}

.video-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #fff;
    overflow: visible;
    box-shadow: 0 24px 60px rgba(2, 12, 27, 0.35);
}

.video-dialog::backdrop { background: rgba(2, 12, 27, 0.72); }

.video-stage {
    position: relative;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    background: #000;
}

.video-dialog-player {
    display: block;
    height: min(72vh, 660px);
    height: min(72dvh, 660px);
    width: auto;
    max-width: calc(100vw - 32px);
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: #000;
}

/* End screen: replay or continue on Instagram */
.video-end {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    background: rgba(8, 44, 48, 0.82);
    color: #fff;
    text-align: center;
}

.video-end[hidden] { display: none; }

.video-end-title {
    margin: 0 0 4px;
    font: 600 20px/1.3 "Poppins", sans-serif;
}

.video-end-ig,
.video-end-replay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: min(220px, 100%);
    padding: 12px 22px;
    white-space: nowrap;
    border-radius: 999px;
    font: 600 15px/1.2 "Poppins", sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.video-end-ig {
    background: #fff;
    color: #0f2d33;
    border: 0;
}

.video-end-replay {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.video-end-ig:hover { background: #E7F2F2; }
.video-end-replay:hover { background: rgba(255, 255, 255, 0.12); }

/* Instagram bar under the video */
.video-ig-bar {
    box-sizing: border-box;
    width: 0;          /* never wider than the video above it */
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 0 0 18px 18px;
    background: #fff;
    color: #0f2d33;
    text-decoration: none;
}

.video-ig-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(45deg, #f9a13a 0%, #e1306c 50%, #833ab4 100%);
}

.video-ig-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font: 400 13px/1.3 "Poppins", sans-serif;
    color: #5b6b70;
}

.video-ig-text > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-ig-text strong {
    font-size: 15px;
    font-weight: 600;
    color: #0f2d33;
}

.video-ig-follow {
    margin-left: auto;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font: 600 14px/1.2 "Poppins", sans-serif;
    transition: background 0.2s ease;
}

.video-ig-bar:hover .video-ig-follow { background: #0b5f60; }

.video-dialog-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #0f2d33;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(2, 12, 27, 0.25);
    z-index: 2;
}

@media (max-width: 767px) {
    .about-video-btn { left: 12px; bottom: 12px; font-size: 13px; padding: 6px 12px 6px 6px; }
    .about-video-play { width: 30px; height: 30px; }
    .video-dialog-close { top: 8px; right: 8px; }
    .video-dialog-player { height: min(calc(100vh - 150px), 620px); height: min(calc(100dvh - 150px), 620px); }
}

@media (max-width: 400px) {
    .video-ig-bar { gap: 10px; padding: 10px 12px; }
    .video-ig-icon { width: 34px; height: 34px; border-radius: 10px; }
    .video-ig-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .video-ig-text > span { display: none; }
    .video-ig-follow { padding: 7px 13px; font-size: 13px; }
    .video-end-ig, .video-end-replay { padding: 11px 16px; font-size: 14px; }
}
