/* ==========================================================================
   Leticia Leto - Estilos Principales y Personalizados
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background-color: #FAFAFA;
    color: #111827;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Cursor Glow */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(26,92,107,0.07) 0%, rgba(255,255,255,0) 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Scroll Progress */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #2a8799, #2a9a78);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(42,135,153,0.4);
}

/* Floating WhatsApp Button */
#floating-whatsapp {
    animation: float 4s ease-in-out infinite;
    display: flex;
}

/* Floating Back To Top Button */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    visibility: hidden;
}
#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}
#back-to-top:hover {
    background-color: #3a7d44 !important;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.mesh-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    z-index: -2;
    will-change: transform;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.parallax-layer {
    will-change: transform;
}

/* ==========================================================================
   HERO TITLE (Per-device precision: 2 lines always on PC, matched size on mobile)
   ========================================================================== */
.hero-title {
    font-size: clamp(28px, 7.8vw, 32px);
    line-height: 1.18;
    color: #005168;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    word-break: normal;
}

.hero-title-line1 {
    display: block;
}

.hero-title-line2 {
    display: block;
    margin-top: 3px;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #2a8799 0%, #2a9a78 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Tablet (640px - 1023px) */
@media (min-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.15;
    }
}

/* Desktop / PC (>= 1024px) */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
        line-height: 1.12;
        margin-bottom: 1.5rem;
    }
    .hero-title-line1 {
        display: block;
        white-space: nowrap;
    }
    .hero-title-line2 {
        display: block;
        white-space: nowrap;
        margin-top: 4px;
        padding-bottom: 2px;
    }
}

/* Large Desktop (>= 1280px) */
@media (min-width: 1280px) {
    .hero-title {
        font-size: 3.25rem;
    }
}

/* Extra Large Desktop (>= 1536px) */
@media (min-width: 1536px) {
    .hero-title {
        font-size: 3.45rem;
    }
}

/* 3D Interactive Flip Cards */
.card-flip {
    perspective: 1200px;
    min-height: 240px;
    height: 100%;
}
.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 1.5rem;
}
.card-flip:hover .card-flip-inner,
.card-flip.flipped .card-flip-inner {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-front {
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.card-front:hover {
    border-color: #2A755C;
}
.card-back {
    background: linear-gradient(145deg, #005168 0%, #003847 100%);
    color: #ffffff;
    transform: rotateY(180deg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 56, 71, 0.25);
}

/* Desafíos: Grid on Desktop/Tablet, Horizontal Swipe Carousel ONLY on Mobile */
.desafios-carousel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

@media (max-width: 1023px) {
    .desafios-carousel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 767px) {
    .desafios-carousel {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: 8px 4px 18px;
        margin-bottom: 1.5rem;
        scrollbar-width: thin;
        scrollbar-color: #2A9A78 #E2E8F0;
    }
    .desafios-carousel::-webkit-scrollbar {
        height: 5px;
    }
    .desafios-carousel::-webkit-scrollbar-track {
        background: #F1F5F9;
        border-radius: 999px;
    }
    .desafios-carousel::-webkit-scrollbar-thumb {
        background: #2A9A78;
        border-radius: 999px;
    }
    .desafios-carousel > .card-flip {
        flex: 0 0 84%;
        max-width: 320px;
        min-width: 260px;
        scroll-snap-align: center;
        min-height: 250px;
    }
}

/* Hero dashboard: more room for metrics, with the chart aligned right. */
.hero-layout { max-width: 1440px; width: 100%; }
.hero-dashboard { min-width: 0; width: 100%; }
.hero-sales-layout > :first-child { min-width: 0; flex: 1; }
#hero-chart { flex-shrink: 0; margin-left: auto; margin-bottom: 4px; }
[data-hero-count] { font-variant-numeric: tabular-nums; }
@keyframes float-badge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.hero-top-rotation {
    position: absolute;
    top: -30px;
    right: 8px;
    z-index: 30;
    pointer-events: none;
    animation: float-badge 3.8s ease-in-out infinite;
    will-change: transform;
}
@media (min-width: 1024px) {
    .hero-layout { column-gap: 2rem; }
}
@media (max-width: 639px) {
    .hero-sales-layout { gap: .5rem; }
    #hero-chart { gap: 3px; width: 56px; }
    #hero-chart .chart-bar { width: 5px; }
    .hero-top-rotation { 
        top: -24px; 
        right: 4px; 
        pointer-events: auto;
    }
}

/* ==========================================================================
   Continuous Client Logo Carousel - Infinite Smooth Marquee
   ========================================================================== */
.pharmacy-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.pharmacy-carousel-track {
    display: flex;
    width: max-content;
    animation: pharmacy-scroll-left 28s linear infinite;
    will-change: transform;
}

.pharmacy-carousel-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pharmacy-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 190px;
    width: 190px;
    height: 80px;
    padding: 10px 24px;
    box-sizing: border-box;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.pharmacy-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.pharmacy-logo:hover img {
    transform: scale(1.08);
}

.pharmacy-logo:focus-visible {
    outline: 2px solid #2A9A78;
    outline-offset: -3px;
    border-radius: 8px;
}

.pharmacy-carousel:hover .pharmacy-carousel-track,
.pharmacy-carousel:focus-within .pharmacy-carousel-track {
    animation-play-state: paused;
}

#clientes {
    scroll-margin-top: 100px;
}

@keyframes pharmacy-scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes pharmacy-scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* On mobile devices: Display exactly 2 logos per screen width (50vw each) */
@media (max-width: 640px) {
    .pharmacy-carousel {
        padding: 6px 0;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    }
    .pharmacy-carousel-track {
        animation-duration: 20s;
    }
    .pharmacy-logo {
        flex: 0 0 50vw;
        width: 50vw;
        max-width: 50vw;
        height: 72px;
        padding: 8px 16px;
    }
    .pharmacy-logo img {
        max-height: 44px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .pharmacy-logo {
        flex: 0 0 25vw;
        width: 25vw;
        height: 78px;
        padding: 8px 18px;
    }
}

.cta-banner-wrap { width: 100%; max-width: 1024px; margin-left: auto; margin-right: auto; }
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 132px;
    padding: 28px 32px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    background: #005168;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / .15);
}
.cta-banner-copy { margin: 0; color: #fff; font-size: 18px; line-height: 1.5; font-weight: 700; }
.cta-banner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 52px;
    padding: 14px 28px;
    border-radius: 999px;
    background: linear-gradient(to right, #2A9A78, #2A755C);
    color: #fff;
    font-size: 14px;
    line-height: 24px;
    font-weight: 700;
    transition: box-shadow .2s;
}
.cta-banner-button i { font-size: 18px; }
.cta-banner-button:hover { box-shadow: 0 8px 20px rgb(42 117 92 / .4); }
.cta-banner-button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 767px) {
    .cta-banner { flex-direction: column; justify-content: center; min-height: 236px; padding: 24px; text-align: center; }
    .cta-banner-copy { font-size: 16px; }
    .cta-banner-button { max-width: 100%; padding-left: 22px; padding-right: 22px; }
}

/* Chart Animation */
.chart-bar {
    transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 0%;
}

/* Accordion Animation */
.aeo-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}
.aeo-answer.open {
    max-height: 400px;
    opacity: 1;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Réplicas visuales solicitadas: SERVICIOS + METODOLOGÍA + EQUIPO + PARTNERS
   Mejoras de legibilidad, contraste tipográfico y full responsive en todos los dispositivos
   ========================================================================== */

/* ------------------------------ SERVICIOS ------------------------------ */
.services-reference-section {
    background: #F7F8F5;
    position: relative;
    overflow: hidden;
    padding: 3rem 0 4.5rem;
}
.services-reference-container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.services-reference-header {
    text-align: center;
    margin: 0 auto 2.5rem;
}
.services-reference-eyebrow {
    display: inline-block;
    color: #2A755C;
    font-weight: 800;
    font-size: 13.5px;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.services-reference-header h2 {
    margin: 0;
    color: #005168;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.03em;
}
.services-reference-header h2 span {
    background: linear-gradient(to right, #2a8799, #2a9a78);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.services-reference-header p {
    margin: 14px auto 0;
    max-width: 680px;
    color: #4B5563;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
}
.services-reference-grid {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}
.service-ref-card {
    --accent: #005168;
    --strip: #005168;
    --border: #005168;
    --soft: #eaf2f5;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-ref-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15,23,42,.09);
}
.service-ref-card--integral {
    --accent: #005168;
    --strip: #005168;
    --border: #005168;
    --soft: #eaf2f5;
}
.service-ref-card--digital {
    --accent: #2A8799;
    --strip: #2A8799;
    --border: #2A8799;
    --soft: #eaf5f7;
}
.service-ref-card--marketplace {
    --accent: #2A755C;
    --strip: #2A755C;
    --border: #2A755C;
    --soft: #eaf4f0;
}
.service-ref-card--training {
    --accent: #6F9584;
    --strip: #6F9584;
    --border: #6F9584;
    --soft: #f0f6f3;
}
.service-ref-strip {
    min-height: 44px;
    background: var(--strip);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
}
.service-ref-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 10.5px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.service-ref-tag--featured { color: #fff; background: #ff524d; border: 1px solid rgba(255, 255, 255, 0.4); }
.service-ref-tag--featured i { font-size: 11px; margin-right: 2px; vertical-align: -1px; }
.service-ref-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 16px 20px;
    gap: 16px;
}
.service-ref-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--soft);
}
.service-ref-icon svg,
.service-ref-icon img { width: 50px; height: 50px; object-fit: contain; display: block; }
.service-ref-icon--integral { background: #eaf2f5; }
.service-ref-icon--digital { background: #eaf5f7; }
.service-ref-icon--marketplace { background: #eaf4f0; }
.service-ref-icon--training { background: #f0f6f3; }
.service-ref-icon--training img { display: none; }
.service-ref-icon--training::before {
    content: "";
    width: 50px;
    height: 50px;
    background-color: #2A9A78;
    -webkit-mask: url("iconos/capacitaciones.png") center / contain no-repeat;
    mask: url("iconos/capacitaciones.png") center / contain no-repeat;
}
.service-ref-card.service-ref-card--training h3 { color: #2A9A78; }
.service-ref-card h3 {
    margin: 0;
    color: var(--accent);
    text-align: center;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.02em;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-ref-subtitle {
    margin: 8px auto 12px;
    text-align: center;
    color: #4B5563;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-ref-ideal {
    border-radius: 10px;
    background: var(--soft);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 12px;
    min-height: 88px;
}
.service-ref-ideal-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 26px;
    line-height: 1;
}
.service-ref-ideal strong {
    display: block;
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 11.5px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.service-ref-ideal p {
    margin: 0;
    color: #374151;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}
.service-ref-list {
    border-top: 1px solid #edf0f2;
    padding-top: 12px;
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.service-ref-list-title {
    display: block;
    color: var(--accent);
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.service-ref-list > div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.service-ref-list i {
    color: var(--accent);
    font-size: 16px;
    line-height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}
.service-ref-list--dark .service-ref-list-title,
.service-ref-list--dark i { color: var(--accent); }
.service-ref-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.service-ref-button:hover { filter: brightness(.92); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.15); }

/* ---------------------------- METODOLOGÍA ----------------------------- */
.method-reference-section {
    background: #fff;
    padding: 3.5rem 0 5rem;
}
.method-reference-container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}
.method-reference-header {
    text-align: center;
    margin: 0 auto 3rem;
}
.method-reference-eyebrow {
    display: inline-block;
    color: #2A755C;
    font-size: 13.5px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.method-reference-header h2 {
    margin: 0;
    color: #005168;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.03em;
}
.method-reference-header p {
    margin: 14px auto 0;
    max-width: 680px;
    color: #607075;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
}
.method-reference-flow {
    position: relative;
    margin-bottom: 2.5rem;
}
.method-reference-line {
    position: absolute;
    top: 27px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: #2A755C;
    z-index: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
.method-reference-flow.active .method-reference-line {
    transform: scaleX(1);
}
.method-reference-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}
.method-ref-step {
    position: relative;
    padding-top: 27px;
}
.method-ref-step:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 20px;
    right: -16px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2A755C;
    opacity: 0;
    transform: scale(0.2);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.method-ref-number {
    position: absolute;
    z-index: 8;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.3) translateY(-10px);
    opacity: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2A755C;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.02em;
    box-shadow: 0 4px 10px rgba(42, 117, 92, 0.25);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.method-ref-card {
    min-height: 310px;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.03);
    text-align: center;
    padding: 38px 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease;
}

/* Staggered progressive entrance when .method-reference-flow.active */
.method-reference-flow.active .method-ref-step:nth-child(1) .method-ref-number {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 0.1s;
}
.method-reference-flow.active .method-ref-step:nth-child(1) .method-ref-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}
.method-reference-flow.active .method-ref-step:nth-child(1)::after {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.28s;
}

.method-reference-flow.active .method-ref-step:nth-child(2) .method-ref-number {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 0.32s;
}
.method-reference-flow.active .method-ref-step:nth-child(2) .method-ref-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.38s;
}
.method-reference-flow.active .method-ref-step:nth-child(2)::after {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.5s;
}

.method-reference-flow.active .method-ref-step:nth-child(3) .method-ref-number {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 0.55s;
}
.method-reference-flow.active .method-ref-step:nth-child(3) .method-ref-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.62s;
}
.method-reference-flow.active .method-ref-step:nth-child(3)::after {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.74s;
}

.method-reference-flow.active .method-ref-step:nth-child(4) .method-ref-number {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 0.78s;
}
.method-reference-flow.active .method-ref-step:nth-child(4) .method-ref-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.85s;
}
.method-reference-flow.active .method-ref-step:nth-child(4)::after {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.98s;
}

.method-reference-flow.active .method-ref-step:nth-child(5) .method-ref-number {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 1.02s;
}
.method-reference-flow.active .method-ref-step:nth-child(5) .method-ref-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.08s;
}

.method-reference-flow.active .method-ref-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 81, 104, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .method-reference-line { transform: scaleX(1) !important; transition: none !important; }
    .method-ref-number { opacity: 1 !important; transform: translateX(-50%) !important; transition: none !important; }
    .method-ref-card { opacity: 1 !important; transform: none !important; transition: none !important; }
    .method-ref-step::after { opacity: 1 !important; transform: scale(1) !important; transition: none !important; }
}
.method-ref-icon {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ffffff 0%, #f4f4f4 62%, #f8f8f8 100%);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid #f0f0f0;
}
.method-ref-icon svg,
.method-ref-icon img { width: 54px; height: 54px; object-fit: contain; display: block; }
.method-ref-card h3 {
    margin: 0;
    color: #24363A;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
}
.method-ref-underline {
    width: 42px;
    height: 3px;
    border-radius: 99px;
    background: #2A755C;
    margin: 12px auto 12px;
}
.method-ref-card p {
    margin: 0 auto;
    color: #607075;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}
.method-reference-summary {
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    background: #F7F8F5;
    box-shadow: 0 4px 14px rgba(15,23,42,.03);
    padding: 30px 32px;
    margin-top: 2rem;
}
.method-reference-summary > h3 {
    margin: 0 0 24px;
    text-align: center;
    color: #005168;
    font-size: clamp(20px, 2.2vw, 24px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.02em;
}
.method-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 24px;
}
.method-summary-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    position: relative;
    padding: 6px 12px;
}
.method-summary-item + .method-summary-item::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8%;
    height: 84%;
    width: 1.5px;
    background: #2A755C;
    opacity: 0.4;
}
.method-summary-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
}
.method-summary-icon svg,
.method-summary-icon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}
.method-summary-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}
.method-summary-text h4 {
    margin: 0;
    color: #005168;
    font-size: 16.5px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.01em;
}
.method-summary-text p {
    margin: 0;
    color: #607075;
    font-size: 13.5px;
    line-height: 1.45;
    font-weight: 400;
}
.method-original-cta { margin-top: 3.5rem; }

/* ------------------------------ EQUIPO -------------------------------- */
#equipo {
    padding-top: 5rem;
    padding-bottom: 5rem;
    background: #F7F8F5;
}

#contacto {
    background: #F7F8F5;
}

#equipo > .max-w-7xl {
    max-width: 1280px;
}

/* ==========================================================================
   TEAM FOUNDER & MEMBERS SECTION
   ========================================================================== */
.team-founder-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
}

.team-founder-card {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.team-founder-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 81, 104, .1);
    border-color: #2A8799;
}

.team-founder-photo-wrap {
    position: relative;
    margin: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #F1F5F9;
    flex: 0 0 340px;
    width: 340px;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-founder-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.team-founder-card:hover .team-founder-photo-wrap img {
    transform: scale(1.02);
}

.team-founder-photo-wrap .team-reference-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #005168;
    color: #ffffff;
    min-height: 22px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.team-founder-content {
    padding: 28px 32px 28px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.team-founder-name {
    margin: 0 0 4px;
    color: #005168;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.team-founder-role {
    margin: 0 0 14px;
    color: #2A755C;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.team-founder-bio {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-founder-bio p {
    margin: 0;
}

.team-founder-highlight {
    font-weight: 700;
    color: #0F172A;
    margin-top: 2px;
}

.team-founder-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
    flex-wrap: wrap;
}

.team-btn-meeting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2A755C;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(42, 117, 92, 0.25);
}

.team-btn-meeting:hover {
    background: #005168;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 81, 104, 0.3);
}

.team-btn-connect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px solid #005168;
    color: #005168;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.team-btn-connect:hover {
    background: #005168;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 81, 104, 0.2);
}

.team-reference-panel {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0.5rem;
}

.team-reference-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.team-reference-card {
    position: relative;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15,23,42,.03);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.team-reference-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 81, 104, .1);
    border-color: #2A8799;
}

.team-reference-photo {
    position: relative;
    margin: 12px 12px 0;
    aspect-ratio: 1 / 1;
    width: auto;
    border: none;
    border-radius: 14px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-reference-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.team-reference-card:hover .team-reference-photo img {
    transform: scale(1.03);
}

.team-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748B;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
}

.team-photo-placeholder i {
    font-size: 24px;
    color: #94A3B8;
}

.team-reference-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #005168;
    color: #ffffff;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.team-reference-body {
    container-type: inline-size;
    padding: 16px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.team-reference-body h3 {
    margin: 0 0 4px;
    color: #005168;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.02em;
}

.team-reference-role {
    margin: 0 0 10px;
    min-height: 28px;
    color: #2A755C;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.team-reference-role span {
    display: block;
    white-space: nowrap;
    font-size: clamp(8px, 4.8cqw, 11px);
}

.team-reference-quote {
    margin: 0;
    color: #607075;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
    font-style: italic;
    flex-grow: 1;
}

.team-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
    padding-top: 6px;
}

.team-linkedin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid #005168;
    color: #005168;
    font-size: 17px;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.team-linkedin-icon:hover {
    background: #005168;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 81, 104, 0.25);
}

/* ---------------------------- PARTNERS -------------------------------- */
.partner-reference {
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.partner-reference-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    align-items: center;
    justify-items: center;
}

.partner-tiendastic {
    position: relative;
    padding-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.partner-mini-label {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: #FEF08A;
    color: #854D0E;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid #FDE047;
}

.partner-brand {
    min-width: 0;
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.partner-brand img {
    max-height: 42px;
    max-width: 85%;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.partner-brand:hover img {
    transform: scale(1.06);
}

.partner-reference .partner-brand { height: 76px; padding: 0; }
.partner-reference .partner-brand img {
    width: 180px;
    height: 72px;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
}
.partner-brand-mercadolibre img { max-height: 48px; }

.partner-certified {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   GLOBAL RESPONSIVE MEDIA QUERIES (DESKTOP, TABLET, MOBILE)
   ========================================================================== */

/* Large Tablets & Small Desktops (1024px - 1279px) */
@media (max-width: 1279px) {
    .team-reference-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
    .method-reference-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .method-reference-line, .method-ref-step::after {
        display: none;
    }
}

/* Medium Tablets (768px - 1023px) */
@media (max-width: 1023px) {
    .services-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
    .team-founder-photo-wrap {
        flex: 0 0 280px;
        width: 280px;
        min-height: 320px;
    }
    .team-founder-content {
        padding: 20px 24px 20px 8px;
    }
    .team-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
    .team-reference-body h3 {
        font-size: 17px;
    }
    .team-reference-quote {
        font-size: 13px;
    }
    .partner-reference-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
    .method-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
    .method-reference-summary {
        padding: 20px;
    }
    .method-summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .method-summary-item + .method-summary-item::before {
        display: none;
    }
    .method-summary-item {
        justify-content: flex-start;
        padding: 6px 0;
    }
}

/* Small Tablets & Mobile Devices (<= 767px) */
@media (max-width: 767px) {
    .services-reference-section {
        padding: 2.5rem 0 3.5rem;
    }
    .services-reference-container {
        width: calc(100% - 24px);
    }
    .services-reference-header h2 {
        font-size: 26px;
    }
    .services-reference-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .service-ref-card h3,
    .service-ref-subtitle,
    .service-ref-ideal {
        min-height: auto;
    }
    .service-ref-body {
        padding: 16px 14px 18px;
    }

    .method-reference-section {
        padding: 2.5rem 0 3.5rem;
    }
    .method-reference-container {
        width: calc(100% - 24px);
    }
    .method-reference-header h2 {
        font-size: 26px;
    }
    .method-reference-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .method-ref-step {
        padding-top: 24px;
    }
    .method-ref-card {
        min-height: auto;
        padding: 32px 16px 20px;
    }

    #equipo {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
    .team-founder-wrapper {
        margin-bottom: 20px;
    }
    .team-founder-card {
        flex-direction: column;
    }
    .team-founder-photo-wrap {
        flex: none;
        width: auto;
        margin: 12px 12px 0;
        aspect-ratio: 1 / 1;
        min-height: auto;
    }
    .team-founder-content {
        padding: 18px 16px 20px;
    }
    .team-founder-name {
        font-size: 20px;
    }
    .team-founder-bio {
        font-size: 13.5px;
    }
    .team-reference-panel {
        padding: 0;
        border: none;
        background: transparent;
    }
    .team-reference-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .team-reference-photo {
        aspect-ratio: 1 / 1;
        height: auto;
    }
    .team-reference-body {
        padding: 14px;
    }
    .team-reference-body h3 {
        font-size: 17px;
    }
    .team-reference-role {
        font-size: 11px;
        min-height: 0;
    }
    .team-reference-quote {
        font-size: 13.5px;
    }

    .partner-reference {
        margin-top: 1.5rem;
        padding: 1.25rem 1rem;
        background: #ffffff;
        border: 1px solid #E2E8F0;
        border-radius: 16px;
    }
    .partner-reference-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .partner-reference .partner-brand {
        height: 60px;
        padding: 4px;
    }
    .partner-reference .partner-brand img {
        width: auto;
        height: auto;
        max-height: 46px;
        max-width: 90%;
        object-fit: contain;
    }
    .partner-reference-row > :last-child:nth-child(odd) {
        grid-column: span 2;
        max-width: 220px;
        width: 100%;
        margin: 0 auto;
    }
    .method-original-cta {
        margin-top: 2.5rem;
    }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
    .partner-reference-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .partner-reference .partner-brand {
        height: 52px;
    }
    .partner-reference .partner-brand img {
        max-height: 38px;
    }
    .partner-tiendastic {
        padding-top: 12px;
    }
}

.clients-section { background: #F7F8F5; padding: 80px 0 40px; }
.client-results { background: #005168; color: #fff; padding: 64px 24px; }
.client-results-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.client-result { text-align: center; padding: 0 24px; }
.client-result + .client-result { border-left: 1px solid rgba(255,255,255,.18); }
.client-result-number { font-size: clamp(40px, 4vw, 56px); font-weight: 800; line-height: 1.15; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.client-result h3 { font-size: 13px; font-weight: 800; letter-spacing: .04em; margin-bottom: 6px; }
.client-result p { font-size: 14px; line-height: 1.5; color: #D6E8EA; }
@media (max-width: 1023px) and (min-width: 768px) {
    .client-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; }
    .client-result:nth-child(3) { border-left: 0; }
}
@media (max-width: 767px) {
    .client-results {
        padding: 40px 20px;
        overflow: hidden;
    }
    .client-results-grid {
        display: flex;
        position: relative;
        justify-content: center;
        align-items: center;
        min-height: 130px;
        grid-template-columns: 1fr;
    }
    .client-result {
        display: none;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.45s ease, transform 0.45s ease;
        padding: 0 16px;
        width: 100%;
        text-align: center;
    }
    .client-result.is-active-slide {
        display: block;
        opacity: 1;
        transform: translateY(0);
        animation: fadeInStat 0.45s ease forwards;
    }
    .client-result + .client-result {
        border-left: 0;
        border-top: 0;
        padding-top: 0;
    }
}
@keyframes fadeInStat {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.clients-section:has(.clients-success) { padding-bottom: 0; }
.clients-success { background: #fff; padding: 64px 0 48px; }
.clients-success-heading { padding: 0 24px; }
.clients-success-description { margin: 24px auto 0; max-width: 1152px; color: #606060; font-size: clamp(16px, 2vw, 22px); line-height: 1.6; }
.clients-success .pharmacy-logo img { filter: grayscale(0.2); opacity: .9; transition: filter .25s, opacity .25s, transform .25s; }
.clients-success .pharmacy-logo:hover img,
.clients-success .pharmacy-logo:focus-visible img { filter: none; opacity: 1; transform: scale(1.08); }
.clients-container { max-width: 1152px; padding: 0 24px; margin: 0 auto; }
.clients-heading { text-align: center; margin-bottom: 48px; }
.clients-heading p { color: #2A755C; font-size: 14px; font-weight: 800; letter-spacing: .06em; margin-bottom: 12px; }
.clients-heading h2 { color: #005168; font-size: clamp(30px, 3.5vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.clients-heading h2 span { background: linear-gradient(to right, #2A8799, #2A9A78); background-clip: text; -webkit-background-clip: text; color: transparent; }
.clients-testimonials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-bottom: 48px; }
.client-testimonial { margin: 0; padding: 32px 30px; border-radius: 24px; background: #fff; border: 1px solid #E8ECE8; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 4px 20px rgba(0, 56, 71, 0.04); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.client-testimonial:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 56, 71, 0.08); }
.client-stars { display: flex; align-items: center; justify-content: flex-start; gap: 4px; color: #FACC15; font-size: 18px; margin-bottom: 18px; }
.client-testimonial blockquote { margin: 0 0 22px; color: #4B5563; font-size: 14.5px; line-height: 1.65; flex: 1; font-style: normal; }
.client-testimonial figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #E8ECE8; font-size: 13px; }
.client-author-box { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #E8F8F0; }
.client-author-info strong { display: block; color: #005168; font-size: 15px; font-weight: 800; line-height: 1.2; }
.client-author-info span { display: block; color: #64748B; font-size: 12px; margin-top: 2px; }
.client-review-btn { display: inline-flex; align-items: center; gap: 4px; color: #2A755C; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: all 0.2s ease; flex-shrink: 0; padding: 6px 10px; border-radius: 8px; }
.client-review-btn:hover { color: #005168; background: #E8F8F0; transform: translateX(3px); }
@media (max-width: 767px) {
    .clients-section { padding-top: 56px; }
    .clients-container { padding: 0 16px; }
    .clients-testimonials {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: 8px 6px 20px;
        margin-bottom: 20px;
        scrollbar-width: thin;
        scrollbar-color: #2A9A78 #E2E8F0;
    }
    .clients-testimonials::-webkit-scrollbar {
        height: 5px;
    }
    .clients-testimonials::-webkit-scrollbar-track {
        background: #F1F5F9;
        border-radius: 999px;
    }
    .clients-testimonials::-webkit-scrollbar-thumb {
        background: #2A9A78;
        border-radius: 999px;
    }
    .client-testimonial {
        flex: 0 0 86%;
        max-width: 340px;
        min-width: 275px;
        scroll-snap-align: center;
        padding: 24px 20px;
        border-radius: 20px;
    }
    .client-testimonial figcaption {
        flex-wrap: nowrap;
        gap: 8px;
    }
}

/* Horizontal methodology carousel on smaller screens. */
@media (max-width: 1279px) {
    .method-reference-grid {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        padding: 8px 0 20px;
        scrollbar-width: thin;
        scrollbar-color: #2A9A78 #E2E8F0;
        align-items: stretch;
    }
    .method-reference-grid > .method-ref-step {
        flex: 0 0 calc((100% - 40px) / 2.25);
        min-width: 0;
        scroll-snap-align: start;
        display: flex;
    }
    .method-reference-grid .method-ref-card { width: 100%; min-height: 310px; }
    .method-reference-grid:focus-visible { outline: 2px solid #2A9A78; outline-offset: 4px; border-radius: 16px; }
}
@media (max-width: 767px) {
    .method-reference-grid > .method-ref-step { flex-basis: 85%; }
}

/* Swipeable team cards on phones and tablets, including landscape tablets. */
@media (max-width: 1279px) {
    .team-reference-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        padding: 6px 0 18px;
        scrollbar-width: thin;
        scrollbar-color: #2A9A78 #E2E8F0;
    }
    .team-reference-grid:focus-visible {
        outline: 2px solid #2A9A78;
        outline-offset: 4px;
        border-radius: 16px;
    }
    .team-reference-grid > .team-reference-card {
        flex: 0 0 calc((100% - 40px) / 2.25);
        scroll-snap-align: start;
    }
}
@media (max-width: 767px) {
    .team-reference-grid > .team-reference-card {
        flex-basis: 85%;
    }
}

/* ==========================================================================
   Autodiagnóstico de 7 Preguntas - Modal Wizard (Tope de Gama)
   ========================================================================== */

.diagnostic-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(10, 20, 24, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
    overflow-y: auto;
}

.diagnostic-overlay.active {
    opacity: 1;
    visibility: visible;
}

.diagnostic-modal-card {
    background: #ffffff;
    border-radius: 1.75rem;
    width: 100%;
    max-width: 780px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -15px rgba(14, 27, 32, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.diagnostic-overlay.active .diagnostic-modal-card {
    transform: scale(1) translateY(0);
}

/* Modal Custom Scrollbar */
.diagnostic-modal-card::-webkit-scrollbar {
    width: 6px;
}
.diagnostic-modal-card::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
.diagnostic-modal-card::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
.diagnostic-modal-card::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Option Cards */
.diag-option-btn {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 1rem;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.diag-option-btn:hover {
    border-color: #1a5c6b;
    background: #F8FBFC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 92, 107, 0.08);
}

.diag-option-btn.selected {
    border-color: #1a5c6b;
    background: #E8F1F2;
    box-shadow: 0 0 0 2px rgba(26, 92, 107, 0.2), 0 8px 20px rgba(26, 92, 107, 0.12);
}

.diag-badge-letter {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.25s ease;
}

.diag-option-btn:hover .diag-badge-letter {
    background: #1a5c6b;
    color: #ffffff;
}

.diag-option-btn.selected .diag-badge-letter {
    background: #1a5c6b;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 92, 107, 0.35);
}

/* Animations */
.diag-fade-in {
    animation: diagFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes diagFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Opportunities Cards in Results */
.diag-opp-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1a5c6b;
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    transition: all 0.3s ease;
}

.diag-opp-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Stage Result Badges */
.badge-stage-construir {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-stage-optimizar {
    background: #E8F1F2;
    color: #1a5c6b;
    border: 1px solid #c2dfe4;
}

.badge-stage-escalar {
    background: #EBF5EC;
    color: #3a7d44;
    border: 1px solid #c6e6cb;
}

/* Hero Gradient Text Fix for Descenders (g, j, p, q, y) */
.hero-gradient-text {
    background-image: linear-gradient(135deg, #2a8799 0%, #2a9a78 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-bottom: 0.22em;
    margin-bottom: -0.22em;
    padding-top: 0.04em;
    line-height: 1.22;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* White Logo filter for Dark Backgrounds */
.logo-white {
    filter: brightness(0) invert(1);
}
