/* =========================================
   Hero Section - Restored Banner
========================================= */
#home {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 500px;
    align-items: center;
    overflow: visible;
    padding: 34px 0 48px;
    background-image: url(/staticfiles/back.png);
    background-attachment: scroll;
    background-position: top center;
    background-repeat: repeat;
    background-size: 225px 225px;
}

#home,
#home * {
    box-sizing: border-box;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 60, 97, .08);
    pointer-events: none;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    direction: rtl;
}

.hero-right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    width: auto;
    min-width: 0;
}

.hero-logos,
#back_logo,
#back_flag {
    display: none;
}

.hero-container {
    width: min(800px, 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 38px 42px 34px;
    border-right: 5px solid #d4b568;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(8, 80, 118, .76));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .42);
    backdrop-filter: blur(10px);
    overflow: visible;
}

.hero-title {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 4.2vw, 50px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.45;
}

.hero-subtitle {
    margin: 0;
    color: #cbd5e1 !important;
    font-size: clamp(16px, 1.55vw, 20px);
    font-weight: 750;
    line-height: 2;
}

.highlight-text {
    color: #d4b568 !important;
    font-size: 1.06em;
    font-weight: 900;
}

.story-slider {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    grid-template-areas: "stage thumbs";
    gap: 14px;
    width: 100%;
    height: 390px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 55px rgba(0, 47, 78, .28), inset 0 1px 0 rgba(255, 255, 255, .86);
    backdrop-filter: blur(10px);
    direction: ltr;
    overflow: hidden;
    align-items: stretch;
}

.story-slider-thumbs {
    grid-area: thumbs;
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, #0aa8b7 0%, #087f99 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    direction: rtl;
}

.story-slider-thumb {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 2px solid rgba(232, 252, 255, .76);
    border-radius: 14px;
    background: #e8f7f8;
    cursor: pointer;
    overflow: hidden;
    opacity: .78;
    box-shadow: 0 8px 18px rgba(0, 55, 75, .16);
    transition: opacity .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.story-slider-thumb:hover,
.story-slider-thumb:focus,
.story-slider-thumb.active {
    opacity: 1;
    border-color: #f6c84d;
    transform: translateX(-3px);
    box-shadow: 0 12px 24px rgba(0, 55, 75, .24);
}

.story-slider-thumb::after {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 8px;
    left: 9px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .48);
}

.story-slider-thumb.active::after {
    background: #f6c84d;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
}

.story-slider-thumb.active::before {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 8px;
    z-index: 1;
    width: calc(100% - 18px);
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    transform-origin: right center;
    animation: storySliderProgress 5.5s linear forwards;
}

@keyframes storySliderProgress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.story-slider-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-slider-window {
    grid-area: stage;
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}

.story-slider-track {
    position: relative;
    direction: rtl;
    height: 100%;
    min-height: 0;
}

.story-slider-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-18px) scale(.985);
    transition: opacity .35s ease, transform .45s ease, visibility .35s ease;
}

.story-slider-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.story-slider-link {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #ffffff;
    color: #14384e;
    text-decoration: none;
    overflow: hidden;
}

.story-slider-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #dceff3 0%, #f6fbfc 100%);
}

.story-slider-backdrop {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: cover;
    filter: blur(18px);
    opacity: .24;
    transform: scale(1.05);
}

.story-slider-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.05) contrast(1.02);
}

.story-slider-caption {
    min-height: 118px;
    padding: 16px 22px 16px 104px;
    background:
        radial-gradient(circle at 92% 22%, rgba(246, 200, 77, .16), transparent 26%),
        linear-gradient(180deg, #fbfeff 0%, #e7f7f9 100%);
    border-top: 1px solid rgba(13, 95, 143, .1);
    text-align: right;
}

.story-slider-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 3px;
    padding: 1px 10px;
    border-radius: 999px;
    background: rgba(13, 113, 129, .1);
    color: #0d7181;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.9;
}

.story-slider-title {
    margin: 0 0 4px;
    color: #063f69;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-slider-summary {
    display: -webkit-box;
    margin: 0;
    color: #1e3f53;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.95;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-slider-controls {
    position: absolute;
    right: auto;
    bottom: 18px;
    left: 20px;
    z-index: 4;
    display: flex;
    gap: 6px;
    direction: ltr;
}

.story-slider-controls button {
    width: 29px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(6, 63, 105, .18);
    border-radius: 8px;
    background: linear-gradient(#ffffff, #e9f4f7);
    color: #0d4d73;
    font-size: 13px;
    font-weight: 900;
    line-height: 22px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 47, 78, .1);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.story-slider-controls button:hover,
.story-slider-controls button:focus {
    background: #0d4d73;
    color: #ffffff;
    transform: translateY(-1px);
}

.hero-banner-empty {
    width: 100%;
    padding: 38px 42px 34px;
    border-right: 5px solid #d4b568;
    border-radius: 24px 6px 6px 24px;
    background: linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(8, 80, 118, .76));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .42);
}

.hero-banner-empty .hero-banner-title {
    color: #ffffff;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.55;
}

.hero-banner-empty .hero-banner-summary {
    display: block;
    margin: 10px 0 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 2;
}

.home-menu-shell {
    position: sticky;
    top: var(--mpte-sticky-header-offset, 112px);
    z-index: 9000;
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.hero-menu {
    position: relative;
    z-index: 9010;
    display: flex;
    width: 100%;
    max-width: 1280px;
    min-height: 56px;
    margin: 0 auto;
    padding: 0 5%;
    flex-wrap: nowrap;
    gap: 28px;
    align-items: center;
    justify-content: flex-start;
}

.hero-menu-group {
    position: relative;
    z-index: 9020;
    display: flex;
    min-height: 56px;
    align-items: center;
}

.hero-menu-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 19px 0 17px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #172033;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.5;
    cursor: default;
    box-shadow: none;
    letter-spacing: 0;
    transition: color .18s ease, transform .18s ease;
}

.hero-menu-title::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #0d4d73;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.hero-menu-title::after {
    content: "";
    width: 6px;
    height: 6px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin-top: -3px;
    opacity: .7;
    transition: transform .22s ease;
}

.hero-menu-group:hover .hero-menu-title,
.hero-menu-group:focus-within .hero-menu-title {
    transform: translateY(-1px);
    color: #0d4d73;
}

.hero-menu-group:hover .hero-menu-title::before,
.hero-menu-group:focus-within .hero-menu-title::before {
    transform: scaleX(1);
}

.hero-menu-group:hover .hero-menu-title::after,
.hero-menu-group:focus-within .hero-menu-title::after {
    transform: rotate(135deg);
}

.hero-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9030;
    display: grid;
    min-width: 240px;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, .98);
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 24px 54px rgba(15, 23, 42, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transform-origin: top right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.hero-menu-group:hover .hero-submenu,
.hero-menu-group:focus-within .hero-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-submenu a {
    display: block;
    padding: 11px 12px;
    border-radius: 7px;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.hero-submenu a:hover,
.hero-submenu a:focus {
    background: #f2f7f7;
    color: #0d4d73;
    transform: translateX(-3px);
}

.hero-left {
    position: relative;
    flex: 0 0 315px;
    display: block;
    order: 2;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }

    100% {
        transform: translateY(0);
    }
}

#back_leader {
    display: block;
    width: 305px;
    height: 405px;
    border-radius: 13px;
    background-image: url(/staticFiles/leader.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, .22),
        0 0 0 8px rgba(160, 175, 156, .62),
        0 22px 38px rgba(0, 0, 0, .38);
    animation: floatImage 6s ease-in-out infinite;
}

:root[data-theme="dark"] #home {
    background-image: url(/staticfiles/back.png);
    background-repeat: repeat;
    background-size: 225px 225px;
}

:root[data-theme="dark"] .hero-content,
:root[data-theme="dark"] .hero-banner-empty {
    background: linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(8, 80, 118, .76));
}

:root[data-theme="dark"] .story-slider {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(248, 250, 252, .95);
}

:root[data-theme="dark"] .story-slider-caption {
    background: linear-gradient(180deg, #f8fdff 0%, #e7f7f9 100%);
}

:root[data-theme="dark"] .home-menu-shell {
    background: rgba(255, 255, 255, .98);
    border-bottom-color: rgba(15, 23, 42, .08);
}

:root[data-theme="dark"] .hero-menu-title {
    color: #172033;
}

:root[data-theme="dark"] .hero-menu-group:hover .hero-menu-title,
:root[data-theme="dark"] .hero-menu-group:focus-within .hero-menu-title {
    color: #0d4d73;
}

@media (max-width: 1100px) {
    #home {
        min-height: auto;
        padding: 34px 0;
        background-attachment: scroll;
    }

    .hero-content-wrapper {
        gap: 28px;
    }

    .hero-container {
        width: min(700px, 100%);
    }

    .story-slider {
        grid-template-columns: minmax(0, 1fr) 116px;
        grid-template-areas: "stage thumbs";
        gap: 12px;
        height: 350px;
        padding: 12px;
        border-radius: 22px;
    }

    .story-slider-thumbs {
        padding: 8px;
        border-radius: 16px;
    }

    .story-slider-caption {
        flex-basis: 108px;
        min-height: 108px;
        padding: 12px 18px 12px 94px;
    }

    .story-slider-title {
        font-size: 16px;
    }

    .story-slider-summary {
        font-size: 12px;
    }

    .hero-content {
        border-right: 0;
        border-top: 5px solid #d4b568;
        border-radius: 0 0 15px 15px;
        text-align: center;
    }

    .hero-menu {
        gap: 18px;
        justify-content: center;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .hero-left {
        flex: 0 0 250px;
    }

    #back_leader {
        width: 240px;
        height: 320px;
    }
}

@media (max-width: 900px) {
    .hero-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 26px;
    }

    .hero-right {
        align-items: stretch;
        width: 100%;
    }

    .hero-container {
        width: min(720px, 100%);
    }

    .hero-left {
        order: 0;
        flex-basis: auto;
    }
}

@media (max-width: 760px) {
    #home {
        padding: 28px 0;
    }

    .hero-content-wrapper {
        padding: 0 14px;
    }

    .hero-container {
        width: 100%;
    }

    .hero-left {
        display: none;
    }

    .hero-content {
        padding: 24px 20px;
        text-align: right;
    }

    .story-slider {
        grid-template-columns: 1fr;
        grid-template-areas:
            "stage"
            "thumbs";
        height: auto;
        min-height: 0;
        gap: 10px;
        padding: 10px;
        border-radius: 18px;
    }

    .story-slider-window {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 4 / 3;
        order: 1;
        border-radius: 15px;
    }

    .story-slider-thumbs {
        order: 2;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: 64px;
        grid-auto-rows: 64px;
        height: auto;
        padding: 8px;
        border-radius: 14px;
    }

    .story-slider-thumb:hover,
    .story-slider-thumb:focus,
    .story-slider-thumb.active {
        transform: translateY(-2px);
    }

    .story-slider-caption {
        flex-basis: 98px;
        min-height: 112px;
        padding: 10px 12px 46px;
    }

    .story-slider-label {
        display: none;
    }

    .story-slider-title {
        font-size: 13px;
        -webkit-line-clamp: 1;
    }

    .story-slider-summary {
        font-size: 12px;
        line-height: 1.65;
        -webkit-line-clamp: 2;
    }

    .story-slider-controls {
        right: auto;
        bottom: 12px;
        left: 14px;
        gap: 5px;
    }

    .story-slider-controls button {
        width: 25px;
        height: 22px;
        line-height: 20px;
    }

    .hero-banner-empty .hero-banner-title {
        font-size: 26px;
    }

    .hero-banner-empty .hero-banner-summary {
        font-size: 14px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .home-menu-shell {
        display: none;
    }
}
