/* ===========================
   5 В КЛАСС v1.1
   Тёплая версия va-53
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #1a1510;
    color: #f5e6d3;
    font-family: 'Inter', sans-serif;
}

/* ===========================
   BACKGROUND
   =========================== */

#background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient {
    position: absolute;
    width: 140vw;
    height: 140vw;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(212, 175, 55, .08) 0%,
        rgba(201, 169, 110, .05) 35%,
        rgba(139, 111, 71, .02) 55%,
        rgba(0,0,0,0) 75%);
    animation: breath 12s ease-in-out infinite;
}

/* Шум — плёночное зерно */
.noise {
    position: absolute;
    inset: 0;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

#particles {
    position: absolute;
    inset: 0;
}

/* ===========================
   HERO (ФИКСИРОВАННЫЙ)
   =========================== */

.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
}

.hero-content {
    width: min(1400px, 95vw);
}

.subtitle {
    color: #c9a96e;
    text-transform: uppercase;
    letter-spacing: 7px;
    font-size: 12px;
    margin-bottom: 30px;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(60px, 9vw, 140px);
    white-space: nowrap;
    letter-spacing: 12px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 25px;
    user-select: none;
}

h1 span {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

.line {
    width: 120px;
    height: 1px;
    background: #c9a96e;
    margin: 30px auto;
}

.description {
    color: #e8d5b7;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 55px;
}

/* Scroll */
.scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll span {
    width: 2px;
    height: 60px;
    display: block;
    background: linear-gradient(transparent, #d4af37);
    animation: scrollAnim 2s infinite;
}

/* ===========================
   CONTENT WRAPPER
   =========================== */

.content-wrapper {
    position: relative;
    z-index: 2;
    margin-top: 100vh;
    background: #1a1510;
}

/* ===========================
   СЕКЦИИ
   =========================== */

section {
    padding: 120px 20px 150px;
    color: #e8d5b7;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: #f5e6d3;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #c9a96e;
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

/* ===========================
   ТОП-3
   =========================== */

.top-section {
    text-align: center;
}

.top-three {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    flex-wrap: wrap;
}

/* Порядок для десктопа: 2 - 1 - 3 */
.top-card.second { order: 1; }
.top-card.first  { order: 2; }
.top-card.third  { order: 3; }

.top-card {
    position: relative;
    background: rgba(245, 230, 211, 0.03);
    border-radius: 20px;
    overflow: visible;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

/* 1 место - по центру, больше */
.top-card.first {
    width: 300px;
    height: 450px;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    z-index: 2;
}

/* 2 и 3 места - по бокам, меньше */
.top-card.second,
.top-card.third {
    width: 280px;
    height: 420px;
    border-color: #c9a96e;
    box-shadow: 0 0 15px rgba(201, 169, 110, 0.2);
}

/* Эффект вспыхивания при наведении */
.top-card:hover {
    transform: scale(1.03);
    border-color: #d4af37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6),
                0 0 60px rgba(201, 169, 110, 0.3);
}

.top-card img.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    opacity: 0.85;
    transition: opacity 0.4s ease;
    filter: grayscale(0.3) brightness(0.9);
}

.top-card:hover img.photo {
    opacity: 1;
    filter: grayscale(0) brightness(1);
}

/* Имя */
.top-card .name {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    font-size: 1.8em;
    font-weight: bold;
    color: #f5e6d3;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.top-card:hover .name {
    opacity: 1;
    transform: translateY(0);
}

/* Средний балл скрыт */
.top-card .subtitle,
.student-card .subtitle {
    display: none;
}

/* Кружок с цифрой */
.badge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 100%);
    border: 3px solid #d4af37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #8b6f47;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    z-index: 10;
}

/* ===========================
   КЛАССНЫЙ РУКОВОДИТЕЛЬ
   =========================== */

.teacher-section {
    background: rgba(245, 230, 211, 0.02);
}

.teacher-content {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.teacher-photo {
    flex-shrink: 0;
    width: 300px;
    height: 375px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.teacher-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.5);
}

.teacher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.2) brightness(0.95);
    transition: filter 0.5s ease;
}

.teacher-photo:hover img {
    filter: grayscale(0) brightness(1);
}

.teacher-info {
    flex: 1;
    min-width: 300px;
}

.teacher-name {
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    color: #f5e6d3;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.teacher-subject {
    font-size: 1.2em;
    color: #c9a96e;
    margin-bottom: 20px;
    font-style: italic;
}

.teacher-description {
    font-size: 1.1em;
    line-height: 1.8;
    color: #e8d5b7;
}

/* ===========================
   ОСТАЛЬНЫЕ УЧЕНИКИ
   =========================== */

.students-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.student-card {
    position: relative;
    width: calc(20% - 20px);
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/5;
}

.student-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(245, 230, 211, 0.05);
    box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.4);
}

.student-card img.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.4) brightness(0.85);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.student-card:hover img.photo {
    filter: grayscale(0) brightness(1);
    transform: scale(1.04);
}

.student-card .name {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #f5e6d3;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
}

.student-card:hover .name {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    position: relative;
    background: #1a1510;
    padding: 80px 20px 40px;
    overflow: hidden;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.footer-copy {
    text-align: center;
}

.footer-copy p {
    color: #8b6f47;
    font-size: 0.8rem;
    letter-spacing: 4px;
}

/* ===========================
   PRELOADER
   =========================== */

#preloader {
    position: fixed;
    inset: 0;
    background: #1a1510;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999;
}

.loader-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, .15);
    border-top: 1px solid #d4af37;
    animation: rotate 2s linear infinite;
}

.loader-text {
    margin-top: 35px;
    letter-spacing: 8px;
    font-size: 14px;
    color: #c9a96e;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes breath {
    0% { transform: translate(-50%, -50%) scale(1); opacity: .25; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: .45; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: .25; }
}

@keyframes scrollAnim {
    0% { opacity: 0; transform: translateY(-15px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(15px); }
}

/* ===========================
   MOBILE
   =========================== */

@media (max-width: 1024px) {
    .student-card {
        width: calc(33.333% - 17px);
    }
}

@media (max-width: 768px) {
    .subtitle {
        letter-spacing: 4px;
        font-size: 10px;
    }
    .description {
        font-size: 15px;
    }
    section {
        padding: 80px 20px 100px;
    }

    .top-three {
        flex-direction: column;
        align-items: center;
    }

    /* Порядок для мобильных: 1 - 2 - 3 */
    .top-card.first  { order: 1; }
    .top-card.second { order: 2; }
    .top-card.third  { order: 3; }

    .top-card.first,
    .top-card.second,
    .top-card.third {
        width: 280px;
        height: 420px;
    }

    .students-grid {
        gap: 15px;
    }

    .student-card {
        width: calc(50% - 8px);
    }

    .teacher-content {
        flex-direction: column;
    }

    .teacher-photo {
        width: 250px;
        height: 312px;
    }
}

/* ===========================
   ЗАПРЕТ ВЫДЕЛЕНИЯ ТЕКСТА
   =========================== */

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ===========================
   РАСПИСАНИЕ
   =========================== */

.schedule-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.day-card {
    width: calc(33.333% - 17px);
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(245, 230, 211, 0.05);
    box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.4);
}

.day-title {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1.2rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

.lessons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lessons li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.lessons li:last-child {
    border-bottom: none;
}

.lessons .num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: #c9a96e;
}

.lessons .subject {
    flex: 1;
    color: #e8d5b7;
    font-size: .95rem;
    line-height: 1.4;
}

.lessons .room {
    flex-shrink: 0;
    font-size: .72rem;
    color: #c9a96e;
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 10px;
    padding: 3px 10px;
    letter-spacing: 1px;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .day-card {
        width: calc(50% - 13px);
    }
}

@media (max-width: 768px) {
    .day-card {
        width: 100%;
    }
}

/* ===========================
   ВНЕШКОЛЬНЫЕ ЗАНЯТИЯ (С ПЕРЕВОРОТОМ)
   ========================================================= */

.clubs-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    align-items: stretch; /* Чтобы все карточки в ряду были одной высоты */
}

/* Контейнер карточки (задает размер и перспективу) */
.club-card {
    width: calc(33.333% - 17px);
    min-height: 380px; /* Фиксируем минимальную высоту для красивого переворота */
    perspective: 1000px; /* Глубина 3D эффекта */
    cursor: pointer;
}

/* Внутренняя обертка, которая собственно и вращается */
.club-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

/* Когда добавляем класс is-flipped - карточка переворачивается */
.club-card.is-flipped .club-card-inner {
    transform: rotateY(180deg);
}

/* Общие стили для лица и спины */
.club-card-front, .club-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Скрываем заднюю часть при повороте */
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 15px;
    padding: 45px 30px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* Декоративный ромбик сверху (только для лица) */
.club-card-front::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #1a1510;
    border: 1px solid #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Эффект при наведении (работает только на лице) */
.club-card:not(.is-flipped):hover .club-card-front {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(245, 230, 211, 0.05);
    box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.4);
}

/* Стили для обратной стороны */
.club-card-back {
    transform: rotateY(180deg);
    background: rgba(26, 21, 16, 0.95); /* Чуть более темный фон для читаемости */
    border-color: rgba(212, 175, 55, 0.4);
    padding: 30px 25px;
    justify-content: flex-start; /* Текст начинается сверху */
    overflow-y: auto; /* Если текст не влезет, появится скролл */
}

.club-card-back .club-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.club-info {
    text-align: left;
    width: 100%;
    margin-bottom: 15px;
}

.club-info p {
    color: #c9b394;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.club-info strong {
    color: #f5e6d3;
}

/* Подсказка "Нажми" */
.flip-hint {
    margin-top: auto;
    font-size: 0.75rem;
    color: #d4af37;
    opacity: 0.7;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.club-title {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: 1.3rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.club-text {
    color: #c9b394;
    font-size: .95rem;
    line-height: 1.7;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .club-card { width: calc(50% - 13px); }
}
@media (max-width: 768px) {
    .club-card { width: 100%; }
}

/* ===========================
   МЕРОПРИЯТИЯ
   =========================== */

.events-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    width: calc(50% - 15px);
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(245, 230, 211, 0.05);
    box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.4);
}

.event-photo {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.event-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.3) brightness(0.9);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.event-card:hover .event-photo img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.04);
}

.event-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-date {
    color: #c9a96e;
    font-size: .75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.event-title {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: 1.4rem;
    letter-spacing: .05em;
    margin-bottom: 15px;
}

.event-text {
    color: #c9b394;
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 25px;
    flex: 1;
}

.event-button {
    align-self: center;
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.4s ease;
    background: transparent;
}

.event-button:hover {
    background: #d4af37;
    color: #1a1510;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5),
                0 0 50px rgba(212, 175, 55, 0.2);
}

@media (max-width: 768px) {
    .event-card {
        width: 100%;
    }
}

/* ===========================
   СТРАНИЦА МЕРОПРИЯТИЯ  max-width: 1400px; ширина
   ============================================================ */

.event-page {
    position: relative;
    z-index: 2;
    padding: 120px 20px 80px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

.back-link {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 10;
    color: #c9a96e;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color .3s ease;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 2px;
}

.back-link:hover {
    color: #f5e6d3;
    border-color: #f5e6d3;
}

.event-hero-photo {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.event-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-page-date {
    color: #c9a96e;
    font-size: .8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

.event-page-title {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: .05em;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 600;
}

.event-page-text {
    color: #e8d5b7;
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.event-page-text strong {
    color: #f5e6d3;
    font-weight: 500;
}

.event-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 50px;
}

.event-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.event-gallery img:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .event-page {
        padding: 80px 20px 60px;
    }
    .back-link {
        position: relative;
        top: 0;
        left: 0;
        display: inline-block;
        margin-bottom: 30px;
    }
    .event-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================
   ФУТЕР: КАРТОЧКИ-ССЫЛКИ
   =========================== */

.footer-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px 30px;
    background: rgba(245, 230, 211, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 10px;
    text-decoration: none;
    color: #c9a96e;
    transition: all 0.3s ease;
    min-width: 120px;
}

.footer-link:hover {
    background: rgba(245, 230, 211, 0.05);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-5px);
    color: #f5e6d3;
    box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.4);
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.link-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.footer-link:hover .link-icon {
    opacity: 1;
}

.link-text {
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 500;
}

.footer-copy a {
    color: #c9a96e;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: color .3s ease, border-color .3s ease;
}

.footer-copy a:hover {
    color: #f5e6d3;
    border-color: rgba(245, 230, 211, 0.5);
}

@media (max-width: 768px) {
    .footer-links {
        gap: 20px;
    }
    .footer-link {
        padding: 20px 25px;
        min-width: 100px;
    }
    .link-icon svg {
        width: 22px;
        height: 22px;
    }
    .link-text {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
}

.link-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    transition: filter 0.3s ease;
}

.footer-link:hover .link-icon img {
    filter: brightness(1.25) drop-shadow(0 0 6px rgba(212, 175, 55, 0.7));
}

@media (max-width: 768px) {
    .link-icon img {
        width: 22px;
        height: 22px;
    }
}

/* =========================
   ЗАЩИТА ОТ КОПИРОВАНИЯ
   ========================= */

body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    pointer-events: auto;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.event-hero-photo::after {
    content: '5 "В" класс';
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
} 

@media (max-width: 768px) {
    .event-page {
        padding: 80px 15px 40px;
    }
    
    .event-page-text {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    
    .event-hero-photo {
        margin-bottom: 30px;
    }
    
    .event-page-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .back-link {
        font-size: 11px;
        top: 20px;
        left: 15px;
    }
}

/* ===========================
   ПЛАВНОЕ ПОЯВЛЕНИЕ (ВОЛНА)
   =========================== */

.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-delay-1.visible { transition-delay: 0.12s; }
.reveal-delay-2.visible { transition-delay: 0.24s; }
.reveal-delay-3.visible { transition-delay: 0.36s; }
.reveal-delay-4.visible { transition-delay: 0.48s; }
.reveal-delay-5.visible { transition-delay: 0.60s; }

/* ===========================
   СТРАНИЦА КОНТАКТОВ   max-width: 1200px;  ширина
   ================================================================= */

.contact-page {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 120px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-hero {
    text-align: center;
    margin-bottom: 60px;
}

.contact-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: #f5e6d3;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: #c9a96e;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.9rem;
    color: #c9a96e;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    padding: 18px 20px;
    color: #f5e6d3;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(245, 230, 211, 0.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(232, 213, 183, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #d9534f;
    background: rgba(217, 83, 79, 0.05);
}

.error-message {
    font-size: 0.85rem;
    color: #d9534f;
    display: none;
}

.form-group.has-error .error-message {
    display: block;
}

.honey-pot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.submit-button {
    position: relative;
    padding: 20px 50px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 10px;
    overflow: hidden;
}

.submit-button:hover {
    background: #d4af37;
    color: #1a1510;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5),
                0 0 50px rgba(212, 175, 55, 0.2);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

.submit-button.loading .button-text {
    opacity: 0;
}

.submit-button.loading .button-loader {
    display: block;
}

.form-status {
    text-align: center;
    font-size: 1rem;
    padding: 20px;
    border-radius: 10px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(92, 184, 92, 0.1);
    border: 1px solid rgba(92, 184, 92, 0.3);
    color: #5cb85c;
}

.form-status.error {
    display: block;
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid rgba(217, 83, 79, 0.3);
    color: #d9534f;
}

@media (max-width: 768px) {
    .contact-page {
        padding: 80px 15px 40px;
    }

    .contact-title {
        font-size: 2rem;
    }

    .submit-button {
        padding: 18px 40px;
        font-size: 12px;
    }
}

/* ===========================
   ГАЛЕРЕЯ: ЭФФЕКТЫ И ЗУМ
   =========================== */

/* Обёртка вокруг фото (создаётся скриптом сама) */
.gallery-item {
    display: block;
    aspect-ratio: 4/3;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
}

/* Наведение — тот же язык, что у карточек учеников */
.gallery-item:hover img {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.5);
    filter: brightness(1.08);
}

/* Шторка лайтбокса */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 5, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Фото во весь экран */
.lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.25);
    pointer-events: none; /* клик проходит сквозь фото на шторку */
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

/* Подсказка внизу */
.lightbox-hint {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(232, 213, 183, 0.6);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    pointer-events: none;
}

/* ===========================
   СТРАНИЦА ПОЛИТИКИ (ПДн)  ширина max-width: 1200px;
   ================================================================= */

.policy-text {
    max-width: 1200px;
    margin: 0 auto;
}

.policy-text h3 {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: 1.3rem;
    letter-spacing: .05em;
    margin: 40px 0 15px;
    font-weight: 600;
}

.policy-text .event-page-text:first-child h3 {
    margin-top: 0;
}

.policy-text ul {
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
}

.policy-text ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
}

.policy-text ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 4px;
    color: #d4af37;
    font-size: .8rem;
}

.policy-text a {
    color: #c9a96e;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: color .3s ease, border-color .3s ease;
}

.policy-text a:hover {
    color: #f5e6d3;
    border-color: rgba(245, 230, 211, 0.5);
}

.policy-version {
    margin-top: 60px;
    text-align: center;
    color: #8b6f47;
    font-size: .85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===========================
   ПОДСКАЗКА ПОД ФОРМОЙ ВХОДА
   =========================== */

.login-help {
    margin-top: 40px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    text-align: center;
}

.login-help p {
    color: rgba(232, 213, 183, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.logout-wrap {
    text-align: center;
    margin-top: 50px;
}

/* ===========================
   ЗАПРОС ДОСТУПА НА СТРАНИЦЕ ВХОДА
   =========================== */

.access-link {
    color: #c9a96e;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    transition: color .3s ease, border-color .3s ease;
}

.access-link:hover {
    color: #f5e6d3;
    border-color: rgba(245, 230, 211, 0.5);
}

.access-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height .6s ease, opacity .6s ease, margin-top .6s ease;
}

.access-form.open {
    max-height: 700px;
    opacity: 1;
    margin-top: 35px;
}

/* ===========================
   ТАБЛИЦА В АДМИНКЕ
   =========================== */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    color: #e8d5b7;
    font-size: 0.95rem;
    text-align: left;
}

.admin-table th {
    color: #c9a96e;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
}

/* ===========================
   КАРТОЧКИ ОБЪЯВЛЕНИЙ
   =========================== */

.ann-card {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-left: 3px solid #d4af37;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.ann-date {
    color: #8b6f47;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ann-title {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ann-card p {
    margin: 0;
    color: #e8d5b7;
    line-height: 1.8;
    font-size: 0.98rem;
}

.admin-del {
    background: none;
    border: 1px solid rgba(220, 80, 80, 0.4);
    color: #d07878;
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all .3s ease;
}

.admin-del:hover {
    background: rgba(220, 80, 80, 0.15);
    color: #f0a0a0;
}

.admin-edit {
    display: inline-block;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #c9a96e;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.8rem;
    text-decoration: none;
    margin-right: 6px;
    transition: all .3s ease;
}

.admin-edit:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #f5e6d3;
}

/* ===========================
   АККОРДЕОН ОБЪЯВЛЕНИЙ
   =========================== */

.ann-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.ann-head-text {
    flex: 1;
}

.ann-title {
    display: block;
    margin-bottom: 0;
}

.ann-arrow {
    color: #d4af37;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform .4s ease;
}

.ann-card.open .ann-arrow {
    transform: rotate(180deg);
}

.ann-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s ease;
}

.ann-body-inner {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

/* ===========================
   РОЛИ И ГАЛОЧКИ В АДМИНКЕ
   =========================== */

.role-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    color: #e8d5b7;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
}

.role-select:focus {
    border-color: rgba(212, 175, 55, 0.6);
}

.role-select option {
    background: #1a1512;
    color: #e8d5b7;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e8d5b7;
    font-size: 0.95rem;
    cursor: pointer;
}

.check-line input {
    width: 18px;
    height: 18px;
    accent-color: #d4af37;
    cursor: pointer;
}

/* ===========================
   ФИНАНСОВЫЙ БЛОК
   =========================== */

.fin-summary {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.fin-box {
    flex: 1;
    min-width: 140px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    padding: 18px 15px;
    text-align: center;
}

.fin-num {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    color: #f5e6d3;
}

.fin-box.fin-in .fin-num { color: #9ec97f; }
.fin-box.fin-out .fin-num { color: #d07878; }

.fin-label {
    margin-top: 6px;
    color: #8b6f47;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.fin-plus { color: #9ec97f; }
.fin-minus { color: #d07878; }

/* ===========================
   БАННЕР И ПРОГРЕСС СБОРОВ
   =========================== */

.fin-note {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 18px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    color: #c9a96e;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.fin-prog { margin-bottom: 18px; }

.fin-prog-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #e8d5b7;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.fin-track {
    height: 6px;
    background: rgba(212, 175, 55, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.fin-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b6f47, #d4af37);
    border-radius: 999px;
    transition: width .6s ease;
}

/* ===========================
   СЕТКА (МАТРИЦА)
   =========================== */

.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }

.cell-form { margin: 0; display: inline-block; }

.cell-input {
    width: 74px;
    padding: 7px 4px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    color: #e8d5b7;
    font-size: 0.9rem;
}

.cell-input:focus { border-color: rgba(212, 175, 55, 0.6); outline: none; }

.matrix-goal {
    font-size: 0.68rem;
    color: #8b6f47;
    font-weight: normal;
    letter-spacing: 1px;
}

/* ===========================
   РОЛЬ-МИНИ И ЯЧЕЙКИ ПРОСМОТРА
   =========================== */

.role-mini {
    width: auto;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.matrix-cell {
    color: #e8d5b7;
}

.matrix-empty {
    color: #5f4a33;
}

/* ===========================
   АВАТАРКИ В СПИСКЕ ЛЮДЕЙ
   =========================== */

.row-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.row-avatar-empty {
    background: rgba(212, 175, 55, 0.15);
}

.avatar-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.avatar-preview img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

input[type="file"] {
    color: #e8d5b7;
    font-size: 0.9rem;
}

input[type="file"]::file-selector-button {
    background: rgba(212, 175, 55, 0.15);
    color: #c9a96e;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    padding: 7px 14px;
    margin-right: 12px;
    cursor: pointer;
    transition: all .3s ease;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(212, 175, 55, 0.3);
    color: #f5e6d3;
}

/* ===========================
   ФОТО В ОБЪЯВЛЕНИЯХ
   =========================== */

.ann-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    justify-items: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ann-image-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.ann-image-item:hover {
    border-color: #d4af37;
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.ann-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.ann-image-item:hover img {
    filter: brightness(1);
}

/* Если картинок меньше 3 — центрируем */
.ann-images-grid:has(.ann-image-item:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

.ann-images-grid:has(.ann-image-item:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
}

.ann-images-grid:has(.ann-image-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 200px;
}

/* ===========================
   ЛАЙТБОКС ДЛЯ ФОТО ОБЪЯВЛЕНИЙ
   =========================== */

.ann-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ann-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.ann-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.ann-lightbox-hint {
    margin-top: 20px;
    color: #c9a96e;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .ann-images-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        max-width: 100%;
    }

    .ann-images-grid:has(.ann-image-item:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .ann-images-grid:has(.ann-image-item:only-child) {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
}

/* ===========================
   ТАБЛИЦЫ В ОБЪЯВЛЕНИЯХ
   ========================================================================= */

.ann-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.ann-text th,
.ann-text td {
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.ann-text th {
    background: rgba(212, 175, 55, 0.1);
    color: #f5e6d3;
    font-weight: 600;
}

.ann-text td {
    color: #e8d5b7;
}

.ann-text tr:nth-child(even) td {
    background: rgba(245, 230, 211, 0.02);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .ann-text table {
        font-size: 0.8rem;
    }
    
    .ann-text th,
    .ann-text td {
        padding: 6px 8px;
    }
}

/* ===========================
   ЭФФЕКТ ДНЯ РОЖДЕНИЯ
   ================================================================================================= */

/* Базовая подготовка для плавности */
[data-birthday="1"] {
    position: relative;
    z-index: 1;
    transition: box-shadow 0.5s ease, transform 0.5s ease;
}

/* Когда карточка на экране: держим свечение и масштаб */
.birthday-active {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 0 60px rgba(212, 175, 55, 0.4) !important;
    transform: scale(1.03);
    z-index: 10 !important;
}

/* Делаем фото ярче при активации */
.birthday-active img.photo {
    filter: brightness(1.2) contrast(1.1) !important;
    transition: filter 0.5s ease;
}

/* Надпись "С Днём Рождения!" по умолчанию скрыта */
[data-birthday="1"]::after {
    content: "С Днём Рождения!";
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #f5e6d3;
    text-shadow: 0 0 10px #d4af37, 0 0 20px #d4af37, 0 0 30px #c9a96e;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 20;
    text-align: center;
    width: 100%;
    pointer-events: none;
    white-space: nowrap;
}

/* Когда карточка активна: надпись плавно появляется и "залипает" */
.birthday-active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Искорки (только для десктопа) - мягкая пульсация, пока карточка на экране */
@media (min-width: 769px) {
    .birthday-active::before {
        content: "";
        position: absolute;
        inset: -15px;
        border-radius: inherit;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.5s ease;
        z-index: 5;
        pointer-events: none;
    }
    
    .birthday-active::before {
        opacity: 1;
        animation: birthdaySparks 2s ease-in-out infinite alternate;
    }
}

@keyframes birthdaySparks {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    [data-birthday="1"]::after {
        font-size: 1.2rem;
        bottom: 3%;
    }
}

/* ===========================
   ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ ТАБЛИЦ
   =========================== */
@media (max-width: 768px) {
    .ann-text table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* плавная прокрутка на iOS */
        white-space: nowrap;
    }
    
    .ann-text table::-webkit-scrollbar {
        height: 6px;
    }
    
    .ann-text table::-webkit-scrollbar-track {
        background: rgba(212, 175, 55, 0.1);
        border-radius: 3px;
    }
    
    .ann-text table::-webkit-scrollbar-thumb {
        background: rgba(212, 175, 55, 0.4);
        border-radius: 3px;
    }
}

/* ===========================
   КНОПКА ВХОДА В ВЕРХНЕМ УГЛУ
   =========================== */
.parent-login-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: #c9a96e;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.parent-login-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #f5e6d3;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.parent-login-btn .btn-text {
    display: none; /* Показываем текст только при наведении */
    animation: fadeIn 0.3s ease;
}

.parent-login-btn:hover .btn-text {
    display: inline;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .parent-login-btn {
        top: 20px;
        right: 20px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .parent-login-btn .btn-text {
        display: inline; /* На мобильном показываем текст всегда */
    }
}

/* ===========================
   БЛОК СОГЛАСИЯ НА ПД
   =========================== */

.consent-section {
    background: rgba(212, 175, 55, 0.03);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.consent-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.consent-sample,
.consent-download {
    flex: 1;
    min-width: 300px;
    background: rgba(245, 230, 211, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    padding: 30px;
}

.consent-sample h3,
.consent-download h3 {
    font-family: 'Cinzel', serif;
    color: #f5e6d3;
    font-size: 1.3rem;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.consent-sample img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.consent-download p {
    color: #e8d5b7;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid #d4af37;
    border-radius: 10px;
    color: #d4af37;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #d4af37;
    color: #1a1510;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
}

.download-btn span:first-child {
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
    }
    
    .consent-sample,
    .consent-download {
        width: 100%;
    }
}

/* Миниатюра образца согласия */
.consent-sample-img {
    width: 100%;
    max-width: 360px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.consent-sample-img:hover {
    transform: scale(1.02);
    border-color: #d4af37;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3);
}

.consent-zoom-hint {
    text-align: center;
    margin-top: 12px;
    color: #c9a96e;
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Лайтбокс для образца */
.consent-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 5, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px;
    cursor: zoom-out;
}

.consent-lightbox.active {
    display: flex;
}

.consent-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.25);
}

/* Включаем кликабельность для образца согласия */
.consent-sample-img {
    pointer-events: auto;
}

/* Мобильные: образец крупный, без тапа */
@media (max-width: 768px) {
    .consent-sample {
        padding: 20px 15px;
    }
    .consent-sample-img {
        max-width: 100%;
        cursor: default;
    }
    .consent-zoom-hint {
        display: none;
    }
}

/* Телефоны: образец снова не ловит палец */
@media (max-width: 768px) {
    .consent-sample-img {
        pointer-events: none;
    }
}

/* ===========================
   БЛОК ПОЗДРАВЛЕНИЯ С ДНЁМ УЧИТЕЛЯ
   =========================== */

.teacher-day-block {
    text-align: center;
    padding: 40px 20px;
}

.flip-card {
    width: 100%;
    max-width: 500px; /* подгони под размер блока учителя */
    height: auto;
    aspect-ratio: 3 / 4; /* соотношение сторон как у твоих картинок */
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.flip-card-front img,
.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.teacher-day-hint {
    margin-top: 20px;
    color: #c9a96e;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Мобильные: тап для переворота */
@media (max-width: 768px) {
    .flip-card {
        max-width: 90vw;
    }
}

