/*
Theme Name: Lyceum Modern
Theme URI: https://github.com/amarshallx95/wordpresslyceum
Author: Senior UI/UX & WordPress Team
Description: Сучасна, мінімалістична та доступна (WCAG) тема для академічного ліцею. Розроблена за принципами Mobile-First, з акцентом на чисту типографіку, високий контраст та швидкість завантаження.
Version: 1.0.0
Text Domain: lyceum-modern
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Кольорова палітра: Академічний глибокий синій + чистий білий + теплий янтарний акцент */
    --color-primary: #0f172a;       /* Deep Slate Navy */
    --color-primary-light: #1e293b; /* Medium Slate */
    --color-accent: #2563eb;        /* Royal Blue link/focus */
    --color-cta: #f59e0b;           /* Amber Gold Action */
    --color-cta-hover: #d97706;     /* Deep Amber */
    --color-text: #1e293b;          /* Dark Slate Text */
    --color-text-muted: #64748b;    /* Secondary Text */
    --color-bg: #ffffff;            /* Clean White */
    --color-bg-subtle: #f8fafc;     /* Light Neutral Slate */
    --color-border: #e2e8f0;        /* Subtle Border */
    
    /* Тіні та радіуси */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Відступи */
    --container-max: 1280px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----------------------------------------------------
   HEADER & MEGA-NAV
---------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.4rem;
    gap: 1rem;
    max-width: 1440px;
}

.header-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    flex-shrink: 0;
}

.header-custom-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-custom-logo .custom-logo-link,
.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap !important;
}

.header-custom-logo img,
.custom-logo-link img,
img.custom-logo {
    height: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    max-width: 160px !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform 0.2s ease;
}

.custom-logo-link:hover img {
    transform: scale(1.04);
}

.brand-logo-text {
    color: var(--color-primary);
    text-decoration: none;
    max-width: none;
}
@media (min-width: 992px) {
    .brand-logo-text {
        white-space: nowrap !important;
    }
}
@media (max-width: 991px) {
    .brand-logo-text {
        white-space: normal !important;
        max-width: 210px;
    }
    .brand-title-main, .brand-title-sub {
        display: block;
        font-size: 0.85rem !important;
        white-space: normal !important;
        line-height: 1.2;
    }
}

.brand-logo:hover .brand-title-main,
.brand-logo:hover .brand-title-sub {
    color: var(--color-accent) !important;
}

@media (max-width: 768px) {
    .header-custom-logo img,
    .custom-logo-link img,
    img.custom-logo {
        height: 40px !important;
        max-height: 40px !important;
        max-width: 130px !important;
    }
    .brand-logo-text {
        font-size: 0.95rem;
    }
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-primary);
    letter-spacing: -0.015em;
    text-decoration: none;
    white-space: normal !important;
    flex-shrink: 0;
}

.brand-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(0.35rem, 0.9vw, 0.85rem);
    margin: 0 auto;
}

@media (min-width: 1400px) {
    .nav-menu {
        gap: 0.95rem;
    }
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.5rem;
    }
}

.nav-link,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary-light);
    padding: 0.35rem 0.55rem;
    border-radius: 9999px;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    line-height: 1.3;
}

.nav-link:hover,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
    background: #eff6ff;
    color: var(--color-accent);
    border-color: #dbeafe;
    transform: translateY(-1px);
}

/* =========================================================
   NAVIGATION DROPDOWNS
========================================================= */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 740px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 1.15rem 1.1rem;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    z-index: 2000;
}

.nav-dropdown-menu.nav-dropdown-menu-2cols {
    width: 520px;
    grid-template-columns: repeat(2, 1fr);
}

.nav-dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-dropdown-col-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 0 0.75rem 0.45rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.25rem;
}

@media (min-width: 992px) {
    .nav-item-dropdown:hover .nav-dropdown-menu {
        display: grid !important;
        animation: navMenuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

.nav-dropdown-menu.active {
    display: grid !important;
    animation: navMenuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navMenuFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-dropdown-item:hover {
    background: #eff6ff;
    border-color: #dbeafe;
    transform: translateX(3px);
}

.dropdown-item-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.nav-dropdown-item strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.nav-dropdown-item span {
    display: block;
    font-size: 0.77rem;
    color: #64748b;
    margin-top: 0.15rem;
    line-height: 1.3;
}

.nav-caret {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-dropdown-toggle[aria-expanded="true"] .nav-caret {
    transform: rotate(180deg);
}

@media (max-width: 991px) {
    .nav-item-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-link,
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 0.5rem;
        border-radius: 12px;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        font-size: 1.08rem;
    }
    .nav-link:hover,
    .nav-dropdown-toggle:hover {
        transform: none;
        background: #f8fafc;
    }
    .nav-dropdown-menu {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        padding: 0.65rem;
        border-radius: 14px;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        grid-template-columns: 1fr;
        max-height: 55vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }
    .nav-dropdown-menu.nav-dropdown-menu-2cols {
        width: 100%;
        grid-template-columns: 1fr;
    }
    @media (min-width: 520px) {
        .nav-dropdown-menu,
        .nav-dropdown-menu.nav-dropdown-menu-2cols {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    .nav-dropdown-item {
        padding: 0.58rem 0.7rem;
        gap: 0.65rem;
    }
    .dropdown-item-icon {
        font-size: 1.25rem;
    }
    .nav-dropdown-item strong {
        font-size: 0.9rem;
    }
    .nav-dropdown-item span {
        font-size: 0.76rem;
    }
}

/* ----------------------------------------------------
   CTA BUTTONS
---------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.35rem;
    font-weight: 700;
    font-size: 0.93rem;
    border-radius: 9999px;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap !important;
    line-height: 1.25;
    flex-shrink: 0;
}

.btn-cta {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: #ffffff;
    color: var(--color-primary);
}

/* =========================================================
   HEADER ACTION BUTTONS & MOBILE SERVICES DROPDOWN
========================================================= */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

@media (max-width: 1350px) and (min-width: 992px) {
    .nav-menu {
        gap: 0.45rem !important;
    }
    .nav-link,
    .nav-dropdown-toggle {
        padding: 0.38rem 0.6rem !important;
        font-size: 0.87rem !important;
    }
    .brand-logo-text {
        font-size: 1.05rem !important;
    }
    .brand-logo-icon {
        width: 2.2rem !important;
        height: 2.2rem !important;
        font-size: 1.05rem !important;
    }
    .desktop-header-actions {
        gap: 0.45rem !important;
    }
    .btn,
    .btn-cta,
    .a11y-trigger-btn {
        padding: 0.45rem 0.85rem !important;
        font-size: 0.85rem !important;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: none !important;
    }
}

.mobile-nav-services {
    display: none;
}

@media (max-width: 991px) {
    .desktop-header-actions {
        display: none !important;
    }

    .mobile-toggle {
        display: block !important;
    }

    .mobile-nav-services {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--color-border);
    }

    .mobile-nav-btn {
        width: 100%;
        justify-content: center !important;
        padding: 0.75rem !important;
        font-size: 0.96rem !important;
    }
}

/* ----------------------------------------------------
   HERO SECTION
---------------------------------------------------- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 6.5rem 0 7.5rem;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: heroBgKenBurns 20s ease-in-out infinite alternate;
}

@keyframes heroBgKenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

.hero-bg-overlay-filter {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 138, 0.78) 100%);
}

.hero-overlay-dark-85 .hero-bg-overlay-filter {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.82) 60%, rgba(30, 58, 138, 0.78) 100%);
}

.hero-overlay-dark-70 .hero-bg-overlay-filter {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 58, 138, 0.65) 100%);
}

.hero-overlay-glass .hero-bg-overlay-filter {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 58, 138, 0.68) 100%);
    backdrop-filter: blur(6px);
}

.hero-overlay-gradient-royal .hero-bg-overlay-filter {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(88, 28, 135, 0.76) 100%);
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 3;
}

.hero-grid {
    position: relative;
    z-index: 10;
    display: block;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-cta);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.hero-title span {
    color: var(--color-cta);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 36rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-stats-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    backdrop-filter: blur(16px);
}

.stat-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-item:first-child {
    padding-top: 0;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-top: 0.25rem;
}

/* ----------------------------------------------------
   QUICK LINKS SECTION (CARDS)
---------------------------------------------------- */
.quicklinks-section {
    position: relative;
    z-index: 20;
    margin-top: -3.5rem;
    padding-bottom: 5rem;
}

.quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.quick-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.quick-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-xl);
}

.quick-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    background: var(--color-bg-subtle);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.quick-card:hover .quick-card-icon {
    background: var(--color-accent);
    color: #ffffff;
}

.quick-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.quick-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.quick-card-arrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-accent);
}

/* ----------------------------------------------------
   SECTION COMMON
---------------------------------------------------- */
.section-header {
    text-align: left;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    background: #eff6ff;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.025em;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
}

/* ----------------------------------------------------
   NEWS & EVENTS SECTION
---------------------------------------------------- */
.news-section {
    padding: 4rem 0 6rem;
    background: var(--color-bg-subtle);
}

.news-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
}

/* Головна картка новини */
.featured-news-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.featured-news-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.featured-news-img {
    height: 260px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    position: relative;
    overflow: hidden;
}

.featured-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: var(--color-cta);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.featured-news-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.featured-news-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.35;
}

.featured-news-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Картки подій з датами */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.event-card:hover {
    border-color: var(--color-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.event-date-box {
    min-width: 4.5rem;
    height: 4.5rem;
    background: #eff6ff;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.event-thumb {
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .event-thumb {
        width: 60px !important;
        height: 60px !important;
    }
}

.event-day {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.event-month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1e40af;
    margin-top: 0.25rem;
}

.event-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.event-info p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ----------------------------------------------------
   TRANSPARENCY / OFFICIAL INFO SECTION
---------------------------------------------------- */
.transparency-section {
    padding: 6rem 0;
    background: #ffffff;
}

.transparency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.transparency-card {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    background: #ffffff;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.transparency-card:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-subtle);
}

.transparency-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.transparency-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.transparency-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
}

.transparency-law {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f1f5f9;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    width: fit-content;
    margin-bottom: 1.25rem;
}

.transparency-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.site-footer {
    background: var(--color-primary);
    color: #e2e8f0;
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    max-width: 22rem;
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

/* ----------------------------------------------------
   GLOBAL MOBILE OVERFLOW PROTECTION & RESPONSIVE DESIGN
---------------------------------------------------- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img, video, iframe, table {
    max-width: 100%;
}

@media (max-width: 1024px) {
    .hero-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .container {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .header-inner {
        justify-content: space-between;
        gap: 0.5rem;
        height: auto;
        min-height: 4.4rem;
        padding: 0.45rem 0;
    }

    .brand-logo {
        white-space: normal !important;
        gap: 0.5rem;
    }

    .brand-logo span:last-child {
        white-space: normal !important;
        max-width: 175px;
        font-size: 0.96rem;
        line-height: 1.15;
    }

    .header-actions-group {
        gap: 0.45rem;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        gap: 0.75rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
        display: none;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 9999;
    }
    .nav-menu.active {
        display: flex !important;
        animation: navDrawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes navDrawerSlideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .mobile-toggle {
        display: block;
    }

    /* Mega Menu та випадаючі меню на мобільному */
    .nav-dropdown-menu,
    .nav-dropdown-menu.nav-dropdown-menu-2cols {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: 1fr !important;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
        padding: 0.85rem !important;
        margin: 0.5rem 0 !important;
        gap: 1.1rem !important;
    }
    .nav-dropdown-menu.active,
    .nav-dropdown-menu.nav-dropdown-menu-2cols.active {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Усі 2- та 3-колонкові картки на сторінках перетворюємо на 1 колонку */
    [style*="grid-template-columns: minmax"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3.5rem 0 4.5rem;
    }
    .hero-title,
    h1 {
        font-size: clamp(1.85rem, 6.5vw, 2.45rem) !important;
        line-height: 1.25 !important;
    }
    .section-title,
    h2 {
        font-size: clamp(1.4rem, 5.5vw, 1.95rem) !important;
    }
    .ql-grid,
    .news-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .hero-actions,
    .button-group {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    .hero-actions a,
    .hero-actions button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    table {
        font-size: 0.82rem;
    }
    th, td {
        padding: 0.65rem 0.6rem !important;
    }
}

/* =========================================================
   ACADEMIC YEAR & HOLIDAYS SECTION STYLES
========================================================= */
.holiday-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.holiday-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08) !important;
}

/* =========================================================
   ACCESSIBILITY TRIGGER BUTTON (ALWAYS VISIBLE HIGH CONTRAST)
========================================================= */
.a11y-trigger-btn {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.a11y-trigger-btn:hover {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    color: var(--color-accent) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
}

/* =========================================================
   TEACHERS DIRECTORY CARDS & FILTERS
========================================================= */
.teacher-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.teacher-filter-btn {
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-filter-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.teacher-filter-btn.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.2rem;
}

.teacher-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.teacher-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.teacher-card-header {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}

.teacher-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    border: 3px solid #ffffff;
}

.teacher-header-info {
    flex: 1;
}

.teacher-cat-badge {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    margin-bottom: 0.4rem;
}

.teacher-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 0.2rem;
}

.teacher-role {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 600;
    margin: 0;
}

.teacher-card-body {
    padding: 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.teacher-qual-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.qual-tag {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
}

.exp-tag {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

.teacher-quote {
    margin: 0;
    font-size: 0.94rem;
    font-style: italic;
    color: #334155;
    line-height: 1.6;
    border-left: 3px solid #3b82f6;
    padding-left: 1rem;
}

.teacher-card-footer {
    padding: 1.15rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.consultation-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.consultation-info strong {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.consultation-info span {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 700;
}

.teacher-contact-btn {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.teacher-contact-btn:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

/* Modal */
.teacher-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.teacher-modal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 2.2rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3);
    text-align: center;
}

.teacher-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* =========================================================
   VACANCIES CARDS DIRECTORY (.vacancy-card)
========================================================= */
.vacancies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.2rem;
}

.vacancy-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vacancy-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.vacancy-card-header {
    padding: 1.6rem 1.6rem 1.3rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}

.vacancy-status-badge {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.vacancy-status-badge.active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.vacancy-status-badge.closed {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.vacancy-title {
    font-size: 1.25rem;
    font-weight: 850;
    color: #0f172a;
    line-height: 1.3;
    margin: 0.4rem 0 0.8rem;
}

.vacancy-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vacancy-card-body {
    padding: 1.5rem 1.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.vacancy-block strong {
    display: block;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 750;
    margin-bottom: 0.35rem;
}

.vacancy-block p {
    font-size: 0.93rem;
    color: #334155;
    line-height: 1.55;
    margin: 0;
}

.vacancy-block.benefits {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.9rem 1rem;
    border-radius: 14px;
}

.vacancy-card-footer {
    padding: 1.2rem 1.6rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.vacancy-contact-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.vacancy-contact-info span {
    font-size: 0.75rem;
    color: #64748b;
}

.vacancy-contact-info strong {
    font-size: 0.84rem;
    color: #0f172a;
    font-weight: 700;
}

/* =========================================================
   OCCUPATIONAL SAFETY DIRECTORY & PILLARS (.safety-doc-card)
========================================================= */
.safety-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.safety-pillar-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.safety-pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

.pillar-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin: 0 auto 1.1rem;
}

.safety-pillar-card h4 {
    font-size: 1.15rem;
    font-weight: 850;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.safety-pillar-card p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.safety-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.safety-doc-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.safety-doc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.11);
    border-color: #cbd5e1;
}

.safety-card-top {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
}

.safety-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
}

.safety-num-badge {
    font-size: 0.72rem;
    font-weight: 750;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.safety-doc-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
}

.safety-doc-summary {
    font-size: 0.93rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.safety-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding-top: 1.1rem;
    border-top: 1px solid #f1f5f9;
}

.safety-view-btn {
    padding: 0.55rem 1.25rem !important;
    font-size: 0.88rem !important;
    border-radius: 10px !important;
}

.safety-download-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.safety-download-icon:hover {
    background: #ecfdf5;
    border-color: #34d399;
}

/* ==========================================================================
   Кнопки поширення в соцмережі (Facebook, Viber, Telegram, WhatsApp)
   ========================================================================== */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

.share-fb {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.share-fb:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.share-vb {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}
.share-vb:hover {
    background: #6d28d9;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

.share-tg {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}
.share-tg:hover {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.share-wa {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.share-wa:hover {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

.share-copy {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.share-copy:hover {
    background: #475569;
    color: #ffffff;
    transform: translateY(-2px);
}

@media print {
    .a11y-floating-btn,
    .a11y-overlay,
    #lyceum-a11y-modal,
    .a11y-trigger-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* =========================================================
   A11Y MOBILE OVERRIDE (MAX-WIDTH: 991px)
========================================================= */
@media (max-width: 991px) {
    button.a11y-floating-btn,
    .a11y-floating-btn {
        bottom: 16px !important;
        left: 16px !important;
        width: 54px !important;
        height: 54px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        box-shadow: 0 8px 25px rgba(15, 23, 42, 0.45) !important;
    }
    button.a11y-floating-btn span:not(:first-child),
    .a11y-floating-btn span:not(:first-child),
    .a11y-floating-btn .a11y-btn-text {
        display: none !important;
    }
    button.a11y-floating-btn span:first-child,
    .a11y-floating-btn span:first-child,
    .a11y-floating-btn .a11y-btn-icon {
        font-size: 1.7rem !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    .a11y-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    .a11y-panel {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 86vh !important;
        border-radius: 24px 24px 0 0 !important;
        border: none !important;
        border-top: 3px solid #2563eb !important;
        padding: 1.4rem 1.1rem 2.2rem !important;
    }
    .a11y-header {
        margin-bottom: 1.1rem !important;
        padding-bottom: 0.8rem !important;
    }
    .a11y-header h2 {
        font-size: 1.2rem !important;
    }
    .a11y-options-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.55rem !important;
    }
    .a11y-btn {
        padding: 0.7rem 0.6rem !important;
        font-size: 0.84rem !important;
    }
}

/* =========================================================
   UNIVERSAL MOBILE GRID & LAYOUT COLLAPSE (MAX-WIDTH: 991px)
========================================================= */
@media (max-width: 991px) {
    /* Автоматично перетворюємо всі сітки, картки та інфо-блоки на 1 колонку */
    [style*="display: grid"],
    [style*="grid-template-columns"],
    .safety-pillars-grid,
    .safety-docs-grid,
    .vacancies-grid,
    .teacher-grid,
    .news-grid,
    .ql-grid,
    .hero-grid,
    .acc-info-grid,
    .safety-info-grid,
    .vacancies-info-grid,
    .ft-info-grid,
    .study-form-card {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Запобігаємо переповненню та виходу тексту за межі екрана */
    .acc-info-box,
    .safety-info-box,
    .vacancies-info-box,
    .ft-info-box,
    .study-form-card,
    .safety-doc-card,
    .safety-pillar-card {
        padding: 1.5rem 1.25rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Адаптивні відступи в контейнерах */
    section {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
}

/* =========================================================================
   MOBILE OPTIMIZATIONS FOR NEWS SECTION
========================================================================= */
@media (max-width: 576px) {
    .event-card {
        padding: 1rem !important;
        gap: 0.75rem !important;
        align-items: flex-start !important;
    }
    .event-card > a[aria-label] {
        display: none !important; /* Hide the right arrow on small screens to save space */
    }
    .event-info h4 {
        font-size: 1.05rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
    }
    .event-info p {
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
    }
    .event-thumb {
        width: 60px !important;
        height: 60px !important;
    }
    .event-date-box {
        padding: 0.5rem !important;
        min-width: 50px !important;
    }
    .event-date-box .event-day {
        font-size: 1.25rem !important;
    }
    .event-date-box .event-month {
        font-size: 0.7rem !important;
    }
    .featured-news-img {
        height: 200px !important;
    }
    .featured-news-content {
        padding: 1.25rem !important;
    }
    .featured-news-title {
        font-size: 1.35rem !important;
    }
    .news-grid {
        gap: 1.5rem !important;
    }
}

/* =====================================================
   АНИМАЦИЇ ТА ВІДСТУПИ (СУЧАСНИЙ ДИЗАЙН)
===================================================== */
.section-spacing {
    padding: 4rem 0;
}
@media (max-width: 991px) {
    .section-spacing {
        padding: 3rem 0;
    }
}
@media (max-width: 576px) {
    .section-spacing {
        padding: 2.5rem 0;
    }
}

/* Scroll Reveal Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

