/*
 * resources.css
 * Page-specific styles for the Resources page template (resources.php).
 *
 * Scoped with .resources-page on <main>. Inter enqueued in functions.php.
 * Reuses from style.css: .page-hero, .cta-banner, .btn, .container
 */

/* ====================================================================
   DESIGN TOKENS — Resources (Figma)
   ==================================================================== */
.resources-page {
    --res-bg: #f9f9f7;
    --res-white: #ffffff;
    --res-black: #000000;
    --res-body: #4b5563;
    --res-muted: #6b7280;
    --res-green: #16a34a;
    --res-dark-bg: #16162a;
    --res-dark-card: rgba(255,255,255,0.04);
    --res-dark-border: rgba(255,255,255,0.08);
    --res-card-radius: 16px;
    --res-card-border: rgba(0,0,0,0.08);
    --res-card-shadow: 0 4px 16px rgba(0,0,0,0.06);
}


/* ====================================================================
   HERO
   ==================================================================== */

.resources-page .page-hero {
    min-height: auto;
    padding: 130px 0 80px;
    background-color: var(--res-bg);
    background-image: url(https://sr-website-01.shiprocket.in/sr-website/res-h2CrWf.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.resources-page .page-hero__background {
    background:
        radial-gradient(900px 540px at 50% 30%, rgba(196, 181, 253, 0.28) 0%, transparent 60%),
        radial-gradient(700px 420px at 25% 65%, rgba(253, 224, 71, 0.16) 0%, transparent 55%),
        radial-gradient(720px 460px at 80% 55%, rgba(147, 197, 253, 0.2) 0%, transparent 55%);
}

.resources-page .page-hero__subtext {
    color: #555555;
}


/* ====================================================================
   SHARED PAGE ELEMENTS
   ==================================================================== */

.res-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A94FF;
    margin-bottom: 12px;
}

.res-eyebrow--green {
    color: #7A94FF;
}

.res-section__heading {
    font-size: clamp(24px, 3vw, 32px);
    color: var(--res-black);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.res-section__sub {
    font-size: 15px;
    font-weight: 400;
    color: #555555;
    line-height: 1.65;
    max-width: 620px;
    margin-bottom: 36px;
}

.res-link {
    font-size: 14px;
    color: #7A94FF;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.res-link:hover { opacity: 0.7; }


/* ====================================================================
   1. HELP CENTER
   ==================================================================== */

.res-help {
    padding: 72px 0;
    background-color: var(--res-bg);
}

.res-help__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.res-help__card {
    background: var(--res-white);
    border-radius: var(--res-card-radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease;
    border: 1px solid #F1F1F1;
}

.res-help__card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

.res-help__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.res-help__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--res-black);
}

.res-help__desc {
    font-size: 14px;
    font-weight: 400;
    color: var(--res-body);
    line-height: 1.55;
    margin-bottom: 4px;
}


/* ====================================================================
   2. API DOCUMENTATION (dark section)
   ==================================================================== */

.res-api {
    padding: 80px 0;
    background: var(--res-dark-bg);
    color: var(--res-white);
}

.res-api__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.res-api__heading {
    font-size: clamp(28px, 3.5vw, 38px);
    color: var(--res-white);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 14px;
}

.res-api__desc {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    margin-bottom: 28px;
}

.res-api__btn {
    border-color: var(--res-white);
    background: var(--res-white);
}

.res-api__btn:hover {
    background: rgba(255,255,255,0.08);
}

/* Code window */
.res-code-window {
    background: #0d0d1a;
    border: 1px solid var(--res-dark-border);
    border-radius: var(--res-card-radius);
    overflow: hidden;
    position: relative;
}

.res-code-window__dots {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.res-code-window__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.res-code-window__body {
    padding: 18px 20px 48px;
    font-family: "SF Mono", "Fira Code", "Courier New", monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
}

.res-code--method {
    color: #7c69fa;
    font-weight: 700;
}

.res-code--header {
    color: #f59e0b;
}

.res-code-window__badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: #7c69fa;
    color: var(--res-white);
    font-family: "SF Mono", monospace;
    font-size: 16px;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ====================================================================
   3. VOICE APIs
   ==================================================================== */

.res-voice {
    padding: 80px 0;
    background-color: #000000;
    color: var(--res-white);
    background-image: url(https://sr-website-01.shiprocket.in/sr-website/kk-hVchYe.png);
    background-size: cover;
    background-position: bottom;
}

.res-voice__heading {
    font-size: clamp(24px, 3vw, 32px);
    color: var(--res-white);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 36px;
}

.res-voice__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.res-voice__card {
    border-radius: var(--res-card-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #00000099;
    backdrop-filter: blur(10px);
}

.res-voice__code {
    border-radius: 10px;
    padding: 14px;
    font-size: 11px;
    color: #3BE696;
    line-height: 1.5;
    overflow: hidden;
    word-break: break-all;
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    border: 0.52px solid;
    border-image-source: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 123.99%);
    backdrop-filter: blur(22.696279525756836px);
    height: 65px;
}

.res-voice__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--res-white);
}

.res-voice__desc {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    flex: 1;
}


/* ====================================================================
   4. STORIES & INSIGHTS
   ==================================================================== */

.res-stories {
    padding: 72px 0;
    background-color: var(--res-bg);
}

.res-stories__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.res-story {
    background: var(--res-white);
    border: 1px solid var(--res-card-border);
    border-radius: var(--res-card-radius);
    box-shadow: var(--res-card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.res-story--large {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
}

.res-story__img {
    flex-shrink: 0;
    overflow: hidden;
    background: #eaeaea;
}

.res-story--large .res-story__img {
    height: 260px;
}

.res-story:not(.res-story--large) .res-story__img {
    width: 180px;
    min-height: 140px;
}

.res-story__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.res-story__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.res-story--large .res-story__content {
    padding: 24px;
    gap: 8px;
}

.res-story__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: #C6ECFF;
    color: #000000;
    padding: 3px 10px;
    border-radius: 9999px;
    width: fit-content;
    line-height: 1.3;
}

.res-story__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--res-black);
    line-height: 1.3;
}

.res-story--large .res-story__title {
    font-size: 18px;
}

.res-story__excerpt {
    font-size: 13px;
    font-weight: 400;
    color: var(--res-body);
    line-height: 1.6;
}

.res-story .res-link {
    margin-top: 4px;
}


/* ====================================================================
   CTA BANNER OVERRIDES (scoped)
   ==================================================================== */



.resources-page .cta-banner .btn {
    font-weight: 500;
}


/* ====================================================================
   5. RESPONSIVE
   ==================================================================== */

@media (max-width: 900px) {
    .res-api__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .res-voice__grid {
        grid-template-columns: 1fr;
    }

    .res-stories__grid {
        grid-template-columns: 1fr;
    }

    .res-story--large {
        grid-row: auto;
    }

    .res-story:not(.res-story--large) {
        flex-direction: column;
    }

    .res-story:not(.res-story--large) .res-story__img {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 600px) {
    .res-help__grid {
        grid-template-columns: 1fr;
    }
}
