/* DEOS — Custom MVC Frontend Styles
   Main color: #26AAE1 (rgb 38,170,225)
   Font: Arial 14px
   Layout: max-width 1200px, 3 columns */

:root {
    --blue:      #26AAE1;
    --blue-dark: #1a8ab8;
    --blue-light:#e8f6fc;
    --gray-bg:   #f4f4f4;
    --text:      #333;
    --text-muted:#666;
    --border:    #ddd;
}

* { box-sizing: border-box; }

/* Visually hidden but available to screen readers (WCAG 1.3.1 / 2.4.1) */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Skip-to-content link: hidden until keyboard-focused (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
    position: absolute;
    top: -40px; left: 0;
    background: var(--blue-dark);
    color: #fff;
    padding: 10px 16px;
    z-index: 10000;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f2f2f2;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.page-wrap {
    max-width: 1252px;
    margin: 0 auto;
    background: #f2f2f2;
    box-shadow: 0 0 21px rgba(0,0,0,.44);
}

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

img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 10px; }

.clearfix::after { content: ''; display: table; clear: both; }

/* ── Container ───────────────────────────────────────── */
.container {
    max-width: 1252px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ── Top Bar ─────────────────────────────────────────── */
.top-bar {
    background: var(--blue);
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 38px;
}
.top-bar-date {
    background: #fff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 2px;
}
.top-bar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
.top-bar li {
    position: relative;
    border-right: 1px solid rgba(255,255,255,.25);
}
.top-bar li:first-child { border-left: 1px solid rgba(255,255,255,.25); }
.top-bar a {
    display: block;
    color: rgba(255,255,255,.9);
    font-weight: 700;
    font-size: 12px;
    padding: 0px 5px 0px 10px;
    white-space: nowrap;
    transition: background .15s;
    text-decoration: none;
}
.top-bar a:hover {
    background: var(--blue-dark, #1558a0);
    color: #fff;
    text-decoration: none;
}

/* ── Header / Logo ───────────────────────────────────── */
.header-wrap {
    background: #fff;
    padding: 0;
}
.header-wrap .container {
    max-width: 100%;
    padding: 0;
}
.logo-link { display: block; }
.logo-link img { display: block; width: 100%; height: auto; }
.logo-text-wrap { padding: 14px 0; }
.logo-text-wrap .site-abbr { font-size: 30px; font-weight: 900; color: var(--blue); letter-spacing: 2px; }
.logo-text-wrap .site-full  { display: block; font-size: 13px; color: #555; }
.logo-text-wrap .site-univ  { display: block; font-size: 12px; color: #888; }

/* ── Main Nav ────────────────────────────────────────── */
.main-nav-wrap {
    background: var(--blue);
    position: relative;
    z-index: 500;
}
.main-nav-wrap .container {
    max-width: 100%;
    padding: 0;
}

.main-nav { list-style: none; display: flex; flex-wrap: nowrap; margin: 0; padding: 0px 15px; }
.main-nav > li { position: relative; border-right: 1px solid rgba(255,255,255,.25); }
.main-nav > li:first-child { border-left: 1px solid rgba(255,255,255,.25); }
.main-nav > li > a {
    display: block;
    color: #fff;
    padding: 11px 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
    transition: background .15s;
}
.main-nav > li > a:hover,
.main-nav > li.has-children:hover > a { background: var(--blue-dark); text-decoration: none; }

/* Dropdown */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--blue);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    min-width: 230px;
    z-index: 1000;
    list-style: none;
    padding: 0;
}
.main-nav > li.has-children:hover .sub-menu { display: block; }
.sub-menu li a {
    display: block;
    color: var(--text);
    padding: 8px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s;
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }

/* ── Main 3-column layout ────────────────────────────── */
.main-container {
    display: flex;
    gap: 1%;
    align-items: flex-start;
    padding: 10px;
    max-width: 1252px;
    margin: 0 auto;
    background: #d4d4d4;
}
.col-left  { width: 24%; flex-shrink: 0; background: #fff; padding: 10px; }
.col-center { width: 50%; flex-shrink: 0; min-width: 0; background: #fff; padding: 10px; }
.col-right { width: 24%; flex-shrink: 0; background: #fff; padding: 10px; }

/* Full-width layout (no sidebars) */
.main-container-wide {
    padding: 10px;
    max-width: 1252px;
    margin: 0 auto;
    background: #d4d4d4;
}
.col-full { background: #fff; padding: 16px 20px; width: 100%; }

/* ── Sidebar Widget ──────────────────────────────────── */
.widget { border: 1px solid var(--border); margin-bottom: 12px; }
.widget-title {
    background: var(--blue);
    color: #fff;
    padding: 5px 5px 5px 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0;
}
.widget-body { padding: 8px 10px; }
.widget-body p { font-size: 12px; color: #555; margin: 3px 0; }
.widget-body ul { list-style: none; }
.widget-body li { border-bottom: 1px solid #f5f5f5; padding: 4px 0; font-size: 12px; }
.widget-body li:last-child { border-bottom: none; }
.widget-body a { color: var(--text); font-size: 12px; }
.widget-body a:hover { color: var(--blue); text-decoration: none; }

/* Search widget */
.search-form { display: flex; }
.search-form input[type="text"] {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-right: none;
    font-size: 13px;
    outline: none;
}
.search-form input[type="text"]:focus { border-color: var(--blue); }
.search-form button {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}
.search-form button:hover { background: var(--blue-dark); }

/* PDF table in widget */
.pdf-table { border-collapse: collapse; width: 100%; font-size: 11px; }
.pdf-table td { border: 1px solid var(--border); padding: 4px 6px; }
.pdf-table a { color: var(--text); }
.pdf-table a:hover { color: var(--blue); }

/* Lang switcher */
.lang-switcher { display: flex; gap: 8px; align-items: center; }
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 2px solid var(--border);
    background: #f9f9f9;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all .15s;
}
.lang-btn img      { width: 18px; height: 12px; vertical-align: middle; margin-right: 3px; }
.lang-btn.active  { border-color: var(--blue); background: var(--blue); color: #fff; }
.lang-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* Visitor counter widget */
.counter-banner        { display: flex; gap: 3px; justify-content: center; margin-bottom: 10px; }
.counter-banner span   { display: inline-block; background: #222; color: #fff; font-family: 'Courier New', monospace; font-size: 20px; font-weight: 700; width: 26px; text-align: center; padding: 4px 0; border-radius: 3px; border-bottom: 2px solid #444; }
.counter-list          { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.counter-list li       { padding: 3px 0; border-bottom: 1px solid #f5f5f5; color: #555; }
.counter-list li:last-child { border-bottom: none; }
.counter-list i        { width: 14px; text-align: center; color: #26aae1; margin-right: 4px; }

/* Weather widget */
.weather-body          { text-align: center; padding: 12px 8px; }
.weather-icon          { font-size: 42px; line-height: 1.1; }
.weather-temp          { font-size: 30px; font-weight: 700; color: #222; margin: 4px 0; }
.weather-desc          { font-size: 11px; color: #888; margin-bottom: 2px; }
.weather-feel          { font-size: 11px; color: #aaa; margin-bottom: 10px; }
.weather-row           { display: flex; justify-content: space-around; border-top: 1px solid #f0f0f0; padding-top: 8px; font-size: 11px; color: #666; }
.weather-source        { font-size: 10px; color: #ccc; margin-top: 8px; }

/* Director widget */
.director-photo-wrap { margin-bottom: 7px; }
.director-photo-wrap img { width: 100%; height: auto; display: block; }
.director-text { font-size: 12px; color: #555; line-height: 1.6; text-align: justify; }
.director-text p { margin: 0 0 6px; }
.director-text p:last-child { margin-bottom: 0; }
.director-more { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--blue); }

/* ── Content area ────────────────────────────────────── */
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: var(--blue);
    text-transform: uppercase;
    text-align: center;
    padding: 10px;
    margin: 0 0 15px;
    border-radius: 4px;
}

/* Breadcrumb */
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--blue); }
.breadcrumb span { margin: 0 4px; }

/* ── News list (cards) ───────────────────────────────── */
.news-cards { display: flex; flex-direction: column; gap: 10px; }
.news-card  { border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.news-card-header {
    display: block; background: var(--blue); color: #fff;
    padding: 10px; text-decoration: none;
}
.news-card-header:hover { background: var(--blue-dark, #1558a0); text-decoration: none; }
.news-card-title { font-size: 17px; font-weight: 700; color: #fff; margin: 0 0 10px; line-height: 1.3; text-transform: uppercase; text-align: center; }
.news-card-header .news-card-title:last-child { margin-bottom: 0; }
.news-card-date  { font-size: 11px; color: rgba(255,255,255,.8); }
.news-card-img-wrap { display: block; margin: 10px 10px 0; }
.news-card-img-wrap img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.news-card-body  { padding: 10px; }
.news-card-preview { font-size: 14px; line-height: 1.65; color: var(--text); margin: 0 0 10px; text-align: justify; }
.news-card-preview p:last-child { margin-bottom: 0; }
.news-card-body .news-card-preview img:not(.alignleft):not(.alignright):not(.aligncenter) {
    max-width: 100% !important; margin: 10px 0 !important;
}
/* .news-card-body already gives 10px padding-top — an image's own margin-top
   would double up with that when it's the excerpt's first element. */
.news-card-body .news-card-preview img:first-child:not(.alignleft):not(.alignright):not(.aligncenter) { margin-top: 0 !important; }
.news-card-body .news-card-preview img.alignleft:first-child,
.news-card-body .news-card-preview img.alignright:first-child,
.news-card-body .news-card-preview img.aligncenter:first-child { margin-top: 0 !important; }
.news-card-more {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700; color: #fff;
    background: var(--blue); padding: 6px 16px; border-radius: 3px;
    text-decoration: none;
}
.news-card-more:hover { background: var(--blue-dark, #1558a0); text-decoration: none; }

/* ── News card mosaic gallery ─────────────────────────────────────────────── */
.news-card-mosaic { display:grid; gap:2px; overflow:hidden; margin: 10px 10px 0; border-radius: 4px; }
.news-card-mosaic a,
.news-card-mosaic button { all:unset; display:block; overflow:hidden; cursor:pointer; }
.news-card-mosaic img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s; }
.news-card-mosaic a:hover img,
.news-card-mosaic button:hover img { transform:scale(1.05); }

/* 1 image — full width */
.mc-1 { grid-template-columns:1fr; }
.mc-1 a, .mc-1 button { height:100px; }

/* 2 images — side by side */
.mc-2 { grid-template-columns:1fr 1fr; }
.mc-2 a, .mc-2 button { height:180px; }

/* 3 images — big left + two stacked right */
.mc-3 { grid-template-columns:2fr 1fr; grid-template-rows:120px 120px; }
.mc-3 a:first-child, .mc-3 button:first-child { grid-row:1/3; }

/* 4 images — 2×2 */
.mc-4 { grid-template-columns:1fr 1fr; grid-template-rows:180px 180px; }

/* 5+ images — first image big (full width), rest small squares */
.mc-n { grid-template-columns:repeat(4, 1fr); }
.mc-n a, .mc-n button { aspect-ratio: 1; }
.mc-n a:first-child, .mc-n button:first-child { grid-column: 1 / -1; aspect-ratio: 1.6; }

/* ── Article gallery grid ────────────────────────────────────────────────── */
.article-gallery { margin-top: 10px; margin-bottom: 10px; }
.gallery-title { font-size:15px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--blue); margin-bottom:12px; }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:8px; }
.gallery-item { all:unset; cursor:pointer; display:block; aspect-ratio:1; overflow:hidden; border-radius:4px; border:1px solid #e0e6ed; }
.gallery-item:first-child { grid-column: 1 / -1; width: 598px; max-width: 100%; aspect-ratio: 1.6; }
.gallery-item img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s; }
.gallery-item:hover img { transform: scale(1.06); }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
#lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}
#lb-img { max-height:82vh; max-width:92vw; object-fit:contain; border-radius:4px; box-shadow:0 8px 40px rgba(0,0,0,.6); }
#lb-counter { color:rgba(255,255,255,.7); font-size:13px; }
.lb-close, .lb-prev, .lb-next { all:unset; cursor:pointer; color:#fff; font-size:28px; line-height:1; opacity:.8; position:absolute; transition:opacity .15s; user-select:none; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity:1; }
.lb-close { top:18px; right:22px; font-size:36px; }
.lb-prev  { left:18px; top:50%; transform:translateY(-50%); }
.lb-next  { right:18px; top:50%; transform:translateY(-50%); }

/* keep old .news-item for any remaining usages */
.news-list { list-style: none; }
.news-item {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.news-item:last-child { border-bottom: none; }
.news-thumb { width: 110px; flex-shrink: 0; }
.news-thumb img { width: 110px; height: 75px; object-fit: cover; display: block; }
.news-thumb-placeholder {
    width: 110px; height: 75px;
    background: var(--gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 22px;
}
.news-body { flex: 1; min-width: 0; }
.news-item-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.news-item-title a { color: var(--text); }
.news-item-title a:hover { color: var(--blue); text-decoration: none; }
.news-item-date  { color: var(--text-muted); font-size: 11px; margin-bottom: 5px; }
.news-item-excerpt { font-size: 12px; color: #555; }
.news-item-more { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--blue); font-weight: 700; }

/* ── Single news ─────────────────────────────────────── */
.news-article { }
.article-header { background: var(--blue); color: #fff; padding: 16px 20px; margin-bottom: 0; }
.article-title  { font-size: 21px; font-weight: 700; line-height: 1.3; margin: 0 0 6px; color: #fff; text-transform: uppercase; text-align: center; }
.article-meta   { font-size: 12px; color: rgba(255,255,255,.8); }
.article-image  { margin-bottom: 10px; }
.article-image img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.article-preview { padding-top: 12px; }
.article-full   { padding-top: 4px; }
.article-readmore-wrap { margin: 4px 0 12px; }
.btn-read-more  {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--blue); color: #fff;
    border: none; border-radius: 4px;
    padding: 7px 18px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.btn-read-more:hover { background: var(--blue-dark, #1558a0); }
.news-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; }
.news-meta  { color: var(--text-muted); font-size: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.news-featured-img { margin-bottom: 14px; }
.news-featured-img img { width: 100%; max-height: 400px; object-fit: cover; }
.news-content { line-height: 1.7; font-size: 14px; }
.news-content p  { margin-bottom: 12px; }
.news-content h2 { font-size: 17px; margin: 18px 0 8px; }
.news-content h3 { font-size: 15px; margin: 14px 0 6px; }
.news-content table { border-collapse: collapse; width: 100%; margin-bottom: 14px; }
.news-content th, .news-content td { border: 1px solid var(--border); padding: 6px 10px; }
.news-content th { background: var(--gray-bg); font-weight: 700; }
.news-content img { max-width: 100%; height: auto; margin: 10px 0; display: block; }
.news-content img.alignleft,  .news-content img[style*="float:left"],  .news-content img[style*="float: left"]  { float: left;  margin: 10px 10px 10px 0; }
.news-content img.alignright, .news-content img[style*="float:right"], .news-content img[style*="float: right"] { float: right; margin: 10px 0 10px 10px; }
.news-content img.aligncenter { display: block; margin: 10px auto; }
.news-content::after { content: ''; display: table; clear: both; }
.news-content strong, .news-content b { font-weight: 700; }
.news-content em, .news-content i { font-style: italic; }
.news-content u { text-decoration: underline; }
.news-content ul, .news-content ol { padding-left: 22px; margin-bottom: 12px; }
.news-content li { margin-bottom: 4px; }
.news-back { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--blue); }

/* ── Page content ────────────────────────────────────── */
.page-content { line-height: 1.7; font-size: 14px; }
.page-content p  { margin-bottom: 12px; }
.page-content h2 { font-size: 17px; margin: 18px 0 8px; color: #222; }
.page-content h3 { font-size: 15px; margin: 14px 0 6px; }
.page-content table { border-collapse: collapse; width: 100%; margin-bottom: 14px; }
.page-content th, .page-content td { border: 1px solid var(--border); padding: 6px 10px; }
.page-content th { background: var(--gray-bg); font-weight: 700; }
.page-content img { max-width: 100%; height: auto; }
.page-content ul, .page-content ol { padding-left: 22px; margin-bottom: 12px; }
.page-content li { margin-bottom: 4px; }

/* ── Slider (homepage) ───────────────────────────────── */
.slider-wrap { position: relative; overflow: hidden; background: #222; margin-bottom: 16px; }
.slider-track { display: flex; transition: transform .5s ease; }
.slider-slide { min-width: 100%; }
.slider-slide img { width: 100%; display: block; max-height: 350px; object-fit: cover; }
.slider-nav { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; border: none; }
.slider-dot.active { background: #fff; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); color: #fff; border: none; width: 34px; height: 48px; cursor: pointer; font-size: 20px; z-index: 5; }
.slider-btn-prev { left: 5px; }
.slider-btn-next { right: 5px; }
.slider-btn:hover { background: rgba(0,0,0,.6); }

/* ── Pagination ──────────────────────────────────────── */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; padding: 16px 0 4px; justify-content: center; align-items: center; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: all .15s;
}
.pagination a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination .dots { border: none; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────── */
footer {
    background: var(--blue);
    color: rgba(255,255,255,.92);
    padding: 20px 0 0;
    margin-top: 18px;
}
.footer-cols { display: flex; gap: 20px; }
.footer-col { flex: 1; }
.footer-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #fff;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,.25);
}
.footer-col ul { list-style: none; }
.footer-col li { padding: 2px 0; }
.footer-col a { color: rgba(255,255,255,.8); font-size: 12px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col p { font-size: 12px; color: rgba(255,255,255,.8); margin: 3px 0; }
.footer-col p i { width: 16px; }
.footer-extra-text { margin-top: 6px; }
.footer-bottom {
    text-align: center;
    padding: 10px;
    margin-top: 14px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-size: 11px;
    color: rgba(255,255,255,.6);
}

/* ── 404 ─────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 40px 20px; }
.error-404 .code { font-size: 72px; font-weight: 900; color: var(--blue); line-height: 1; }
.error-404 h1 { font-size: 22px; margin: 10px 0; }
.error-404 p { color: var(--text-muted); margin-bottom: 20px; }
.btn { display: inline-block; padding: 8px 20px; background: var(--blue); color: #fff; border-radius: 3px; font-size: 14px; font-weight: 700; }
.btn:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }

/* ── Hamburger button ────────────────────────────────── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 10px 14px;
    line-height: 1;
    flex-shrink: 0;
}
.nav-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0;
}

/* ── Responsive ──────────────────────────────────────── */

/* Condense nav between 1101-1252px so long items fit */
@media (min-width: 1101px) and (max-width: 1252px) {
    .main-nav > li > a { font-size: 11px; padding: 11px 5px; letter-spacing: 0; }
}

/* Nav collapses to hamburger at 1100px (items too long for smaller) */
@media (max-width: 1100px) {
    .nav-toggle { display: block; }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin: 0;
    }
    .main-nav.open { display: flex; }

    .main-nav > li {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.2);
        width: 100%;
    }
    .main-nav > li:first-child { border-left: none; }
    .main-nav > li > a { padding: 12px 16px; font-size: 14px; }

    /* Sub-menus: static, click-toggled */
    .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: rgba(0,0,0,.18);
        min-width: 0;
    }
    .main-nav > li.has-children:hover .sub-menu { display: none; }
    .main-nav > li.has-children.open > .sub-menu { display: block; }
    .sub-menu li a { color: rgba(255,255,255,.9); padding: 9px 16px 9px 30px; border-bottom-color: rgba(255,255,255,.1); }
    .sub-menu li a:hover { background: rgba(255,255,255,.1); color: #fff; }

    .main-nav > li.has-children > a::after { content: ' ›'; float: right; transition: transform .2s; }
    .main-nav > li.has-children.open > a::after { transform: rotate(90deg); }
}

/* Layout collapses to 1 column at 900px */
@media (max-width: 900px) {
    .top-bar-date { display: none; }
    .top-bar-inner { justify-content: center; padding: 0 8px; }
    .top-bar ul { justify-content: center; }

    .main-container { flex-direction: column; gap: 10px; padding: 8px; }
    .col-center { order: 1; width: 100%; }
    .col-left   { order: 2; width: 100%; }
    .col-right  { order: 3; width: 100%; }

    .footer-cols { flex-direction: column; gap: 14px; }

    .page-content table,
    .news-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .news-filter-form { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; }
    .news-thumb img { width: 100%; height: 180px; }
    .news-thumb-placeholder { width: 100%; }
    .top-bar ul { font-size: 11px; }
    .top-bar li + li::before { padding: 0 3px; }
}

/* ── WP Visual Composer content (minimal, scoped) ───── */
.page-content .vc_row,
.news-content .vc_row { display: block; width: 100%; margin: 0; padding: 0; }
.page-content .wpb_column,
.news-content .wpb_column { display: block; width: 100%; }
.page-content .wpb_wrapper,
.news-content .wpb_wrapper { display: block; }
.page-content img,
.news-content img { max-width: 100%; height: auto; margin: 10px 0; display: block; }
.page-content .ts-advanced-textblock-content,
.news-content  .ts-advanced-textblock-content { display: block !important; height: auto !important; overflow: visible !important; }
.page-content table,
.news-content  table { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.page-content table th,
.page-content table td,
.news-content  table th,
.news-content  table td { border: 1px solid #ddd; padding: 6px 10px; font-size: 13px; }
.page-content table th { background: #f0f4f8; font-weight: 600; }
.page-content .news-box .block-title h2,
.page-content .news-box .block-title h2 a { font-size: 15px; font-weight: 700; color: var(--blue); text-decoration: none; border-bottom: 2px solid var(--blue); padding-bottom: 5px; display: block; margin-bottom: 10px; }
.page-content .news-box ul { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; padding: 0; }
.page-content .news-box ul li { width: calc(50% - 10px); display: flex; flex-direction: column; }
.page-content .news-box .post-thumbnail img { width: 100%; height: 200px; object-fit: cover; object-position: top; display: block; border-radius: 4px; }
.page-content .news-box .post-thumbnail a { display: block; }
.page-content .news-box .fix-right-content { padding: 10px 0 4px; }
.page-content .news-box .fix-right-content h2 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.page-content .news-box .fix-right-content h2 a { color: var(--text); text-decoration: none; }
.page-content .news-box .fix-right-content h2 a:hover { color: var(--blue); }
.page-content .news-box .fix-right-content .entry-meta,
.page-content .news-box .fix-right-content .entry-content p:empty { display: none; }
/* Links to the university's main site (mu-sofia.bg) look like the text around them. The department's
   own absolute links (deos.mu-sofia.bg - which is also what {SITE_URL} expands to in production) are
   ordinary links: they stay clickable and keep the normal link colour. :where() leaves the specificity
   of the rule unchanged. A rule that switched pointer events off for that host once made every document
   link in the content (GDPR files, quality reports, programmes) unclickable - tests/CssLinksTest.php. */
.page-content a[href*="mu-sofia.bg"]:where(:not([href*="deos.mu-sofia.bg"])) { color: inherit; text-decoration: none; }
.page-content a[href*="mu-sofia.bg"]:where(:not([href*="deos.mu-sofia.bg"])):hover { text-decoration: none; }
.page-content .news-box .post-thumbnail { background: #e8edf2; border-radius: 4px; overflow: hidden; }
.page-content .news-box .post-thumbnail .no-photo { height: 200px; display: flex; align-items: center; justify-content: center; color: #b0bec5; font-size: 48px; }
.page-content .entry-title a,
.page-content .fix-r a { color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.page-content .entry-title a:hover { color: var(--blue); }

/* ── Home page ───────────────────────────────────────── */
.home-slider-img { width: 100%; height: auto; display: block; margin-bottom: 12px; }
.text-empty { color: #999; }
.all-news-wrap { margin-top: 12px; }

/* ── News filter ─────────────────────────────────────── */
.news-filter-form { margin-bottom: 14px; display: flex; gap: 6px; }
.news-filter-form .filter-input { padding: 6px 10px; border: 1px solid var(--border); font-size: 13px; flex: 1; outline: none; }
.news-filter-form .filter-input:focus { border-color: var(--blue); }
.news-filter-form .filter-btn { padding: 6px 14px; background: var(--blue); color: #fff; border: none; cursor: pointer; font-size: 13px; }
.news-filter-form .filter-btn:hover { background: var(--blue-dark); }
.news-filter-form .filter-clear { padding: 6px 10px; border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; display: inline-flex; align-items: center; text-decoration: none; }
.news-filter-form .filter-clear:hover { border-color: var(--blue); color: var(--blue); }
.search-results-info { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.no-results { color: #999; padding: 20px 0; }

/* ── Schedule (разписание) ───────────────────────────────────────────────── */
.sched-wrap { overflow-x: auto; margin-top: 8px; }
.sched-table { border-collapse: collapse; width: 100%; font-size: 12px; min-width: 500px; }
.sched-title {
    background: #1a5c8a;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 8px 10px;
    border: 1px solid #1a5c8a;
    letter-spacing: .3px;
}
.sched-groups {
    background: var(--blue);
    color: #fff;
    font-size: 11px;
    text-align: center;
    padding: 5px 10px;
    border: 1px solid #1a8ab8;
    font-weight: normal;
}
.sched-hdr-day  { width: 28px; }
.sched-hdr-slot { width: 85px; white-space: nowrap; }
.sched-hdr-col  { min-width: 90px; }
.sched-table thead th.sched-hdr-day,
.sched-table thead th.sched-hdr-slot,
.sched-table thead th.sched-hdr-col {
    background: #2980b9;
    color: #fff;
    padding: 5px 6px;
    border: 1px solid #1a5c8a;
    font-size: 11px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.sched-table td { border: 1px solid #c8d6e0; padding: 4px 6px; vertical-align: middle; font-size: 11px; }
.sched-day {
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 8px 3px;
    letter-spacing: .5px;
    border: 1px solid #1a8ab8;
}
.sched-slot {
    background: #eaf4fb;
    font-size: 11px;
    font-weight: 700;
    color: #1a5276;
    white-space: nowrap;
    text-align: center;
    padding: 4px 6px;
}
.sched-cell { min-width: 80px; line-height: 1.4; }

/* Staff template */
.staff-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; }
.staff-card { width: calc(50% - 10px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.staff-photo { background: #e8edf2; height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.staff-photo img { width: 100%; height: 200px; object-fit: cover; object-position: top; display: block; }
.staff-no-photo { font-size: 72px; color: #b0bec5; line-height: 1; }
.staff-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.staff-name { font-size: 14px; font-weight: 700; color: var(--text); }
.staff-title { font-size: 13px; color: #555; }
.staff-email { font-size: 12px; color: var(--blue); text-decoration: none; margin-top: 2px; }
.staff-email:hover { text-decoration: underline; }
.staff-empty { color: #888; font-style: italic; margin-top: 16px; }

/* Staff card link */
.staff-card { text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.staff-card:hover { box-shadow: 0 4px 16px rgba(38,170,225,.25); transform: translateY(-2px); text-decoration: none; }

/* Staff profile page */
.staff-profile { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 20px; }
.staff-profile-photo { flex-shrink: 0; width: 200px; }
.staff-profile-photo img { width: 200px; height: 240px; object-fit: cover; object-position: top; border-radius: 4px; display: block; border: 2px solid var(--border); }
.staff-profile-info { flex: 1; }
.staff-profile-name { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: #222; }
.staff-profile-title { font-size: 15px; color: #555; margin: 0 0 8px; }
.staff-profile-email { font-size: 14px; margin: 0; }
.staff-profile-email a { color: var(--blue); }
.staff-profile-bio { border-top: 2px solid var(--blue); padding-top: 16px; margin-top: 4px; }
@media (max-width: 600px) {
    .staff-profile { flex-direction: column; }
    .staff-profile-photo { width: 100%; }
    .staff-profile-photo img { width: 100%; height: auto; }
}
@media (max-width: 600px) { .staff-card { width: 100%; } }

/* ── Edu Programs sidebar widget ─────────────────────────────────────────── */
.widget-edu .widget-body { padding: 0; }
.edu-tabs { display: flex; flex-direction: column; gap: 0; }
.edu-tab-btn {
    display: block;
    width: 100%;
    background: var(--blue, #26aae1);
    color: #fff;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,.25);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    letter-spacing: .4px;
    transition: background .15s;
}
.edu-tab-btn:hover { background: #1a8ab8; }
.edu-tab-btn.active { background: #1a5276; border-bottom-color: transparent; }
.edu-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.edu-table th {
    background: #f0f4f8;
    color: #1a5276;
    font-weight: 700;
    padding: 5px 8px;
    border-bottom: 1px solid #d0dde5;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.edu-table td { padding: 5px 8px; border-bottom: 1px solid #eef2f5; vertical-align: middle; line-height: 1.35; }
.edu-table tr:last-child td { border-bottom: none; }
.edu-table td:last-child { width: 40px; text-align: center; }
.edu-pdf-link img { display: block; margin: auto; transition: opacity .15s; }
.edu-pdf-link:hover img { opacity: .75; }
.edu-no-file { color: #ccc; }

/* ── Edu Programs center column ──────────────────────────────────────────── */
.edu-faculty-buttons { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.edu-faculty-btn {
    display: block;
    background: var(--blue, #26aae1);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
    padding: 14px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s, transform .1s;
}
.edu-faculty-btn:hover { background: #1a8ab8; transform: translateY(-1px); text-decoration: none; color: #fff; }

.edu-faculty-header {
    background: var(--blue, #26aae1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
    text-align: center;
    padding: 12px 20px;
    border-radius: 4px;
    margin: 16px 0 20px;
}

.edu-form-tabs { display: flex; gap: 6px; margin-bottom: 0; flex-wrap: wrap; }
.edu-form-tab-btn {
    background: #e8f4fb;
    color: #1a5276;
    border: 2px solid #26aae1;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
    transition: background .15s;
}
.edu-form-tab-btn.active { background: #26aae1; color: #fff; }
.edu-form-tab-btn:hover:not(.active) { background: #d0eaf7; }

.edu-form-pane { display: none; }
.edu-form-pane.active { display: block; }

.edu-center-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 2px solid #26aae1;
    border-top: none;
    margin-bottom: 20px;
}
.edu-center-table thead th {
    background: #26aae1;
    color: #fff;
    padding: 8px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-align: left;
}
.edu-center-table tbody tr { border-bottom: 1px solid #e0eaf2; }
.edu-center-table tbody tr:last-child { border-bottom: none; }
.edu-center-table tbody tr:nth-child(even) { background: #f5fafd; }
.edu-center-table td { padding: 8px 12px; vertical-align: middle; line-height: 1.4; }
.edu-center-table td:last-child { width: 60px; text-align: center; }
.edu-pdf-btn img { display: block; margin: auto; transition: opacity .15s; }
.edu-pdf-btn:hover img { opacity: .7; }

/* ── Edu programs accordion (overview page) ──────────────────────────────── */
.edu-accordion { display: flex; flex-direction: column; gap: 6px; margin: 20px 0; }
.edu-acc-item { border-radius: 4px; overflow: hidden; }
.edu-acc-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: var(--blue, #26aae1);
    color: #fff;
    border: none;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
    border-radius: 4px;
}
.edu-acc-btn:hover { background: #1a8ab8; }
.edu-acc-btn.open { background: #1a5276; border-radius: 4px 4px 0 0; }
.edu-acc-arrow { font-size: 11px; transition: transform .2s; flex-shrink: 0; margin-left: 10px; }
.edu-acc-btn.open .edu-acc-arrow { transform: rotate(180deg); }
.edu-acc-pane { border: 2px solid #26aae1; border-top: none; border-radius: 0 0 4px 4px; }
.edu-acc-pane .edu-center-table { border: none; margin-bottom: 0; }
.edu-empty { color: #888; text-align: center; margin-top: 24px; font-style: italic; }

/* ── Карта на сайта (HTML указател) ─────────────────────────────────────────── */
.sitemap-index { background:#f7fafc; border:1px solid var(--border); border-radius:4px; padding:12px 16px; margin-bottom:22px; }
.sitemap-index ul { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 18px; }
.sitemap-index li { margin:0; }
.sitemap-index a { font-size:13px; font-weight:600; }

.sitemap section { margin-bottom:26px; }
.sitemap section > h2 {
    font-size:16px; color:#fff; background:var(--blue-dark, #1a8ab8);
    padding:6px 12px; border-radius:3px; margin:0 0 12px;
}
.sitemap h3 { font-size:14px; color:#1a5276; margin:14px 0 6px; border-bottom:1px solid var(--border); padding-bottom:3px; }
.sitemap ul { list-style:none; margin:0 0 10px; padding:0; }
.sitemap li { margin:0 0 3px; font-size:13.5px; line-height:1.5; }
.sitemap li::before { content:"›"; color:var(--blue-dark, #1a8ab8); margin-right:6px; }
.sitemap-staff { margin-top:8px !important; padding-left:14px !important; border-left:2px solid var(--border); }
.sitemap-staff li { font-size:13px; }
.sitemap-empty { color:var(--text-muted); font-style:italic; }
.sitemap-empty::before, .sitemap-count::before { content:none; }
.sitemap-count { color:var(--text-muted); font-size:12px; margin-left:4px; }
.sitemap-more { margin:8px 0 0; font-size:13px; }

/* Клавиатурен фокус — видим контур навсякъде (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #f2a900;
    outline-offset: 2px;
}

/* ── Декларация за достъпност ──────────────────────────────────────────────── */
.a11y-statement h2 { font-size:16px; color:#fff; background:var(--blue-dark, #1a8ab8); padding:6px 12px; border-radius:3px; margin:22px 0 12px; }
.a11y-statement h2:first-child { margin-top:0; }
.a11y-statement h3 { font-size:14.5px; color:#1a5276; margin:16px 0 6px; }
.a11y-statement table th { background:#eef4f8; text-align:left; font-size:13px; }
.a11y-statement table th,
.a11y-statement table td { border:1px solid var(--border); padding:7px 10px; vertical-align:top; font-size:13px; }
.a11y-statement table td:first-child { width:34%; font-weight:600; color:#333; }
.a11y-statement ul { margin:0 0 12px 18px; padding:0; }
.a11y-statement li { margin-bottom:4px; }
.a11y-meta { margin-top:20px; font-size:12.5px; color:var(--text-muted); border-top:1px solid var(--border); padding-top:10px; }

/* ── Футър: долен ред (карта на сайта, декларация) ─────────────────────────── */
.footer-bottom nav { display: inline-flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; align-items: center; }
.footer-bottom a {
    color: #fff;
    background: #0d6288;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 5px 12px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
}
.footer-bottom a:hover { background: #0a4f6e; text-decoration-thickness: 2px; }
.footer-bottom a:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
.footer-sep { display: none; }

/* ════════════════════════════════════════════════════════════════════════════
   ВИСОКОКОНТРАСТЕН РЕЖИМ
   Включва се с линка във футъра. Класът 'hc' се слага на <html> от сървъра
   (бисквитка deos_contrast), затова няма премигване при зареждане.

   Целеви коефициенти (WCAG 1.4.6, ниво AAA):
     текст върху фон   21:1   (#fff на #000)
     линкове           19.6:1 (#ff0 на #000)
   Всичко декоративно (градиенти, сенки, фонови изображения) се премахва,
   защото пречи на хора с остатъчно зрение и на хора с дислексия.
   ════════════════════════════════════════════════════════════════════════════ */

html.hc {
    --blue:       #000000;
    --blue-dark:  #000000;
    --blue-light: #000000;
    --gray-bg:    #000000;
    --text:       #ffffff;
    --text-muted: #ffffff;
    --border:     #ffffff;
}

/* ── Основа ─────────────────────────────────────────────────────────────── */
html.hc body {
    background: #000 !important;
    color: #fff !important;
}
html.hc .page-wrap { background: #000 !important; }

/* Всяко декоративно фоново изображение и сянка пада */
html.hc *,
html.hc *::before,
html.hc *::after {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ── Линкове ────────────────────────────────────────────────────────────── */
html.hc a,
html.hc a:visited {
    color: #ffff00 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}
html.hc a:hover,
html.hc a:focus {
    color: #000 !important;
    background: #ffff00 !important;
}

/* ── Ленти, хедър, навигация ────────────────────────────────────────────── */
html.hc .top-bar,
html.hc .top-bar-inner,
html.hc .header-wrap,
html.hc .main-nav-wrap,
html.hc .main-nav,
html.hc .sub-menu {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
html.hc .top-bar { border-bottom: 2px solid #fff; }
html.hc .header-wrap { border-bottom: 2px solid #fff; }
html.hc .main-nav-wrap { border-bottom: 3px solid #fff; }

html.hc .main-nav > li > a,
html.hc .top-bar a,
html.hc .sub-menu li a {
    background: #000 !important;
    color: #ffff00 !important;
    border-color: #fff !important;
}
html.hc .main-nav > li > a:hover,
html.hc .main-nav > li > a:focus,
html.hc .main-nav > li:hover > a,
html.hc .sub-menu li a:hover,
html.hc .sub-menu li a:focus {
    background: #ffff00 !important;
    color: #000 !important;
}
html.hc .top-bar-date { color: #fff !important; }

/* ── Заглавия на секции и уиджети ───────────────────────────────────────── */
html.hc .widget-title,
html.hc .sitemap section > h2,
html.hc .a11y-statement h2,
html.hc .news-card-header,
html.hc .article-header,
html.hc .sched-day,
html.hc .sched-groups,
html.hc .edu-faculty-header,
html.hc .edu-center-table thead th {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}
html.hc .news-card-header *,
html.hc .article-header *,
html.hc .edu-center-table thead th * { color: #000 !important; }

html.hc .page-title,
html.hc .gallery-title,
html.hc h1, html.hc h2, html.hc h3, html.hc h4 {
    color: #fff !important;
    border-color: #fff !important;
}

/* ── Панели, карти, таблици ─────────────────────────────────────────────── */
html.hc .widget,
html.hc .news-card,
html.hc .footer-col,
html.hc .sitemap-index,
html.hc .a11y-statement table,
html.hc .a11y-statement th,
html.hc .a11y-statement td,
html.hc .page-content table,
html.hc .page-content th,
html.hc .page-content td,
html.hc .news-content table,
html.hc .news-content th,
html.hc .news-content td {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}
html.hc .a11y-statement table th { background: #fff !important; color: #000 !important; }

/* ── Бутони, пагинация ──────────────────────────────────────────────────── */
html.hc .btn,
html.hc .btn-read-more,
html.hc .news-card-more,
html.hc .director-more,
html.hc .news-back,
html.hc .pagination a,
html.hc .pagination span,
html.hc .news-filter-form .filter-btn,
html.hc .search-form button {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
    font-weight: 700 !important;
}
html.hc .btn:hover,
html.hc .pagination a:hover,
html.hc .pagination .current {
    background: #ffff00 !important;
    color: #000 !important;
    border-color: #ffff00 !important;
}

/* ── Форми ──────────────────────────────────────────────────────────────── */
html.hc input,
html.hc select,
html.hc textarea,
html.hc button {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}
html.hc input::placeholder,
html.hc textarea::placeholder { color: #ccc !important; }

/* ── Футър ──────────────────────────────────────────────────────────────── */
html.hc footer {
    background: #000 !important;
    color: #fff !important;
    border-top: 3px solid #fff !important;
}
html.hc .footer-col a,
html.hc .footer-col p,
html.hc .footer-bottom span { color: #fff !important; }
html.hc .footer-col h4 { color: #fff !important; border-bottom: 2px solid #fff; }

/* Тъмните „бутони“ от долния ред стават бели — на черно иначе няма контраст */
html.hc .footer-bottom a {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}
html.hc .footer-bottom a:hover {
    background: #ffff00 !important;
    color: #000 !important;
    border-color: #ffff00 !important;
}

/* ── Изображения: бял контур, за да не се сливат с фона ─────────────────── */
html.hc img {
    border: 2px solid #fff;
    background: #000;
}

/* ── Фокус — дебел жълт контур, видим върху черно ───────────────────────── */
html.hc a:focus-visible,
html.hc button:focus-visible,
html.hc input:focus-visible,
html.hc select:focus-visible,
html.hc textarea:focus-visible,
html.hc [tabindex]:focus-visible {
    outline: 4px solid #ffff00 !important;
    outline-offset: 2px !important;
}

/* ── Бутонът за превключване: ясно различим и в двата режима ───────────── */
.hc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #0d6288;         /* 6.73:1 с бял текст */
    border: none;
    border-radius: 3px;
    padding: 5px 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hc-toggle:hover { background: #0a4f6e; text-decoration-thickness: 2px; }
.hc-toggle:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
.hc-toggle[aria-pressed="true"] { background: #7a3d00; }   /* включен режим — топъл тон */
.hc-toggle[aria-pressed="true"]:hover { background: #5e2f00; }

/* В контрастен режим превключвателят е бял, както останалите футърни бутони */
html.hc .hc-toggle {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}
html.hc .hc-toggle[aria-pressed="true"] {
    background: #ffff00 !important;
    border-color: #ffff00 !important;
}

/* ── ВИСОКОКОНТРАСТЕН РЕЖИМ — втори слой ─────────────────────────────────────
   Първият блок покрива структурата, но сайтът има ~23 hardcoded сиви/тъмни
   цвята по текстови елементи, които на черно изчезват. Тук всичко текстово
   става бяло, после се връщат изключенията (инвертираните блокове и линковете).
   Редът е важен: всеки следващ блок има по-висока специфичност. */

/* 1. Всички текстови повърхности — бели */
html.hc .page-wrap p,
html.hc .page-wrap li,
html.hc .page-wrap div,
html.hc .page-wrap td,
html.hc .page-wrap th,
html.hc .page-wrap h1,
html.hc .page-wrap h2,
html.hc .page-wrap h3,
html.hc .page-wrap h4,
html.hc .page-wrap h5,
html.hc .page-wrap h6,
html.hc .page-wrap label,
html.hc .page-wrap small,
html.hc .page-wrap strong,
html.hc .page-wrap em,
html.hc .page-wrap time,
html.hc .page-wrap blockquote,
html.hc .page-wrap figcaption { color: #fff !important; }

/* 2. Линковете пак жълти (по-специфични от горното) */
html.hc .page-wrap a,
html.hc .page-wrap a * { color: #ffff00 !important; }

/* 3. Изключения: инвертирани блокове — черен текст върху бяло */
html.hc .news-card-header,
html.hc .news-card-header *,
html.hc .article-header,
html.hc .article-header *,
html.hc .widget-title,
html.hc .widget-title *,
html.hc .sitemap section > h2,
html.hc .sitemap section > h2 *,
html.hc .a11y-statement h2,
html.hc .a11y-statement h2 *,
html.hc .a11y-statement table th,
html.hc .a11y-statement table th *,
html.hc .edu-center-table thead th,
html.hc .edu-center-table thead th *,
html.hc .btn,
html.hc .btn *,
html.hc .btn-read-more,
html.hc .news-card-more,
html.hc .director-more,
html.hc .news-back,
html.hc .news-filter-form .filter-btn,
html.hc .search-form button,
html.hc .pagination .current,
html.hc .pagination a,
html.hc .top-bar-date,
html.hc .footer-bottom a,
html.hc .footer-bottom a *,
html.hc .hc-toggle,
html.hc .hc-toggle *,
html.hc .lang-btn { color: #000 !important; }

/* 4. Слайдер: снимките не трябва да заслепяват */
html.hc .slider-wrap { background: #000 !important; border: 2px solid #fff; }
html.hc .slider-slide img { filter: grayscale(100%) contrast(1.1) brightness(.9); }
html.hc .slider-dot { background: #fff !important; border: 2px solid #fff !important; }
html.hc .slider-dot.active { background: #ffff00 !important; border-color: #ffff00 !important; }
html.hc .slider-btn { background: #000 !important; color: #ffff00 !important; border: 2px solid #fff !important; }

/* 5. Снимки и лога — обезцветени, с бял контур */
html.hc img {
    filter: grayscale(100%) contrast(1.1);
    border: 2px solid #fff;
    background: #000;
}
/* Логото и банерът не носят смисъл сами по себе си — махаме ги напълно,
   за да не заемат място и да не заслепяват. Текстът до тях остава. */
html.hc .logo-link img { display: none; }
html.hc .logo-text-wrap { display: block !important; padding: 14px 8px; }
html.hc .logo-text-wrap .site-abbr { color: #fff !important; font-size: 26px; }
html.hc .logo-text-wrap .site-full,
html.hc .logo-text-wrap .site-univ { color: #fff !important; }

/* 6. Разделителни линии — бели, иначе изчезват */
html.hc .counter-list li,
html.hc .weather-row,
html.hc .footer-col h4,
html.hc .breadcrumb,
html.hc .widget-title,
html.hc .sitemap h3,
html.hc .banner { border-color: #fff !important; }

/* 7. Google Classroom бутоните (вътрешни изображения) */
html.hc .gc-btn,
html.hc .gc-btn * { border-color: #fff !important; }

/* 8. „Посетители" брояч — цифрите бяха тъмни на тъмно */
html.hc .counter-banner span,
html.hc .counter-list strong { color: #fff !important; background: #000 !important; border-color: #fff !important; }
/* ── ВИСОКОКОНТРАСТЕН РЕЖИМ — корекция на каскадата ──────────────────────────
   Проблем: правилата за инвертираните блокове (бял фон, черен текст) са с
   специфичност (0,2,0), а правилото „всички линкове в .page-wrap стават жълти"
   е (0,2,1). За линковете-бутони (.btn, .news-back, .director-more и т.н.)
   жълтото печелеше → жълт текст върху белия фон на бутона, ~1:1, нечетимо.
   Тук издигаме инвертираните елементи до (0,3,1), за да са над жълтото. */

html.hc .page-wrap .btn,
html.hc .page-wrap .btn *,
html.hc .page-wrap .btn:hover,
html.hc .page-wrap .btn-read-more,
html.hc .page-wrap .btn-read-more *,
html.hc .page-wrap .news-card-more,
html.hc .page-wrap .news-card-more *,
html.hc .page-wrap .director-more,
html.hc .page-wrap .news-back,
html.hc .page-wrap .news-filter-form .filter-btn,
html.hc .page-wrap .search-form button,
html.hc .page-wrap .pagination a,
html.hc .page-wrap .pagination span,
html.hc .page-wrap .pagination .current,
html.hc .page-wrap .news-card-header,
html.hc .page-wrap .news-card-header *,
html.hc .page-wrap .article-header,
html.hc .page-wrap .article-header *,
html.hc .page-wrap .widget-title,
html.hc .page-wrap .widget-title *,
html.hc .page-wrap .sitemap section > h2,
html.hc .page-wrap .sitemap section > h2 *,
html.hc .page-wrap .a11y-statement h2,
html.hc .page-wrap .a11y-statement h2 *,
html.hc .page-wrap .a11y-statement table th,
html.hc .page-wrap .a11y-statement table th *,
html.hc .page-wrap .edu-center-table thead th,
html.hc .page-wrap .edu-center-table thead th *,
html.hc .page-wrap .top-bar-date,
html.hc .page-wrap .top-bar-date *,
html.hc .page-wrap .lang-btn { color: #000 !important; }

/* На hover инвертираните бутони стават жълти с черен текст */
html.hc .page-wrap .btn:hover,
html.hc .page-wrap .pagination a:hover,
html.hc .page-wrap .pagination .current {
    background: #ffff00 !important;
    border-color: #ffff00 !important;
    color: #000 !important;
}

/* Отделен случай: .news-card-more и .btn-read-more седят върху белия
   .news-card-header, но нямат свой фон — даваме им такъв, иначе жълтото
   правило ги прави нечетими. */
html.hc .page-wrap .news-card-more,
html.hc .page-wrap .btn-read-more {
    background: #fff !important;
    border: 2px solid #fff !important;
    padding: 3px 8px;
    border-radius: 3px;
}
html.hc .page-wrap .news-card-more:hover,
html.hc .page-wrap .btn-read-more:hover {
    background: #ffff00 !important;
    border-color: #ffff00 !important;
}

/* ── Cookie consent ────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
    padding: 14px 20px;
    background: #1a2942;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { max-width: 720px; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.cookie-banner__text strong { color: #fff; }
.cookie-banner__text p { margin: 4px 0 0; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cookie-banner__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.cookie-banner__btn {
    display: inline-block;
    padding: 8px 14px;
    border: 0;
    border-radius: 4px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.cookie-banner__btn--all { background: #f26522; color: #fff; }
.cookie-banner__btn--all:hover { background: #d95518; }
.cookie-banner__btn--necessary { color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.cookie-banner__btn--necessary:hover { border-color: #fff; }
.cookie-banner__link { color: #fff; font-size: 13px; text-decoration: underline; }
.footer-link-btn { all: unset; cursor: pointer; color: inherit; }
.footer-link-btn:hover { text-decoration: underline; }
.footer-link-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 640px) {
    .cookie-banner { padding: 12px 14px; }
    .cookie-banner__actions { width: 100%; }
}
html.hc .cookie-banner { background: #000 !important; border-top: 2px solid #fff; }
html.hc .cookie-banner__btn--all { background: #ffff00 !important; color: #000 !important; }

/* ── Third-party embed consent ─────────────────────────────────────────── */
.embed-consent {
    border: 1px solid var(--border);
    background: var(--gray-bg);
    border-radius: 6px;
    padding: 20px;
    margin: 14px 0;
    text-align: center;
}
.embed-consent__title { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.embed-consent__text { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); }
.embed-consent__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.embed-consent__btn {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.embed-consent__btn:hover { background: var(--blue-dark, #1558a0); }
.embed-consent__link { font-size: 13px; }
html.hc .embed-consent { background: #fff !important; border-color: #000 !important; }
html.hc .embed-consent__btn { background: #000 !important; color: #fff !important; }
