/* --- СВЕТЛА КОРПОРАТИВНА ДИЗАЙН СИСТЕМА --- */
:root {
    --white: #ffffff;
    --light-grey: #f8fafc;
    --light-blue-100: #f0f9ff;
    --light-blue-200: #e0f2fe;
    --light-blue-300: #bae6fd;
    --sky-blue-light: #38bdf8;
    --sky-blue: #0ea5e9;
    --sky-blue-dark: #0284c7;
    --text-slate: #475569;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(14, 165, 233, 0.05);
    --shadow-corporate: 0 8px 25px rgba(2, 132, 199, 0.12);
    --shadow-card-hover: 0 20px 35px rgba(14, 165, 233, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-slate);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

/* --- NAVBAR & HEADER --- */
.main-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 46px;
    width: auto;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sky-blue-dark);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
}

.nav-item {
    color: var(--sky-blue-dark);
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--sky-blue-light) 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--sky-blue-dark);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.hamburger-menu.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger-menu.open span:nth-child(2) { opacity: 0; }
.hamburger-menu.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- SIDEBAR MENU --- */
.sidebar {
    position: fixed;
    top: 0;
    right: -310px;
    width: 310px;
    height: 100%;
    background-color: var(--white);
    box-shadow: -10px 0 35px rgba(14, 165, 233, 0.08);
    z-index: 1500;
    transition: var(--transition-smooth);
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
}

.sidebar.active { right: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-blue-100);
}

.sidebar-title { font-size: 1.3rem; font-weight: 800; color: var(--sky-blue-dark); }
.close-sidebar-btn { background: transparent; border: none; font-size: 2rem; color: var(--sky-blue); cursor: pointer; line-height: 1; }
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.sidebar-links a {
    color: var(--sky-blue-dark);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.sidebar-links a:hover, .sidebar-links .active-link {
    background-color: var(--light-blue-100);
    color: var(--sky-blue);
    padding-left: 22px;
}

.sidebar-dropdown { display: flex; flex-direction: column; }
.dropdown-toggle { justify-content: space-between !important; }
.arrow-icon { font-size: 0.75rem; transition: var(--transition-smooth); }
.sidebar-dropdown.open .arrow-icon { transform: rotate(180deg); }

.dropdown-menu {
    list-style: none;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.35s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-dropdown.open .dropdown-menu { max-height: 200px; opacity: 1; margin-top: 4px; }
.dropdown-menu a { font-size: 0.95rem; font-weight: 600; background-color: var(--light-grey); }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(2, 132, 199, 0.2); backdrop-filter: blur(4px); z-index: 1400; opacity: 0; visibility: hidden; transition: var(--transition-smooth); }
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.mobile-only-link {
    display: none;
}

/* --- HERO СЕКЦИЯ НА НОВИНИТЕ --- */
.news-hero {
    background: linear-gradient(135deg, var(--light-blue-100) 0%, #e0f2fe 100%);
    padding: 70px 0;
    border-bottom: 1px solid var(--light-blue-200);
}

.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--white);
    color: var(--sky-blue-dark);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-soft);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.news-hero-title {
    font-size: 2.8rem;
    color: var(--sky-blue-dark);
    font-weight: 800;
    margin-bottom: 10px;
}

.news-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-slate);
    max-width: 700px;
    margin: 0 auto;
}

/* --- МРЕЖА И КАРТИ ЗА НОВИНИ --- */
.news-section {
    background-color: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(2, 132, 199, 0.04);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    animation: cardAppear 0.5s ease-out forwards;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--light-blue-300);
}

.news-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: grid;
    gap: 3px;
    background-color: var(--light-blue-200);
}

.news-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
    background-color: var(--light-blue-100);
}

.news-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

/* --- ВИДЕО И МЕДИЯ СТИЛОВЕ В КАРТИТЕ --- */
.news-card-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-card-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(14, 165, 233, 0.9);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 3;
}

.news-card:hover .news-card-video-overlay {
    background: var(--sky-blue-dark);
    transform: translate(-50%, -50%) scale(1.1);
}

.news-card-more-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.8rem;
    backdrop-filter: blur(2px);
    z-index: 4;
}

.news-card:hover .news-card-img-wrapper img {
    transform: scale(1.05);
}

.news-card-image.img-count-1 { display: block; }
.news-card-image.img-count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 100%; }
.news-card-image.img-count-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 50% 50%; }
.news-card-image.img-count-3 .news-card-img-wrapper:nth-child(1) { grid-row: span 2; grid-column: span 1; }
.news-card-image.img-count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 50% 50%; }

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--white);
    color: var(--sky-blue-dark);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 5;
}

.news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--sky-blue);
    font-weight: 600;
}

.news-card-title {
    font-size: 1.3rem;
    color: var(--sky-blue-dark);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-desc {
    font-size: 0.95rem;
    color: var(--text-slate);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--light-blue-100);
    color: var(--sky-blue-dark);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    align-self: flex-start;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.news-card:hover .news-btn {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--sky-blue-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.news-btn i {
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.news-card:hover .news-btn i {
    transform: translateX(4px);
}

/* --- СТИЛОВЕ ЗА МОДАЛНИЯ ПЛЕЙЪР ЗА ВИДЕО --- */
.custom-modal-video {
    width: 100%;
    max-height: 480px;
    border-radius: 12px;
    background-color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    outline: none;
    display: block;
}

.custom-modal-single-video {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
}

.custom-modal-gallery-item.custom-modal-video-item {
    flex-direction: column;
    padding: 10px;
}

/* --- СИСТЕМА ЗА ПАГИНАЦИЯ --- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--light-grey);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid var(--light-blue-100);
}

.page-arrow, .page-num {
    background-color: var(--white);
    border: 1px solid rgba(2, 132, 199, 0.08);
    color: var(--sky-blue-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.page-arrow:hover:not(.disabled), .page-num:hover:not(.active) {
    background-color: var(--light-blue-100);
    color: var(--sky-blue);
    border-color: var(--light-blue-300);
}

.page-num.active {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--sky-blue-light) 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}

.page-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--light-grey);
}

/* --- ОФИЦИАЛЕН FOOTER --- */
.main-footer {
    background-color: var(--light-grey);
    border-top: 1px solid var(--light-blue-200);
    padding: 60px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo { height: 40px; width: auto; }
.footer-school-name { font-size: 1.2rem; font-weight: 800; color: var(--sky-blue-dark); }
.footer-motto { font-size: 0.95rem; color: var(--text-slate); }
.footer-title { font-size: 1.15rem; color: var(--sky-blue-dark); margin-bottom: 20px; font-weight: 800; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    color: var(--text-slate);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover { color: var(--sky-blue); padding-left: 5px; }
.work-time { font-size: 0.95rem; color: var(--text-slate); margin-bottom: 20px; }
.work-time i { color: var(--sky-blue); margin-right: 5px; }
.social-title { margin-bottom: 12px; }
.footer-socials { display: flex; gap: 12px; }

.footer-socials a {
    width: 38px;
    height: 38px;
    background-color: var(--white);
    color: var(--sky-blue-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--sky-blue-light) 100%);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom text-center {
    padding-top: 20px;
    border-top: 1px solid var(--light-blue-200);
    font-size: 0.9rem;
    color: var(--text-slate);
}

/* --- RESPONSIVE КОРЕКЦИИ --- */
@media (max-width: 992px) {
    .news-hero-title { font-size: 2.3rem; }
    .news-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
}

@media (max-width: 768px) {
    .section { padding: 40px 0; }
    .nav-links { display: none; }
    .mobile-only-link { display: block; }
    .news-hero { padding: 40px 0; }
    .news-hero-title { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 30px; }
    .news-card-image { height: 180px; }
}