/* =====================================================================
   AWARDS & PARTNERSHIPS SECTION
   FILE: awards-section.css  |  VERSION: 3.0
   PREFIX: rh-awards__
   BEM naming: rh-awards__[element]
   Typography: Follows Remote Hive type scale
   Breakpoints: 480 → 768 → 1024 → 1280+
   ===================================================================== */

/* ── Section ── */
.rh-awards {
    background: #fff;
    padding: 80px 0 100px;
    overflow: hidden;
    position: relative;
}

/* ── Bottom Glow — radiating upward ── */
.rh-awards::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -80px;
    width: 620px;
    height: 380px;
    background: radial-gradient(
        ellipse at center bottom,
        rgba(6, 182, 212, 0.32) 0%,
        rgba(20, 184, 166, 0.22) 20%,
        rgba(6, 182, 212, 0.12) 45%,
        transparent 78%
    );
    filter: blur(35px);
    pointer-events: none;
    z-index: 0;
}

.rh-awards::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 60px;
    width: 470px;
    height: 300px;
    background: radial-gradient(
        ellipse at center bottom,
        rgba(59, 130, 246, 0.26) 0%,
        rgba(6, 182, 212, 0.16) 30%,
        transparent 72%
    );
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
}

/* ── Screen-reader-only heading (H2 + H3) ── */
.rh-awards__heading-sr,
.rh-awards__partners-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ══════════════════════════════════════════════
   CURVED LOOP MARQUEE
   ══════════════════════════════════════════════ */
.rh-awards__curve-wrap {
    width: 100%;
    overflow: hidden;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
    /* CLS prevention — reserve space */
    min-height: 150px;
}

.rh-awards__curved-loop {
    width: 100%;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.rh-awards__curved-loop:active {
    cursor: grabbing;
}

.rh-awards__curved-svg {
    width: 100%;
    height: auto;
    min-height: 150px;
    overflow: visible;
    display: block;
}

/* Desktop (1280+): H2 = 48px → SVG curved text ≈ 3.8rem  */
.rh-awards__curved-text {
    font-size: 3.8rem;
    font-weight: 800;
    fill: url(#rh-awards-text-gradient);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   AWARDS GRID — 5 columns
   ══════════════════════════════════════════════ */
.rh-awards__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.rh-awards__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: relative;
    border: 1px solid transparent;
    border-image: repeating-linear-gradient(
        to right,
        transparent 0px, transparent 3px,
        rgba(100, 116, 139, 0.25) 3px, rgba(100, 116, 139, 0.25) 5px,
        transparent 5px, transparent 8px
    ) 1;
}

/* ── Award Cell ── */
.rh-awards__cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 25px;
    margin: 0;
    z-index: 1;
    gap: 6px;
}

.rh-awards__cell img {
    max-width: 80%;
    max-height: 55%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.rh-awards__cell:hover img {
    transform: scale(1.08);
}

/* ── Cell link (wraps image if URL provided) ── */
.rh-awards__cell-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.rh-awards__cell-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Caption — Desktop: 14px Caption ── */
.rh-awards__cell-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    letter-spacing: 0.5px;
    margin-top: 4px;
    text-transform: uppercase;
    line-height: 1.3;
}

/* ══════════════════════════════════════════════
   GRID LINES — Dotted + Shine
   ══════════════════════════════════════════════ */
.rh-awards__grid .rh-awards__vline {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.rh-awards__grid .rh-awards__vline:nth-child(1) { left: 20%; }
.rh-awards__grid .rh-awards__vline:nth-child(2) { left: 40%; }
.rh-awards__grid .rh-awards__vline:nth-child(3) { left: 60%; }
.rh-awards__grid .rh-awards__vline:nth-child(4) { left: 80%; }

/* Dotted line background */
.rh-awards__grid .rh-awards__vline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px, transparent 3px,
        rgba(100, 116, 139, 0.25) 3px, rgba(100, 116, 139, 0.25) 5px,
        transparent 5px, transparent 8px
    );
}

/* Gradient shine streak */
.rh-awards__grid .rh-awards__vline::after {
    content: '';
    position: absolute;
    top: -80px;
    left: -6px;
    width: 14px;
    height: 80px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(59, 130, 246, 0.6) 20%,
        rgba(6, 182, 212, 1) 50%,
        rgba(59, 130, 246, 0.6) 80%,
        transparent 100%
    );
    filter: blur(4px);
    animation: rh-awards-shineV 4s ease-in-out infinite;
    border-radius: 50%;
}

/* Staggered animation delays */
.rh-awards__grid .rh-awards__vline:nth-child(1)::after { animation-delay: 0s; }
.rh-awards__grid .rh-awards__vline:nth-child(2)::after { animation-delay: 0.7s; }
.rh-awards__grid .rh-awards__vline:nth-child(3)::after { animation-delay: 1.4s; }
.rh-awards__grid .rh-awards__vline:nth-child(4)::after { animation-delay: 2.1s; }

@keyframes rh-awards-shineV {
    0%   { top: -80px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100%;  opacity: 0; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Laptop (1024px – 1279px)
   ══════════════════════════════════════════════ */
@media (max-width: 1279px) {
    .rh-awards {
        padding: 70px 0 90px;
    }

    /* Laptop H2 equivalent: 42px → ~3.4rem SVG */
    .rh-awards__curved-text {
        font-size: 3.4rem;
    }

    .rh-awards__cell {
        padding: 22px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet (768px – 1023px)
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .rh-awards {
        padding: 60px 0 80px;
    }

    .rh-awards__curve-wrap {
        margin-bottom: 48px;
        min-height: 140px;
    }

    /* Tablet H2 equivalent: 36px → ~4.2rem SVG (needs larger in SVG context) */
    .rh-awards__curved-text {
        font-size: 4.2rem;
    }

    .rh-awards__cell {
        padding: 20px;
    }

    /* Caption: 13px on tablet */
    .rh-awards__cell-label {
        font-size: 13px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile Large (480px – 767px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .rh-awards {
        padding: 50px 0 70px;
    }

    .rh-awards__curve-wrap {
        margin-bottom: 40px;
        min-height: 160px;
    }

    /* Mobile Large SVG text bump for readability */
    .rh-awards__curved-text {
        font-size: 6.4rem;
    }

    .rh-awards__curved-svg {
        min-height: 160px;
    }

    .rh-awards__container {
        padding: 0 16px;
    }

    /* 2 columns on mobile */
    .rh-awards__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Only show center vline on mobile */
    .rh-awards__grid .rh-awards__vline:nth-child(1) { left: 50%; }
    .rh-awards__grid .rh-awards__vline:nth-child(2),
    .rh-awards__grid .rh-awards__vline:nth-child(3),
    .rh-awards__grid .rh-awards__vline:nth-child(4) { display: none; }

    /* Fixed height cells */
    .rh-awards__cell {
        padding: 20px 15px;
        aspect-ratio: auto;
        min-height: 130px;
    }

    .rh-awards__cell img {
        max-width: 70%;
        max-height: 48px;
    }

    /* Caption: 12px on mobile large */
    .rh-awards__cell-label {
        font-size: 12px;
        letter-spacing: 0.4px;
    }

    /* Smaller glow on mobile */
    .rh-awards::before {
        width: 440px;
        height: 270px;
        bottom: 0;
        left: -60px;
    }

    .rh-awards::after {
        width: 340px;
        height: 210px;
        bottom: 0;
        left: 20px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile Small (below 480px)
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .rh-awards {
        padding: 40px 0 60px;
    }

    .rh-awards__curve-wrap {
        min-height: 140px;
    }

    .rh-awards__curved-text {
        font-size: 5.6rem;
    }

    .rh-awards__curved-svg {
        min-height: 140px;
    }

    .rh-awards__cell {
        padding: 16px 12px;
        min-height: 110px;
    }

    .rh-awards__cell img {
        max-width: 65%;
        max-height: 40px;
    }

    .rh-awards__cell-label {
        font-size: 9px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 360px) {
    .rh-awards__curved-text {
        font-size: 4.8rem;
    }

    .rh-awards__cell img {
        max-width: 60%;
        max-height: 34px;
    }

    .rh-awards__cell-label {
        font-size: 9px;
    }
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .rh-awards__grid .rh-awards__vline::after {
        animation: none !important;
        opacity: 0 !important;
    }

    .rh-awards__cell img {
        transition-duration: 0.01ms !important;
    }
}