:root {
    --brand-color: #1cac78;
    --brand-dark: #158a60;
    --bg-color: #eee;
    --text-color: #333;
    --white: #fff;
    --footer-bg: #666;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    height: 50px;
    margin-right: 1rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a:hover, nav a.active {
    color: var(--brand-color);
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

h1, h2, h3 {
    color: var(--brand-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--brand-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2 i {
    color: var(--brand-color);
}

p {
    margin-bottom: 1rem;
}

ul.info-list {
    list-style: none;
    padding-left: 0;
}

ul.info-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

ul.info-list li i {
    color: var(--brand-color);
    margin-top: 0.25rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

a {
    color: var(--brand-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--bg-color); /* Светлый фон как у сайта (#eee) */
    color: #333333; /* Темно-серый текст */
    padding: 2rem 1rem;
    margin-top: auto;
    border-top: 1px solid #ddd; /* Легкая граница сверху для визуального отделения */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-container p {
    margin-bottom: 1rem;
    color: #333333; /* Темно-серый текст */
    font-size: 0.95rem;
}

.footer-container a {
    color: #333333; /* Темно-серые ссылки */
    text-decoration: none;
}

.footer-container a:hover {
    color: var(--brand-color);
    text-decoration: none;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-links a {
    color: #333333; /* Темно-серые иконки */
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--brand-color);
    transform: translateY(-2px);
}

.social-links i {
    color: #333333; /* Темно-серые иконки */
}

.social-links a:hover i {
    color: var(--brand-color);
}

/* Contacts Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 580px;
    border: 0;
    display: block;
}

/* 404 Page */
.not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.not-found h1 {
    font-size: 4rem;
    border: none;
    margin-bottom: 0.5rem;
    text-align: center;
}

.not-found h2 {
    text-align: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.not-found p {
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--brand-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--brand-dark);
    color: var(--white);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        flex-direction: column;
    }

    .logo img {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}


/* =========================================
   Стили для раздела Организации и Lightbox
   ========================================= */

/* Выпадающее меню */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    border-radius: 4px;
    min-width: 220px;
    z-index: 1001;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-color);
    color: var(--brand-color);
}

/* Сетка организаций (Главная страница раздела) */
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.org-card {
    position: relative;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--white);
}

.org-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.org-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.org-card:hover .org-card-bg {
    transform: scale(1.05);
}

.org-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.org-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.org-card-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

/* Страница отдельной организации */
.org-detail {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.org-detail h2 {
    color: var(--brand-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-info h3 {
    color: var(--brand-color);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.org-info ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.org-info a {
    color: var(--brand-color);
    text-decoration: none;
}

.org-info a:hover {
    text-decoration: underline;
}

/* Галерея фотографий */
.photo-gallery {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.photo-gallery h3 {
    color: var(--brand-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.photos-grid.single-photo {
    display: flex;
    justify-content: center;
}

.photos-grid.single-photo .photo-item {
    max-width: 800px;
    width: 100%;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background-color: #ddd;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* Lightbox (Просмотр фото) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close, .lightbox-nav {
    position: absolute;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
    border: none;
}

.lightbox-close:hover, .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* Адаптивность для мобильного меню и организаций */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        flex-direction: column;
    }

    .logo img {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--bg-color);
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    .dropdown-menu li a {
        justify-content: center;
    }

    .org-grid {
        grid-template-columns: 1fr;
    }

    .org-card {
        height: 220px;
    }
    
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}













