/* =========================================
   1. BASE VARIABLES & RESET
   ========================================= */
:root {
    --primary: #00CC00;
    --primary-hover: #00b300;
    --text: #1c1c1e;
    --text-light: #6e6e73;
    --gray-bg: #f2f2f7;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--gray-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
* { box-sizing: border-box; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. HEADER & MENU
   ========================================= */
header {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    height: 64px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ЛОГОТИП */
.logo-container {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.logo-img {
    height: 32px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-controls { display: flex; align-items: center; }
.main-menu { display: flex; gap: 24px; align-items: center; }

/* Dropdown (Десктоп) */
.dropdown-item { position: relative; padding: 10px 0; }
.dropdown-trigger {
    cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text);
    display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.dropdown-trigger:hover { color: var(--primary); }

.dropdown-menu {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white); min-width: 200px;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05); padding: 8px;
    opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 1100;
}

@media (min-width: 901px) {
    .dropdown-item:hover .dropdown-menu {
        opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
    }
}

.dropdown-menu li a {
    display: block; padding: 10px 16px; border-radius: 8px;
    font-size: 14px; color: var(--text); white-space: nowrap;
}
.dropdown-menu li a:hover { background-color: var(--gray-bg); color: var(--primary); }

.mobile-close-btn { display: none; }
.lang-switch { display: flex; gap: 12px; }
.lang-switch a { font-size: 13px; font-weight: 600; color: #8e8e93; text-transform: uppercase; }
.lang-switch a.active { color: var(--primary); font-weight: 800; }

/* КНОПКА В ХЕДЕРЕ (.header-btn) */
.header-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 36px; padding: 0 20px; margin-left: 15px;
    background-color: var(--primary); color: #ffffff !important;
    border-radius: 50px; font-size: 13px; font-weight: 700;
    text-transform: uppercase; text-decoration: none;
    border: none; box-shadow: none; transition: background 0.2s;
}
.header-btn:hover { background-color: var(--primary-hover); opacity: 0.9; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    position: relative; text-align: center; padding: 120px 20px;
    margin-bottom: 0; border-radius: 0; overflow: hidden;
    background-color: #333;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.webp');
    background-size: cover; background-position: center; color: #ffffff; 
}
.hero h1 { font-size: 2.8rem; font-weight: 900; margin: 0 0 20px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.3); line-height: 1.1; }
.hero p { font-size: 1.3rem; opacity: 0.95; margin: 0 0 40px 0; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* =========================================
   4. CONTENT SECTIONS
   ========================================= */
section { padding: 60px 0; }
section h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; color: var(--text); }
section h2 span { color: var(--primary); } 
.text-block { text-align: center; max-width: 700px; margin: 0 auto; }
.text-block p { font-size: 1.1rem; line-height: 1.6; color: var(--text-light); }

.steps-grid { display: flex; justify-content: space-between; gap: 30px; position: relative; }
.step-card { flex: 1; background: var(--white); padding: 30px 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); position: relative; z-index: 2; }
.step-number { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; font-weight: bold; font-size: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto; }
.step-card h3 { margin: 10px 0; font-size: 1.2rem; }
.step-card p { font-size: 0.95rem; color: var(--text-light); line-height: 1.5; }
.step-arrow { position: absolute; top: 50%; right: -25px; transform: translateY(-50%); font-size: 24px; color: var(--primary); z-index: 1; }
.step-card:last-child .step-arrow { display: none; }

.stats-section { background: var(--white); }
.stats-grid { display: flex; justify-content: space-around; text-align: center; flex-wrap: wrap; gap: 30px; }
.stat-item h3 { font-size: 3.5rem; color: var(--primary); margin: 0; font-weight: 800; }
.stat-item p { font-size: 1.1rem; color: var(--text-light); margin-top: 5px; font-weight: 500; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.review-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); text-align: center; }
.review-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 3px solid var(--gray-bg); }
.review-card h4 { margin: 0 0 5px 0; font-size: 1.1rem; }
.review-card p { font-size: 0.95rem; color: var(--text-light); font-style: italic; line-height: 1.5; }

/* =========================================
   5. UNIFIED CARDS
   ========================================= */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.country-card { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.2s, opacity 0.3s ease; text-decoration: none; color: inherit; border: 1px solid #eee; display: flex; flex-direction: column; height: 100%; position: relative; }
.country-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.country-card.restricted { background-color: #fcfcfc; border-color: #ffebeb; opacity: 0.85; }
.country-card.restricted:hover { opacity: 1; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.card-flag { font-size: 28px; }
.card-title { font-size: 20px; font-weight: 700; margin: 0; color: #333; }
.card-meta { font-size: 14px; color: #666; margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 10px 15px; font-weight: 500; }
.card-desc { font-size: 14px; color: #555; line-height: 1.5; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-card { animation: fadeIn 0.4s ease forwards; }

.status-badge { align-self: flex-end; margin: 12px 12px 0 0; width: fit-content; padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; z-index: 2; text-transform: uppercase; letter-spacing: 0.5px; }
.status-easy { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.status-hard { background: #f0fdf4; color: #587856; border: 1px solid #bbf7d0; }
.status-impossible { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

.search-hero { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; margin-bottom: 30px; }
.search-container { max-width: 600px; margin: 0 auto; background: white; padding: 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.form-group label { display: block; margin-bottom: 10px; font-weight: 600; color: #333; }
.form-group select { width: 100%; padding: 15px; font-size: 16px; border: 2px solid #e1e1e1; border-radius: 12px; background: #fff; appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300CC00%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 12px auto; }
.empty-state { text-align: center; padding: 40px; color: #888; grid-column: 1 / -1; }

.tabs-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; border-radius: 25px; border: 1px solid #e1e1e1; background: white; cursor: pointer; font-size: 15px; font-weight: 600; color: #555; transition: all 0.2s ease; }
.tab-btn:hover { background: #f5f5f7; border-color: #d1d1d1; }
.tab-btn.active { background: #007AFF; color: white; border-color: #007AFF; box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3); }
.all-countries-btn { display: inline-block; margin-top: 40px; padding: 12px 35px; background-color: transparent; color: #007AFF; border: 2px solid #007AFF; border-radius: 30px; font-weight: bold; text-decoration: none; transition: all 0.3s ease; }
.all-countries-btn:hover { background-color: #007AFF; color: white; }

/* =========================================
   6. BIG BUTTONS (PROMO / MOBILE)
   ========================================= */
.promo-card .cta-button, 
.hero .cta-button,
.mobile-order-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background-color: var(--primary) !important; color: #ffffff !important;
    padding: 18px 40px; font-size: 1.1rem; border-radius: 50px;
    font-weight: 800; text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 204, 0, 0.4); transition: all 0.2s ease;
}
.promo-card .cta-button:hover,
.hero .cta-button:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0, 204, 0, 0.5);
}

.promo-card { background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%); border: 2px solid var(--primary); border-radius: 20px; padding: 30px; margin: 40px 0; box-shadow: 0 10px 30px rgba(0, 204, 0, 0.15); text-align: center; position: relative; overflow: hidden; }
.promo-badge { position: absolute; top: 0; right: 0; background: var(--primary); color: white; padding: 5px 15px; border-bottom-left-radius: 15px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.promo-card h2 { color: #1c1c1e; font-size: 1.8rem; margin-top: 10px; line-height: 1.2; }
.promo-text { font-size: 1.1rem; color: #444; margin-bottom: 25px; }
.promo-list { text-align: left; background: white; padding: 20px; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.promo-list li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }

.sticky-cta { position: fixed; bottom: 24px; right: 24px; width: 64px; height: 64px; background: #2AABEE; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; box-shadow: 0 4px 15px rgba(42, 171, 238, 0.4); z-index: 999; transition: bottom 0.4s ease, transform 0.2s; }
.sticky-cta.moved-up { bottom: 90px; }

.mobile-order-btn { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150%); z-index: 2000; width: 90%; max-width: 350px; text-align: center; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; background: var(--primary); color: white; padding: 14px 24px; border-radius: 50px; font-weight: 800; text-transform: uppercase; box-shadow: 0 10px 25px rgba(0, 204, 0, 0.4); }
.mobile-order-btn.visible { transform: translateX(-50%) translateY(0); }

/* =========================================
   7. COMPATIBILITY (OLD PAGES)
   ========================================= */
.card { background: #ffffff; border-radius: 16px; padding: 30px !important; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #eee; margin-bottom: 30px; font-size: 1rem; line-height: 1.6; color: #333; position: relative; overflow: hidden; }
.card ul { padding-left: 20px; margin-bottom: 20px; }
.card li { margin-bottom: 8px; }
.card h3 { margin-top: 25px; margin-bottom: 15px; font-size: 1.3rem; font-weight: 700; }
.card hr { border: 0; border-top: 1px solid #eee; margin: 25px 0; }
.country-hero-img { width: 100%; height: auto; max-height: 400px; object-fit: cover; border-radius: 16px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.country-description { font-size: 1.15rem; line-height: 1.6; color: var(--text); margin-bottom: 40px; }
.country-description p { margin-bottom: 20px; }
.container > a[href="/"] { display: inline-block; margin-bottom: 20px; padding: 8px 16px; background: white; border-radius: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); font-weight: 600; transition: all 0.2s; }
.container > a[href="/"]:hover { color: var(--primary); transform: translateX(-3px); }

/* =========================================
   8. MOBILE ADAPTATION (ULTIMATE MENU FIX)
   ========================================= */
@media (max-width: 900px) {
    .header-content { flex-wrap: wrap; padding: 10px 20px; gap: 15px; height: auto; }
    .logo-container { height: 40px; flex-grow: 1; }
    .mobile-controls { height: 40px; }
    header { height: auto; }
    
    .header-btn { display: none !important; }

    nav { width: 100%; order: 3; overflow-x: auto; padding-bottom: 5px; border-top: 1px solid #f2f2f7; padding-top: 10px; -ms-overflow-style: none; scrollbar-width: none; }
    nav::-webkit-scrollbar { display: none; }
    .main-menu { gap: 8px; white-space: nowrap; }
    .dropdown-trigger, .main-menu > li > a { background: #f2f2f7; padding: 8px 16px; border-radius: 20px; font-size: 14px; }
    .dropdown-item { padding: 0; }
    .logo-img { height: 32px; }

    /* 🔥 ФИНАЛЬНЫЙ ФИКС МЕНЮ (РАСТЯГИВАЕМ ДО НИЗА) 🔥 */
    .dropdown-menu { 
        position: fixed !important;
        
        /* 1. Начинаем сразу под шапкой */
        top: 75px !important;
        
        /* 2. Отступы по бокам */
        left: 5% !important; 
        width: 90% !important;
        max-width: 350px !important;
        
        /* 3. ВЫСОТА: Растягиваем почти до самого низа, оставляя 80px отступа */
        /* Это гарантирует, что список не "обрежется" слишком рано */
        max-height: calc(100vh - 90px) !important;
        
        /* 4. Скролл */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; 

        opacity: 0 !important;
        visibility: hidden !important;
        
        background: var(--white) !important;
        border-radius: 16px !important;
        box-shadow: 0 0 0 1000px rgba(0,0,0,0.5) !important;
        z-index: 2000 !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        
        transform: none !important; 
        transition: opacity 0.2s ease;
    }

    .dropdown-item.active .dropdown-menu { 
        opacity: 1 !important;
        visibility: visible !important;
    }

    .dropdown-menu li a { 
        font-size: 17px; 
        padding: 16px 20px; 
        text-align: center; 
        border-bottom: 1px solid #f5f5f7; 
        display: block !important;
    }
    
    .mobile-close-btn { 
        display: block; 
        text-align: center; 
        padding: 15px; 
        color: #ff3b30; 
        font-weight: 700; 
        background: #fff; 
        position: sticky; 
        bottom: 0; 
        font-size: 16px;
        border-top: 1px solid #eee;
        cursor: pointer;
    }

    /* ФИКС ДЛЯ "ПОДАРКА" И ТЕКСТА */
    p, li, h1, h2, h3, span, div { overflow-wrap: break-word; word-wrap: break-word; max-width: 100%; }
    .promo-list li { display: block !important; margin-bottom: 15px; }
    .promo-list li strong { display: inline !important; margin-right: 5px; }

    /* Остальное */
    .hero { padding: 80px 15px; }
    .hero h1 { font-size: 2rem; }
    .steps-grid { flex-direction: column; gap: 20px; }
    .step-arrow { top: auto; bottom: -25px; right: 50%; transform: translateX(50%) rotate(90deg); }
    .stats-grid { gap: 40px; }
    .country-hero-img { width: calc(100% + 40px); margin-left: -20px; border-radius: 0; max-height: 300px; }
    .card { padding: 20px !important; }
    h1 { font-size: 1.8rem; line-height: 1.2; }
}

@media (min-width: 768px) {
    .mobile-order-btn { display: none; }
    .sticky-cta.moved-up { bottom: 24px; }
}