/* =========================================
   ZUŠ Trutnov — site.css
   ========================================= */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  color: #313131;
  background: #fff;
  overflow-x: hidden;
}
a { color: #d00b01; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; vertical-align: top; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HEADER ---- */
.site-header {
  background: #fff;
  border-top: 5px solid #d00b01;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.header-logo {
  flex-shrink: 0;
  padding: 8px 16px 8px 0;
}
.header-logo img { display: block; height: auto; max-height: 90px; width: auto; }
.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}
.header-social {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 8px 0 4px;
  text-align: right;
}
.header-izus {
  display: inline-block; vertical-align: middle;
  margin-right: 5px; text-decoration: none;
}
.header-izus img { height: 28px; width: auto; vertical-align: middle; }
.header-izus:hover { opacity: 0.8; }
/* Social sprite icons — top_socials.png: Facebook at 0,0; next_socials.png: Teams at 0,0; YouTube at -35,0 */
.soc-facebook, .soc-youtube, .soc-teams {
  display: inline-block;
  width: 30px; height: 30px;
  background-repeat: no-repeat;
  text-decoration: none;
  vertical-align: middle;
  transition: opacity 0.2s;
}
.soc-facebook:hover, .soc-youtube:hover, .soc-teams:hover { opacity: 0.8; }
.soc-facebook { background-image: url('/images/top_socials.png'); background-position: 0 0; }
.soc-facebook:hover { background-position: 0 -30px; }
.soc-youtube { background-image: url('/images/next_socials.png'); background-position: -35px 0; }
.soc-youtube:hover { background-position: -35px -30px; }
.soc-teams { background-image: url('/images/next_socials.png'); background-position: 0 0; }
.soc-teams:hover { background-position: 0 -30px; }

/* ---- NAV ---- */
.site-nav { border-top: 1px solid #ebebeb; width: 100%; }
#mainNav { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; justify-content: flex-end; }
#mainNav > li { position: relative; padding: 0 0 12px 20px; }
#mainNav > li > a {
  display: block;
  line-height: 18px;
  padding: 10px 0 0;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #313131;
  text-decoration: none;
  transition: color 0.15s;
}
#mainNav > li > a:hover,
#mainNav > li.active > a { color: #c5c5c5; }

/* Dropdown */
#mainNav > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: #fff;
  border-top: 3px solid #d00b01;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
  z-index: 200;
  list-style: none;
  padding: 14px 0 7px;
  margin: 0;
}
#mainNav > li:hover > ul { display: block; }
#mainNav > li > ul > li > a {
  display: block;
  padding: 0 10px 7px 15px;
  font-size: 0.75rem;
  font-weight: 400;
  color: #313131;
  text-decoration: none;
  line-height: 18px;
  transition: color 0.15s;
}
#mainNav > li > ul > li > a:hover,
#mainNav > li > ul > li.active > a { color: #d00b01; font-weight: 600; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: #313131;
}
.nav-toggle svg { display: block; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
  padding: 8px 0;
  font-size: 0.82rem;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb li + li::before { content: "/"; color: #aaa; margin-right: 4px; }
.breadcrumb a { color: #555; text-decoration: none; }
.breadcrumb a:hover { color: #d00b01; }
.breadcrumb li:last-child { color: #313131; }

/* ---- PAGE CONTENT ---- */
.page-content { padding: 24px 0 36px; background: #fff; }
.page-content h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.page-content .page-divider { border: none; border-top: 3px solid #d00b01; width: 50px; margin: 10px 0 20px; }
.prose { line-height: 1.7; font-size: 0.92rem; max-width: 860px; }
.prose h2 { font-size: 1.15rem; font-weight: 700; margin: 20px 0 8px; }
.prose h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 6px; }
.prose p { margin-bottom: 12px; }
.prose ul, .prose ol { margin: 0 0 12px 22px; }
.prose img { max-width: min(100%, 560px); height: auto !important; border-radius: 4px; margin: 10px 0; display: block; transition: opacity 0.2s; }
.prose img:hover { opacity: 0.85; }
.prose a { color: #d00b01; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 0.88rem; }
.prose th, .prose td { border: 1px solid #ddd; padding: 7px 10px; text-align: left; }
.prose th { background: #f5f5f5; font-weight: 600; }

/* ---- SECTION HEADING ---- */
.section-heading {
  font-size: 1.5rem; font-weight: 700;
  border-bottom: 3px solid #d00b01;
  padding-bottom: 6px; display: inline-block;
  margin-bottom: 20px;
}

/* ---- HERO SWIPER ---- */
.carousel-wrap { padding-bottom: 24px; }
.hero-swiper { width: 100%; background: #eee; }
.hero-swiper .swiper-slide { line-height: 0; }
.swiper-slide img { width: 100%; height: auto; display: block; }
.hero-swiper .swiper-slide a { display: block; line-height: 0; }
.swiper-button-prev, .swiper-button-next {
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}
.hero-swiper:hover .swiper-button-prev,
.hero-swiper:hover .swiper-button-next { opacity: 1; }
.swiper-pagination-bullet-active { background: #d00b01 !important; }

/* ---- DEPARTMENTS (Homepage) ---- */
.departments { padding: 32px 0 24px; }
.departments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.department-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 12px;
  border: 1px solid #e0e0e0;
  text-decoration: none; color: #313131;
  text-align: center;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.department-item:hover {
  border-color: #d00b01; color: #d00b01;
  box-shadow: 0 2px 10px rgba(208,11,1,0.12);
  text-decoration: none;
}
.department-icon {
  display: block;
  width: 70px; height: 70px;
  margin: 0 auto 12px;
  background-repeat: no-repeat;
  background-position: 0 0;
}
.dept-icon-1 { background-image: url('/images/icon1.png'); }
.dept-icon-2 { background-image: url('/images/icon2.png'); }
.dept-icon-3 { background-image: url('/images/icon3.png'); }
.dept-icon-4 { background-image: url('/images/icon4.png'); }
.department-item:hover .department-icon { background-position: 0 -70px; }
.department-name { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }

/* ---- WELCOME BLOCK ---- */
.welcome-block {
  text-align: center; padding: 22px 0 26px;
  background: #f9f9f9; margin: 0 0 32px;
}
.welcome-subtitle {
  font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #444; font-weight: 600; margin-bottom: 6px;
}
.welcome-block h2 {
  font-size: 1.8rem; font-weight: 800; color: #313131;
  font-style: italic; margin: 0;
}

/* ---- NEWS + ABOUT (homepage) ---- */
.news-and-about { padding: 28px 0 32px; background: #f9f9f9; border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; }
.news-and-about-inner { display: flex; gap: 40px; align-items: flex-start; }
.news-slider-col { flex: 1; min-width: 0; }
.about-col { width: 280px; flex-shrink: 0; border-left: 3px solid #d00b01; padding-left: 24px; }
.about-col-title { font-size: 1rem; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; color: #313131; line-height: 1.3; }
.about-col p { font-size: 0.83rem; color: #555; line-height: 1.7; margin-bottom: 10px; }
.about-col a { color: #d00b01; }

/* News slider cards */
.news-swiper { overflow: hidden; width: 100%; }
.news-swiper .swiper-wrapper { align-items: flex-start; }
.swiper-pagination-news { display: none; text-align: center; margin-top: 10px; }
.swiper-pagination-news .swiper-pagination-bullet { background: #bbb; opacity: 1; }
.swiper-pagination-news .swiper-pagination-bullet-active { background: #d00b01; }
@media (max-width: 799px) {
  .swiper-pagination-news { display: block; }
}
.news-swiper .swiper-slide { box-sizing: border-box; overflow: hidden; }
/* Na mobilu explicitní šířka kontejneru — Swiper špatně měří flex: 1 */
@media (max-width: 539px) {
    .news-swiper { width: calc(100vw - 40px); }
}
.news-slide {
  display: flex; flex-direction: column;
  word-break: break-word; width: 100%;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.news-slide:hover { border-bottom-color: #d00b01; }
.news-slide:hover h3 a { color: #d00b01; }
.news-slide-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #bbb; color: #fff; padding: 8px 12px;
  margin-bottom: 10px; width: 100%; text-align: center; box-sizing: border-box;
}
.news-slide-date .day { font-size: 2rem; font-weight: 800; line-height: 1; }
.news-slide-date .month { font-size: 0.65rem; text-transform: uppercase; line-height: 1.5; letter-spacing: 0.05em; }
.news-slide-date .year { font-size: 0.65rem; line-height: 1.3; }
.news-slide h3 { font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; line-height: 1.4; color: #313131; }
.news-slide h3 a { color: #313131; text-decoration: none; }
.news-slide h3 a:hover { color: #d00b01; }
.news-slide p { font-size: 0.8rem; color: #666; line-height: 1.5; }

@media (max-width: 800px) {
  .news-and-about-inner { flex-direction: column; }
  .about-col { width: 100%; border-left: none; border-top: 3px solid #d00b01; padding-left: 0; padding-top: 16px; }
}

/* ---- NEWS CARDS ---- */
.news-section, .activities-section { padding: 16px 0 32px; }
.news-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.news-card {
  border: 1px solid #e0e0e0; padding: 16px;
  transition: border-color 0.2s;
}
.news-card:hover { border-color: #d00b01; }
.news-card-date { font-size: 0.78rem; color: #888; margin-bottom: 6px; }
.news-card-title a { font-weight: 600; font-size: 0.95rem; color: #313131; text-decoration: none; }
.news-card-title a:hover { color: #d00b01; }
.news-card-perex { font-size: 0.85rem; color: #666; margin-top: 6px; }
.section-more { text-align: center; margin-top: 20px; }

/* Activities slider */
.activities-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.activities-header .section-heading { margin-bottom: 0; }
.activities-nav { display: flex; gap: 6px; }
.activities-nav button {
  background: #d00b01; color: #fff; border: none; cursor: pointer;
  width: 30px; height: 30px; font-size: 0.85rem; line-height: 30px;
  text-align: center; transition: background 0.2s; display: inline-block;
}
.activities-nav button:hover { background: #a00800; }
.activities-nav button.swiper-button-disabled { background: #ccc; cursor: default; opacity: 1; }
.activities-swiper { overflow: hidden; }
.activities-swiper .swiper-wrapper { align-items: flex-start; }
.activity-slide { display: flex; flex-direction: column; }
.activity-slide-link { display: block; line-height: 0; margin-bottom: 10px; }
.activity-slide-link img { width: 258px; height: 365px; object-fit: cover; display: block; }
.activity-slide-noimg { width: 258px; height: 365px; background: #eee; }
.activity-slide-meta { font-size: 0.75rem; color: #888; margin-bottom: 4px; line-height: 1.4; }
.activity-slide-title { margin-bottom: 4px; }
.activity-slide-title a { font-weight: 600; font-size: 0.9rem; color: #313131; text-decoration: none; line-height: 1.3; display: block; }
.activity-slide-title a:hover { color: #d00b01; }
.activity-slide-perex { font-size: 0.8rem; color: #666; margin-top: 4px; line-height: 1.5; }
.btn-outline {
  display: inline-block; padding: 8px 24px;
  border: 2px solid #d00b01; color: #d00b01;
  font-weight: 600; font-size: 0.85rem;
  text-decoration: none; transition: all 0.2s;
}
.btn-outline:hover { background: #d00b01; color: #fff; text-decoration: none; }

/* ---- ACTIVITIES LIST (/akce) ---- */
.activities-list-grid { display: flex; flex-direction: column; gap: 0; }
.activity-list-card {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid #e8e8e8;
}
.activity-list-card:last-child { border-bottom: none; }
.activity-list-img-link { flex-shrink: 0; display: block; line-height: 0; }
.activity-list-img-link img { width: 160px; height: 220px; object-fit: cover; display: block; transition: opacity 0.2s; }
.activity-list-img-link:hover img { opacity: 0.88; }
.activity-list-noimg { width: 160px; height: 220px; background: #eee; }
.activity-list-body { display: flex; gap: 16px; align-items: flex-start; flex: 1; }
.activity-list-date {
  flex-shrink: 0; text-align: center; min-width: 52px;
  background: #d00b01; color: #fff; padding: 8px 6px;
}
.activity-list-date .day { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; }
.activity-list-date .month { display: block; font-size: 0.65rem; text-transform: uppercase; margin-top: 2px; line-height: 1.3; }
.activity-list-info { flex: 1; }
.activity-list-info h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.activity-list-info h2 a { color: #313131; text-decoration: none; }
.activity-list-info h2 a:hover { color: #d00b01; }
.activity-list-place { font-size: 0.8rem; color: #888; margin-bottom: 8px; }
.activity-list-info p { font-size: 0.88rem; color: #555; line-height: 1.6; margin-bottom: 10px; }
.activity-list-more { font-size: 0.82rem; color: #d00b01; text-decoration: none; font-weight: 600; }
.activity-list-more:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .activity-list-card { flex-direction: column; }
  .activity-list-img-link img, .activity-list-noimg { width: 100%; height: 200px; }
}

/* ---- GALLERY ---- */
.gallery-folders { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.gallery-folder {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 1px solid #e0e0e0;
  text-decoration: none; color: #313131; font-size: 0.88rem; font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.gallery-folder:hover { border-color: #d00b01; color: #d00b01; text-decoration: none; }
.gallery-folder svg { color: #d00b01; }

/* Gallery folder cards (new grid) */
.gallery-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.gallery-folder-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: #313131;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gallery-folder-card:hover { border-color: #d00b01; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-decoration: none; }
.gallery-folder-card-img { aspect-ratio: 4/3; overflow: hidden; }
.gallery-folder-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-folder-card:hover .gallery-folder-card-img img { transform: scale(1.05); }
.gallery-folder-card-icon {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; color: #c0c0c0;
}
.gallery-folder-card-label {
  padding: 8px 10px; font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.gallery-folder-card-count {
  font-size: 0.72rem; font-weight: 400; color: #888; white-space: nowrap; flex-shrink: 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.gallery-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; }
.gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-img-wrap:hover img { transform: scale(1.05); }
.gallery-img-wrap a { display: block; height: 100%; position: relative; }
.gallery-img-wrap a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center / 44px no-repeat;
    opacity: 0;
    transition: opacity 0.25s, background-color 0.25s;
}
.gallery-img-wrap:hover a::after {
    opacity: 1;
    background-color: rgba(0,0,0,0.32);
}

/* ---- NEWS DETAIL ---- */
.news-detail-wrap { max-width: 1100px; }
.news-detail-wrap h1 { font-size: 1.3rem; margin-bottom: 4px; }
.news-detail-img-link { display: block; line-height: 0; margin-bottom: 16px; }
.news-detail-img-link img {
  width: 100%; max-height: 340px; object-fit: cover;
  display: block; transition: opacity 0.2s; cursor: zoom-in;
}
.news-detail-img-link:hover img { opacity: 0.9; }
.news-detail-perex {
  font-size: 0.83rem; font-weight: 600; color: #444;
  line-height: 1.55; margin-bottom: 12px;
  border-left: 3px solid #d00b01; padding-left: 12px;
}
.news-detail-wrap .prose { font-size: 0.82rem; line-height: 1.65; }
.news-detail-wrap .prose p { margin-bottom: 8px; }
.news-detail-wrap .prose h2 { font-size: 1rem; margin: 14px 0 6px; }
.news-detail-wrap .prose h3 { font-size: 0.92rem; margin: 12px 0 5px; }
.news-detail-gallery {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0;
}
.news-detail-gallery-thumb { display: block; line-height: 0; }
.news-detail-gallery-thumb img { width: 100px; height: 72px; object-fit: cover; transition: opacity 0.2s; }
.news-detail-gallery-thumb:hover img { opacity: 0.8; }
.news-detail-attachments { margin: 16px 0; padding: 12px 14px; background: #f5f5f5; border-left: 3px solid #d00b01; }
.news-detail-attachments-title { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; margin-bottom: 6px; color: #313131; }
.news-detail-attachments ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.news-detail-attachments a { font-size: 0.82rem; color: #313131; text-decoration: none; display: flex; align-items: center; gap: 7px; }
.news-detail-attachments a:hover { color: #d00b01; }
.attachment-ext {
  background: #d00b01; color: #fff; font-size: 0.6rem; font-weight: 700;
  padding: 1px 4px; border-radius: 2px; flex-shrink: 0;
}
.news-detail-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-top: 20px; padding-top: 12px;
  border-top: 1px solid #e8e8e8;
}
.news-detail-published { font-size: 0.75rem; color: #aaa; }

/* ---- PAGE ATTACHMENTS ---- */
.page-attachments { margin-top: 24px; padding: 12px 14px; background: #f5f5f5; border-left: 3px solid #d00b01; }
.page-attachments-title { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; margin-bottom: 8px; color: #313131; }
.page-attachments-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.page-attachments-list a { font-size: 0.88rem; color: #313131; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.page-attachments-list a::before { content: "📎"; font-size: 0.75rem; }
.page-attachments-list a:hover { color: #d00b01; }

/* ---- ACTIVITY DETAIL ---- */
.activity-detail-layout { display: flex; gap: 36px; align-items: flex-start; }
.activity-detail-poster { flex-shrink: 0; }
.activity-detail-poster a { display: block; line-height: 0; }
.activity-detail-poster img { width: 258px; height: 365px; object-fit: cover; display: block; box-shadow: 0 4px 16px rgba(0,0,0,0.15); transition: opacity 0.2s; cursor: zoom-in; }
.activity-detail-poster a:hover img { opacity: 0.9; }
.activity-detail-content { flex: 1; min-width: 0; }
.activity-detail-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.activity-detail-content h1 { font-size: 1.3rem; }
.activity-detail-meta-item { display: flex; gap: 10px; font-size: 0.82rem; }
.activity-detail-meta-label { font-weight: 700; color: #313131; min-width: 60px; }
.activity-detail-perex { font-size: 0.9rem; font-weight: 600; color: #444; margin-bottom: 16px; line-height: 1.6; }
.activity-detail-content .prose { font-size: 0.82rem; line-height: 1.65; }
@media (max-width: 700px) {
  .activity-detail-layout { flex-direction: column; }
  .activity-detail-poster img { width: 100%; height: auto; max-height: 400px; }
}

/* ---- NEWS LIST ---- */
.news-list { list-style: none; }
.news-list-item {
  border-bottom: 1px solid #e8e8e8; padding: 18px 0;
  display: flex; gap: 16px; align-items: flex-start;
}
.news-list-date {
  min-width: 70px; text-align: center;
  background: #d00b01; color: #fff; padding: 6px 4px;
  font-size: 0.85rem; font-weight: 600; line-height: 1.3;
  flex-shrink: 0;
}
.news-list-date .day { display: block; font-size: 1.4rem; font-weight: 800; }
.news-list-date .month { display: block; font-size: 0.7rem; text-transform: uppercase; }
.news-list-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.news-list-body h3 a { color: #313131; text-decoration: none; }
.news-list-body h3 a:hover { color: #d00b01; }
.news-list-body p { font-size: 0.85rem; color: #666; }

/* ---- FEATURED LINKS (homepage) ---- */
.featured-links {
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}
.featured-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}
.featured-links-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.featured-links-row a:hover { opacity: 0.75; }
.featured-links-row img { max-height: 110px; max-width: 240px; width: auto; height: auto; object-fit: contain; }

/* ---- FOOTER ---- */
.site-footer { background: #222; color: #ccc; margin-top: 16px; }
.footer-main { padding: 36px 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col-title {
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: #fff; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 2px solid #d00b01;
}
/* IZuS events list */
.footer-events-list { list-style: none; margin: 0 0 8px; padding: 0; }
.footer-events-list li { margin-bottom: 12px; }
.footer-event-name { color: #d00b01; font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.footer-event-detail { font-size: 0.75rem; color: #aaa; line-height: 1.4; }
.footer-event-detail b { color: #ccc; }
.footer-more { display: inline-block; margin-top: 6px; font-size: 0.78rem; color: #d00b01; text-decoration: none; }
.footer-more:hover { text-decoration: underline; }
/* Partner logos */
.footer-partners-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.footer-partners-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 6px 10px;
  border-radius: 3px;
  transition: opacity 0.2s;
}
.footer-partners-logos a:hover { opacity: 0.8; }
.footer-partners-logos img { max-height: 56px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
/* Contacts */
.footer-contact-item { display: flex; flex-direction: column; margin-bottom: 4px; font-size: 0.85rem; color: #ccc; }
.footer-contact-item a { color: #ccc; text-decoration: none; }
.footer-contact-item a:hover { color: #d00b01; }
/* Footer bottom */
.footer-bottom { border-top: 1px solid #333; padding: 16px 0; }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom-logo { display: flex; align-items: center; gap: 12px; flex: 1; }
.footer-bottom-logo img { max-height: 56px; width: auto; }
.footer-bottom-logo span { font-size: 0.75rem; color: #666; }
.footer-bottom-links { display: flex; align-items: center; gap: 10px; }
.footer-bottom-links img { max-height: 46px; max-width: 80px; width: auto; opacity: 0.8; transition: opacity 0.2s; }
.footer-bottom-links a:hover img { opacity: 1; }
.footer-bottom-teachers { font-size: 0.8rem; color: #888; text-align: right; }
.footer-bottom-teachers p { font-weight: 600; color: #aaa; margin-bottom: 2px; }
.footer-bottom-teachers a { color: #888; text-decoration: none; margin-left: 8px; }
.footer-bottom-teachers a:hover { color: #d00b01; }

/* ---- RESPONSIVE ---- */

/* Tablet landscape */
@media (max-width: 1024px) {
  .header-logo { max-width: 260px; }
  .footer-partners-logos { grid-template-columns: 1fr 1fr; }
  .news-detail-wrap { max-width: 100%; }
}

/* Tablet portrait */
@media (max-width: 960px) {
  .departments-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-wrap: wrap; gap: 16px; }
  .footer-bottom-logo { flex: 1 1 100%; }
  .welcome-block h2 { font-size: 1.5rem; }
}

/* Large phone / small tablet */
@media (max-width: 700px) {
  /* Header */
  .site-header { position: relative; }
  #mainNav {
    display: none; flex-direction: column; width: 100%;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; z-index: 500;
    max-height: calc(100vh - 80px); overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-top: 2px solid #d00b01;
  }
  #mainNav.open { display: flex; }
  #mainNav > li { padding: 0; border-bottom: 1px solid #f0f0f0; }
  #mainNav > li > a { padding: 12px 16px; display: block; }
  #mainNav > li > ul {
    display: block; position: static;
    box-shadow: none; border-top: none;
    background: #f9f9f9; padding: 0;
  }
  #mainNav > li > ul > li > a { padding: 10px 16px 10px 28px; font-size: 0.82rem; }
  .nav-toggle { display: block; }
  .header-right { align-items: flex-start; width: 100%; }
  .header-social { padding: 6px 0 2px; }
  .header-logo img { max-height: 52px; }
  .header-logo { max-width: 200px; }

  /* Homepage */
  .departments-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .welcome-block h2 { font-size: 1.3rem; }
  .welcome-subtitle { font-size: 0.78rem; }
  .activities-header { flex-wrap: wrap; gap: 8px; }

  /* Activity slides — pevná šířka obrázku nahrazena 100% */
  .activity-slide-link img { width: 100%; height: 220px; }
  .activity-slide-noimg { width: 100%; height: 220px; }

  /* Nav arrows — skrýt na mobilu */
  .news-prev, .news-next, .act-prev, .act-next { display: none; }
  .activities-header .activities-nav { display: none; }

  /* News slide — compact on mobile */
  .news-slide { flex-direction: column; }
  .news-slide-date {
    width: auto; min-width: unset; flex-direction: row;
    align-items: center; justify-content: flex-start;
    gap: 6px; padding: 4px 10px; margin-bottom: 8px;
    background: #bbb;
  }
  .news-slide-date .day { font-size: 1.1rem; }
  .news-slide-date .month { font-size: 0.65rem; letter-spacing: 0; }
  .news-slide-date .year { font-size: 0.65rem; }

  /* Featured links */
  .featured-links-row { gap: 16px; }
  .featured-links-row img { max-height: 72px; max-width: 160px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-partners-logos { grid-template-columns: 1fr 1fr; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-bottom-teachers { text-align: left; }

  /* Activity detail */
  .activity-detail-layout { flex-direction: column; }
  .activity-detail-poster img { width: 100%; height: auto; max-height: 360px; }

  /* Activity list */
  .activity-list-card { flex-direction: column; }
  .activity-list-img-link img, .activity-list-noimg { width: 100%; height: 200px; }
  .activity-list-body { flex-direction: column; }
}

/* Phone */
@media (max-width: 480px) {
  .departments-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .department-item { padding: 14px 8px; }
  .department-name { font-size: 0.75rem; }
  .footer-partners-logos { grid-template-columns: 1fr 1fr; }
  .featured-links-row img { max-height: 56px; max-width: 130px; }
  .page-content h1 { font-size: 1.4rem; }
  .news-and-about { padding: 20px 0 24px; }
  .about-col { padding-top: 12px; }
  .activity-slide-link img { height: 180px; }
}
