#m2sVideoSection {
    --accent: #fdc513;
    --accent-dark: #d9a400;
    --text: #111111;
    --muted: #5f5f5f;
    --bg: #f5f5f2;
    --panel: #ffffff;
    --ink: #000000;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 36px 0 70px;
    font-family: "Inter", Arial, sans-serif;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #fbfaf5 0%, var(--bg) 42%, #ffffff 100%);
    background-size: 44px 44px, 44px 44px, 100% 100%;
    color: var(--text);
    text-align: left;
    word-spacing: normal;
}

#m2sVideoSection,
#m2sVideoSection *,
#m2sVideoSection *::before,
#m2sVideoSection *::after {
    box-sizing: border-box;
}

#m2sVideoSection p,
#m2sVideoSection h1,
#m2sVideoSection h2,
#m2sVideoSection h3 {
    margin: 0;
    text-align: left;
    word-spacing: normal;
}

#m2sVideoSection .gallery-header,
#m2sVideoSection .gallery-nav,
#m2sVideoSection .gallery-content {
    width: min(1400px, calc(100% - 24px));
    margin-left: auto !important;
    margin-right: auto !important;
}

#m2sVideoSection .gallery-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 247, 216, 0.96) 62%, rgba(0, 0, 0, 0.08) 100%);
    box-shadow: var(--shadow);
}

#m2sVideoSection .gallery-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), #000000);
}

#m2sVideoSection .gallery-header::after {
    content: "";
    position: absolute;
    right: clamp(18px, 4vw, 50px);
    bottom: -36px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

#m2sVideoSection .eyebrow,
#m2sVideoSection .category-heading p {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

#m2sVideoSection .gallery-header h1 {
    max-width: 720px;
    color: var(--ink);
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1;
    letter-spacing: 0;
}

#m2sVideoSection .header-copy {
    max-width: 680px;
    margin-top: 14px;
    color: #333333;
    font-size: 15px;
    line-height: 1.7;
}

#m2sVideoSection .tab-input {
    display: none !important;
}

#m2sVideoSection .gallery-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    overflow: visible;
    margin-bottom: 18px !important;
    padding: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
}

#m2sVideoSection .gallery-nav > .gallery-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 42px;
    margin: 0 !important;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px 8px 10px;
    background: transparent;
    color: #222222;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
}

#m2sVideoSection .btn-index {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
}

#m2s-tab-relief:checked ~ .gallery-nav .relief-btn,
#m2s-tab-education:checked ~ .gallery-nav .education-btn,
#m2s-tab-healthcare:checked ~ .gallery-nav .healthcare-btn,
#m2s-tab-livelihood:checked ~ .gallery-nav .livelihood-btn,
#m2s-tab-skill:checked ~ .gallery-nav .skill-btn,
#m2sVideoSection .gallery-btn:hover {
    border-color: rgba(0, 0, 0, 0.12);
    background: var(--accent);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

#m2s-tab-relief:checked ~ .gallery-nav .relief-btn .btn-index,
#m2s-tab-education:checked ~ .gallery-nav .education-btn .btn-index,
#m2s-tab-healthcare:checked ~ .gallery-nav .healthcare-btn .btn-index,
#m2s-tab-livelihood:checked ~ .gallery-nav .livelihood-btn .btn-index,
#m2s-tab-skill:checked ~ .gallery-nav .skill-btn .btn-index {
    background: #000000;
    color: var(--accent);
}

#m2sVideoSection .gallery-content {
    display: grid;
    gap: 14px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

#m2sVideoSection .tab-panel {
    display: none !important;
}

#m2s-tab-relief:checked ~ .gallery-content .relief-panel,
#m2s-tab-education:checked ~ .gallery-content .education-panel,
#m2s-tab-healthcare:checked ~ .gallery-content .healthcare-panel,
#m2s-tab-livelihood:checked ~ .gallery-content .livelihood-panel,
#m2s-tab-skill:checked ~ .gallery-content .skill-panel {
    display: grid !important;
    gap: 18px;
}

#m2sVideoSection .category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#m2sVideoSection .category-heading h2 {
    color: var(--ink);
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.05;
}

#m2sVideoSection .category-heading span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 9px 12px;
    background: #f3f5f0;
    color: #222222;
    font-size: 13px;
    font-weight: 800;
}

#m2sVideoSection .video-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

#m2sVideoSection .video-card {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

#m2sVideoSection .video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #252525;
}

#m2sVideoSection .video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#m2sVideoSection .video-info {
    display: grid;
    gap: 12px;
    min-height: 112px;
    padding: 15px 14px 18px;
}

#m2sVideoSection .video-info h3 {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
}

#m2sVideoSection .video-info a {
    align-self: end;
    width: fit-content;
    border-radius: 999px;
    padding: 9px 12px;
    background: var(--accent);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

#m2sVideoSection .video-info a:hover,
#m2sVideoSection .video-info a:focus-visible {
    background: #000000;
    color: var(--accent);
    outline: none;
}

@media (max-width: 900px) {
    #m2sVideoSection .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    #m2sVideoSection {
        padding: 28px 0 46px;
    }

    #m2sVideoSection .gallery-header h1 {
        max-width: 300px;
        font-size: 29px;
        line-height: 1.05;
        text-align: left !important;
    }

    #m2sVideoSection .header-copy {
        max-width: 100%;
        text-align: left !important;
        word-spacing: normal !important;
    }

    #m2sVideoSection .gallery-nav > .gallery-btn {
        align-items: flex-start !important;
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 0;
        min-height: auto;
        padding: 9px 8px;
        white-space: normal;
    }

    #m2sVideoSection .gallery-nav > .gallery-btn span:not(.btn-index) {
        min-width: 0;
        font-size: 12px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere;
    }

    #m2sVideoSection .video-grid {
        grid-template-columns: 1fr !important;
    }

    #m2sVideoSection .category-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
