/* =========================================================
   SCHOOL WEBSITE — main stylesheet
   ========================================================= */

/* ── Custom Properties ────────────────────────────────────── */
:root {
    --navy: #0f1b35;
    --navy-mid: #162040;
    --navy-light: #1e2d52;
    --accent: #f0a500;
    --accent-h: #ffc233;
    --white: #ffffff;
    --off-white: #f4f6fb;
    --text: #1e2d52;
    --text-muted: #6b7a99;
    --border: #dde5f0;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(15, 27, 53, .08);
    --shadow-md: 0 8px 32px rgba(15, 27, 53, .12);
    --shadow-lg: 0 20px 60px rgba(15, 27, 53, .18);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: .3s cubic-bezier(.4, 0, .2, 1);
    --header-h: 70px;
}

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--off-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-sm);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ── Container ────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--accent-h);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 165, 0, .35);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, .5);
    color: var(--white);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: var(--header-h);
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
    background: rgba(15, 27, 53, .97);
    box-shadow: 0 2px 24px rgba(0, 0, 0, .25);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 40px;
    height: 40px;
}

.logo-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.logo-tagline {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .02em;
}

.main-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .8);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, .12);
}

.nav-link.active {
    color: var(--accent);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-left: auto;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(240, 165, 0, .12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(30, 45, 82, .6) 0%, transparent 60%),
        linear-gradient(135deg, #0f1b35 0%, #1a2e58 50%, #0f1b35 100%);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 24px 80px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid rgba(240, 165, 0, .4);
    border-radius: 50px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeDown .8s ease both;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fadeDown .8s ease .1s both;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, .65);
    margin-bottom: 40px;
    animation: fadeDown .8s ease .2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeDown .8s ease .3s both;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .4);
    cursor: pointer;
    animation: bounce 2s infinite;
}

.hero-scroll svg {
    width: 32px;
    height: 32px;
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--white);
}

.section-header {
    margin-bottom: 56px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

/* ── Reveal animations ────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── Skeleton loaders ─────────────────────────────────────── */
.skeleton-card {
    background: linear-gradient(90deg, #e8edf5 25%, #f4f6fb 50%, #e8edf5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
    min-height: 220px;
}

.media-skeleton {
    min-height: 200px;
}

.contact-skeleton {
    min-height: 70px;
}

.hidden {
    display: none !important;
}

/* ── News ─────────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.news-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--navy-light), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-img-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: .3;
    color: var(--white);
}

.news-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-card-preview {
    font-size: 14px;
    color: var(--text-muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-more {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card-more svg {
    width: 16px;
    height: 16px;
    transition: transform .2s;
}

.news-card:hover .news-card-more svg {
    transform: translateX(4px);
}

/* ── News Modal ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 27, 53, .7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 48px;
    position: relative;
    transform: scale(.96);
    transition: transform var(--transition);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: var(--text-muted);
    transition: color var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--navy);
}

.modal-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
    line-height: 1.3;
}

.modal-body {
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 16px;
}

/* ── About ────────────────────────────────────────────────── */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.about-text p {
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--off-white);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ── Media Gallery ────────────────────────────────────────── */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.media-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--navy-light);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform .5s ease;
}

.media-item:hover img {
    transform: scale(1.06);
}

.media-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 27, 53, .8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.media-item:hover .media-item-overlay {
    opacity: 1;
}

.media-item-title {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.media-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.media-empty svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(5, 10, 20, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lb-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lb-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lb-caption {
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
}

.lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    font-size: 36px;
    color: rgba(255, 255, 255, .6);
    transition: color var(--transition);
    z-index: 10;
}

.lb-close:hover {
    color: var(--white);
}

.lb-prev,
.lb-next {
    font-size: 48px;
    color: rgba(255, 255, 255, .5);
    padding: 16px;
    transition: color var(--transition);
    flex-shrink: 0;
}

.lb-prev:hover,
.lb-next:hover {
    color: var(--white);
}

/* ── Feedback Form ────────────────────────────────────────── */
.feedback-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: start;
}

.feedback-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--navy);
}

.feedback-info p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 15px;
}

.feedback-hints {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-hints li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.feedback-hints span {
    width: 24px;
    height: 24px;
    background: rgba(240, 165, 0, .15);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.required {
    color: #e04040;
}

.form-group input,
.form-group textarea {
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--off-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(240, 165, 0, .12);
    background: var(--white);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e04040;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.form-note {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    max-width: 320px;
}

.btn-primary[disabled] {
    opacity: .7;
    pointer-events: none;
}

/* ── Contacts ─────────────────────────────────────────────── */
.contacts-wrap {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    min-height: 420px;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.contact-item:hover {
    transform: translateX(4px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(240, 165, 0, .12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
}

.contacts-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 420px;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}

.footer-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-left: auto;
}

.footer-nav a {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--white);
}

.footer-copy {
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
    width: 100%;
    text-align: center;
    margin-top: 16px;
}

.admin-link {
    margin-left: 12px;
    color: rgba(255, 255, 255, .2);
    transition: color var(--transition);
}

.admin-link:hover {
    color: var(--accent);
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background: var(--navy);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #1a7f37;
}

.toast.error {
    background: #b91c1c;
}

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .about-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .feedback-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contacts-wrap {
        grid-template-columns: 1fr;
    }

    .contacts-map {
        height: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 60px;
    }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-110%);
        transition: transform var(--transition);
        z-index: 899;
    }

    .main-nav.open {
        transform: translateY(0);
    }

    .nav-link {
        padding: 12px 16px;
    }

    .burger {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-box {
        padding: 28px 20px;
    }

    .lb-prev,
    .lb-next {
        font-size: 32px;
        padding: 10px;
    }

    .section {
        padding: 64px 0;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}