.hero-video {
    width: 100%;
    max-width: 920px;
    margin: 42px auto 0;
    padding: 0 16px;
    box-sizing: border-box;
}
.hero-video h2 {
    margin: 0 0 18px;
}
.hero-video-frame {
    width: min(100%, 820px);
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #0b0f0d;
    box-shadow: 0 12px 35px rgba(0,0,0,.22);
}
.hero-video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.home-page {
    background: #101613;
    color: #f4f5f2;
}

.home-page .top {
    background: rgba(16,22,19,.92);
    border-bottom: 1px solid rgba(112,198,169,.10);
}

.home-page .brand,
.home-page .nav-link,
.home-page .nav-admin {
    color: #eef3ef;
}

.home-page .brand-mark {
    color: #70c6a9;
}

.home-page .hero-banner {
    min-height: 590px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 48%, rgba(65,125,99,.18), transparent 30%),
        radial-gradient(circle at 18% 75%, rgba(20,88,66,.14), transparent 32%),
        linear-gradient(135deg, #101613 0%, #15201b 52%, #0d1210 100%);
}

.home-page .hero-banner::before,
.home-page .hero-banner::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(1px);
}

.home-page .hero-banner::before {
    width: 520px;
    height: 520px;
    right: -250px;
    top: -130px;
    border: 1px solid rgba(112,198,169,.10);
    box-shadow:
        0 0 0 55px rgba(112,198,169,.025),
        0 0 0 110px rgba(112,198,169,.018);
}

.home-page .hero-banner::after {
    width: 300px;
    height: 300px;
    left: -190px;
    bottom: -170px;
    background: rgba(112,198,169,.035);
}

.home-page .banner-inner {
    width: 100%;
    position: relative;
    z-index: 2;
}

.home-page .banner-copy {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

.home-page .eyebrow {
    color: #8ed2b4;
    letter-spacing: .14em;
    font-weight: 700;
    font-size: 13px;
}

.home-page .banner-copy h1 {
    margin: 24px 0 8px;
    color: #f7f8f6;
    font-family: "Ubuntu Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: clamp(52px, 7vw, 92px);
    line-height: .98;
    font-weight: 500;
    letter-spacing: -.035em;
}

.home-page .community-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #79bc99;
    margin: 0 auto;
    max-width: 900px;
}

.home-page .community-title span {
    height: 1px;
    flex: 1;
    max-width: 230px;
    background: linear-gradient(90deg, transparent, rgba(112,198,169,.55));
}

.home-page .community-title span:last-child {
    background: linear-gradient(90deg, rgba(112,198,169,.55), transparent);
}

.home-page .community-title strong {
    font-family: "Ubuntu Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: clamp(28px, 3.5vw, 46px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -.02em;
}

.home-page .trident {
    width: 72px;
    height: 72px;
    margin: 12px auto 8px;
    position: relative;
    display: grid;
    place-items: center;
}

.home-page .trident::before,
.home-page .trident::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 125px;
    height: 1px;
    background: rgba(112,198,169,.38);
}

.home-page .trident::before { right: 100%; }
.home-page .trident::after { left: 100%; }

.home-page .trident svg {
    width: 48px;
    height: 58px;
    fill: none;
    stroke: #70c6a9;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(112,198,169,.15));
}

.home-page .banner-copy > p {
    margin: 14px auto 34px;
    color: #e6ebe8;
    font-size: clamp(17px, 2vw, 21px);
}

.home-page .search {
    max-width: 850px;
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 9px 7px 22px;
    border: 1px solid rgba(190,218,205,.22);
    border-radius: 12px;
    background: rgba(9,14,12,.48);
    box-shadow: 0 18px 45px rgba(0,0,0,.22);
    backdrop-filter: blur(8px);
}

.home-page .search-icon {
    flex: 0 0 auto;
    color: #aebbb4;
    font-size: 35px;
    line-height: 1;
    transform: rotate(-15deg);
}

.home-page .search input {
    min-width: 0;
    flex: 1;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #f2f5f3 !important;
    box-shadow: none !important;
    font-size: 16px;
}

.home-page .search input::placeholder {
    color: #89968f;
    opacity: 1;
}

.home-page .search button {
    flex: 0 0 auto;
    min-width: 105px;
    height: 54px;
    border: 0;
    border-radius: 9px;
    background: #477e63;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: .2s ease;
}

.home-page .search button:hover {
    background: #579572;
    transform: translateY(-1px);
}

.home-page .content {
    background: #101613;
    color: #eef3ef;
}

.home-page footer {
    background: #0b100d;
    color: #89968f;
    border-top: 1px solid rgba(112,198,169,.08);
}


/* ===== Лічильник героїв ===== */
.memory-counter {
    background: #0d1210;
    border-top: 1px solid rgba(112,198,169,.10);
    border-bottom: 1px solid rgba(112,198,169,.10);
}
.memory-counter-inner {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    text-align: center;
}
.memory-counter-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(112,198,169,.28);
    border-radius: 50%;
    color: #70c6a9;
    font-size: 22px;
    box-shadow: 0 0 25px rgba(112,198,169,.07);
}
.memory-counter-text {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.memory-counter-text .eyebrow {
    margin-right: 4px;
}
.memory-counter-text strong {
    color: #79bc99;
    font-family: "Ubuntu Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: 48px;
    line-height: 1;
    font-weight: 600;
}
.memory-counter-text > span:last-child {
    color: #c8d1cc;
    font-size: 16px;
}

@media (max-width: 700px) {
    .home-page .hero-banner {
        min-height: auto;
        padding: 58px 16px 64px;
    }

    .home-page .banner-copy {
        max-width: 100%;
    }

    .home-page .eyebrow {
        font-size: 11px;
        letter-spacing: .11em;
    }

    .home-page .banner-copy h1 {
        margin: 18px 0 10px;
        font-size: clamp(40px, 13vw, 58px);
        line-height: .98;
        letter-spacing: -.025em;
    }

    .home-page .community-title {
        gap: 7px;
        width: 100%;
    }

    .home-page .community-title strong {
        font-size: clamp(23px, 7vw, 30px);
        line-height: 1.05;
        white-space: normal;
    }

    .home-page .community-title span {
        max-width: 34px;
    }

    .home-page .trident {
        width: 58px;
        height: 58px;
        margin: 9px auto 5px;
    }

    .home-page .trident::before,
    .home-page .trident::after {
        width: 42px;
    }

    .home-page .trident svg {
        width: 38px;
        height: 48px;
    }

    .home-page .banner-copy > p {
        margin: 12px auto 25px;
        font-size: 16px;
        line-height: 1.45;
    }

    .home-page .search {
        box-sizing: border-box;
        width: calc(100% - 32px);
        max-width: 420px;
        min-height: 56px;
        margin-left: auto;
        margin-right: auto;
        padding: 5px 6px 5px 12px;
        gap: 6px;
        border-radius: 11px;
    }

    .home-page .search-icon {
        font-size: 25px;
        flex: 0 0 24px;
    }

    .home-page .search input {
        box-sizing: border-box;
        width: 1px;
        min-width: 0;
        flex: 1 1 auto;
        font-size: 13px;
        padding: 0 !important;
    }

    .home-page .search button {
        box-sizing: border-box;
        flex: 0 0 auto;
        width: 88px;
        min-width: 88px;
        height: 44px;
        padding: 0 8px;
        font-size: 14px;
    }

    .hero-video {
        width: calc(100% - 24px);
        max-width: 560px;
        margin: 30px auto 0;
        padding: 0;
    }

    .hero-video h2 {
        margin-bottom: 14px;
    }

    .hero-video-frame {
        width: 100%;
        margin: 0 auto;
        border-radius: 10px;
    }

    .memory-counter-inner {
        min-height: 96px;
        padding: 15px 16px;
        gap: 12px;
    }

    .memory-counter-icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        font-size: 17px;
    }

    .memory-counter-text {
        gap: 5px 8px;
        line-height: 1.2;
    }

    .memory-counter-text .eyebrow {
        width: 100%;
        margin: 0;
    }

    .memory-counter-text strong {
        font-size: 36px;
    }

    .memory-counter-text > span:last-child {
        font-size: 13px;
    }

    .home-page .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-page .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .home-page .section-head h2 {
        font-size: 30px;
    }

    .home-page .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-page .hero-card {
        min-width: 0;
    }

    .home-page .card-photo {
        height: 280px;
    }

    .home-page .card-body {
        padding: 18px;
    }

    .home-page .hero-card h3 {
        font-size: 23px;
    }

    .home-page .top .nav {
        padding-left: 16px;
        padding-right: 16px;
        gap: 10px;
    }

    .home-page .brand small {
        display: none;
    }

    .home-page .nav-link {
        display: none;
    }

    .home-page .nav-admin {
        margin-left: auto;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .home-page .hero-banner {
        padding-top: 45px;
    }

    .home-page .banner-copy h1 {
        font-size: 39px;
    }

    .home-page .community-title strong {
        font-size: 22px;
    }

    .home-page .community-title span {
        max-width: 20px;
    }

    .home-page .trident::before,
    .home-page .trident::after {
        width: 30px;
    }

    .home-page .search {
        width: calc(100% - 28px);
        max-width: 360px;
        min-height: 54px;
        padding: 5px;
        gap: 5px;
    }

    .home-page .search-icon {
        display: none;
    }

    .home-page .search input {
        font-size: 12.5px;
        padding-left: 7px !important;
    }

    .home-page .search button {
        width: 82px;
        min-width: 82px;
        height: 44px;
        padding: 0 7px;
    }

    .hero-video {
        width: calc(100% - 24px);
        max-width: 350px;
    }

    .memory-counter-inner {
        justify-content: flex-start;
        text-align: left;
    }

    .memory-counter-text {
        justify-content: flex-start;
    }
}

/* ===== FINAL MOBILE FIX ===== */
@media (max-width: 700px) {
    .home-page .search {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 92px !important;
        align-items: center !important;
        box-sizing: border-box !important;
        width: min(92vw, 560px) !important;
        max-width: 560px !important;
        min-height: 54px !important;
        height: 54px !important;
        margin: 22px auto 0 !important;
        padding: 5px !important;
        gap: 6px !important;
        overflow: hidden !important;
    }

    .home-page .search-icon {
        display: none !important;
    }

    .home-page .search input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 44px !important;
        box-sizing: border-box !important;
        padding: 0 8px !important;
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 44px !important;
    }

    .home-page .search button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        height: 44px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 8px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }

    /* Video on hero page */
    .hero-page .hero-video,
    .hero-video {
        display: block !important;
        box-sizing: border-box !important;
        width: min(92vw, 560px) !important;
        max-width: 560px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .hero-page .hero-video-frame,
    .hero-video-frame {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        aspect-ratio: 16 / 9 !important;
    }

    .hero-page .hero-video-frame iframe,
    .hero-video-frame iframe {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 420px) {
    .home-page .search {
        width: 90vw !important;
        max-width: 340px !important;
        grid-template-columns: minmax(0, 1fr) 82px !important;
    }

    .home-page .search button {
        width: 82px !important;
        min-width: 82px !important;
        max-width: 82px !important;
    }

    .hero-page .hero-video,
    .hero-video {
        width: 90vw !important;
        max-width: 390px !important;
    }
}


/* ===== Background video for the main hero ===== */
.home-page .hero-banner {
    isolation: isolate;
}

.home-page .hero-banner .hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center center;
    z-index: -2;
    pointer-events: none;
}

.home-page .hero-banner .hero-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8,14,11,.68) 0%, rgba(8,14,11,.44) 45%, rgba(8,14,11,.54) 100%),
        linear-gradient(180deg, rgba(8,14,11,.15) 0%, rgba(8,14,11,.42) 100%);
    z-index: -1;
    pointer-events: none;
}

.home-page .hero-banner .banner-inner {
    position: relative;
    z-index: 1;
}

