/* =========================================
   VARIABLES
========================================= */

:root {
    --font-display: "Fraunces", serif;

    --nexos-red: #E21F26;
    --nexos-black: #111318;
    --nexos-white: #FFFFFF;
    --nexos-salmon: #F28B8F;
    --nexos-soft-red: #FDEBEC;

    --primary: var(--nexos-red);
    --primary-dark: var(--nexos-black);
    --secondary: var(--nexos-salmon);
    --accent: var(--nexos-red);

    --background: #FAFAFA;
    --white: var(--nexos-white);

    --text: var(--nexos-black);
    --text-light: rgba(17, 19, 24, 0.62);

    --border: rgba(17, 19, 24, 0.14);
    --success: var(--nexos-red);

    --shadow:
        0 15px 45px rgba(17, 19, 24, 0.12);

    --radius: 18px;
    --radius-small: 10px;

    --container: 1180px;
}

/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--white);
    color: var(--text);
    line-height: 1.6;
}

h1,
h2,
h3,
.hero-subtitle {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings:
        "SOFT" 0,
        "WONK" 0;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

button,
input {
    font: inherit;
}

ul[class],
ol[class] {
    list-style: none;
}

/* Oculta solo visualmente: conserva el contenido para lectores de pantalla. */
.visually-hidden,
.option input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--nexos-salmon);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* =========================================
   GLOBAL
========================================= */

.container {
    width: min(92%, var(--container));
    margin: auto;
}

.section {
    padding: 90px 0;
}

.section-light {
    background: var(--background);
}

.section-title {
    text-align: center;
    margin-bottom: 55px;
}

.section-title span {
    display: block;
    margin-bottom: 8px;

    color: var(--nexos-red);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.section-title h2 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    margin-bottom: 15px;
}

.section-title p {
    max-width: 680px;
    margin: auto;
    color: var(--text-light);
}

/* =========================================
   HEADER
========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);

    border-bottom: 1px solid var(--border);
}

.navbar {
    min-height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: var(--primary);
}

.site-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary);
}

.logo img {
    display: block;
    width: auto;
    height: 52px;
}

.logo-wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.logo-name {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 29px;
    font-weight: 300;
    letter-spacing: -1.5px;
}

.logo-name .logo-name-base {
    color: var(--text);
}

.logo-name .logo-name-accent {
    color: #22C3DF;
}

.logo-care {
    margin-top: 2px;
    padding: 2px 8px;

    background: #777777;
    border-radius: 2px;
    color: var(--white) !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-subtitle {
    margin-top: 4px;
    color: var(--text-light) !important;
    font-size: 9px;
    font-weight: 400;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.phone {
    color: var(--text);
    font-weight: 600;
}

.floating-call-cta {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 180;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 52px;
    padding: 13px 21px;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;

    background: var(--nexos-red);
    color: var(--nexos-white);
    box-shadow: 0 12px 30px rgba(17, 19, 24, 0.24);

    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    transition:
        transform 0.2s ease,
        opacity 0.18s ease,
        visibility 0.18s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.floating-call-cta.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.floating-call-cta:hover {
    transform: translateY(-2px);
    background: var(--nexos-black);
    color: var(--nexos-white);
    box-shadow: 0 15px 34px rgba(17, 19, 24, 0.32);
}

.floating-call-cta:focus-visible {
    outline: 3px solid var(--nexos-salmon);
    outline-offset: 4px;
}

.floating-call-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.floating-call-cta__label {
    line-height: 1;
}

.floating-call-cta__number {
    font-weight: 700;
    white-space: nowrap;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 14px 27px;

    border: none;
    border-radius: 10px;

    font-weight: 700;
    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--nexos-red);
    color: var(--nexos-white);

    box-shadow:
        0 10px 25px rgba(226, 31, 38, 0.25);
}

.btn-primary:hover {
    background: var(--nexos-black);
    color: var(--nexos-white);
}

/* =========================================
   HERO
========================================= */

.hero,
#evaluacion {
    background-repeat: no-repeat;
    background-size: cover;
}

.hero {
    position: relative;
    overflow: hidden;

    min-height: 680px;
    padding: 120px 0;

    display: flex;
    align-items: center;

    background-image: var(--pain-hero-image, url("images/banner-team.jpeg"));
    background-position: center 42%;
}

@media (min-width: 901px) {
    .hero {
        align-items: flex-start;
        padding-top: 65px;
        padding-bottom: 80px;
    }
}

#evaluacion {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 0;

    background-image: var(--pain-evaluation-image, url("images/image-banner-3.jpeg"));
    background-position: left center;
}

#evaluacion::before {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(250, 250, 250, 0) 0%,
        rgba(250, 250, 250, 0) 52%,
        rgba(250, 250, 250, 0.45) 76%,
        var(--background) 100%
    );
}

.evaluation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;

    background: var(--background);
}

.evaluation-layout > .section {
    min-width: 0;
}

#evaluacion-form {
    background: var(--background);
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(17, 19, 24, 0.34) 0%,
        rgba(17, 19, 24, 0.48) 45%,
        rgba(17, 19, 24, 0.94) 100%
    );
}

.hero-grid {
    position: relative;
    z-index: 2;

    width: 100%;
    padding-inline: clamp(24px, 4vw, 76px);

    display: flex;
    justify-content: flex-end;
}

.hero-content {
    width: 100%;
    max-width: 620px;
}

.hero .video-card {
    display: none;
}

.hero-label {
    display: inline-block;

    padding: 8px 14px;
    margin-bottom: 20px;

    background: rgba(242, 139, 143, 0.20);
    border: 1px solid rgba(242, 139, 143, 0.35);

    border-radius: 50px;

    color: var(--nexos-white);
    font-weight: 700;
    font-size: 14px;
}

.hero h1 {
    max-width: 700px;

    font-size: clamp(40px, 5vw, 65px);
    line-height: 1.05;
    letter-spacing: -2px;

    margin-bottom: 6px;

    color: var(--white);
}

.hero-subtitle {
    max-width: 700px;

    /* 70% of the h1 size: a 30% reduction. */
    font-size: clamp(28px, 3.5vw, 45.5px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;

    margin-bottom: 25px;

    color: var(--white);
}

.hero-description {
    max-width: 650px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 19px;
    line-height: 1.7;

    margin-bottom: 30px;
}

.hero-condition-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: stretch;
    gap: 8px;

    margin: 0 0 35px;
    padding: 0;

    list-style: none;
}

.hero-condition-card {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 50px;
    height: 100%;
    overflow: hidden;
    padding: 6px 6px;

    border: 1px solid rgba(242, 139, 143, 0.48);
    border-radius: 12px;

    background: rgba(17, 19, 24, 0.28);
    text-align: center;
}

.hero-condition-card:first-child {
    background: rgba(226, 31, 38, 0.28);
    border-color: var(--nexos-red);
}

.hero-condition-card h3 {
    width: 100%;
    max-width: 100%;
    margin: 0;

    color: var(--white);
    font-size: clamp(0.72rem, 0.8vw, 0.8rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-wrap: balance;
}

.hero-locations-title {
    margin: 24px 0 14px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.hero-locations {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-location {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 50px;
    padding: 6px;
    border: 1px solid rgba(242, 139, 143, 0.48);
    border-radius: 12px;
    background: rgba(17, 19, 24, 0.28);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.hero-location:first-child {
    background: rgba(226, 31, 38, 0.28);
    border-color: var(--nexos-red);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
    .hero-condition-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-condition-card h3 {
        font-size: 0.875rem;
        white-space: normal;
    }
}

@media (max-width: 900px) {
    .hero-locations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-location {
        font-size: 0.875rem;
    }
}

@media (max-width: 320px) {
    .hero-condition-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================
   TRUST
========================================= */

.trust-section {
    --trust-logo-width: 180px;
    --trust-logo-height: 72px;
    --trust-logo-gap: 80px;
    --trust-marquee-duration: 33s;

    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;
    padding: 32px 0;
    background:
        radial-gradient(
            circle at 18% 50%,
            rgba(226, 31, 38, 0.24) 0%,
            rgba(226, 31, 38, 0.08) 26%,
            transparent 48%
        ),
        radial-gradient(
            circle at 82% 45%,
            rgba(242, 139, 143, 0.14) 0%,
            transparent 38%
        ),
        linear-gradient(
            110deg,
            #111318 0%,
            #251114 30%,
            #64171B 55%,
            #281114 76%,
            #111318 100%
        );
}

.trust-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(226, 31, 38, 0.055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(226, 31, 38, 0.055) 1px,
            transparent 1px
        );

    background-size: 72px 72px;
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent,
        #000 18%,
        #000 82%,
        transparent
    );
    mask-image: linear-gradient(
        90deg,
        transparent,
        #000 18%,
        #000 82%,
        transparent
    );
}

.trust-section .trust-marquee-viewport {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.trust-section .trust-marquee-viewport:focus-visible {
    outline-offset: -4px;
}

.trust-section .trust-marquee-track {
    display: flex;
    width: max-content;
    /* Cada grupo cubre, como mínimo, la franja completa incluso en pantallas amplias. */
    min-width: 200%;
    animation: trust-logo-marquee var(--trust-marquee-duration) linear infinite;
    will-change: transform;
}

.trust-section .trust-marquee-group {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: space-around;
    gap: var(--trust-logo-gap);
    /* Las dos mitades de espacio mantienen la misma separación en la unión. */
    padding: 12px calc(var(--trust-logo-gap) / 2);
    margin: 0;
    list-style: none;
}

.trust-section .trust-marquee-group > li {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.trust-section .trust-marquee-logo {
    display: block;
    width: var(--trust-logo-width);
    height: var(--trust-logo-height);
    max-width: none;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.trust-section .trust-marquee-viewport:focus-within .trust-marquee-track {
    animation-play-state: paused;
}

@keyframes trust-logo-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (hover: hover) and (pointer: fine) {
    .trust-section .trust-marquee-viewport:hover .trust-marquee-track {
        animation-play-state: paused;
    }

    .trust-section .trust-marquee-logo:hover {
        transform: scale(1.05);
    }
}

@media (max-width: 1024px) {
    .trust-section {
        --trust-logo-width: 145px;
        --trust-logo-height: 64px;
        --trust-logo-gap: 60px;
    }
}

@media (max-width: 650px) {
    .trust-section {
        --trust-logo-width: 120px;
        --trust-logo-height: 56px;
        --trust-logo-gap: 44px;
        --trust-marquee-duration: 25s;
        padding: 24px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trust-section .trust-marquee-viewport {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .trust-section .trust-marquee-track {
        width: 100%;
        min-width: 0;
        animation: none;
        transform: none;
        will-change: auto;
    }

    .trust-section .trust-marquee-group {
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px var(--trust-logo-gap);
    }

    .trust-section .trust-marquee-group[aria-hidden="true"] {
        display: none;
    }

    .trust-section .trust-marquee-logo:hover {
        transform: none;
    }
}

/* =========================================
   CONDITIONS
========================================= */

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.condition-card {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    height: 100%;
    min-height: 264px;
    overflow: hidden;

    border: 1px solid rgba(226, 31, 38, 0.18);
    border-radius: var(--radius);

    background: var(--white);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.condition-card:hover {
    transform: translateY(-5px);
    border-color: rgba(226, 31, 38, 0.45);
    box-shadow: 0 18px 42px rgba(17, 19, 24, 0.14);
}

.condition-card .condition-card__content {
    min-width: 0;
    align-self: center;
    padding: 28px 20px 28px 26px;
}

.condition-card .condition-card__media {
    position: relative;
    min-width: 0;
    background: var(--nexos-soft-red);
}

.condition-card .condition-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px 0;
    object-fit: contain;
    object-position: center;
}

.condition-card h3 {
    margin-bottom: 7px;
    font-size: 19px;
}

.condition-card p {
    color: var(--text-light);
    font-size: 15px;
}

@media (max-width: 1100px) {
    .condition-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 240px 1fr;
        min-height: 0;
    }

    .condition-card .condition-card__media {
        order: -1;
    }

    .condition-card .condition-card__content {
        align-self: start;
        padding: 24px;
    }
}

/* =========================================
   PROCESS
========================================= */

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.process-card {
    text-align: center;
    padding: 35px;
}

.number {
    width: 55px;
    height: 55px;

    display: grid;
    place-items: center;

    margin: auto auto 20px;

    border-radius: 50%;

    background: var(--nexos-red);
    color: var(--nexos-white);

    font-weight: 800;
}

.process-card h3 {
    margin-bottom: 10px;
}

.process-card p {
    color: var(--text-light);
}

/* =========================================
   PAIN TEST
========================================= */

.pain-test {
    max-width: 820px;

    container-type: inline-size;

    margin: auto;

    padding: 50px;

    border-radius: 25px;

    background: var(--nexos-white);

    box-shadow: var(--shadow);
}

.pain-test h3 {
    font-size: 29px;
    margin-bottom: 8px;
}

.pain-test .form-intro {
    color: var(--text-light);
    margin-bottom: 35px;
}

.question {
    min-inline-size: 0;
    border: 0;
    margin-bottom: 32px;
}

.contact-details {
    min-inline-size: 0;
    border: 0;
}

.question-title {
    display: block;
    width: 100%;

    margin-bottom: 14px;

    font-weight: 700;
    font-size: 17px;
}

.options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option {
    position: relative;
}

.option label {
    display: block;

    padding: 15px;

    border: 1.5px solid var(--border);
    border-radius: var(--radius-small);

    cursor: pointer;

    text-align: center;
    font-weight: 600;

    transition: all 0.2s ease;
}

.option input:checked + label {
    border-color: var(--nexos-red);

    background: var(--nexos-soft-red);

    color: var(--nexos-red);
}

.option input:focus-visible + label {
    outline: 3px solid var(--nexos-salmon);
    outline-offset: 3px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;

    margin-bottom: 20px;
}

.form-row-single {
    grid-template-columns: minmax(0, 1fr);
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;

    padding: 15px;

    border: 1px solid rgba(17, 19, 24, 0.16);
    border-radius: 9px;

    background: var(--nexos-white);
    color: var(--nexos-black);
    font: inherit;

    outline: none;
}

.form-group textarea {
    display: block;
    min-height: 120px;
    line-height: 1.5;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--nexos-red);
    outline: 2px solid var(--nexos-salmon);
    outline-offset: 2px;
}

.pain-test .btn {
    width: 100%;
}

.contact-details + .btn {
    margin-top: 20px;
}

.privacy {
    text-align: center;

    margin-top: 16px;

    color: var(--text-light);

    font-size: 13px;
}

@container (max-width: 480px) {
    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.locations-Clinic {
    width: min(92%, var(--container));
    margin: auto;
    padding: 90px 0;
}

.locations-Clinic > p {
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.locations-Clinic > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 45px;
    padding: 0;
    list-style: none;
}

.location-clinica {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;
    height: 100%;
    padding: 20px 28px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    text-align: center;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.location-clinica:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.location-medical {
    display: block;
    margin-bottom: 10px;

    color: var(--secondary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.location-clinica h3 {
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-size: 22px;
    line-height: 1.25;
}

.location-clinica p {
    margin-bottom: 14px;
    color: var(--text-light);
}

.btn-directions {
    margin-top: auto;
}

/* =========================================
   FOOTER
========================================= */

.site-footer {
    background: var(--nexos-black);
    color: var(--nexos-white);

    padding: 55px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;

    padding-bottom: 35px;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer a,
.site-footer .footer-links {
    color: var(--nexos-salmon);
}

.footer-heading {
    font-size: 16px;
    margin-bottom: 15px;
}

.site-footer .footer-logo {
    color: var(--white);
}

.site-footer .footer-logo .logo-name-base {
    color: var(--white);
}

.footer-description {
    margin-top: 15px;
    max-width: 400px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.site-footer .legal {
    padding-top: 25px;

    border-top:
        1px solid rgba(255,255,255,0.12);

    color: rgba(255, 255, 255, 0.62);

    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .hero {
        --hero-photo-height: min(81.35vw, 420px);

        min-height: 0;
        padding-top: calc(var(--hero-photo-height) + 24px);
        background-color: var(--nexos-black);
        background-image:
            linear-gradient(
                to bottom,
                rgba(17, 19, 24, 0.12) 0,
                rgba(17, 19, 24, 0.16) calc(var(--hero-photo-height) - 65px),
                var(--nexos-black) var(--hero-photo-height)
            ),
            var(--pain-hero-image, url("images/banner-team.jpeg"));
        background-size: 100% 100%, auto var(--hero-photo-height);
        background-position: center top, left top;
    }

    .hero::before {
        display: none;
    }

    .evaluation-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    #evaluacion {
        min-height: 420px;
    }

    #evaluacion::before {
        background: linear-gradient(
            180deg,
            rgba(250, 250, 250, 0) 0%,
            rgba(250, 250, 250, 0) 58%,
            var(--background) 100%
        );
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 33.6px;
    }

    .conditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .locations-Clinic > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {

    .floating-call-cta {
        left: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        min-height: 48px;
        padding: 11px 13px;
        gap: 6px;
        font-size: 12px;
    }

    .floating-call-cta__icon {
        font-size: 17px;
    }

    .section {
        padding: 65px 0;
    }

    .locations-Clinic {
        padding: 65px 0;
    }

    .locations-Clinic > ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        min-height: 620px;
        padding-bottom: 80px;
    }

    .hero h1 {
        font-size: 39px;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 27.3px;
    }

    .hero-description {
        font-size: 17px;
    }

    .header-actions {
        margin-left: auto;
        gap: 0;
    }

    .header-actions .phone {
        display: none;
    }

    .header-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-height: 44px;
        max-width: 145px;
        padding: 9px 12px;

        font-size: 13px;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
    }

    .conditions-grid,
    .trust-grid,
    .options,
    .form-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .pain-test {
        padding: 30px 20px;
    }

    .navbar {
        min-height: 68px;
        gap: 12px;
    }

    .logo {
        font-size: 21px;
    }

    .site-header .logo {
        gap: 7px;
    }

    .logo img {
        height: 42px;
    }

    .logo-name {
        font-size: 22px;
        letter-spacing: -1px;
    }

    .logo-care {
        padding: 2px 6px;
        font-size: 9px;
    }

    .logo-subtitle {
        display: none;
    }
}

/* Keep translated text inside the existing layout. */
.hero-content,
.header-actions,
.hero h1,
.hero-subtitle,
.hero-description,
.section-title,
.condition-card__content,
.location-clinica,
.footer-grid > *,
.btn {
    min-width: 0;
}

.hero h1,
.hero-subtitle,
.hero-description,
.section-title h2,
.section-title p,
.condition-card h3,
.condition-card p,
.location-clinica h3,
.location-clinica p {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.2;
}

.floating-call-cta {
    max-width: calc(100vw - 28px);
}

.floating-call-cta__label {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* GTranslate may set the page direction, but the layout keeps its LTR order. */
:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body,
body.translated-rtl {
    direction: ltr;
}

:is(:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body, body.translated-rtl) :is(.navbar, .header-actions, .hero-grid, .hero-condition-cards, .trust-marquee-track, .trust-marquee-group, .conditions-grid, .condition-card, .process-grid, .evaluation-layout, .locations-Clinic > ul, .footer-grid) {
    direction: ltr;
}

:is(:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body, body.translated-rtl) :is(h1, h2, h3, p, label, legend, .btn, .hero-label, .section-title span, .floating-call-cta__label, .location-medical, .footer-links a, .footer-links span, input, textarea) {
    direction: rtl;
    unicode-bidi: plaintext;
}

:is(:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body, body.translated-rtl) :is(.hero h1, .hero-subtitle, .hero-description, .condition-card__content h3, .condition-card__content p, .footer-grid h3, .footer-grid p, .footer-links, .site-footer .legal, .form-group label, .question-title, .option label, legend, input, textarea) {
    text-align: right;
}

:is(:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body, body.translated-rtl) :is(.section-title h2, .section-title p, .hero-condition-card h3, .process-card h3, .process-card p, .locations-Clinic > p, .location-clinica h3, .location-clinica p, .location-medical, .btn, .floating-call-cta__label) {
    text-align: center;
}

:is(:is(html[dir="rtl"], html[lang^="he"], html[lang^="iw"], html[lang^="yi"], html[lang^="ar"], html[lang^="fa"], html[lang^="ur"]) body, body.translated-rtl) :is(.logo, .phone.notranslate) {
    direction: ltr;
    unicode-bidi: isolate;
}
