/*
Theme Name: Искра Премия
Author: Ваше имя
Description: Тема для Национальной премии прессы "Искра"
*/

:root {
    --primary-color: #1a2639; 
    --accent-color: #b33a3a;  
    --bg-light: #faf9f6;  
    --bg-white: #ffffff;    
    --bg-section: #f4f2ed;
    --text-main: #2c2f33;
    --text-muted: #7a7f85;
    --font-heading: 'Playfair Display', serif; 
    --font-body: 'Roboto', sans-serif;          
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Хедер и Базовая типографика (оставлены без изменений) */
header {
    padding: 15px 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid #e3e0d8;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}
header.scrolled {
    background-color: var(--bg-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-img { height: 65px; display: block; }
nav ul {
    display: flex;
    gap: 35px;
    font-weight: 400;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}
nav ul li a:hover { color: var(--primary-color); transition: 0.3s; }
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 2px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1.2px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 38, 57, 0.1);
}
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}
.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: 0.3s;
}

/* HERO */
.hero { padding: 100px 0 80px; border-bottom: 1px solid #ece9e2; background: url('topback32.png') no-repeat center;}
.hero-grid { display: flex; align-items: center; gap: 80px; }
.hero-left { flex: 1; max-width: 500px; }
.hero-left .logo-wrapper { }
.hero-left img { max-width: 150px; display: block; }
.hero-subtitle {
    font-family: var(--font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-color);
 
    font-weight: 500;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 100px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -1px;
}
.hero-title span {
    display: block;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-top: 15px;
    color: var(--text-muted);
    font-family: var(--font-body);
}
.hero-right { flex: 1; position: relative; padding-top: 20px; }
.hero-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}
.hero-right p { color: var(--text-main); font-size: 16px; margin-top: 25px; color: #4a4e54; }
.dropcap::first-letter {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 5px;
}
.hero-right .btn-link {
    font-family: var(--font-body);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 2px;
    font-weight: 500;
}
.hero-right .btn-link:hover { color: var(--accent-color); border-color: var(--accent-color); }

/* Номинации */
.nominations { padding: 90px 0; }
.section-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::before, .section-title::after {
    content: "«";
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 28px;
    opacity: 0.3;
    margin: 0 10px;
}
.section-title::after { content: "»"; }
.section-sub {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 50px;
    letter-spacing: 0.5px;
}
.nominations-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 40px;
    padding: 0 40px;
}
.nomination-item {
    border-bottom: 1px solid #ece9e2;
    padding: 18px 0;
    display: flex;
    align-items: center;
    transition: 0.3s;
}
.nomination-item:hover { border-color: var(--primary-color); padding-left: 10px; }
.nom-number {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    color: #d0cdc6;
    margin-right: 25px;
    min-width: 45px;
    line-height: 1;
}
.nom-title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Даты */
.dates-section {
    padding: 90px 0;
    background-color: var(--bg-section);
    border-top: 1px solid #ece9e2;
    border-bottom: 1px solid #ece9e2;
}
.dates-content { display: flex; gap: 80px; }
.dates-left { flex: 0.7; }
.dates-left h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.dates-left p { color: var(--text-muted); font-size: 15px; margin-bottom: 25px; }
.dates-left .btn-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 30px;
}
.dates-left .btn-primary:hover { background: var(--primary-color); color: #fff; }
.dates-right { flex: 1.5; }
.date-item {
    display: flex;
    gap: 30px;
    padding: 18px 0;
    border-bottom: 1px solid #e0ddd6;
}
.date-item:last-child { border-bottom: none; }
.date-number {
    min-width: 130px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}
.date-desc { color: var(--text-main); font-size: 15px; }

/* ИСТОРИЯ ПРЕМИИ (НОВЫЙ СЛАЙДЕР С КАРТОЧКАМИ) */
.history-section { padding: 90px 0; background-color: var(--bg-light); }
.history-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 40px;
}
.history-track {
    overflow: hidden;
    flex: 1;
    display: flex;
    gap: 30px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 20px;
}
.history-slide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    min-width: 100%;
    scroll-snap-align: start;
}
.history-card {
    flex: 1;
    background: #fff;
    border: 1px solid #ece9e2;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.history-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.history-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.history-card-content { padding: 25px 20px; text-align: center; }
.history-card-content .year-num {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}
.history-card-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}
.history-scroll-btn {
    background: var(--bg-light);
    border: 1px solid #e3e0d8;
    color: var(--primary-color);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
    flex-shrink: 0;
}
.history-scroll-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Жюри */
.jury-section { padding: 0 0 90px 0; }
.jury-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}
.jury-card img {
    width: 100px; height: 100px;
    border-radius: 50%; object-fit: cover;
    background-color: #e3e0d8; margin-bottom: 15px;
    filter: grayscale(10%); transition: 0.3s;
}
.jury-card:hover img { filter: grayscale(0%); box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.jury-name { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin-bottom: 3px; }
.jury-role { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* CTA Баннер */
.cta-banner {
    background: var(--primary-color) url(botback.png) no-repeat center;
    padding: 70px 20px;
    margin: 0 20px 60px;
    text-align: center;
    color: #fff;
    position: relative;
}
.cta-banner::before {
    content: "";
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}
.cta-banner h2 { font-family: var(--font-heading); font-size: 34px; font-weight: 600; margin-bottom: 15px; letter-spacing: 1px; }
.cta-banner p { opacity: 0.8; font-weight: 300; margin-bottom: 35px; font-size: 15px; }
.cta-banner .btn-primary { background: #fff; color: var(--primary-color); }
.cta-banner .btn-primary:hover { background: #f0efea; }

/* Партнеры (Карусель) */
.partners { padding: 0 0 90px; }
.partners-wrapper {
   
}
.partners-track {
    display: flex; width: max-content;
    gap: 50px;
    justify-content: center;
    margin: auto;
}
.partners-track:hover { animation-play-state: paused; }
.partner-logo {
    width: auto;
   flex-shrink: 0;
    background: transparent; 
    display: flex; align-items: center; justify-content: center;
    font-weight: 400; color: #a09d96; font-size: 11px;
    text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s ease; font-family: var(--font-body);
}
.partner-logo:hover { border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-2px); }
@keyframes scroll-partners { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

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

/* Подвал и Модалка */
footer {
    background-color:#005a87;
    color: rgba(255,255,255,0.8);
    padding: 80px 0 40px;
    border-top: 2px solid var(--accent-color);
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 50px; }
.footer-col h4 { font-family: var(--font-heading); margin-bottom: 20px; font-weight: 600; font-size: 18px; color: #fff; }
.footer-col p, .footer-col a { color: rgba(255,255,255,0.5); font-size: 14px; line-height: 2.2; display: block; font-weight: 300; }
.footer-col a:hover { color: #fff; }
.footer-contacts { margin-top: 40px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.3); letter-spacing: 1px; }

/* Модалка */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26, 38, 57, 0.6); backdrop-filter: blur(8px);
    z-index: 9999; justify-content: center; align-items: center; opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: #fff; padding: 45px; border-radius: 4px;
    max-width: 980px; width: 90%; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: translateY(30px); transition: transform 0.3s ease;
    border-top: 4px solid var(--accent-color);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close-modal { position: absolute; top: 10px; right: 20px; font-size: 30px; line-height: 1; cursor: pointer; color: #d0cdc6; background: none; border: none; transition: 0.2s; font-weight: 300; }
.modal-close-modal:hover { color: var(--primary-color); }
.modal-title { font-family: var(--font-heading); font-size: 26px; margin-bottom: 10px; color: var(--primary-color); font-weight: 600; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 400; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #e3e0d8; border-radius: 2px; font-family: var(--font-body); font-size: 15px; box-sizing: border-box; transition: 0.3s; background: #fafaf9; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { background: #fff; border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 2px rgba(26, 38, 57, 0.05); }
.modal-content .btn-primary { width: 100%; text-align: center; padding: 14px; font-size: 14px; margin-top: 10px; }



/* Дополните ваш раздел .form-group в style.css */
.form-group input[type="file"] {
    padding: 10px 12px;
    background: #fafaf9;
    font-size: 14px;
    cursor: pointer;
}
.form-group input[type="file"]::file-selector-button {
    padding: 8px 15px;
    border: 1px solid #e3e0d8;
    border-radius: 2px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin-right: 15px;
    cursor: pointer;
    transition: 0.3s;
}
.form-group input[type="file"]::file-selector-button:hover {
    background: var(--bg-section);
    border-color: var(--primary-color);
}

/* Примечание (сноска) под полями формы */
.field-note {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* Сетка для формы (2 колонки на десктопе) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 30px; /* 15px по вертикали, 30px по горизонтали */
    margin-bottom: 20px;
}

/* Примечание (сноска) под полями формы - уже есть, добавляем на всякий случай */
.field-note {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* Обновлённые стили для модального окна (с поддержкой прокрутки на мобильных) */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26, 38, 57, 0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    transition: opacity 0.3s ease;
    /* Добавляем скролл для самого оверлея при необходимости */
    padding: 20px 0;
    overflow-y: auto;
}

.modal-content {
    background: #fff; 
    padding: 45px; 
    border-radius: 4px;
    max-width: 980px; 
    width: 90%; 
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: translateY(30px); 
    transition: transform 0.3s ease;
    border-top: 4px solid var(--accent-color);
    /* Если форма слишком высокая, внутри появится аккуратный скролл */
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

/* Чтобы скроллбар внутри модалки выглядел аккуратно */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #d0cdc6;
    border-radius: 4px;
}

/* Адаптивность для планшетов и мобильных (1 колонка) */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px; /* Уменьшаем отступы на мобильных */
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .mobile-menu-btn { display: flex; }
    nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-light); padding: 20px; border-bottom: 1px solid #ece9e2; gap: 15px; align-items: center; }
    header.open nav ul { display: flex; }
    header.open .mobile-menu-btn span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    header.open .mobile-menu-btn span:nth-child(2) { opacity: 0; }
    header.open .mobile-menu-btn span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .hero-grid, .dates-content { flex-direction: column; text-align: center; }
    .hero-left img { margin: 0 auto 20px; }
    .hero-right::before { left: 50%; transform: translateX(-50%); }
    .hero-right .dropcap { text-align: left; }
    .nominations-list { grid-template-columns: 1fr; padding: 0; }
    .dates-left { text-align: center; }
    .dates-left .btn-primary { margin: 0 auto; }
    .date-item { flex-direction: column; gap: 5px; align-items: center; }
    .date-number { min-width: auto; }
    .jury-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    
    .history-wrapper { flex-direction: column; text-align: center; }
    .history-slide { grid-template-columns: 1fr 1fr; } /* На планшетах по 2 карточки */
    .history-scroll-btn { width: 36px; height: 36px; font-size: 18px; margin-top: 10px; }
    .history-track { gap: 20px; }
}
@media (max-width: 768px) {
    .partner-logo { width: 130px; height: 60px; margin: 0 10px; font-size: 10px; }
    .hero-title { font-size: 42px; }
    .hero-title span { font-size: 16px; letter-spacing: 5px; }
    .logo-img { height: 40px; }
    .header-content .btn-primary { font-size: 10px; padding: 8px 15px; }
    .history-card img { height: 160px; }
}
@media (max-width: 600px) {
    .hero { padding: 50px 0 40px; }
    .hero-title { font-size: 36px; }
    .hero-title span { font-size: 12px; letter-spacing: 4px; margin-top: 10px; }
    .hero-right { padding: 25px; }
    .dropcap::first-letter { font-size: 3em; margin-right: 8px; margin-top: 3px; }
    .section-title { font-size: 26px; }
    .section-title::before, .section-title::after { font-size: 20px; }
    .nominations-list { gap: 10px; }
    .nom-number { font-size: 20px; min-width: 30px; margin-right: 15px; }
    .nom-title { font-size: 14px; }
    .dates-section { padding: 60px 0; }
    .dates-content { gap: 30px; }
    .cta-banner { margin: 0 10px 50px; padding: 40px 20px; }
    .cta-banner h2 { font-size: 24px; }
    .modal-content { padding: 30px 20px; }
    .modal-title { font-size: 22px; }
    .history-slide { grid-template-columns: 1fr; } /* На телефонах по 1 карточке */
    .history-card img { height: 200px; }
}
@media (max-width: 480px) {
    .jury-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .jury-card img { width: 80px; height: 80px; }
    .footer-grid { gap: 20px; }
    .hero{background-size: cover;}
  
}


/* ===== Модальное окно PDF ===== */
.pdf-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  align-items: center;
  justify-content: center;
}

.pdf-modal.active {
  display: flex;
}

.pdf-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.pdf-modal__container {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 90vw;
  max-width: 1000px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #efe8e3;
  flex-shrink: 0;
}

.pdf-modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #15171c;
  margin: 0;
}

.pdf-modal__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  color: #8a8580;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.pdf-modal__close:hover {
  background: #f5f5f5;
  color: #15171c;
}

.pdf-modal__body {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

.pdf-modal__frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Адаптивность */
@media (max-width: 768px) {
  .pdf-modal__container {
    width: 95vw;
    height: 95vh;
    border-radius: 12px;
  }

  .pdf-modal__header {
    padding: 14px 18px;
  }
}

/* Модальное окно для Новостей (чистый контент) */
.news-modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26, 38, 57, 0.8); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000; justify-content: center; align-items: center; 
    opacity: 0; transition: opacity 0.3s ease; padding: 20px 0;
    overflow-y: auto;
}
.news-modal-overlay.active { display: flex; opacity: 1; }
.news-modal-content {
    background: #fff; padding: 40px; border-radius: 4px;
    max-width: 700px; width: 90%; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(30px); transition: transform 0.3s ease;
    border-top: 4px solid var(--accent-color);
    max-height: 85vh; overflow-y: auto;
    margin: auto;
}
.news-modal-content::-webkit-scrollbar { width: 6px; }
.news-modal-content::-webkit-scrollbar-track { background: transparent; }
.news-modal-content::-webkit-scrollbar-thumb { background: #d0cdc6; border-radius: 4px; }
.news-modal-overlay.active .news-modal-content { transform: translateY(0); }

.news-modal-close {
    position: absolute; top: 15px; right: 20px; font-size: 30px;
    line-height: 1; cursor: pointer; color: #d0cdc6;
    background: none; border: none; transition: 0.2s; font-weight: 300;
}
.news-modal-close:hover { color: var(--primary-color); }

.news-modal-content h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    margin-top: 0;
}
.news-modal-content p, .news-modal-content li { 
    line-height: 1.8; 
    color: var(--text-main); 
    font-size: 16px;
}
.news-modal-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 2px;
}

/* ===== МОДАЛЬНОЕ ОКНО ДЛЯ PDF ===== */
.pdf-modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26, 38, 57, 0.8); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001; /* Чуть выше, чем у остальных модалок */
    justify-content: center; align-items: center; 
    opacity: 0; transition: opacity 0.3s ease; padding: 20px 0;
    overflow-y: auto;
}
.pdf-modal-overlay.active { display: flex; opacity: 1; }
.pdf-modal-content {
    background: #fff; padding: 40px; border-radius: 4px;
    max-width: 800px; width: 90%; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(30px); transition: transform 0.3s ease;
    border-top: 4px solid var(--accent-color);
    max-height: 85vh; overflow-y: auto;
    margin: auto;
}
.pdf-modal-content::-webkit-scrollbar { width: 6px; }
.pdf-modal-content::-webkit-scrollbar-track { background: transparent; }
.pdf-modal-content::-webkit-scrollbar-thumb { background: #d0cdc6; border-radius: 4px; }
.pdf-modal-overlay.active .pdf-modal-content { transform: translateY(0); }

.pdf-modal-close {
    position: absolute; top: 15px; right: 20px; font-size: 30px;
    line-height: 1; cursor: pointer; color: #d0cdc6;
    background: none; border: none; transition: 0.2s; font-weight: 300;
}
.pdf-modal-close:hover { color: var(--primary-color); }

.pdf-modal-content h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    margin-top: 0;
}
.pdf-modal-content iframe {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


/* ИСТОРИЯ ПРЕМИИ */
.history-section { padding: 90px 0; background-color: var(--bg-light); }
.history-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 40px;
}
.history-track {
    display: flex;
    flex-wrap: nowrap; /* Критично, чтобы карточки не переносились! */
    overflow-x: auto;
    gap: 30px; /* Отступ между карточками */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    flex: 1;
    padding: 20px 0;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.history-track::-webkit-scrollbar { display: none; }

.history-card {
    flex: 0 0 calc(33.333% - 20px); /* 3 карточки на десктопе */
    flex-shrink: 0; /* Запрещаем сжатие */
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ece9e2;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.history-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

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

.history-card-content { padding: 25px 20px; text-align: center; }
.history-card-content .year-num {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}
.history-card-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Планшеты (2 карточки) */
@media (max-width: 992px) {
    .history-track { gap: 20px; }
    .history-card { flex: 0 0 calc(50% - 10px); }
}

/* Мобильные (1 карточка) */
@media (max-width: 600px) {
    .history-track { gap: 0;        max-width: 100%; }
    .history-card { 
        flex: 0 0 100%; 
        padding: 0 10px; /* Отступ от краев экрана */
        border: none; /* Убираем рамку на мобильном, чтобы выглядело чище */
        box-shadow: none;
    }
    .history-card img { height: 180px; }
    .history-card-content { padding: 20px 10px; }
}

.history-scroll-btn {
    background: var(--bg-light);
    border: 1px solid #e3e0d8;
    color: var(--primary-color);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
    flex-shrink: 0;
    margin: 10px;
}
.history-scroll-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Кнопки перемотки (Новая структура) --- */
.history-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 40px;
}

.history-controls {
    display: flex;
    gap: 12px;
    /* На десктопе: абсолютное позиционирование по бокам */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.history-controls .prev {
    left: -60px; /* Отступ от контента слева */
}

.history-controls .next {
    left: 958px;
}

.history-scroll-btn {
    background: var(--bg-light);
    border: 1px solid #e3e0d8;
    color: var(--primary-color);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
    flex-shrink: 0;
    position: absolute;
}

.history-scroll-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Адаптив для мобильных --- */
@media (max-width: 992px) {
    .history-controls .prev { left: 0; }
    .history-controls .next { right: 0;left:0px; }
}

@media (max-width: 600px) {
    .history-wrapper {
        flex-direction: column; /* Элементы встают друг под другом */
        align-items: center;
        gap: 0px; /* Отступ между кнопками и карточками */
        margin-top: 30px;
    }

    .history-controls {
        position: static; /* Убираем абсолютное позиционирование */
        transform: none;
        justify-content: center;
        width: 100%; /* Центрируем контейнер */
        margin-bottom: 5px;
    }

    .history-scroll-btn {
        width: 40px; /* Чуть меньше на мобильном */
        height: 40px;
        font-size: 20px;
        position: relative;
    }
    
}