/* ==========================================================================
   SCHOOL JOOMLA TEMPLATE — MAIN STYLESHEET
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --blue-dark:   #1a3a6b;
    --blue-mid:    #2256a0;
    --blue-light:  #3a7bd5;
    --gold:        #f5a623;
    --gold-dark:   #d4881a;
    --white:       #ffffff;
    --gray-light:  #f4f6f9;
    --gray-mid:    #e0e4ec;
    --gray-text:   #555e6e;
    --text-dark:   #1e2433;
    --radius:      8px;
    --shadow:      0 4px 18px rgba(26,58,107,0.10);
    --shadow-hover:0 8px 32px rgba(26,58,107,0.18);
    --transition:  all 0.28s ease;
    --font-main:   'Roboto', sans-serif;
    --font-head:   'Montserrat', sans-serif;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: 16px;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue-mid);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--gold-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--blue-dark);
    font-weight: 700;
    line-height: 1.3;
}

ul { padding-left: 0; list-style: none; margin: 0; }

/* ---------- TOP BAR ---------- */
.top-bar {
    background-color: var(--blue-dark);
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    padding: 7px 0;
}
.top-bar-contacts span {
    display: inline-block;
    margin-right: 16px;
}
.top-bar-contacts i {
    margin-right: 5px;
    color: var(--gold);
}
.top-bar a {
    color: rgba(255,255,255,0.85);
}
.top-bar a:hover { color: var(--gold); text-decoration: none; }
.top-bar-social a {
    display: inline-block;
    margin-left: 10px;
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}
.top-bar-social a:hover { color: var(--gold); }
.top-bar-login {
    margin-left: 18px !important;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 14px;
}

/* ---------- HEADER ---------- */
.site-header {
    background: var(--white);
    padding: 18px 0;
    box-shadow: 0 2px 12px rgba(26,58,107,0.08);
    position: relative;
    z-index: 100;
}
.school-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-default {
    display: flex;
    align-items: center;
    gap: 14px;
}
.logo-icon svg {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-name {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-dark);
    line-height: 1.2;
}
.logo-slogan {
    font-size: 0.78rem;
    color: var(--gray-text);
    font-style: italic;
}
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.header-search-form {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-mid);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition);
}
.header-search-form:focus-within {
    border-color: var(--blue-mid);
}
.search-input {
    border: none;
    outline: none;
    padding: 7px 14px;
    font-size: 0.88rem;
    width: 200px;
    background: transparent;
}
.search-btn {
    background: var(--blue-mid);
    border: none;
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
    transition: var(--transition);
}
.search-btn:hover { background: var(--blue-dark); }

/* ---------- NAVBAR ---------- */
.site-navbar {
    background: var(--blue-dark);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 3px 10px rgba(26,58,107,0.25);
}
.site-navbar .container { position: relative; }
.site-navbar .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
}
.site-navbar .nav > li > a,
.site-navbar .nav > li > span > a {
    display: block;
    color: rgba(255,255,255,0.88);
    padding: 14px 17px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
    text-decoration: none;
}
.site-navbar .nav > li > a:hover,
.site-navbar .nav > li.active > a,
.site-navbar .nav > li.current > a {
    color: var(--gold);
    background: rgba(255,255,255,0.06);
}
/* Dropdown */
.site-navbar .nav .dropdown-menu {
    background: var(--blue-dark);
    border: none;
    border-top: 3px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(26,58,107,0.25);
    min-width: 220px;
    padding: 6px 0;
}
.site-navbar .nav .dropdown-menu li a {
    color: rgba(255,255,255,0.8);
    padding: 9px 20px;
    font-size: 0.88rem;
    transition: var(--transition);
}
.site-navbar .nav .dropdown-menu li a:hover {
    background: rgba(245,166,35,0.15);
    color: var(--gold);
    padding-left: 26px;
}

/* ---------- HERO ---------- */
.hero-section {
    position: relative;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,58,107,0.82) 40%, rgba(26,58,107,0.45) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 60px 0;
    animation: fadeInUp 0.8s ease both;
}
.hero-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 18px;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.88);
    margin-bottom: 32px;
    line-height: 1.6;
}
.hero-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--blue-dark) !important;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 32px;
    border-radius: 30px;
    text-decoration: none !important;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(245,166,35,0.4);
}
.hero-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,166,35,0.5);
}
.hero-btn i { margin-left: 8px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- FEATURE BLOCKS ---------- */
.feature-section {
    background: var(--gray-light);
    padding: 50px 0 40px;
}
.feature-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 20px;
    border-bottom: 4px solid transparent;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
}
.feature-box .feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--white);
    font-size: 1.8rem;
}
.feature-box h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--blue-dark);
}
.feature-box p {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin: 0;
}

/* ---------- SECTION HEADER ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-mid);
}
.section-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--blue-dark);
    margin: 0;
    position: relative;
}
.section-title span { color: var(--blue-mid); }
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--gold);
    margin-top: 8px;
    border-radius: 2px;
}
.section-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue-mid);
    white-space: nowrap;
    text-decoration: none;
    transition: var(--transition);
}
.section-link:hover { color: var(--gold-dark); }
.section-link i { margin-left: 5px; }

/* ---------- NEWS SECTION ---------- */
.news-section {
    padding: 60px 0;
    background: var(--white);
}
.news-grid { margin: 0 -12px; }

/* News Card (used via module chrome) */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 24px;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.news-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
    background: var(--gray-mid);
}
.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card:hover .news-card-image img { transform: scale(1.06); }
.news-card-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--gold);
    color: var(--blue-dark);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.news-card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--blue-dark);
    color: rgba(255,255,255,0.9);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
.news-card-body {
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 10px;
    line-height: 1.35;
}
.news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.news-card-title a:hover { color: var(--blue-mid); }
.news-card-text {
    font-size: 0.87rem;
    color: var(--gray-text);
    line-height: 1.55;
    flex-grow: 1;
    margin-bottom: 16px;
}
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--gray-mid);
}
.news-card-author {
    font-size: 0.8rem;
    color: var(--gray-text);
}
.news-card-author i { color: var(--blue-mid); margin-right: 4px; }
.news-readmore {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue-mid);
    text-decoration: none;
    transition: var(--transition);
}
.news-readmore:hover { color: var(--gold-dark); }
.news-readmore i { margin-left: 4px; }

/* News wrapper inside module */
.news-col { padding: 0 12px; }

/* ---------- COM_CONTENT — Article Blog layout overrides ---------- */
.blog .items-row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.blog .items-row .item {
    padding: 0 12px;
    margin-bottom: 24px;
}
.blog .items-row.cols-3 .item { width: 33.3333%; }
.blog .items-row.cols-2 .item { width: 50%; }
.blog .items-row.cols-1 .item { width: 100%; }
.blog .item .item-image img {
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    height: 210px;
    object-fit: cover;
}
.blog .item-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 14px 0 8px;
}
.blog .item-title a { color: var(--blue-dark); text-decoration: none; }
.blog .item-title a:hover { color: var(--blue-mid); }
.blog .article-info { font-size: 0.82rem; color: var(--gray-text); margin-bottom: 10px; }
.blog .item-content { font-size: 0.9rem; color: var(--gray-text); }
.blog .readmore a {
    display: inline-block;
    margin-top: 12px;
    background: var(--blue-mid);
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}
.blog .readmore a:hover { background: var(--blue-dark); }

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs-bar {
    background: var(--gray-light);
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-mid);
}
.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 4px 0;
    font-size: 0.85rem;
}
.breadcrumb > li + li::before { content: "›"; color: var(--gray-text); padding: 0 6px; }
.breadcrumb > li > a { color: var(--blue-mid); }
.breadcrumb > li.active { color: var(--gray-text); }

/* ---------- MAIN CONTENT ---------- */
.main-content { padding: 40px 0 60px; }
.home-content { padding: 0; }

/* Article single */
.com-content-article .article-header { margin-bottom: 20px; }
.com-content-article h1, .article-full-title { color: var(--blue-dark); font-size: 1.8rem; }
.com-content-article .article-info-block { font-size: 0.85rem; color: var(--gray-text); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-mid); }
.com-content-article .article-info-block .article-date i,
.com-content-article .article-info-block .article-author i { color: var(--blue-mid); margin-right: 4px; }

/* Intro image */
.com-content-article .pull-right { margin: 0 0 20px 24px; }
.com-content-article .pull-left  { margin: 0 24px 20px 0; }

/* Pagination */
.pagination > li > a, .pagination > li > span {
    color: var(--blue-mid);
    border-color: var(--gray-mid);
}
.pagination > .active > a { background: var(--blue-mid); border-color: var(--blue-mid); }

/* ---------- SIDEBAR ---------- */
.sidebar-area { padding-left: 28px; }
.sidebar .module-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-dark);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--gold);
    margin-bottom: 16px;
}
.sidebar .module-inner { margin-bottom: 28px; }

/* Latest News module in sidebar */
.sidebar ul.latestnews li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--gray-mid);
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
}
.sidebar ul.latestnews li img {
    width: 60px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.sidebar ul.latestnews li a { color: var(--text-dark); font-weight: 500; }
.sidebar ul.latestnews li a:hover { color: var(--blue-mid); }
.sidebar ul.latestnews li .item_date { font-size: 0.75rem; color: var(--gray-text); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--blue-dark); color: rgba(255,255,255,0.78); }
.footer-main { padding: 60px 0 40px; }
.footer-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(245,166,35,0.4);
}
.footer-about p { font-size: 0.88rem; line-height: 1.6; margin-top: 10px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--white);
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 700;
}
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}
.footer-contact-list li i { color: var(--gold); width: 16px; flex-shrink: 0; margin-top: 3px; }
.footer-contact-list a { color: rgba(255,255,255,0.8); }
.footer-contact-list a:hover { color: var(--gold); }
.footer-social-links { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--white) !important;
    transition: var(--transition);
    text-decoration: none !important;
}
.social-icon.vk  { background: #4680c2; }
.social-icon.ok  { background: #f7931e; }
.social-icon.yt  { background: #ff0000; }
.social-icon.tg  { background: #2ca5e0; }
.social-icon:hover { transform: translateY(-3px) scale(1.08); opacity: 0.9; }
.footer-gov-links { font-size: 0.8rem; }
.footer-gov-links a { color: rgba(255,255,255,0.6); }
.footer-gov-links a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- MOBILE TOGGLER ---------- */
.navbar-toggler {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    padding: 7px 10px;
    cursor: pointer;
    margin-top: 4px;
}
.navbar-toggler .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    margin: 4px 0;
    border-radius: 2px;
}

/* ---------- UTILITIES ---------- */
.align-items-center { align-items: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .sidebar-area { padding-left: 0; margin-top: 36px; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    .blog .items-row.cols-3 .item { width: 50%; }
}

@media (max-width: 767px) {
    .top-bar-contacts span { display: block; margin-right: 0; margin-bottom: 4px; }
    .top-bar-social { text-align: left !important; margin-top: 6px; }
    .site-header { padding: 14px 0; }
    .logo-name { font-size: 0.88rem; }
    .logo-slogan { display: none; }
    .hero-section { min-height: 320px; }
    .hero-title { font-size: 1.55rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .news-section { padding: 40px 0; }
    .blog .items-row.cols-3 .item,
    .blog .items-row.cols-2 .item { width: 100%; }
    .site-navbar .nav { flex-direction: column; }
    .site-navbar .nav > li > a { padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
    #main-nav.collapse:not(.in) { display: none; }
    #main-nav.in { display: block; }
    .footer-col { margin-bottom: 28px; }
    .search-input { width: 140px; }
}

@media (max-width: 480px) {
    .hero-content { padding: 40px 0; }
    .hero-btn { padding: 11px 22px; }
    .main-content { padding: 28px 0 40px; }
}

/* ---------- PRINT ---------- */
@media print {
    .top-bar, .site-navbar, .hero-section, .news-section, .site-footer { display: none; }
}
