/* Hero */
.home-hero {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
color: #fff;
padding: 80px 20px 60px;
text-align: center;
}
.home-hero h1 { font-size: 2.8rem; margin: 0 0 15px; line-height: 1.2; }
.home-hero-subtitle { font-size: 1.15rem; opacity: 0.9; max-width: 700px; margin: 0 auto 30px; }

.home-search {
max-width: 600px;
margin: 0 auto 30px;
position: relative;
}
.home-search input {
width: 100%;
padding: 16px 20px;
font-size: 1rem;
border: 2px solid rgba(255,255,255,0.2);
border-radius: 10px;
background: rgba(255,255,255,0.1);
color: #fff;
outline: none;
}
.home-search input::placeholder { color: rgba(255,255,255,0.6); }
.home-search input:focus { border-color: #0073aa; background: #fff; color: #333; }

.home-hero-cta { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Boards */
.home-boards { max-width: 1100px; margin: 60px auto; padding: 0 20px; }
.home-boards-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 25px;
}
.board-card {
background: #f7f9fc;
padding: 40px 30px;
border-radius: 12px;
text-decoration: none;
color: #1a1a2e;
text-align: center;
transition: transform 0.2s, box-shadow 0.2s;
border: 2px solid transparent;
}
.board-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(0,115,170,0.15);
border-color: #0073aa;
}
.board-card-icon { font-size: 3rem; margin-bottom: 15px; }
.board-card h3 { font-size: 1.5rem; margin: 0 0 10px; }
.board-card p { color: #666; margin: 0; }

/* Popular airports grid */
.airports-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 12px;
margin-top: 25px;
}
.airport-card {
display: flex;
flex-direction: column;
padding: 15px;
background: #fff;
border: 1px solid #e5e5e5;
border-radius: 8px;
text-decoration: none;
color: #1a1a2e;
transition: all 0.2s;
}
.airport-card:hover { border-color: #0073aa; background: #f0f8ff; }
.airport-iata {
font-size: 0.75rem;
font-weight: 700;
color: #0073aa;
background: #eaf3fa;
padding: 3px 8px;
border-radius: 4px;
align-self: flex-start;
margin-bottom: 8px;
}
.airport-name { font-size: 0.95rem; font-weight: 500; }

/* Regions grid */
.regions-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
margin-top: 25px;
}
.region-card {
padding: 20px;
background: linear-gradient(135deg, #0073aa, #005a87);
color: #fff;
text-decoration: none;
border-radius: 10px;
transition: transform 0.2s;
}
.region-card:hover { transform: translateY(-3px); }
.region-card h3 { margin: 0 0 5px; font-size: 1.15rem; }
.region-count { font-size: 0.9rem; opacity: 0.9; }

/* Countries grid */
.countries-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
margin-top: 25px;
}
.country-card {
padding: 18px 20px;
background: #f7f9fc;
border-radius: 8px;
text-decoration: none;
color: #1a1a2e;
transition: all 0.2s;
border-left: 3px solid #0073aa;
}
.country-card:hover { background: #eaf3fa; }
.country-card h3 { margin: 0 0 5px; font-size: 1.05rem; }
.country-count { font-size: 0.85rem; color: #666; }

/* Why */
.home-why { background: #f7f9fc; padding: 60px 20px; }
.home-why h2 { text-align: center; max-width: 1100px; margin: 0 auto 40px; }
.why-grid {
max-width: 1100px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
}
.why-card { background: #fff; padding: 25px; border-radius: 10px; text-align: center; }
.why-icon { font-size: 2.5rem; margin-bottom: 15px; }
.why-card h3 { font-size: 1.1rem; margin: 0 0 10px; color: #1a1a2e; }
.why-card p { color: #666; margin: 0; font-size: 0.95rem; }

/* CTA */
.home-cta { text-align: center; padding: 60px 20px; background: #1a1a2e; color: #fff; }
.home-cta h2 { margin: 0 0 25px; }
.home-cta-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* CTA-кнопки для главной */
.home-section-cta { text-align: center; margin-top: 30px; }
.button-outline {
display: inline-block;
padding: 12px 28px;
border: 2px solid #0073aa;
color: #0073aa;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
transition: all 0.2s;
}
.button-outline:hover { background: #0073aa; color: #fff; }

/* Mobile */
@media (max-width: 768px) {
.home-hero { padding: 50px 15px 40px; }
.home-hero h1 { font-size: 1.9rem; }
.home-hero-subtitle { font-size: 1rem; }
.home-boards-grid { grid-template-columns: 1fr; }
.airports-grid { grid-template-columns: repeat(2, 1fr); }
.regions-grid, .countries-grid { grid-template-columns: 1fr 1fr; }
.home-hero-cta .button { width: 100%; text-align: center; }
}

/* ============================================
ПАРТНЁРСКИЕ КНОПКИ В HERO
============================================ */

.home-hero-affiliates {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
margin-top: 25px;
padding-top: 25px;
border-top: 1px solid rgba(255, 255, 255, 0.15);
max-width: 600px;
margin-left: auto;
margin-right: auto;
}

.button-affiliate-hero {
display: inline-flex;
align-items: center;
gap: 8px;
background: #ff6b35; /* Оранжевый — цвет партнёрки */
color: #fff !important;
padding: 14px 26px;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
font-size: 1rem;
transition: background 0.2s, transform 0.15s;
box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.button-affiliate-hero:hover {
background: #e55a2a;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
color: #fff;
}

/* ============================================
МЯГКИЙ ФИКС ДЛЯ HERO НА МОБИЛЬНЫХ
============================================ */

@media (max-width: 768px) {

/* Контейнер с партнёрскими кнопками — не выходит за пределы */
.home-hero-affiliates {
max-width: 100%;
box-sizing: border-box;
padding-left: 0;
padding-right: 0;
flex-direction: column;
gap: 10px;
}

/* Партнёрские кнопки — не вылезают за границы */
.button-affiliate-hero {
display: inline-block;
max-width: 100%;
width: 100%;
box-sizing: border-box;
padding: 12px 16px;
font-size: 0.92rem;
line-height: 1.3;
text-align: center;
white-space: normal;
word-wrap: break-word;
margin: 0;
}

/* Обычные кнопки в hero — тоже на всю ширину */
.home-hero-cta {
flex-direction: column;
gap: 10px;
}

.home-hero-cta .button {
width: 100%;
box-sizing: border-box;
text-align: center;
}

/* Уменьшаем отступы самой hero-секции */
.home-hero {
padding-left: 15px;
padding-right: 15px;
}
}

/* ============================================
ЖИВОЙ ПОИСК АЭРОПОРТОВ (для главной)
============================================ */

.airport-search-results {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: #fff;
border: 1px solid #e5e5e5;
border-top: none;
border-radius: 0 0 10px 10px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
max-height: 400px;
overflow-y: auto;
z-index: 9999;
margin-top: -2px;
text-align: left; /* ← важно: hero центрирован, поиск — нет */
}

.airport-search-results.active {
display: block;
}

.airport-search-item {
display: flex;
align-items: center;
padding: 12px 16px;
text-decoration: none;
color: #1a1a2e;
border-bottom: 1px solid #f0f0f0;
transition: background 0.15s;
}

.airport-search-item:last-child {
border-bottom: none;
}

.airport-search-item:hover,
.airport-search-item.active {
background: #f0f8ff;
}

.airport-search-item .iata-badge {
font-size: 0.75rem;
font-weight: 700;
background: #0073aa;
color: #fff;
padding: 3px 8px;
border-radius: 4px;
letter-spacing: 0.5px;
flex-shrink: 0;
margin-right: 12px;
}

.airport-search-item .search-title {
flex: 1;
font-weight: 500;
font-size: 0.95rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 10px;
color: #1a1a2e;
}

.airport-search-item .search-country {
font-size: 0.8rem;
color: #888;
flex-shrink: 0;
text-align: right;
}

.search-loading,
.search-empty {
padding: 15px 20px;
color: #888;
font-size: 0.9rem;
text-align: center;
}

@media (max-width: 768px) {
.airport-search-item {
padding: 14px 16px;
}
.airport-search-item .search-title {
font-size: 0.9rem;
}
}

.airport-search-item .search-title {
flex: 1;
min-width: 0; /* ← добавить */
font-weight: 500;
font-size: 0.95rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 10px;
color: #1a1a2e;
}

.airport-search-item:hover .search-title {
color: #0073aa;
}

/* ============================================
   SEARCH INPUT STYLES (для всех hub-страниц)
   ============================================ */

.airlines-hub-search,
.airports-hub-search,
.hub-search {
    max-width: 600px;
    margin: 0 auto 50px;
    position: relative;
}

.airlines-hub-search input,
.airports-hub-search input,
.hub-search input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    color: #1a1a2e;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.airlines-hub-search input::placeholder,
.airports-hub-search input::placeholder,
.hub-search input::placeholder {
    color: #999;
    opacity: 1;
}

.airlines-hub-search input:focus,
.airports-hub-search input:focus,
.hub-search input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}
