/* =========================================================
   Санаторий «Калуга-Бор»  —  тема хвойного леса
   ========================================================= */

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

:root {
    --pine-deep:    #1b3324;
    --pine:         #2a4a33;
    --pine-mid:     #3b5e42;
    --sage:         #6e8072;
    --sage-light:   #9baca0;
    --wood:         #7b6b58;
    --wood-light:   #a89880;
    --cream:        #f7f5f0;
    --white:        #ffffff;
    --border:       #e4dfd5;
    --text:         #2c342e;
    --text-muted:   #7d8479;
    --shadow:       0 1px 3px rgba(26, 51, 36, 0.06), 0 4px 16px rgba(26, 51, 36, 0.04);
    --radius:       12px;
    --font:         'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- hero --- */
.hero {
    background: linear-gradient(165deg, #1a3324 0%, #254831 50%, #2a4f37 100%);
    color: #eaf0e8;
    text-align: center;
    padding: 48px 24px 44px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(80, 120, 80, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 20%, rgba(140, 180, 130, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* --- reconstruction badge --- */
.recon-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #e8d08f;
    border: 1px solid rgba(232, 208, 143, 0.35);
    border-radius: 20px;
    padding: 5px 18px;
    margin-bottom: 14px;
    position: relative;
}

.hero h1 {
    font-size: clamp(24px, 4.5vw, 36px);
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    position: relative;
}

.hero-sub {
    font-size: 16px;
    font-weight: 400;
    color: #b5c7b3;
    letter-spacing: 0.2px;
    position: relative;
}

/* --- cards --- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 32px 28px;
    margin-bottom: 22px;
}

.card-head {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2eb;
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--pine-deep);
    letter-spacing: -0.2px;
}

/* --- notice --- */
.notice {
    background: #f2f6f0;
    border-left: 3px solid var(--pine-mid);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--pine);
}

.notice em {
    color: var(--sage);
}

/* --- files --- */
.files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.file-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 20px;
    background: #f7f9f4;
    border: 1px solid #e4eadb;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    flex: 1;
    min-width: 240px;
}

.file-link:hover {
    background: #eef3e7;
    border-color: #c5d3ba;
}

.file-name {
    font-weight: 600;
    color: var(--pine);
    font-size: 15px;
}

.file-hint {
    font-size: 13px;
    color: var(--sage-light);
}

/* --- table --- */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.docs-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--sage);
    padding: 0 16px 12px;
    border-bottom: 2px solid #eef2eb;
}

.docs-table thead th:last-child {
    text-align: right;
    width: 160px;
}

.docs-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f4f3ef;
    vertical-align: baseline;
    line-height: 1.55;
}

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

.docs-table tbody tr:hover {
    background: #fafaf7;
}

.docs-table td small {
    color: var(--sage-light);
    font-size: 13px;
    display: block;
    margin-top: 3px;
}

.form-cell {
    text-align: right;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--pine);
    background: #eef3ea;
    padding: 3px 12px;
    border-radius: 6px;
    letter-spacing: 0.1px;
}

.badge.muted {
    color: #b0b8ab;
    background: transparent;
}

.extra-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #e8e5dd;
    font-size: 14px;
    color: var(--sage);
}

/* --- contacts --- */
.contacts {
    display: flex;
    flex-direction: column;
}

.contact-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid #f4f3ef;
    gap: 16px;
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-row .contact-label {
    font-size: 14.5px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.contact-phone {
    font-weight: 600;
    color: var(--pine);
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
}

.contact-phone:hover {
    color: var(--pine-mid);
}

.contact-phone .ext {
    font-weight: 400;
    color: var(--sage);
    font-size: 13px;
}

.contact-value-link {
    color: #2787f5;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.contact-value-link:hover {
    text-decoration: underline;
}

/* --- footer --- */
footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 22px 0;
    font-size: 13.5px;
    color: var(--sage-light);
}

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

footer a {
    color: var(--pine-mid);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    color: var(--pine);
}

/* --- responsive --- */
@media (max-width: 600px) {
    .card {
        padding: 22px 16px;
    }

    .docs-table thead th:last-child {
        display: none;
    }

    .docs-table tbody td {
        display: block;
        padding: 8px 0;
    }

    .docs-table tbody tr {
        display: block;
        border-bottom: 1px solid #f4f3ef;
        padding: 8px 0;
    }

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

    .form-cell {
        text-align: left;
        padding-top: 2px;
    }

    .badge {
        font-size: 12px;
        padding: 2px 10px;
    }

    .contact-row {
        flex-direction: column;
        gap: 2px;
    }

    .files-grid {
        flex-direction: column;
    }

    footer .container {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}
