/* Home page overrides */

html.page-home-root,
body.page-home {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    perspective: none !important;
    transform: none !important;
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.page-home #page {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    transform: none !important;
    perspective: none !important;
}

body.page-home .page-wrapper,
body.page-home .page-wrapper-inner {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: block !important;
}

body.page-home .page-wrapper-inner figure,
body.page-home figure.page-wrapper-inner {
    display: block !important;
    margin: 0;
    width: 100%;
}

body.page-home .base-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
}

body.page-home .layer,
body.page-home .layer.animate {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    z-index: 1;
    top: auto !important;
    left: auto !important;
    table-layout: auto !important;
}

body.page-home .layer.animate.pointer-events-none {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    display: block;
    pointer-events: none;
}

body.page-home #content,
body.page-home .content-wrapper {
    display: block !important;
    vertical-align: initial !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}

body.page-home .home-container.container {
    width: 100% !important;
    max-width: 1140px !important;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

body.page-home .home-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 50px 0 60px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Mobile header + hamburger (hidden on desktop) */
body.page-home .home-mobile-header {
    display: none;
}

body.page-home .home-menu-overlay,
body.page-home .home-mobile-menu {
    display: none;
}

@media (max-width: 767px) {
    body.page-home .home-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 56px;
        padding: 0 16px;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(212, 175, 55, 0.15);
        box-sizing: border-box;
    }

    body.page-home .home-mobile-logo {
        font-family: MyFont, 'Poppins', sans-serif !important;
        font-size: 1rem !important;
        font-weight: 600;
        color: #fff;
        text-decoration: none;
        letter-spacing: 0;
        margin: 0;
        padding: 0;
        line-height: 1;
        white-space: nowrap;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 52px);
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-flex !important;
        align-items: center;
        gap: 0;
    }

    body.page-home .home-mobile-logo .brand-wing {
        display: inline-block;
        color: #f0cf6a;
    }

    body.page-home .home-mobile-logo .brand-wing-left {
        margin-right: -0.04em;
    }

    body.page-home .home-mobile-logo .brand-wing-right {
        transform: scaleX(-1);
        -webkit-transform: scaleX(-1);
        margin-left: -0.14em;
    }

    body.page-home .home-mobile-logo .brand-top {
        display: inline-block;
        letter-spacing: 0.02em;
        padding: 0;
    }

    body.page-home .home-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        border: none;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    body.page-home .home-menu-bar {
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        border-radius: 1px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    body.page-home.home-menu-open .home-menu-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.page-home.home-menu-open .home-menu-bar:nth-child(2) {
        opacity: 0;
    }

    body.page-home.home-menu-open .home-menu-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    body.page-home .home-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.65);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.page-home .home-menu-overlay:not([hidden]) {
        opacity: 1;
        visibility: visible;
    }

    body.page-home .home-mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        height: 100%;
        height: 100dvh;
        z-index: 1002;
        background: #0a0a0a;
        border-left: 1px solid rgba(212, 175, 55, 0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.page-home.home-menu-open .home-mobile-menu {
        transform: translateX(0);
    }

    body.page-home.home-menu-open {
        overflow: hidden !important;
    }

    body.page-home.home-menu-open #content {
        overflow: hidden !important;
    }

    body.page-home .home-mobile-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    body.page-home .home-mobile-menu-title {
        color: rgba(255, 255, 255, 0.85);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        font-family: 'Poppins', sans-serif;
    }

    body.page-home .home-menu-close {
        width: 40px;
        height: 40px;
        border: none;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        border-radius: 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    body.page-home .home-mobile-menu-countries {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    body.page-home .home-menu-country-item {
        min-width: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

    body.page-home .home-page-content > .brand {
        display: none;
    }

    body.page-home .country-picker-desktop {
        display: none !important;
    }

    body.page-home .country-picker-mobile {
        display: block !important;
        width: 100%;
        max-width: 100%;
        margin: 8px auto 0;
        padding-bottom: 24px;
    }

    body.page-home .country-picker-mobile-list {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.page-home .country-picker-mobile .country-picker-item {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
        padding: 14px 18px;
    }

    body.page-home .home-page-content {
        justify-content: flex-start;
        min-height: auto;
        padding: 64px 0 36px;
    }

    body.page-home .brand {
        margin-bottom: 28px;
    }
}

/* Logo fade-in */
@keyframes brandFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

body.page-home .brand {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 48px;
}

body.page-home .brand-link {
    text-decoration: none;
    display: inline-block;
}

body.page-home .home-page-content .brand .brand-logo {
    font-family: MyFont, 'Poppins', sans-serif !important;
    color: #fff;
    margin: 0;
    padding: 0;
    display: inline-flex !important;
    align-items: center;
    gap: 0;
    line-height: 1.05;
    text-align: center;
    font-size: clamp(2.25rem, 8vw, 4rem) !important;
    white-space: nowrap;
    letter-spacing: 0;
    word-break: normal;
    opacity: 0;
    animation: brandFadeIn 4s ease-in-out forwards !important;
    -webkit-animation: brandFadeIn 4s ease-in-out forwards !important;
}

body.page-home .brand-logo .brand-wing {
    display: inline-block;
    color: #f0cf6a;
}

body.page-home .brand-logo .brand-wing-left {
    margin-right: -0.04em;
}

body.page-home .brand-logo .brand-wing-right {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    margin-left: -0.14em;
}

body.page-home .brand-logo .brand-top {
    display: inline-block;
    letter-spacing: 0.02em;
    padding: 0;
}

/* Banners */
body.page-home .home-banners {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 48px;
}

body.page-home .banner-item {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    background: #111;
    display: block;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

body.page-home a.banner-link {
    text-decoration: none;
    color: inherit;
}

body.page-home a.banner-link:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.55);
}

body.page-home .banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.page-home .banner-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

body.page-home .banner-title {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

body.page-home .banner-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: center;
    margin-top: 4px;
}

/* Discover button */
body.page-home .discover-section {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 5;
}

body.page-home .discover-btn {
    display: inline-block;
    min-width: 180px;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff !important;
    border: 3px solid #fff;
    background-color: transparent;
    border-radius: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.page-home .discover-btn:hover,
body.page-home .discover-btn:focus {
    background-color: #fff;
    color: #363636 !important;
    text-decoration: none;
}

/* Country picker */
body.page-home .country-picker-mobile {
    display: none;
}

body.page-home .country-picker-section {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 20px;
    text-align: center;
    position: relative;
    z-index: 5;
}

body.page-home .country-picker-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

body.page-home .country-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

body.page-home .country-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    padding: 16px 24px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

body.page-home .country-picker-item:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.65);
    background: rgba(212, 175, 55, 0.1);
    color: #fff;
    text-decoration: none;
}

body.page-home .country-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: block;
}

body.page-home .country-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

@media (max-width: 991px) {
    body.page-home .home-banners {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 640px;
        gap: 18px;
    }

    body.page-home .banner-item {
        height: 180px;
    }
}

@media (max-width: 767px) {
    body.page-home .home-container {
        padding-left: 16px;
        padding-right: 16px;
        width: 100%;
        max-width: 100%;
    }

    body.page-home .home-banners {
        grid-template-columns: 1fr;
        max-width: 100%;
        width: 100%;
        gap: 14px;
        margin-bottom: 24px;
    }

    body.page-home .banner-item {
        height: 150px;
        max-width: 100%;
    }

    body.page-home .banner-title {
        font-size: 12px;
    }

    body.page-home .banner-subtitle {
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    body.page-home .home-mobile-logo {
        font-size: 0.85rem !important;
        letter-spacing: 0;
    }

    body.page-home .home-page-content {
        padding: 64px 0 28px;
    }

    body.page-home .banner-item {
        height: 130px;
    }
}

/* Mobile scroll + layout (Chrome Android) */
@media (max-width: 767px) {
    html.page-home-root,
    body.page-home {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        perspective: none !important;
        transform: none !important;
        position: relative;
        background-color: #000000 !important;
        color: #ffffff !important;
    }

    body.page-home #page,
    body.page-home .page-wrapper,
    body.page-home .page-wrapper-inner,
    body.page-home figure.page-wrapper-inner {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: block !important;
        position: relative !important;
        transform: none !important;
        perspective: none !important;
    }

    body.page-home .layer,
    body.page-home .layer.animate {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }

    /* Detach scroll from theme table layout: fixed viewport below header */
    body.page-home #content {
        position: fixed !important;
        top: 56px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain;
        touch-action: pan-y pinch-zoom;
        z-index: 10 !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        color: #ffffff !important;
        vertical-align: top !important;
        transform: none !important;
    }

    body.page-home .content-wrapper,
    body.page-home .home-container,
    body.page-home .home-page-content,
    body.page-home .home-banners {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: transparent !important;
        color: #ffffff !important;
    }

    body.page-home .base-layer {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        z-index: 0 !important;
        pointer-events: none !important;
        transform: none !important;
    }

    body.page-home .base-layer canvas {
        pointer-events: none !important;
        touch-action: none !important;
    }

    body.page-home .layer.animate.pointer-events-none {
        display: none !important;
    }

    body.page-home .home-mobile-header {
        width: 100%;
        max-width: 100%;
    }

    body.page-home .banner-item img {
        max-width: 100%;
        height: auto;
        min-height: 100%;
    }
}
