/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Официальная палитра аэропорта */
    --primary-color: #003366;
    --primary-hover: #002952;
    --primary-light: #0055a5;
    --accent-color: #0077cc;
    --accent-hover: #005fa3;
    
    /* Нейтральные цвета */
    --background: #ffffff;
    --surface: #f7f9fb;
    --surface-dark: #e8ecf1;
    --text-primary: #1a2332;
    --text-secondary: #5a6c7d;
    --text-muted: #8b98a5;
    --border: #d6dce3;
    --border-light: #e8ecf1;
    
    /* Статусные цвета */
    --success: #2d8659;
    --warning: #d97706;
    --danger: #c53030;
    --info: #0077cc;
    
    /* Тени - сдержанные */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.8;
}

.logo-text {
    font-size: 1.875rem;
    font-weight: bold;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
}

.logo-icon {
    height: 2em;
    width: auto;
    display: inline-block;
    vertical-align: baseline;
    margin: 0 -0.05em;
    position: relative;
    top: 0.28em;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

/* Breadcrumbs */
.breadcrumbs-wrapper {
    background-color: var(--background);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 400;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--accent-hover);
}

.breadcrumb-item.active span {
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    padding: 2.5rem 0;
    min-height: calc(100vh - 300px);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.page-header .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Search Form */
.search-form {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 700px;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.125rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    background-color: var(--background);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    padding: 0.875rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.search-button:hover {
    background-color: var(--accent-hover);
}

.search-button:active {
    transform: scale(0.98);
}

/* Search Results Info */
.search-results-info {
    background-color: var(--background);
    padding: 1rem 1.25rem;
    border-radius: 4px;
    border-left: 4px solid var(--info);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.search-results-info p {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Airports Grid */
.airports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.airport-card {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    transition: all 0.25s ease;
    position: relative;
}

.airport-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.25s;
}

.airport-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.airport-card:hover::before {
    opacity: 1;
}

.airport-name {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.airport-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.airport-name a:hover {
    color: var(--primary-color);
}

.airport-info {
    margin-bottom: 1.125rem;
}

.airport-location {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
    font-weight: 400;
}

.airport-location a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.airport-location a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.airport-codes {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.code-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: 'Consolas', 'Courier New', monospace;
}

.code-badge.iata {
    color: var(--primary-color);
    background-color: rgba(0, 119, 204, 0.08);
    border-color: var(--accent-color);
}

.code-badge.icao {
    color: var(--text-secondary);
}

.airport-actions {
    display: flex;
    gap: 0.625rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
}

/* Airport Header */
.airport-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: var(--background);
    /*border-radius: 8px;*/
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent-color);
}

.airport-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.airport-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.meta-item {
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Airport Widgets Container */
.airport-widgets {
    display: inline-flex;
    gap: 0.75rem;
    margin: 1rem 0;
}

/* Airport Time Widget */
.airport-time-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 82, 163, 0.12) 100%);
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    transition: all 0.2s ease;
    width: auto;
}

.airport-time-widget:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.12) 0%, rgba(0, 82, 163, 0.16) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Airport Weather Widget */
.airport-weather-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, rgba(0, 153, 102, 0.08) 0%, rgba(0, 128, 85, 0.12) 100%);
    border: 1px solid rgba(0, 153, 102, 0.15);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    transition: all 0.2s ease;
    width: auto;
}

.airport-weather-widget:hover {
    background: linear-gradient(135deg, rgba(0, 153, 102, 0.12) 0%, rgba(0, 128, 85, 0.16) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.time-widget-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.time-widget-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    opacity: 0.8;
}

.time-widget-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.time-widget-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    font-weight: 600;
    color: var(--text-secondary);
}

.time-widget-time {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.time-hours {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.time-date {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
    color: var(--text-secondary);
}

.time-loading,
.time-error {
    font-size: 0.8125rem;
    font-style: italic;
    opacity: 0.7;
}

.time-error {
    color: #dc2626;
}

/* Weather Widget Styles */
.weather-widget-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 153, 102, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.weather-widget-icon svg {
    width: 18px;
    height: 18px;
    color: #009966;
    opacity: 0.8;
}

.weather-widget-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.weather-widget-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    font-weight: 600;
    color: var(--text-secondary);
}

.weather-widget-data {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.weather-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.weather-loading,
.weather-error {
    font-size: 0.8125rem;
    font-style: italic;
    opacity: 0.7;
}

.weather-error {
    color: #dc2626;
}

.weather-city {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
}

.weather-temp {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.weather-detail-item {
    white-space: nowrap;
}

.meta-item::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
}

.meta-item:first-child::before {
    display: none;
}

/* Airport Tabs */
.airport-tabs {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 2rem;
}

.tabs-list {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    flex-wrap: wrap;
}

.tab-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.tab-link:hover {
    background-color: var(--surface);
    color: var(--text-primary);
}

.tab-link.active {
    background-color: var(--accent-color);
    color: white;
}

/* Content Section */
.airport-content {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    position: relative;
    font-size: 1.75rem;
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    padding-left: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    background: linear-gradient(
        to right,
        rgba(0, 119, 204, 0.06) 0%,
        rgba(0, 119, 204, 0.02) 50%,
        transparent 100%
    );
    border-left: 4px solid var(--accent-color);
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
    scroll-margin-top: 100px; /* Отступ при скролле для учета sticky header */
}

.content-section h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(
        to bottom,
        var(--accent-color) 0%,
        var(--primary-light) 100%
    );
    border-radius: 2px 0 0 2px;
}

.content-section h2:hover {
    background: linear-gradient(
        to right,
        rgba(0, 119, 204, 0.08) 0%,
        rgba(0, 119, 204, 0.03) 50%,
        transparent 100%
    );
    transform: translateX(2px);
}

.content-section h3 {
    position: relative;
    font-size: 1.375rem;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.content-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

/* WYSIWYG Content */
.wysiwyg-content {
    line-height: 1.7;
    color: var(--text-primary);
}

.wysiwyg-content h1 {
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* H2 - Красивые блоки заголовков */
.wysiwyg-content h2 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: linear-gradient(
        to right,
        rgba(0, 119, 204, 0.06) 0%,
        rgba(0, 119, 204, 0.02) 50%,
        transparent 100%
    );
    border-left: 4px solid var(--accent-color);
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
}

.wysiwyg-content h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(
        to bottom,
        var(--accent-color) 0%,
        var(--primary-light) 100%
    );
    border-radius: 2px 0 0 2px;
}

.wysiwyg-content h2:hover {
    background: linear-gradient(
        to right,
        rgba(0, 119, 204, 0.08) 0%,
        rgba(0, 119, 204, 0.03) 50%,
        transparent 100%
    );
    transform: translateX(2px);
}

/* Первый H2 на странице */
.wysiwyg-content h2:first-of-type {
    margin-top: 0;
}

/* H3 - Подзаголовки с маркером */
.wysiwyg-content h3 {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.wysiwyg-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: all 0.2s;
}

.wysiwyg-content h3:hover::before {
    transform: scale(1.5);
}

.wysiwyg-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.wysiwyg-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

/* Lists Styling - Красивые и ровные списки */
.wysiwyg-content ul,
.wysiwyg-content ol {
    margin-bottom: 1.5rem;
    margin-left: 0;
    padding-left: 0;
    list-style: none;
    color: var(--text-secondary);
}

.wysiwyg-content ol {
    counter-reset: custom-counter;
}

.wysiwyg-content li {
    position: relative;
    margin-bottom: 0.875rem;
    padding-left: 2.5rem;
    line-height: 1.75;
}

/* Маркеры для UL - красивые bullet points */
.wysiwyg-content ul > li::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: all 0.2s;
}

.wysiwyg-content ul > li:hover::before {
    transform: scale(1.3);
    background-color: var(--primary-color);
}

/* Нумерация для OL - стильные цифры */
.wysiwyg-content ol > li {
    counter-increment: custom-counter;
}

.wysiwyg-content ol > li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0.125rem;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--surface);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.wysiwyg-content ol > li:hover::before {
    background-color: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* Вложенные списки */
.wysiwyg-content ul ul,
.wysiwyg-content ol ol,
.wysiwyg-content ul ol,
.wysiwyg-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 2rem;
}

/* Вторичные маркеры для вложенных UL */
.wysiwyg-content ul ul > li::before {
    background-color: transparent;
    border: 2px solid var(--accent-color);
}

.wysiwyg-content ul ul > li:hover::before {
    background-color: var(--accent-color);
}

/* Вложенные OL с буквами */
.wysiwyg-content ol ol {
    counter-reset: custom-counter-alpha;
}

.wysiwyg-content ol ol > li {
    counter-increment: custom-counter-alpha;
}

.wysiwyg-content ol ol > li::before {
    content: counter(custom-counter-alpha, lower-alpha);
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    background-color: var(--surface-dark);
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

/* Выделение текста */
.wysiwyg-content strong,
.wysiwyg-content b {
    font-weight: 600;
    color: var(--text-primary);
}

.wysiwyg-content em,
.wysiwyg-content i {
    font-style: italic;
    color: var(--text-secondary);
}

/* Ссылки в контенте */
.wysiwyg-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.wysiwyg-content a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-color);
}

/* Цитаты */
.wysiwyg-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    padding-left: 2rem;
    background-color: var(--surface);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.wysiwyg-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Код */
.wysiwyg-content code {
    padding: 0.2em 0.5em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.wysiwyg-content pre {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-x: auto;
}

.wysiwyg-content pre code {
    padding: 0;
    background: none;
    border: none;
    font-size: 0.875rem;
}

/* Горизонтальная линия */
.wysiwyg-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid var(--border-light);
}

.wysiwyg-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.wysiwyg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.wysiwyg-content table th,
.wysiwyg-content table td {
    padding: 0.875rem;
    border: 1px solid var(--border);
    text-align: left;
}

.wysiwyg-content table th {
    background-color: var(--surface);
    font-weight: 600;
    color: var(--primary-color);
}

.wysiwyg-content table tr:nth-child(even) {
    background-color: var(--surface);
}

/* Board Departures Section */
.board-section {
    margin-bottom: 2rem;
}

.board-section-header {
    margin-bottom: 1.5rem;
}

.board-section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(
        to right,
        rgba(0, 119, 204, 0.06) 0%,
        rgba(0, 119, 204, 0.02) 50%,
        transparent 100%
    );
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

.board-section-header svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Board Table */
.board-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.board-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background);
    font-size: 0.9375rem;
}

.board-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.board-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--accent-color);
}

.board-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.board-table tbody tr:hover {
    background-color: rgba(0, 119, 204, 0.03);
}

.board-table tbody tr:last-child {
    border-bottom: none;
}

.board-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

/* Flight Data Styles */
.flight-number {
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    letter-spacing: 0.05em;
}

.flight-status {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-ontime {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status-delayed {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.status-cancelled {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.status-default {
    background-color: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.flight-time {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.flight-destination {
    font-weight: 500;
    color: var(--text-primary);
}

.flight-airline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Placeholder Message */
.placeholder-message {
    background-color: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.placeholder-message p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Board Filters */
.board-filters {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background-color: var(--background);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: var(--surface);
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.board-info {
    margin-bottom: 2rem;
}

/* Pagination */
.pagination {
    margin-top: 2.5rem;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background-color: var(--background);
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-link:hover {
    background-color: var(--surface);
    border-color: var(--accent-color);
}

.pagination-current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

/* No Results */
.no-results {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-results p {
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
}

/* Scroll To Top Button */
.scroll-to-top {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 16px rgba(0, 119, 204, 0.4);
    transform: translateY(-3px);
}

.scroll-to-top:active {
    transform: translateY(-1px) scale(0.95);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        gap: 1rem;
    }

    .airports-grid {
        grid-template-columns: 1fr;
    }

    .airport-header {
        padding: 1.5rem;
    }

    .airport-header h1 {
        font-size: 1.875rem;
    }

    .page-header h1 {
        font-size: 1.875rem;
    }

    .tabs-list {
        flex-direction: column;
    }

    .tab-link {
        text-align: center;
    }

    .search-input-group {
        flex-direction: column;
        max-width: 100%;
    }

    .search-button {
        width: 100%;
    }

    .airport-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Mobile Widgets */
    .airport-widgets {
        flex-direction: column;
        gap: 0.75rem;
        margin: 0.875rem 0;
        width: 100%;
    }
    
    .airport-time-widget,
    .airport-weather-widget {
        padding: 0.5rem 0.875rem;
        gap: 0.5rem;
        width: 100%;
    }

    .time-widget-icon,
    .weather-widget-icon {
        width: 28px;
        height: 28px;
    }

    .time-widget-icon svg,
    .weather-widget-icon svg {
        width: 16px;
        height: 16px;
    }

    .time-hours {
        font-size: 1rem;
    }

    .time-date {
        font-size: 0.6875rem;
    }

    .time-widget-label,
    .weather-widget-label {
        font-size: 0.625rem;
    }
    
    .weather-temp {
        font-size: 1rem;
    }
    
    .weather-city {
        font-size: 0.6875rem;
    }
    
    .weather-details {
        font-size: 0.625rem;
    }
    
    .weather-widget-data {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .weather-main {
        gap: 0.375rem;
    }

    .airport-content {
        padding: 1.5rem;
    }

    /* Адаптивные стили для контента */
    .wysiwyg-content h2,
    .content-section h2 {
        font-size: 1.375rem;
        padding: 0.875rem 1rem;
        padding-left: 1.5rem;
    }

    .wysiwyg-content h3,
    .content-section h3 {
        font-size: 1.125rem;
        padding-left: 1rem;
    }

    .wysiwyg-content li {
        padding-left: 2rem;
    }

    .wysiwyg-content ul > li::before {
        left: 0.25rem;
        width: 6px;
        height: 6px;
    }

    .wysiwyg-content ol > li::before {
        left: 0;
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .wysiwyg-content blockquote {
        padding: 1rem 1.25rem;
        padding-left: 1.5rem;
    }

    .wysiwyg-content ul ul,
    .wysiwyg-content ol ol,
    .wysiwyg-content ul ol,
    .wysiwyg-content ol ul {
        margin-left: 1.5rem;
    }
    
    /* Table of Contents на мобильных */
    .table-of-contents {
        padding: 1rem;
    }
    
    .toc-toggle {
        display: flex !important; /* Кнопка видна на мобильных */
        align-items: center;
        justify-content: center;
    }
    
    .toc-title {
        font-size: 1rem;
    }
    
    .toc-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .toc-link:hover,
    .toc-link.active {
        padding-left: 1rem;
    }
    
    /* На мобильных меню может разворачиваться */
    .table-of-contents:not(.collapsed) .toc-nav {
        max-height: 600px !important;
        opacity: 1 !important;
    }
    
    .table-of-contents.collapsed .toc-nav {
        max-height: 0 !important;
        opacity: 0 !important;
    }
    
    /* Scroll To Top на мобильных */
    .scroll-to-top {
        left: 1rem;
        bottom: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Board Table на мобильных - карточный вид */
    .board-section-header h2 {
        font-size: 1.375rem;
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }
    
    .board-section-header svg {
        width: 20px;
        height: 20px;
    }
    
    .board-table {
        font-size: 0.875rem;
    }
    
    /* Скрываем заголовки таблицы на мобильных */
    .board-table thead {
        display: none;
    }
    
    /* Карточный вид строк */
    .board-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        background-color: var(--background);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .board-table tbody tr:hover {
        background-color: var(--background);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    }
    
    .board-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }
    
    .board-table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Добавляем лейблы перед данными */
    .board-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    
    .flight-number {
        font-size: 0.9375rem;
    }
    
    .flight-time {
        font-size: 1rem;
    }
    
    .flight-status {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }
    
    .flight-airline {
        font-size: 0.8125rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .breadcrumbs-wrapper,
    .airport-tabs,
    .search-form {
        display: none;
    }
    
    body {
        background: white;
    }
}

/* Table of Contents - Автоматическое меню оглавления */
.table-of-contents {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.table-of-contents:hover {
    box-shadow: var(--shadow-md);
}

.table-of-contents.collapsed {
    padding-bottom: 1rem; /* Меньше padding когда свернуто */
}

.table-of-contents.collapsed .toc-header {
    margin-bottom: 0;
    padding-bottom: 0.75rem;
    border-bottom: none;
}

.table-of-contents.collapsed .toc-toggle {
    background-color: var(--accent-color);
    color: white;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
    cursor: pointer; /* Вся шапка кликабельна на мобильных */
}

.toc-header:hover .toc-toggle {
    background-color: var(--surface);
    color: var(--accent-color);
}

.toc-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.toc-toggle {
    display: none; /* Скрыта на десктопе */
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.toc-toggle:hover {
    background-color: var(--surface);
    color: var(--accent-color);
}

.toc-toggle:active {
    transform: scale(0.95);
}

.toc-toggle svg {
    display: block;
    transition: transform 0.3s ease;
}

.table-of-contents.collapsed .toc-toggle svg {
    transform: rotate(-90deg);
}

.toc-nav {
    overflow: hidden;
    max-height: 1000px; /* Достаточно для любого меню */
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.table-of-contents.collapsed .toc-nav {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-item:last-child {
    margin-bottom: 0;
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s ease;
    position: relative;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.toc-link:hover {
    background-color: var(--surface);
    color: var(--text-primary);
    padding-left: 1.25rem;
}

.toc-link:hover::before {
    height: 60%;
}

.toc-link.active {
    background-color: rgba(0, 119, 204, 0.08);
    color: var(--accent-color);
    font-weight: 600;
    padding-left: 1.25rem;
}

.toc-link.active::before {
    height: 100%;
}

/* Счетчик разделов */
.toc-header::after {
    content: attr(data-count);
    display: none; /* Можно включить добавив data-count атрибут */
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    background-color: var(--surface);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
}

/* Индикатор прокрутки */
.toc-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--surface);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.toc-progress-bar {
    height: 100%;
    background: linear-gradient(
        to right,
        var(--accent-color) 0%,
        var(--primary-light) 100%
    );
    width: 0%;
    transition: width 0.1s linear;
}

/* Sticky меню на больших экранах (опционально) */
@media (min-width: 1400px) {
    .airport-content {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 2rem;
        align-items: start;
    }
    
    .table-of-contents {
        position: sticky;
        top: 100px;
        margin-bottom: 0;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-color) var(--surface);
    }
    
    .table-of-contents::-webkit-scrollbar {
        width: 6px;
    }
    
    .table-of-contents::-webkit-scrollbar-track {
        background: var(--surface);
        border-radius: 3px;
    }
    
    .table-of-contents::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 3px;
    }
    
    .table-of-contents::-webkit-scrollbar-thumb:hover {
        background: var(--accent-hover);
    }
    
    /* Контент справа от меню */
    .airport-content > .content-section,
    .airport-content > div:not(.table-of-contents) {
        grid-column: 2;
    }
}

/* =================================================================
   AIRPORT MAP (Яндекс.Карты)
   ================================================================= */

.airport-map-section {
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.airport-map-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.airport-map {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    background-color: var(--surface);
}

.map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-style: italic;
}

.map-coordinates {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0.5rem 0 0.5rem;
    font-size: 0.875rem;
}

.coordinate-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: 6px;
    transition: all 0.2s;
}

.coordinate-item:hover {
    background: var(--border-light);
    transform: translateY(-1px);
}

.coordinate-item strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
    font-weight: 600;
}

/* Адаптивность карты */
@media (max-width: 768px) {
    .airport-map-section {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }
    
    .airport-map-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .airport-map {
        height: 350px;
    }
    
    .map-coordinates {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .coordinate-item {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .airport-map {
        height: 300px;
    }
}

/* Стилизация элементов Яндекс.Карт */
.ymaps-2-1-79-balloon {
    border-radius: 8px !important;
}

.ymaps-2-1-79-balloon__content {
    padding: 1rem !important;
}

/* Accessibility */
.btn:focus,
.search-button:focus,
.search-input:focus,
.tab-link:focus,
.nav-link:focus,
.toc-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Loading states */
.btn:disabled,
.search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
