/* Variables */
:root {
    --color-primary-dark: #01221B;
    --color-emerald: #013E2F;
    --color-accent-gold: #D9A441;
    --color-light-gold: #FDE27C;
    --color-bg-light: #F8F5EC;
    --color-bg-white: #FFFFFF;
    --color-text-main: #2D2D2D;
    --color-text-secondary: #5A5A5A;
    --color-text-light: #F0EDE5;
    
    --font-family-base: 'Inter', sans-serif;
    --font-family-display: 'Playfair Display', serif;
    
    --container-width: 1200px;
    --border-radius-md: 14px;
    --border-radius-lg: 20px;
    
    --shadow-card: 0 4px 20px rgba(1, 34, 27, 0.08);
    --shadow-card-hover: 0 8px 32px rgba(1, 34, 27, 0.14);
    --shadow-gold: 0 4px 16px rgba(217, 164, 65, 0.3);
    --transition: all 0.3s ease;
}



/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-display);
    color: var(--color-primary-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background-color: var(--color-accent-gold);
    color: var(--color-primary-dark);
    padding: 12px 24px;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-light-gold);
    transform: translateY(-2px);
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
}

/* Mobile Adaptation: Stacked Cards Layout */
@media (max-width: 768px) {
    .table-responsive table {
        min-width: unset;
    }

    /* Скрываем шапку таблицы, чтобы не занимала место */
    .table-responsive thead {
        display: none;
    }

    /* Каждая строка становится отдельной карточкой */
    .table-responsive tbody tr {
        display: flex;
        flex-direction: column;
        padding: 12px;
        margin-bottom: 12px;
        background-color: var(--color-bg-light);
        border-radius: var(--border-radius-md);
        box-shadow: 0 2px 8px rgba(1, 34, 27, 0.05);
        border-bottom: none !important;
    }

    /* Ячейки растягиваем на всю ширину и отделяем пунктиром */
    .table-responsive td,
    .table-responsive th {
        display: block;
        width: 100%;
        padding: 4px 0;
        border-bottom: 1px dashed rgba(1, 62, 47, 0.1);
    }

    .table-responsive td:last-child,
    .table-responsive th:last-child {
        border-bottom: none;
    }

    /* Первый столбец делаем основным заголовком карточки */
    .table-responsive td:first-child,
    .table-responsive th:first-child {
        font-weight: 700;
        color: var(--color-primary-dark);
        margin-bottom: 6px;
        padding-top: 0;
    }

    /* Остальные ячейки выравниваем по левому краю */
    .table-responsive td:not(:first-child),
    .table-responsive th:not(:first-child) {
        text-align: left;
    }

    /* Отключаем "зебру" для чистоты мобильной карточки */
    .table-responsive tbody tr:nth-child(even) {
        background-color: transparent;
    }
}

/* ========================= */
/* TABLES STYLES             */
/* ========================= */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

table thead th {
    background-color: var(--color-primary-dark);
    color: var(--color-bg-white);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-family: var(--font-family-base);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.85rem;
    white-space: nowrap;
}

table tbody td {
    padding: 12px 18px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(1, 62, 47, 0.1);
    line-height: 1.5;
}

table tbody tr:nth-child(even) {
    background-color: var(--color-bg-light);
}

table tbody tr:hover {
    background-color: rgba(217, 164, 65, 0.08);
}

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

/* Bordered variant */
.table-bordered table,
table.table-bordered {
    border: 1px solid var(--color-emerald);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.table-bordered table thead th,
table.table-bordered thead th {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.table-bordered table thead th:last-child,
table.table-bordered thead th:last-child {
    border-right: none;
}

.table-bordered table tbody td,
table.table-bordered tbody td {
    border-right: 1px solid rgba(1, 62, 47, 0.1);
    border-bottom: 1px solid rgba(1, 62, 47, 0.1);
}

.table-bordered table tbody td:last-child,
table.table-bordered tbody td:last-child {
    border-right: none;
}

/* Highlighted first column */
table thead th:first-child,
table tbody td:first-child {
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Small tables */
table.table-sm thead th,
table.table-sm tbody td {
    padding: 8px 12px;
    font-size: 0.88rem;
}
