:root {
    --primary-color: #1A2B42; /* Deep dark blue header */
    --secondary-color: #E74C3C; /* Reddish-orange for headings and buttons */
    --accent-color: #FFD700; /* Bright golden yellow for logo and accents */
    --text-dark: #333333; /* Dark gray for main text */
    --text-light: #555555; /* Lighter gray for secondary text */
    --background-light: #FDF8F3; /* Light warm beige background */
    --white: #ffffff;
    --black: #000000;
    --font-family: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    padding-top: 80px; /* Добавляем отступ сверху из-за фиксированной шапки */
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.main-content {
    flex-grow: 1;
}

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

.section {
    padding: 60px 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    max-width: 700px;
    margin: -20px auto 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #fff;
    color: var(--dark-color);
}

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

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* Шапка */
#header {
    background-color: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.main-nav {
    margin-right: 20px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--accent-color);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.burger-menu {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Главный экран (Hero) */
#hero {
    min-height: calc(100vh + 80px); /* Высота экрана с компенсацией шапки */
    margin-top: -80px;
    background: url('https://images.unsplash.com/photo-1542025232-c29113569942?q=80&w=1974&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 74, 153, 0.3);
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* Hero slideshow (global) */
#hero {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.hero-slide.active {
    opacity: 1;
}

.hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 44px;
    text-align: center;
}

.hero-btn:hover { background: rgba(255, 149, 0, 0.6); }
.hero-btn.prev { left: 16px; }
.hero-btn.next { right: 16px; }

.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    z-index: 2;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    background: rgba(255, 246, 246, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.hero-dots button.active {
    background: #fff;
}

/* Language switcher */
.lang-switch {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
}
.lang-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid var(--black);
    border-radius: 6px;
    background: #fff;
    color: var(--black);
    cursor: pointer;
}
.lang-btn.active {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

/* Заголовок страницы */
.page-header {
    background-color: transparent;
    padding: 20px 0 0;
    text-align: left;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--secondary-color);
}

/* Секция "О нас" */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text, .about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Секция Qaisar Games */
.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.countdown-item {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.countdown-item span {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.countdown-item p {
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 5px;
}

.qaysar-info {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.1rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

/* Секция Проекты */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px) scaleX(1.04);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 20px 20px 10px;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 20px 20px;
}

/* Подвал (унифицировано) */
#contacts-footer {
    padding: 40px 0;
    text-align: center;
    background-color: #222;
    color: #fff;
}

.footer-content p {
    margin-bottom: 10px;
}

.copyright {
    margin-top: 30px;
    border-top: 1px solid #555;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
}

/* Стили для анимации при прокрутке */
.section-title, .section-subtitle, .about-text, .about-image, .project-card, .gallery-item, .countdown, .qaysar-info, .contact-info, .contact-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-title.visible, .section-subtitle.visible, .about-text.visible, .about-image.visible, .project-card.visible, .gallery-item.visible, .countdown.visible, .qaysar-info.visible, .contact-info.visible, .contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Адаптивность */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .section-title, .page-header h1 {
        font-size: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.2rem;
    }
    #hero {
        position: relative;
        overflow: hidden;
    }

    /* Мобильное меню */
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 15px 0;
        width: 100%;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px;
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
    }

    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        color: var(--secondary-color);
        background-color: rgba(231, 76, 60, 0.1);
    }

    .burger-menu {
        display: block;
    }
    
    .burger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Скрываем кнопки языков и пожертвования в мобильном меню */
    .lang-switch,
    .donate-btn {
        display: none;
    }

    /* Показываем кнопки в мобильном меню */
    .main-nav .mobile-controls {
        display: block;
        padding: 20px;
        text-align: center;
        border-top: 1px solid #eee;
    }

    .main-nav .mobile-controls .lang-switch,
    .main-nav .mobile-controls .donate-btn {
        display: block;
        margin: 10px auto;
    }

    .main-nav .mobile-controls .lang-switch {
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}

/* Скрываем мобильные элементы на десктопе */
.mobile-controls {
    display: none;
}

    
    /* Slides */
    .hero-slide {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 0.6s ease;
    }
    .hero-slide.active {
        opacity: 1;
    }
    
    /* Reuse existing overlay/look */
    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
    }
    
    /* Arrows */
    .hero-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        background: rgba(0,0,0,0.4);
        color: #fff;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 24px;
        line-height: 44px;
        text-align: center;
    }
    .hero-btn:hover { background: rgba(0,0,0,0.6); }
    .hero-btn.prev { left: 16px; }
    .hero-btn.next { right: 16px; }
    
    /* Dots */
    .hero-dots {
        position: absolute;
        bottom: 16px;
        left: 0;
        right: 0;
        display: flex;
        gap: 8px;
        justify-content: center;
        z-index: 2;
    }
    .hero-dots button {
        width: 10px;
        height: 10px;
        background: rgba(255,255,255,0.6);
        border: none;
        border-radius: 50%;
        cursor: pointer;
    }
    .hero-dots button.active {
        background: #fff;
    }

    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-top: 30px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .countdown {
        flex-wrap: wrap;
        gap: 10px;
    }
    .countdown-item {
        min-width: calc(50% - 10px);
    }
}
#impact {
    background-color: var(--primary-color);
    color: #fff;
}

#impact .section-title {
    color: var(--secondary-color);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.impact-item h3 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.impact-item p {
    font-size: 1.1rem;
    margin-top: 10px;
}


/* --- Стили для блока "Истории успеха" (Карусель) --- */
.testimonial-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 60px; /* Оставляем место для кнопок */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

.testimonial-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
    color: #555;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: #003366;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Изменение цвета подвала для контраста */
#contacts-footer {
    padding: 40px 0;
    text-align: center;
    background-color: #222;
    color: #fff;
}

#contacts-footer .copyright {
    margin-top: 30px;
    border-top: 1px solid #555;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
}

/* Контакты — карточки и сетка */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.contact-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 20px;
}
.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.map-frame { border-radius: 8px; overflow: hidden; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link { background: #f1f1f1; padding: 8px 12px; border-radius: 6px; text-decoration: none; color: #333; }
.contact-note { margin-top: 20px; text-align: center; }

.about-page-header {
    display: none;
}

.about-title-left {
    text-align: left;
}

/* --- Стили для модального окна пожертвований --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 1002;
    width: 90%;
    max-width: 450px;
    display: none;
}

.modal-overlay.active, .modal.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}

.requisites-block {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}
.requisites-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

#donation-form .btn {
    width: 100%;
    margin-top: 10px;
}

.projects-grid .project-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.projects-grid .project-card:hover {
    transform: scale(1.06, 1.02);
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
    position: relative;
    z-index: 3;
}

/* --- Специальные стили для модального окна "О фонде" --- */
#about-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(5px) !important;
}

#about-overlay.active {
    display: flex !important;
}

#about-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background-color: #fff !important;
    padding: 40px !important;
    border-radius: 15px !important;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4) !important;
    z-index: 100000 !important;
    width: 90% !important;
    max-width: 600px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    display: none !important;
}

#about-modal.active {
    display: block !important;
}

#about-modal-close-btn {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    color: #666 !important;
    cursor: pointer !important;
    z-index: 100001 !important;
    padding: 5px !important;
    line-height: 1 !important;
}

#about-modal-close-btn:hover {
    color: #333 !important;
}

.about-modal-content {
    margin-top: 20px !important;
}

.about-modal-content h2 {
    color: #d32f2f !important;
    font-size: 24px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
}

.about-modal-content h3 {
    color: #d32f2f !important;
    font-size: 18px !important;
    margin: 25px 0 15px 0 !important;
    border-bottom: 2px solid #d32f2f !important;
    padding-bottom: 5px !important;
}

.about-modal-content p {
    margin-bottom: 15px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

.about-modal-content ul {
    margin: 15px 0 !important;
    padding-left: 20px !important;
}

.about-modal-content li {
    margin-bottom: 8px !important;
    line-height: 1.5 !important;
    color: #333 !important;
}


/* Адаптивность для модального окна "О фонде" */
@media (max-width: 768px) {
    #about-modal {
        width: 95% !important;
        max-width: none !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
    
    .about-modal-content h2 {
        font-size: 20px !important;
    }
    
    .about-modal-content h3 {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    #about-modal {
        width: 98% !important;
        padding: 15px !important;
        max-height: 95vh !important;
    }
    
    .about-modal-content h2 {
        font-size: 18px !important;
    }
    
    .about-modal-content h3 {
        font-size: 14px !important;
    }
    
    #about-modal-close-btn {
        top: 10px !important;
        right: 15px !important;
        font-size: 24px !important;
    }
}

/* Стиль для выделенного слогана - максимальная специфичность */
#about-modal .about-modal-content .highlight-slogan {
    color: white !important;
    background-color: #ffd700 !important;
    font-weight: 700 !important;
    font-size: 1.2em !important;
    text-align: center !important;
    margin: 2rem 0 !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3) !important;
}

/* --- Стили для раздела партнеров --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 40px;
    align-items: center;
    justify-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 100px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.partner-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.partner-item img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(20%) brightness(0.9);
}

.partner-item:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

/* Адаптивность для партнеров */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 18px;
        margin-top: 30px;
    }
    
    .partner-item {
        width: 140px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 25px;
    }
    
    .partner-item {
        width: 130px;
        height: 70px;
    }
}

.read-more-btn {
    display: inline-block;
    margin: 10px 20px 20px 20px;
    padding: 10px 16px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.read-more-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

#project-modal {
    max-width: 700px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}
#project-modal .project-modal-body {
    max-height: calc(80vh - 40px);
    overflow-y: auto;
}

/* --- Styles for Events Page Photos --- */

/* This will ensure the individual photos in the main gallery are centered within their grid cell */
.gallery-item {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Keep rounded corners */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #fff; /* Add a background for consistency */
}

/* Make images fill the container without being distorted */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* This will create a centered grid for partner logos */
.partners-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    justify-items: center; /* Center the items (logos) on the horizontal axis */
    align-items: center;   /* Center the items (logos) on the vertical axis */
    margin: 20px 0;
}

/* This overrides any inline styles and ensures each partner logo box is centered via flexbox */
.partners-gallery .partner-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; /* Ensure it fills the grid cell */
    height: 100px;
}

.partners-gallery .partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

/* Ensure partner logos themselves are not stretched or cropped */
.partners-gallery .partner-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* General styles for events page for consistency */
.event-header {
    text-align: center;
    margin-bottom: 40px;
}

.event-header img {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.event-card {
    background: #f8f9fa; 
    padding: 30px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.event-card h3 {
    color: #d32f2f; 
    margin-bottom: 20px; 
    font-size: 20px;
}

.event-description {
    max-width: 800px; 
    margin: 0 auto; 
    text-align: left; 
    line-height: 1.6;
}

.event-section-subtitle {
    text-align: center; 
    margin: 40px 0 20px; 
    color: #d32f2f;
}

.audio-player {
    max-width: 400px; 
    margin: 40px auto; 
    text-align: center; 
    background: #f8f9fa; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.audio-player h3 {
    color: #d32f2f; 
    margin-bottom: 15px; 
    font-size: 18px;
}
.audio-player audio {
    width: 100%; 
    margin-bottom: 10px;
}
.audio-player p {
    color: #666; 
    font-size: 14px; 
    margin: 0;
}

/* --- Стили для секции "В СМИ о нас" --- */
.media-links {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 20px auto 0;
    text-align: left;
}

.media-links li {
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-links li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.media-links a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding-right: 40px;
}

.media-links a::after {
    content: '>';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    transition: right 0.2s ease;
}

.media-links a:hover::after {
    right: 15px;
}






