/* Основные стили сайта Ассоциации ветеранов СВО в РБ */

@font-face {
    font-family: 'Merriweather';
    src: url('../fonts/Merriweather-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Merriweather';
    src: url('../fonts/Merriweather-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-color: #0075BC;
    --primary-light: #2a8fd4;
    --primary-pale: #e6f4fc;
    --secondary-color: #D51317;
    --secondary-light: #e53e3e;
    --accent-color: #BDA364;
    --accent-light: #d4bc8a;
    --light-color: #f7fafc;
    --light-warm: #fefcfa;
    --dark-color: #2d3748;
    --gray-color: #718096;
    --gray-light: #a0aec0;
    --white-color: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 117, 188, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 117, 188, 0.12);
    --transition: all 0.3s ease;
    --error-color: #D51317;
}

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

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white-color);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 117, 188, 0.4);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
}

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

.scroll-to-top:hover {
    box-shadow: 0 6px 24px rgba(0, 117, 188, 0.5);
    transform: translateY(-2px);
}

.scroll-to-top:active {
    transform: translateY(0);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(rgba(246, 244, 239, 0.7), rgba(246, 244, 239, 0.7)), url('../pattern.png') repeat;
    background-color: #F6F4EF;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-top {
    box-shadow: 0 2px 12px rgba(0, 117, 188, 0.2);
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white-color);
    padding: 1rem 0;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emblem {
    width: 144px;
    height: 144px;
    background: url('../logo.png') no-repeat center center, #F6F4EF;
    background-size: contain;
    border-radius: 50%;
    border: 3px solid #F6F4EF;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.emblem:hover {
    background: transparent;
    border-color: transparent;
}

.emblem::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 144px;
    height: 144px;
    margin: -72px 0 0 -72px;
    background: url('../logo.png') no-repeat center center, #F6F4EF;
    background-size: contain;
    border-radius: 50%;
    border: 3px solid #F6F4EF;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
}

.emblem:hover::after {
    transform: scale(4);
    opacity: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.65rem;
    margin-bottom: 5px;
}

.logo-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-contacts .phone i,
.header-contacts .email i {
    margin-right: 0.4rem;
    opacity: 0.95;
}

.header-contacts .max-link {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.header-contacts .max-link:hover {
    color: var(--accent-light);
}

nav {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.nav-container {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: var(--white-color);
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-light);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.nav-menu a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero {
    background: linear-gradient(135deg, rgba(0, 117, 188, 0.75) 0%, rgba(42, 143, 212, 0.65) 50%, rgba(189, 163, 100, 0.25) 100%),
        url('https://via.placeholder.com/1920x600/0075BC/ffffff?text=Ветераны+СВО+РБ') no-repeat center center/cover;
    color: var(--white-color);
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    color: var(--white-color);
    padding: 0.85rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(213, 19, 23, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 48, 48, 0.35);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: var(--dark-color);
    box-shadow: 0 4px 12px rgba(189, 163, 100, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    color: var(--dark-color);
    box-shadow: 0 6px 20px rgba(189, 163, 100, 0.4);
}

.section {
    padding: 3rem 0;
}

.section-alt {
    background: linear-gradient(180deg, var(--primary-pale) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title h2 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
    font-weight: 600;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-content h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-img {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: var(--white-color);
    min-height: 300px;
    box-shadow: var(--shadow);
}

.goals-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.goal-card {
    background: var(--white-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-light);
}

.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.goal-card h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-card h3 i {
    color: var(--accent-color);
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.leader-card {
    background: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.leader-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.leader-img {
    aspect-ratio: 3 / 4;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.leader-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leader-info {
    padding: 1.5rem;
    text-align: center;
}

.leader-name {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.leader-position {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.documents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.document-card {
    background: var(--white-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.document-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
}

.document-card h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-card p {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

.doc-btn {
    display: block;
    margin-top: 1.25rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.gallery-item {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--accent-color) 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

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

.gallery-item::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white-color);
    background: rgba(0, 117, 188, 0.45);
    opacity: 0;
    transition: var(--transition);
}

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

/* Модальное окно галереи */
.modal-gallery-content {
    max-width: 1100px;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: rgba(255,255,255,0.8);
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: var(--transition);
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white-color);
    font-size: 3rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    opacity: 0.7;
    transition: var(--transition);
    line-height: 1;
}

.lightbox-nav:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.contacts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-info {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--gray-color);
}

footer {
    background: linear-gradient(180deg, #3d4f5f 0%, #2d3748 100%);
    color: var(--white-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-col p,
.footer-col a {
    color: #cbd5e0;
    margin-bottom: 0.8rem;
    display: block;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--accent-light);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    color: var(--gray-light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 55, 72, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 117, 188, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--secondary-color);
}

/* Форма сообщений */
.form-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 1024px) {
    .container {
        width: 95%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

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

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section {
        padding: 2rem 0;
    }
}

@media (max-width: 375px) {
    .logo-title {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 320px) and (max-width: 374px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
}
