/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: rgb(0, 117, 0);
    --primary-dark: #5a3000;
    --accent: #67210c;
    --primary-extra-dark: rgb(56, 27, 0);
    --text: #1e2330;
    --muted: #5a6475;
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e5e9f2;
    --shadow: 0 10px 30px rgba(99, 0, 0, 0.08);
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-position: center 180px !important;
    /* background-image: url("assets/Spas_vsederzhitel_sinay.jpg"); */
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top center;
    background-attachment: fixed;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: var(--primary-extra-dark);
    padding: 2rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}


header .subtitle {
    font-size: 1rem;
    color: var(--muted);
}

.pages-header {
    display: flex;
    justify-content: center;
    color: white;
    flex-direction: row;
}

/* Navigation */
nav {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding: 0.4rem 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: 999px;
    transition: color 0.2s, background-color 0.2s;
    font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary);
    background-color: rgba(21, 107, 0, 0.1);
}

/* Main Content */
main {
    padding: 3rem 0 4rem;
    min-height: 60vh;
}

header h1 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.3rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.4rem;
}

h2 {
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    font-size: 2rem;
}

h2white {
    color: white;
    text-align: center;
    font-size: 1.9rem;
    font-family: 'Times New Roman', Times, serif;
}

h3 {
    color: var(--primary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

h4 {
    color: var(--text);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

p {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    text-indent: 1.0rem;
    font-family: Arial, Helvetica, sans-serif;
}

pverse {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    font-weight: bold;
    font-style: italic;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* content-section Section */
.content-section {
    background: var(--card);
    padding: 2.2rem;
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}


.content-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.4rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--muted);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.6rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 14px;
    box-shadow: var(--shadow);
    text-align: left;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(75, 0, 0, 0.12);
}

.info-card p {
    margin-bottom: 1.2rem;
    text-indent: 0;
    color: var(--muted);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

table th,
table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background-color: rgba(95, 0, 0, 0.1);
    color: var(--primary-dark);
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: #fafbfd;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 360px;
    background: linear-gradient(180deg, rgba(65, 0, 0, 0.85), rgba(78, 0, 0, 0));
    border-radius: 14px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border: 1px dashed #cfd7e6;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
    margin-top: 2rem;
}

.contact-item p {
    text-indent: 0;
}

.contact-item {
    padding: 1.4rem;
    background: #f7f9fc;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.contact-item h4 {
    color: var(--primary);
    margin-bottom: 0.4rem;
}

/* Button */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.6rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.2s, transform 0.2s;
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(99, 0, 0, 0.2);
}

.button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Footer */
footer {
    background: linear-gradient(160deg, var(--primary-extra-dark) 0%, #1a0a00 100%);
    color: #e9eef6;
    border-top: 4px solid;
    border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem 24px 2rem;
}

.footer-col h4 {
    color: #f0c080;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-col p {
    color: #c8d0de;
    font-size: 0.9rem;
    line-height: 1.7;
    text-indent: 0;
    margin-bottom: 0;
}

.footer-col a {
    color: #f0c080;
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding: 1.2rem 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-bottom p {}

/* Collapsible Section */
.collapsible {
    background-color: var(--primary-extra-dark);
    color: white;
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.collapsible.active,
.collapsible:hover {
    background-color: var(--primary-dark);
}

.collapsible:after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

/* image parallel to text */
.img {
    max-width: 400px;
    float: right;
    margin: 0 0 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.flex-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.flex-text {
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(75, 0, 0, 0.18);
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(56, 27, 0, 0.75));
    color: white;
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

.gallery-item {
    cursor: pointer;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

#lightbox-caption {
    color: #f0e0c0;
    margin-top: 1rem;
    font-size: 1rem;
    font-family: Arial, Helvetica, sans-serif;
    text-indent: 0;
}

#lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#lightbox-close:hover {
    opacity: 1;
}

table th,
table td {
    padding: 0.6rem 0.8rem;
}

/* Phone screen vertical */
@media (max-width: 700px) {
    .pages-header {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header h2white {
        font-size: 1.3rem;
    }

    header h2 {
        font-size: 1.8rem;
    }

    nav ul li a {
        padding: 0.4rem 0.6rem;
    }

    .content-section h3 {
        font-size: 1.15rem;
    }

    .content-section,
    .content-section pverse,
    .content-section ul li,
    .content-section p {
        font-size: 0.95rem;
    }


    .logo {
        width: 150px;
        height: 150px;
        display: block;
        margin: 0 auto;
    }

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

    .contact-item p {
        font-size: 0.9rem;
    }

    table {
        font-size: 0.9rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        height: 200px;
    }

    .img {
        float: none;
        max-width: 100%;
        margin: 0 auto 1rem;
    }
}

/* Phone screen horizontal */
@media (min-width: 701px) and (max-width: 800px) {
    body {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1rem;
    }

    p,
    pverse,
    .content-section ul li {
        font-size: 0.65rem;
    }

    nav ul li a {
        padding: 0.4rem 0.6rem;
    }

    .content-section {
        padding: 1.5rem;
    }
}

/**
 * Media query for larger screens and devices
 * Applies styles when the viewport width is 900px or wider
 * Typically used for desktop and tablet layouts
 */
@media (min-width: 801px) and (max-width: 900px) {
    nav ul li a {
        padding: 0.4rem 0.7rem;
    }
}