/* ========================================
   New Design: Top Bar + Header + Footer
   Extracted from new_main_page.html
   ======================================== */

/* --- Reset & Variables --- */
:root {
    --bg-dark: #1a252f;
    --bg-hover: #2c3e50;
    --bg-light: #ffffff;
    --text-light: #ecf0f1;
    --text-dark: #2c3e50;
    --accent: #27ae60;
    --border: #e1e8ed;
    --shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ========================================
   TOP BAR
   ======================================== */
.new-top-bar {
    background-color: #29AAE2;
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
}

.new-top-bar a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-weight: 500;
}

.new-top-bar a:hover {
    text-decoration: underline;
}

.adv-bar {
    width: 100%;
    align-self: stretch;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
    display: inline-flex;
}

.adv-bar-text-1 {
    width: 70%;
    align-self: stretch;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
    display: inline-flex;
}

.adv-bar-text-2 {
    display: flex;
    width: 50%;
    justify-content: flex-start;
}

.new-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-top-bar {
    width: 24px;
    height: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* ========================================
   HEADER
   ======================================== */
.new-header {
    background-image: url('../new-design-images/image_header.png');
    background-size: cover;
    background-position: center;
    padding: 20px 0;
    position: relative;
    min-height: 700px;
}

.new-header.no-hero {
    height: auto;
    min-height: 0;
    padding: 20px 0;
}

/* Regional page: wrapper takes over background; strip header bg */
.regional-hero-wrapper .new-header.no-hero {
    background-image: none;
    background-color: transparent;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.header-logo {
    width: 20%;
}

.logo-mobile {
    display: none;
}

.new-logo span {
    color: #fff;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.15);
    padding: 5px;
    border-radius: 8px;
    height: 45px;
}

.nav-menu a,
.menu-section,
.new-sub-menu {
    color: white;
    text-decoration: none;
    padding: 10px 10px;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 15px;
}

.nav-menu a:hover,
.nav-menu a.new-active {
    background: rgba(255,255,255,0.2);
}

.nav-menu .new-sub-menu:hover {
    background: rgba(255,255,255,0.2);
    background: #1a1a1aa1;
}

.nav-menu .app-btn {
    background: #4CAF50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-select {
    display: inline-flex;
    border-radius: 8px;
}

.country-btn {
    position: relative;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 5px;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a252f;
    border-radius: 5px;
    margin-top: 5px;
    min-width: 160px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.dropdown.show {
    display: block;
}

.dropdown a {
    color: white;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
}

.dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

/* Hero section (inside header) */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px 20px 0px 20px;
    line-height: normal;
}

.hero-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    align-items: center;
}

.hero-btn {
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
    text-align: left;
    box-sizing: border-box;
    min-width: 0;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 1.2;
}

.hero-btn:hover {
    transform: translateY(-2px);
}

.hero-btn.new-blue {
    border-radius: 16px;
    border: 1px solid var(--Blue, #29AAE2);
    background: rgba(51, 51, 51, 0.35);
    backdrop-filter: blur(75px);
    width: 200px;
    height: 56px;
    display: flex;
    align-items: center;
}

.hero-btn.new-red {
    border-radius: 16px;
    border: 1px solid #FF84A0;
    background: rgba(51, 51, 51, 0.35);
    backdrop-filter: blur(75px);
    width: 200px;
    height: 56px;
    display: flex;
    align-items: center;
}

.hero h1 {
    align-self: stretch;
    text-align: center;
    color: white;
    font-size: 56px;
    font-family: Proxima Nova, system-ui, sans-serif;
    font-weight: 500;
    word-wrap: break-word;
    line-height: 1.05;
}

.hero .subtitle {
    font-size: 20px;
    color: #90EE90;
    align-self: stretch;
    text-align: center;
    color: #75BF19;
    font-size: 32px;
    font-family: Proxima Nova, system-ui, sans-serif;
    font-weight: 500;
    word-wrap: break-word;
}

/* ========================================
   NAVIGATION DROPDOWNS (Level 2 & 3)
   ======================================== */
.nav-list {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 16px;
    color: var(--text-light);
    font-weight: 500;
    transition: background 0.2s;
}

.nav-link:hover,
.nav-item.new-active > .nav-link {
    background: var(--bg-hover);
}

.has-dropdown::after {
    content: ' ▾';
    font-size: 0.75em;
    opacity: 0.8;
}

.has-children::after {
    content: ' ›';
    position: absolute;
    right: 15px;
    font-size: 0.9em;
    opacity: 0.6;
}

/* Level 2 (Federal Districts) */
.level-2 {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dark);
    min-width: 230px;
    box-shadow: var(--shadow);
    border-radius: 0 0 6px 6px;
    padding: 8px 0;
    z-index: 1002;
    background: #1a1a1ad6;
    list-style: none;
    margin: 0;
}

.level-2 li {
    position: relative;
}

.sub-link {
    display: block;
    padding: 11px 16px;
    color: var(--text-light);
    transition: 0.15s;
    text-decoration: none;
}

.sub-link:hover {
    background: #f8f9fa;
    color: var(--accent);
    padding-left: 20px;
}

/* Level 3 (Regions) */
.level-3 {
    display: none;
    position: absolute;
    top: -8px;
    left: 100%;
    background: var(--bg-dark);
    min-width: 260px;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border-radius: 4px;
    padding: 6px 0;
    z-index: 1003;
    background: #1a1a1ad6;
    list-style: none;
    margin: 0;
}

.level-3 li a {
    display: block;
    padding: 9px 18px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    transition: 0.15s;
}

.level-3 li a:hover {
    background: #f4f8fb;
    color: var(--accent);
    padding-left: 22px;
}

/* Hover dropdown visibility */
.nav-item:hover > .level-2,
.nav-item.new-active > .level-2 {
    display: block;
    animation: fadeSlide 0.2s ease;
}

.sub-menu-item:hover > .level-3,
.sub-menu-item.new-active > .level-3 {
    display: block;
    animation: fadeSlideRight 0.2s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideRight {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Auth button */
.auth-btn {
    margin-left: 15px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 14px;
    transition: 0.2s;
    text-decoration: none;
}

.auth-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* ========================================
   FOOTER
   ======================================== */
.new-footer {
    background: linear-gradient(180deg, #0a2520 0%, #1a4738 100%);
    color: white;
    padding: 60px 40px 0px;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.new-footer-logo {
    font-size: 28px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 15px;
}

.new-footer-logo span {
    font-size: 14px;
    color: #81C784;
    display: block;
}

.age-rating {
    display: inline-block;
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    font-weight: bold;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: #4CAF50;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #81C784;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #4CAF50;
}

.footer-menu {
    /* menu container — items styled via .footer-column */
}

.new-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 13px;
    color: #999;
}

.footer-decor {
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: url('../new-design-images/image-footer.svg');
    background-size: cover;
    opacity: 0.5;
}

/* ========================================
   HAMBURGER MENU (Mobile)
   ======================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.2s;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.25);
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger → X animation */
.mobile-menu-toggle.new-active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.mobile-menu-toggle.new-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.new-active .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ========================================
   RESPONSIVE ADAPTATIONS
   ======================================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .new-header {
        padding: 15px 0;
        min-height: 370px;
    }

    .header-top {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
        border-radius: 8px;
        padding: 8px 12px;
        position: relative;
    }

    .header-logo {
        width: auto;
        flex: 0 1 auto;
        flex-shrink: 0;
    }

    /* Hide desktop logo, show mobile logo on small screens */
    .header-logo img:not(.logo-mobile) {
        display: none;
    }

    .header-logo .logo-mobile {
        display: block;
        height: 32px;
        width: auto;
    }

    /* Show hamburger, hide nav by default */
    .mobile-menu-toggle {
        display: flex;
        z-index: 2000;
        order: -1;
        flex-shrink: 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        flex-wrap: wrap;
        height: auto;
        justify-content: flex-start;
        gap: 6px;
        padding: 10px 0;
        background: rgba(0,0,0,0.3);
        border-radius: 8px;
        margin-top: 5px;
        z-index: 1999;
        align-items: flex-start;
    }

    .nav-menu.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a252f;
        padding: 16px 12px;
        border-radius: 8px;
        gap: 4px;
        z-index: 1999;
        animation: slideDown 0.3s ease;
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* All direct links in open menu */
    .nav-menu.open > a {
        color: #fff !important;
        font-size: 16px;
        font-weight: 600;
        padding: 14px 16px;
        border-radius: 6px;
        text-decoration: none;
        display: block;
        transition: background 0.15s;
    }
    .nav-menu.open > a:hover {
        background: rgba(255,255,255,0.08);
    }

    .nav-menu.open .nav-link {
        color: #fff !important;
        font-size: 16px;
        font-weight: 600;
        padding: 14px 16px;
    }

    .nav-menu.open .app-btn {
        background: #4CAF50;
        color: #fff !important;
        font-weight: 700;
        font-size: 16px;
        padding: 14px 20px;
        border-radius: 8px;
        margin-bottom: 6px;
        text-align: center;
        justify-content: center;
    }

    /* Sub-menu links in open state */
    .nav-menu.open .sub-link {
        color: #ccc !important;
        font-size: 15px;
        padding: 12px 24px;
        display: block;
        text-decoration: none;
    }
    .nav-menu.open .level-3 li a {
        color: #bbb !important;
        font-size: 14px;
        padding: 10px 32px;
        display: block;
        text-decoration: none;
    }
    .nav-menu.open .sub-link:hover,
    .nav-menu.open .level-3 li a:hover {
        color: #4CAF50 !important;
        background: rgba(255,255,255,0.05);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 12px 16px;
        justify-content: space-between;
    }

    /* Dropdown on mobile: tap to expand */
    .nav-menu.open .nav-item > .level-2 {
        background: rgba(0,0,0,0.55);
        border-radius: 0 0 6px 6px;
        box-shadow: none;
        width: 100%;
    }

    .nav-menu.open .sub-menu-item > .level-3 {
        background: rgba(0,0,0,0.45);
        max-height: 60vh;
        width: 100%;
        border-radius: 0;
    }

    /* Hide dropdowns by default, show on .open */
    .nav-item > .level-2,
    .sub-menu-item > .level-3 {
        display: none;
        position: static;
    }

    .nav-item.open > .level-2,
    .sub-menu-item.open > .level-3 {
        display: block;
        animation: slideDown 0.25s ease;
    }

    .country-select {
        flex-shrink: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0;
        margin-left: auto;
        width: auto;
    }

    .country-btn,
    .login-btn {
        flex-shrink: 0;
        justify-content: center;
        min-width: auto;
    }

    .country-btn {
        padding: 6px 10px;
        font-size: 14px;
        flex: 0 0 auto;
    }

    .country-btn .dropdown {
        right: 0;
        left: auto;
        top: 100%;
        min-width: 140px;
    }

    .login-btn {
        padding: 6px 10px;
        font-size: 0;
        border-left: 1px solid rgba(255,255,255,0.2);
        flex: 0 0 auto;
    }

    .login-btn span:last-child {
        display: none;
    }

    .hero h1 {
        font-size: 22px;
        line-height: 1.3;
    }

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

    .hero-buttons {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .hero-btn,
    .hero-btn.new-blue,
    .hero-btn.new-red {
        width: 160px;
        max-width: 160px;
        height: 56px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .new-footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    /* Show mobile search on mobile */
    .mobile-search {
        display: block;
    }

    /* Fix WPBakery red CTA button overflow — high specificity to override main.css */
    .wpb_wrapper .mybtn_red_1,
    .txt_center .mybtn_red_1 {
        display: inline-block !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        width: auto !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .header-logo img {
        max-height: 32px;
    }

    .hero h1 {
        font-size: 22px;
        line-height: 1.3;
    }

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

    .hero-btn.new-blue,
    .hero-btn.new-red {
        width: 160px;
        height: 56px;
        font-size: 13px;
        padding: 6px 12px;
    }

    .new-header.no-hero {
        padding: 15px 0;
    }

    .new-top-bar {
        font-size: 12px;
        padding: 6px 0;
    }

    .adv-bar {
        flex-direction: column;
        gap: 4px;
    }

    .adv-bar-text-1,
    .adv-bar-text-2 {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

}

/* ========================================
   BLUE BUTTONS (Country Popup)
   ======================================== */
.blueButton {
    background-color: rgb(37, 170, 225);
    padding: 20px;
    margin: 0 auto;
    text-align: center;
    text-transform: uppercase;
    color: white;
    width: 260px;
    max-width: 100%;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blueButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3), 0 12px 12px rgba(0, 0, 0, 0.24);
}

.blueButtonGrey {
    background-color: #666;
    box-shadow: none;
    cursor: default;
}

.blueButtonGrey:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   COUNTRY POPUP
   ======================================== */
.groupBtnCountry {
    height: 60%;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 16px;
    padding: 20px 0;
}

.closePopupCountry {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.closePopupCountry:hover {
    opacity: 1;
}

.close-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

/* Utility: close-top-bar (typo variant kept for compatibility) */
.colse-top-bar {
    width: 24px;
    height: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* ========================================
   MAP SECTION & SHARE
   ======================================== */
.map-section-container {
    width: 100%;
    position: relative;
}

.shareBox {
    display: none;
    width: 100%;
    height: 50px;
    background: #1a252f;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 20px;
    box-sizing: border-box;
}

.shareBox.show {
    display: flex;
}

/* ========================================
   ALERT BAR (Login error)
   ======================================== */
.alert-bar {
    top: 0;
    left: 0;
    width: 100%;
    position: fixed;
    z-index: 10000;
    font-size: 16px;
    text-align: center;
    color: #fff;
    background: #e74c3c;
    padding: 12px 20px;
    box-sizing: border-box;
}

/* ========================================
   SUB-MENU ITEM (underscore variant)
   Used in header.php for regions in level-3
   ======================================== */
.sub-menu-item_.sub-menu-item {
    /* Inherits .sub-menu-item styles */
}

/* Match both .sub-menu-item and .sub-menu-item_ for JS hover */
.sub-menu-item,
.sub-menu-item_ {
    position: relative;
}

.sub-menu-item:hover > .level-3,
.sub-menu-item.new-active > .level-3,
.sub-menu-item_:hover > .level-3,
.sub-menu-item_.new-active > .level-3 {
    display: block;
    animation: fadeSlideRight 0.2s ease;
}

/* ========================================
   GLOBAL WRAPPER
   ======================================== */
.wrap_every_thing {
    width: 100%;
}

/* ========================================
   FIXED ELEMENTS (Legacy compatibility)
   ======================================== */
.fixed {
    position: fixed;
    z-index: 999;
}

.fixed2 {
    position: fixed;
    z-index: 998;
}

.fixed_wrap {
    position: relative;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.h70 {
    height: 70%;
}

.hide {
    display: none !important;
}

.txt-white {
    color: white;
}

/* ========================================
   MOBILE SEARCH (hidden by default)
   ======================================== */
.mobile-search {
    display: none;
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-search-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.95);
    font-size: 15px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-search-input::placeholder {
    color: #95a5a6;
}

.mobile-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}
