/* ============================================================
   ZŠ Krásného 24 – hlavní styly veřejné části webu
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: #fff; color: #1a1a1a; font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── HORNÍ LIŠTA ── */
.hdr-top { background: #f7f7f7; border-bottom: 1px solid #efefef; padding: 6px 0; }
.hdr-top-inner { max-width: 1060px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.hdr-top a { font-size: 12px; color: #666; display: flex; align-items: center; gap: 5px; transition: color .12s; }
.hdr-top a:hover { color: #FF9123; }
.icon-logo { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }
.icon-logo-inline { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.icon-social { width: 14px; height: 14px; flex-shrink: 0; }

/* ── HEADER ── */
.hdr { background: #fff; box-shadow: 0 1px 0 #f0f0f0; position: sticky; top: 0; z-index: 200; }
.hdr-inner { max-width: 1060px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.logo-area { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-img { width: 52px; height: 52px; border-radius: 50%; object-fit: contain; border: 2px solid #e8f0e8; background: #f5fbf5; padding: 2px; }
.logo-text strong { display: block; font-size: 15px; font-weight: 700; color: #1a1a1a; line-height: 1.2; white-space: nowrap; }
.logo-text span { font-size: 12px; color: #888; white-space: nowrap; }

/* Navigace */
.nav-toggle { display: none; width: 40px; height: 40px; border: none; background: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #333; border-radius: 2px; }
.nav-overlay { display: none; }
.nav-close { display: none; }
body.nav-open { overflow: hidden; }
.main-nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.main-nav > a,
.main-nav > .has-sub > a { font-size: 13.5px; color: #333; padding: 8px 11px; border-radius: 6px; transition: background .12s, color .12s; display: block; white-space: nowrap; }
.main-nav > a:hover,
.main-nav > .has-sub > a:hover { background: #f5f5f5; color: #FF9123; }
.main-nav > a.active,
.main-nav > .has-sub > a.active { color: #FF9123; font-weight: 600; }

/* Dropdown */
.has-sub { position: relative; }
.has-sub::before { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 6px; }
.sub-toggle { display: none; }
.sub-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid #efefef; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.1); min-width: 210px; padding: 6px; z-index: 300; }
.sub-menu a { display: block; padding: 8px 12px; font-size: 13px; color: #333; border-radius: 6px; transition: background .1s, color .1s; }
.sub-menu a:hover { background: #fff4ea; color: #FF9123; }

/* Dropdown – jen na šířkách nad 900px (najetí myší) */
@media (min-width: 901px) {
  .has-sub > a::after { content: ' ▾'; font-size: 10px; opacity: .5; }
  .has-sub:hover .sub-menu { display: block; }
}

/* Barevný proužek */
.hdr-accent { height: 4px; background: linear-gradient(90deg, #FF9123 0%, #FFCC00 40%, #FF3D3D 100%); position: sticky; top: 72px; z-index: 199; }

/* ── HERO ── */
.hero-slider-wrap { padding: 24px 0 32px; }
.hero-slider { position: relative; width: 100%; height: 340px; overflow: hidden; background: #1a1a1a; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; }
.btn-primary { background: #FF9123; color: #fff; padding: 13px 26px; border-radius: 9px; font-size: 15px; font-weight: 600; transition: background .15s; display: inline-block; }
.btn-primary:hover { background: #e07d10; color: #fff; }
.btn-secondary { background: #fff; color: #333; border: 1.5px solid #e0e0e0; padding: 12px 24px; border-radius: 9px; font-size: 15px; font-weight: 500; transition: border-color .15s, color .15s; display: inline-block; }
.btn-secondary:hover { border-color: #FF9123; color: #FF9123; }

/* ── RYCHLÉ DLAŽDICE ── */
.quick-links { padding: 0 24px 8px; }
.quick-links-inner { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.qcard { background: #fff; border: 1px solid #efefef; border-radius: 14px; padding: 20px 14px 18px; text-align: center; transition: box-shadow .15s, transform .15s; display: block; color: #1a1a1a; }
.qcard:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-3px); color: #1a1a1a; }
.qcard-icon { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 12px; display: block; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 1px #efefef; transition: box-shadow .15s; }
.qcard:hover .qcard-icon { box-shadow: 0 0 0 1px #FFD8A8; }
.qi-orange { background: #FFF0E0; }
.qi-yellow { background: #FFF8E0; }
.qi-red    { background: #FFE8E8; }
.qcard h3 { font-size: 15.6px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; }
.qcard p  { font-size: 12px; color: #999; line-height: 1.4; }

/* ── OBECNÝ SECTION ── */
.section { padding: 52px 24px; }
.section-alt { background: #FAFAFA; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.section-inner { max-width: 1060px; margin: 0 auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ''; display: inline-block; width: 5px; height: 22px; background: #FF9123; border-radius: 3px; flex-shrink: 0; }
.section-head a { font-size: 13.5px; color: #FF9123; font-weight: 500; }
.section-head a:hover { text-decoration: underline; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #f0f0f0; display: flex; align-items: center; gap: 10px; }
.page-title::before { content: ''; display: inline-block; width: 5px; height: 28px; background: #FF9123; border-radius: 3px; }

/* ── AKTUALITY – GRID ── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { border: 1px solid #efefef; border-radius: 14px; overflow: hidden; transition: box-shadow .15s; display: block; color: #1a1a1a; }
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); color: #1a1a1a; }
.news-card-img { height: 160px; overflow: hidden; background: linear-gradient(135deg, #FFF0E0, #FFE0C0); display: flex; align-items: center; justify-content: center; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img-placeholder { font-size: 48px; }
.news-card-body { padding: 18px; }
.news-tag { font-size: 11px; font-weight: 700; color: #FF9123; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.news-card h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.news-card p { font-size: 13px; color: #666; line-height: 1.55; }
.news-date { font-size: 12px; color: #bbb; margin-top: 12px; }
.news-empty { color: #999; font-size: 14px; padding: 32px 0; }

/* ── AKTUALITY – DETAIL ── */
.news-detail img { border-radius: 10px; margin-bottom: 20px; max-height: 400px; width: 100%; object-fit: cover; }
.news-detail-content { font-size: 15px; line-height: 1.75; color: #333; }
.news-detail-content p { margin-bottom: 1em; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: #FF9123; font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.back-link:hover { text-decoration: underline; }

/* ── INFO GRID (úvod) ── */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.info-card { border: 1px solid #efefef; border-radius: 14px; padding: 24px; }
.info-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-card-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.info-card-icon svg { width: 22px; height: 22px; }
.info-card-icon.qi-orange { color: #FF9123; }
.info-card-icon.qi-yellow { color: #CC6E00; }
.info-card-icon.qi-red { color: #FF3D3D; }
.info-card h3 { font-size: 16px; font-weight: 700; }
.info-card p { font-size: 13.5px; color: #555; line-height: 1.6; }
.info-card .more-link { font-size: 13px; color: #FF9123; font-weight: 500; display: inline-block; margin-top: 12px; }
.info-card .more-link:hover { text-decoration: underline; }

/* ── JÍDELNÍČEK ── */
.jidelnicek-info { color: #555; font-size: 14.5px; line-height: 1.65; }
.jidelnicek-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.jidelnicek-table th { background: #FFF4E8; color: #CC6E00; font-size: 13px; font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 2px solid #FFD8A8; }
.jidelnicek-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: top; }
.jidelnicek-table tr:last-child td { border-bottom: none; }
.jidelnicek-table tr:hover td { background: #FAFAFA; }
.jidelnicek-date { font-weight: 600; white-space: nowrap; color: #1a1a1a; }
.jidelnicek-empty { padding: 32px 0; color: #999; font-size: 14px; text-align: center; }

/* ── DOKUMENTY ── */
.doc-category { margin-bottom: 32px; }
.doc-category h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #f0f0f0; display: flex; align-items: center; gap: 8px; }
.doc-category h3::before { content: '📁'; font-size: 16px; }
.doc-list { list-style: none; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.doc-list li:last-child { border-bottom: none; }
.doc-list a { font-size: 14px; color: #1a1a1a; flex: 1; transition: color .12s; }
.doc-list a:hover { color: #FF9123; }
.doc-size { font-size: 12px; color: #bbb; }
.doc-icon { font-size: 18px; flex-shrink: 0; }

/* ── TABULKA (obecná) ── */
.public-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.public-table th { background: #f7f7f7; font-size: 13px; font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.public-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.public-table tr:last-child td { border-bottom: none; }

/* ── FOOTER ── */
.site-footer { background: #1c1c1c; color: #aaa; padding: 48px 24px 24px; margin-top: 56px; }
.footer-inner { max-width: 1060px; margin: 0 auto; }
.footer-accent { height: 3px; background: linear-gradient(90deg, #FF9123, #FFCC00, #FF3D3D); margin-bottom: 40px; border-radius: 2px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-grid p { font-size: 13px; line-height: 1.8; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 6px; }
.footer-grid ul a { font-size: 13px; color: #888; transition: color .12s; display: flex; align-items: center; gap: 6px; }
.footer-grid ul a:hover { color: #FF9123; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { color: #aaa; transition: color .12s; }
.footer-social a:hover { color: #FF9123; }
.footer-social .icon-social { width: 22px; height: 22px; }
.footer-bottom { border-top: 1px solid #2e2e2e; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #555; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: #555; transition: color .12s; }
.footer-bottom a:hover { color: #FF9123; }
.footer-links { display: flex; gap: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-links-inner { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .hero-slider { height: 200px; }

  /* Mobilní navigace – výsuvný panel zprava */
  .nav-toggle { display: flex; }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 900; }
  .nav-overlay.open { opacity: 1; visibility: visible; }
  .nav-close { display: flex; align-items: center; justify-content: center; align-self: flex-end; width: 36px; height: 36px; margin-bottom: 8px; border: none; border-radius: 50%; background: #f5f5f5; color: #333; font-size: 16px; cursor: pointer; }
  .main-nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 82vw); flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; background: #fff; padding: 16px 20px 24px; box-shadow: -8px 0 28px rgba(0,0,0,.18); overflow-y: auto; z-index: 1000; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s ease; }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav > a { width: 100%; }
  .has-sub { width: 100%; display: flex; flex-wrap: wrap; align-items: center; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; background: none; font-size: 14px; color: #666; cursor: pointer; transition: transform .15s; }
  .sub-toggle[aria-expanded="true"] { transform: rotate(180deg); }
  .sub-menu { position: static; display: none; width: 100%; box-shadow: none; border: none; padding: 0 0 6px 14px; }
  .has-sub.open .sub-menu { display: block; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .quick-links-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
