/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    font-family: 'Aeroport Light', 'Inter', sans-serif;
    background-color: #fef9f0;
    position: relative;
}

/* ===== ШРИФТЫ ===== */
@font-face {
    font-family: 'Aeroport Light';
    src: url('../fonts/Aeroport-light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Aeroport Monospaced';
    src: url('../fonts/Aeroport-monospaced.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== АНИМИРОВАННЫЙ ФОН ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #fef9f0;
}

/* ===== ШАПКА ===== */
.top-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 250, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10;
    padding: 1rem 2rem;
}
.nav-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.nav-left {
    flex: 1;
    text-align: left;
}
.nav-left a {
    font-family: 'Aeroport Monospaced', 'Courier New', monospace;
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: #1a5f5a;
    text-decoration: none;
    white-space: nowrap;
}
.nav-left a:hover {
    text-decoration: underline;
}
.nav-center {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-center a {
    font-family: 'Aeroport Light', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: #1a5f5a;
    text-decoration: none;
    white-space: nowrap;
}
.nav-center a:hover {
    text-decoration: underline;
}
.nav-right {
    flex: 1;
}

/* ===== КОНТЕНТ (ГЛАВНАЯ) ===== */
.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    padding: 0;
}
.text-section {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    text-align: center;
}
h1 {
    font-family: 'Aeroport Monospaced', 'Courier New', monospace;
    font-weight: normal;
    font-size: 2.8rem;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
    color: #1e3b3f;
}
.description {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: #2c4b50;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ КАРТ ===== */
.map-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}
.map-switch a {
    font-family: inherit;
    font-size: 1rem;
    text-decoration: underline;
    color: #1a5f5a;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}
.map-switch a:hover {
    color: #0a3a36;
    text-decoration-thickness: 1.5px;
}

/* ===== КАРТА (ФРЕЙМ) ===== */
.map-frame-wrapper {
    flex-shrink: 0;
    width: 100%;
    background: #eef3f0;
}
iframe {
    width: 100%;
    height: 55vh;
    border: none;
    display: block;
    touch-action: pan-x pan-y;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 700px) {
    .top-nav {
        background: #fef9f0;
        backdrop-filter: none;
        padding: 1rem;
    }
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .nav-left, .nav-right {
        flex: none;
        text-align: center;
    }
    .nav-left a, .nav-center a {
        white-space: normal;
    }
    .text-section {
        padding: 0.5rem 1rem;
    }
    h1 {
        font-size: 2.2rem;
    }
    .description {
        font-size: 1rem;
    }
    .map-switch {
        gap: 1rem;
    }
    .map-switch a {
        font-size: 0.9rem;
    }
    /* Высота карты по умолчанию (для всех страниц, кроме главной) */
    iframe {
        height: 35vh;
    }
}
@media (max-width: 550px) {
    .nav-center {
        gap: 1.5rem;
    }
    .nav-center a {
        font-size: 0.85rem;
    }
    .map-switch a {
        font-size: 0.85rem;
    }
    iframe {
        height: 30vh;
    }
}

/* Главная страница: карта на мобильных занимает половину экрана */
body.page-index iframe {
    height: 50vh !important;
}
@media (max-width: 700px) {
    body.page-index iframe {
        height: 50vh;
    }
}
@media (max-width: 550px) {
    body.page-index iframe {
        height: 45vh;
    }
}

/* ===== ВРЕМЕННАЯ ПОДСВЕТКА ГРАНИЦ (раскомментировать при необходимости) ===== 
.main-content { outline: 2px solid red; }
.text-section { outline: 2px solid blue; }
.map-switch { outline: 2px solid green; }
.map-frame-wrapper { outline: 2px solid orange; }
.top-nav { outline: 2px solid purple; }
.nav-container { outline: 2px solid cyan; }
.nav-left { outline: 2px solid magenta; }
.nav-center { outline: 2px solid yellow; }
.nav-right { outline: 2px solid grey; }
*/