
/* =========================================================
   VILLAGE WELFARE SOCIETY
   RESOURCES & REPORTS
========================================================= */


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

.resources-hero {
    position: relative;
    min-height: 690px;
    display: flex;
    align-items: center;
    overflow: hidden;

    background:
        radial-gradient(circle at 78% 30%, rgba(96,165,250,.20), transparent 28%),
        radial-gradient(circle at 18% 85%, rgba(37,99,235,.18), transparent 30%),
        linear-gradient(135deg, #06142b 0%, #0b2b57 55%, #0f4c81 100%);

    color: #ffffff;
}

.resources-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: .28;
    pointer-events: none;
}

.resources-hero .container {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 70px;
}

.resources-hero-content {
    max-width: 700px;
}

.resources-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.resources-eyebrow i {
    color: #60a5fa;
}

.resources-hero h1 {
    margin: 0 0 25px;
    font-size: clamp(46px, 5.8vw, 78px);
    line-height: 1.03;
    letter-spacing: -2.5px;
    font-weight: 850;
    color: #ffffff;
}

.resources-hero h1 span {
    display: block;
    color: #93c5fd;
}

.resources-hero p {
    max-width: 620px;
    margin: 0 0 32px;
    color: rgba(255,255,255,.78);
    font-size: 18px;
    line-height: 1.8;
}

.resources-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 50px;
    background: #ffffff;
    color: #0f3b82;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 18px 40px rgba(0,0,0,.20);
    transition: transform .3s ease, box-shadow .3s ease;
}

.resources-hero-btn:hover {
    color: #0f3b82;
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0,0,0,.28);
}


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

.resources-hero-visual {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resources-document-stack {
    position: relative;
    width: 340px;
    height: 380px;
}

.resources-document {
    position: absolute;
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(0,0,0,.28);
    transition: transform .5s ease;
}

.resources-document-back {
    width: 230px;
    height: 300px;
    top: 42px;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(147,197,253,.16);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.30);
    transform: rotate(-12deg);
}

.resources-document-middle {
    width: 240px;
    height: 315px;
    top: 27px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.38);
    transform: rotate(10deg);
}

.resources-document-front {
    width: 250px;
    min-height: 335px;
    top: 20px;
    left: 45px;
    padding: 28px;
    background: rgba(255,255,255,.96);
    color: #102a43;
    transform: rotate(-1deg);
    border: 1px solid rgba(255,255,255,.8);
}

.resources-document-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid #dbeafe;
    color: #1558b0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.resources-document-top i {
    font-size: 20px;
}

.resources-document-lines {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 35px;
}

.resources-document-lines span {
    display: block;
    height: 8px;
    border-radius: 20px;
    background: #dbeafe;
}

.resources-document-lines span:nth-child(1) {
    width: 82%;
    background: #93c5fd;
}

.resources-document-lines span:nth-child(2) {
    width: 95%;
}

.resources-document-lines span:nth-child(3) {
    width: 72%;
}

.resources-document-lines span:nth-child(4) {
    width: 88%;
}

.resources-document-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 55px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}

.resources-document-footer i {
    color: #2563eb;
}

.resources-hero-visual:hover .resources-document-front {
    transform: rotate(-1deg) translateY(-10px);
}

.resources-hero-visual:hover .resources-document-back {
    transform: rotate(-15deg) translate(-8px, 5px);
}

.resources-hero-visual:hover .resources-document-middle {
    transform: rotate(13deg) translate(8px, 5px);
}

.resources-hero-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(5px);
    pointer-events: none;
}

.resources-glow-one {
    top: -120px;
    right: 10%;
    background: rgba(96,165,250,.10);
}

.resources-glow-two {
    bottom: -130px;
    left: 28%;
    background: rgba(37,99,235,.12);
}


/* =========================================================
   INTRO / LIBRARY
========================================================= */

.resources-intro {
    padding: 110px 0 80px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.resources-section-heading {
    max-width: 780px;
    margin: 0 auto 70px;
    text-align: center;
}

.resources-section-heading > span {
    display: inline-block;
    margin-bottom: 14px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.resources-section-heading h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -1.2px;
    font-weight: 800;
}

.resources-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 17px;
    line-height: 1.8;
}


/* =========================================================
   CATEGORY
========================================================= */

.resources-category {
    margin-bottom: 85px;
}

.resources-category-last {
    margin-bottom: 20px;
}

.resources-category-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
}

.resources-category-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #2563eb;
    font-size: 21px;
    box-shadow: 0 12px 28px rgba(37,99,235,.10);
}

.resources-category-heading span {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.resources-category-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 25px;
    font-weight: 800;
}


/* =========================================================
   RESOURCE CARDS
========================================================= */

.resources-grid {
    display: grid;
    gap: 22px;
}

.resources-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resources-card {
    position: relative;
    min-height: 320px;
    padding: 30px 28px 25px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15,23,42,.055);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.resources-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}

.resources-card:hover {
    transform: translateY(-8px);
    border-color: #bfdbfe;
    box-shadow: 0 24px 55px rgba(15,23,42,.11);
}

.resources-card:hover::before {
    transform: scaleX(1);
}

.resources-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 19px;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.resources-card:hover .resources-card-icon {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
}

.resources-card-number {
    position: absolute;
    top: 26px;
    right: 25px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.resources-card h4 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 800;
}

.resources-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.75;
}

.resources-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.resources-card-meta i {
    color: #2563eb;
}

.resources-card-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 15px 0 0;
    border: 0;
    border-top: 1px solid #eef2f7;
    background: transparent;
    color: #2563eb;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.resources-card-action i {
    transition: transform .3s ease;
}

.resources-card-action:hover i {
    transform: translateX(5px);
}

.resources-card-action:focus-visible {
    outline: 3px solid rgba(37,99,235,.20);
    outline-offset: 5px;
    border-radius: 5px;
}


/* =========================================================
   CTA
========================================================= */

.resources-cta {
    padding: 40px 0 110px;
    background: #ffffff;
}

.resources-cta-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 45px 50px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 20%, rgba(96,165,250,.22), transparent 32%),
        linear-gradient(135deg, #0b2b57, #1558b0);
    color: #ffffff;
    box-shadow: 0 25px 65px rgba(15,59,130,.20);
}

.resources-cta-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    color: #bfdbfe;
    font-size: 27px;
}

.resources-cta-content > span {
    display: block;
    margin-bottom: 7px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.resources-cta-content h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
}

.resources-cta-content p {
    max-width: 700px;
    margin: 0;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    line-height: 1.7;
}

.resources-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 21px;
    border-radius: 50px;
    background: #ffffff;
    color: #1558b0;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .3s ease, box-shadow .3s ease;
}

.resources-cta-btn:hover {
    color: #1558b0;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,.20);
}


/* =========================================================
   DOCUMENT LIST MODAL
========================================================= */

.resources-modal,
.resources-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.resources-modal.is-open,
.resources-viewer.is-open {
    display: block;
}

.resources-modal-backdrop,
.resources-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2,8,23,.76);
    backdrop-filter: blur(7px);
}

.resources-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 30px));
    max-height: min(760px, calc(100vh - 40px));
    margin: 20px auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 35px 100px rgba(0,0,0,.35);
    animation: resourcesModalIn .25s ease;
}

.resources-modal-header,
.resources-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 25px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.resources-modal-kicker {
    display: block;
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.resources-modal-header h2,
.resources-viewer-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
}

.resources-modal-close,
.resources-viewer-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #f8fafc;
    color: #334155;
    font-size: 17px;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.resources-modal-close:hover,
.resources-viewer-close:hover {
    background: #eff6ff;
    color: #2563eb;
    transform: rotate(5deg);
}

.resources-modal-body {
    max-height: calc(100vh - 155px);
    overflow-y: auto;
    padding: 18px;
}

.resources-document-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resources-document-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #ffffff;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.resources-document-row:hover {
    transform: translateX(3px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 25px rgba(15,23,42,.07);
}

.resources-document-type {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
}

.resources-document-info {
    min-width: 0;
}

.resources-document-info h3 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.resources-document-info p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.resources-document-year {
    display: inline-block;
    margin-top: 5px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 750;
}

.resources-document-view {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border: 0;
    border-radius: 30px;
    background: #eff6ff;
    color: #2563eb;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.resources-document-view:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
}

.resources-list-empty {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}

.resources-list-empty i {
    margin-bottom: 15px;
    color: #94a3b8;
    font-size: 38px;
}

.resources-list-empty h3 {
    margin: 0 0 8px;
    color: #334155;
    font-size: 18px;
}

.resources-list-empty p {
    margin: 0;
    font-size: 13px;
}


/* =========================================================
   DOCUMENT VIEWER
========================================================= */

.resources-viewer-dialog {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 24px));
    height: calc(100vh - 24px);
    margin: 12px auto;
    overflow: hidden;
    border-radius: 20px;
    background: #0b1220;
    box-shadow: 0 35px 100px rgba(0,0,0,.50);
    animation: resourcesModalIn .25s ease;
}

.resources-viewer-header {
    min-height: 76px;
}

.resources-viewer-heading {
    min-width: 0;
}

.resources-viewer-heading h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resources-viewer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resources-viewer-newtab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 30px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.resources-viewer-newtab:hover {
    color: #1d4ed8;
    background: #dbeafe;
}

.resources-viewer-body {
    position: relative;
    height: calc(100% - 76px);
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, #172554 0%, #0b1220 58%);
}

.resources-viewer-pdf {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

.resources-viewer-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 25px;
}

.resources-viewer-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 15px 45px rgba(0,0,0,.35);
}

.resources-viewer-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: #0b1220;
    color: #cbd5e1;
    font-size: 13px;
}

.resources-viewer-loading i {
    color: #60a5fa;
    font-size: 25px;
}

.resources-viewer-error {
    max-width: 500px;
    padding: 30px;
    text-align: center;
    color: #cbd5e1;
}

.resources-viewer-error i {
    margin-bottom: 15px;
    color: #fbbf24;
    font-size: 34px;
}

.resources-viewer-error h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 19px;
}

.resources-viewer-error p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   BODY LOCK
========================================================= */

body.resources-modal-open {
    overflow: hidden;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes resourcesModalIn {

    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {

    .resources-hero .container {
        gap: 40px;
    }

}


@media (max-width: 991px) {

    .resources-hero {
        min-height: auto;
        padding: 150px 0 90px;
    }

    .resources-hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .resources-hero-content {
        margin: 0 auto;
    }

    .resources-hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .resources-eyebrow {
        justify-content: center;
    }

    .resources-hero-visual {
        min-height: 360px;
    }

    .resources-document-stack {
        transform: scale(.9);
    }

    .resources-cta-inner {
        grid-template-columns: auto 1fr;
    }

    .resources-cta-btn {
        grid-column: 2;
        justify-self: start;
    }

}


@media (max-width: 767px) {

    .resources-hero {
        padding: 130px 0 70px;
    }

    .resources-hero h1 {
        font-size: clamp(42px, 12vw, 60px);
        letter-spacing: -1.5px;
    }

    .resources-hero p {
        font-size: 16px;
    }

    .resources-hero-visual {
        min-height: 310px;
    }

    .resources-document-stack {
        transform: scale(.75);
    }

    .resources-intro {
        padding: 80px 0 55px;
    }

    .resources-section-heading {
        margin-bottom: 50px;
    }

    .resources-section-heading h2 {
        font-size: 34px;
    }

    .resources-section-heading p {
        font-size: 15px;
    }

    .resources-category {
        margin-bottom: 65px;
    }

    .resources-category-heading {
        align-items: flex-start;
    }

    .resources-category-heading h3 {
        font-size: 21px;
    }

    .resources-grid-two {
        grid-template-columns: 1fr;
    }

    .resources-card {
        min-height: auto;
    }

    .resources-cta {
        padding: 20px 0 80px;
    }

    .resources-cta-inner {
        grid-template-columns: 1fr;
        padding: 35px 28px;
        text-align: center;
    }

    .resources-cta-icon {
        margin: 0 auto;
    }

    .resources-cta-btn {
        grid-column: auto;
        justify-self: center;
    }

    .resources-modal-dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        margin: 8px auto;
        border-radius: 18px;
    }

    .resources-modal-header,
    .resources-viewer-header {
        padding: 17px;
    }

    .resources-modal-header h2,
    .resources-viewer-header h2 {
        font-size: 18px;
    }

    .resources-modal-body {
        max-height: calc(100vh - 120px);
        padding: 12px;
    }

    .resources-document-row {
        grid-template-columns: 42px 1fr;
        gap: 12px;
        padding: 13px;
    }

    .resources-document-type {
        width: 42px;
        height: 42px;
    }

    .resources-document-view {
        grid-column: 2;
        justify-self: start;
    }

    .resources-viewer-dialog {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .resources-viewer-body {
        height: calc(100% - 72px);
    }

    .resources-viewer-newtab {
        padding: 8px 10px;
        font-size: 10px;
    }

    .resources-viewer-image-wrap {
        padding: 12px;
    }

}


@media (max-width: 390px) {

    .resources-hero {
        padding-top: 120px;
    }

    .resources-document-stack {
        transform: scale(.66);
    }

    .resources-category-heading {
        gap: 12px;
    }

    .resources-category-icon {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }

    .resources-card {
        padding: 24px 20px 22px;
    }

}
