/* =========================================================
   Piaristé Strážnice – MOBILNÍ ÚPRAVY (mobil-upravy.css)
   Platí jen pro šířku < 992 px, desktop se nemění.
   Načítá se z doplňků stránek: <link rel="stylesheet" href="/images_static/files/obrazky/mobil-upravy.css">
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap");
@media (max-width: 991px) {

  /* --- Horní oranžová lišta: tenčí, ikony YouTube/Facebook na střed --- */
  #header .header-top { min-height: 0 !important; height: 36px; overflow: hidden; }
  #header .header-top .header-row.py-2 { padding-top: 5px !important; padding-bottom: 5px !important; min-height: 0; }
  #header .header-top .container { min-height: 0; }
  #header .header-top .header-column:first-child { display: none; } /* prázdný sloupec s citátem */
  #header .header-top .header-column.justify-content-end .header-row { justify-content: center; gap: 18px; }
  #header .header-top a img { height: 16px; width: auto; }

  /* --- Řádek s logem: znak vlevo, vedle něj „PIARISTÉ STRÁŽNICE“, vpravo hamburger --- */
  #header .header-body { position: relative; }
  #header { height: 129px !important; } /* 36 lišta + 68 logo + 25 (záporný okraj šablony) – aby citát nezajížděl pod hlavičku */
  #header .header-body > .header-container > .header-row { padding: 10px 64px 10px 0 !important; min-height: 68px; }
  #header .header-logo { margin: 0 !important; }
  #header .wt-logo { display: flex; align-items: center; text-decoration: none; }
  #header .wt-logo img { order: -1; width: 46px; height: auto; margin: 0 12px 0 0; } /* znak na začátek */
  #header .wt-logo span {                       /* písmo Cinzel (Google Fonts) */
    font-family: "Cinzel", "Playfair Display", serif;
    font-size: 17px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    line-height: 1; color: #212529; white-space: nowrap;
  }
  #header .wt-logo span:first-of-type { margin-right: .45em; } /* mezera Piaristé – Strážnice */

  /* --- Lišta s menu se přesune do řádku s logem (už žádný samostatný řádek) --- */
  #header .header-nav-bar {
    position: absolute !important; left: 0; right: 0; top: 36px; bottom: auto;
    height: 68px; background: transparent !important; border: 0 !important;
    pointer-events: none; z-index: 5;
  }
  #header .header-nav-bar .header-container,
  #header .header-nav-bar .header-row,
  #header .header-nav-bar .header-column,
  #header .header-nav-bar .header-nav { height: 68px !important; min-height: 0 !important; }

  /* --- Hamburger: jen oranžové čárky, bez rámečku a pozadí --- */
  #header .header-btn-collapse-nav {
    pointer-events: auto; margin: 0 !important;
    width: 44px; height: 44px; padding: 0; border-radius: 0; font-size: 24px;
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; color: #da7940 !important;
  }
  #header .header-btn-collapse-nav:focus,
  #header .header-btn-collapse-nav:active { outline: 0; box-shadow: none !important; }

  /* --- Rozbalené menu --- */
  #header .header-nav-main { pointer-events: auto; top: 68px !important; }
  #header .header-nav-main nav {
    background: #fff;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    border-top: 3px solid #da7940;
    max-height: calc(100vh - 120px) !important;
    padding: 4px 20px 12px !important;
  }
  #header .header-nav-main nav > ul > li { border-bottom: 1px solid #eee; }
  #header .header-nav-main nav > ul > li:last-child { border-bottom: 0; }
  #header .header-nav-main nav > ul > li > a { font-size: 15px !important; padding: 14px 4px !important; letter-spacing: .5px; }
  #header .header-nav-main nav > ul > li > a > i { font-size: 12px; }
  #header .header-nav-main nav > ul li ul li a { font-size: 14px !important; padding: 10px 16px !important; text-transform: none; }

  /* --- Přilepená hlavička při scrollu: schová jen oranžovou lištu, logo + menu zůstanou --- */
  html.sticky-header-active #header .header-body {
    top: -36px !important;
    margin-top: 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
  }
}

/* Malé telefony (šířka 360 px a méně) – menší nápis, aby se vešel vedle hamburgeru */
@media (max-width: 374px) {
  #header .wt-logo img { width: 40px; margin-right: 10px; }
  #header .wt-logo span { font-size: 14px; letter-spacing: .5px; }
}

/* =========================================================
   Aktuality na mobilu – kompaktní karty (obrázek vlevo, text vpravo)
   ========================================================= */
@media (max-width: 991px) {
  .ak-row > div { padding-bottom: 0 !important; margin-bottom: 14px !important; }
  .ak-row article.thumb-info { display: flex !important; flex-direction: row !important; align-items: stretch; min-height: 112px; }

  /* obrázek – čtverec 112 px, ořez na střed */
  .ak-row .thumb-info-wrapper { flex: 0 0 112px; width: 112px; height: auto !important; overflow: hidden; margin: 0 !important; }
  .ak-row .thumb-info-wrapper > a { display: block; height: 100%; }
  .ak-row .thumb-info-wrapper img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; transform: none !important; }

  /* menší štítek s datem */
  .ak-row .ak-date { top: 6px !important; left: 6px !important; padding: 3px 6px !important; line-height: 1; }
  .ak-row .ak-date b { font-size: 15px !important; line-height: 1; }
  .ak-row .ak-date small { font-size: 9px !important; display: block; }

  /* text */
  .ak-row .thumb-info-caption { flex: 1; min-width: 0; padding: 10px 14px !important; display: flex !important; flex-direction: column; justify-content: center; }
  .ak-row .custom-event-infos ul { margin: 0 0 2px !important; padding: 0; }
  .ak-row .custom-event-infos li { font-size: 10.5px !important; }
  .ak-row .thumb-info-caption-text h4 { font-size: 15px !important; line-height: 1.25 !important; margin: 0 0 3px !important; }
  .ak-row .thumb-info-caption-text p {          /* popisek max. 2 řádky */
    font-size: 13px; line-height: 1.35; margin: 0 0 4px !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .ak-row .thumb-info-caption-text .ak-more { font-size: 12px; }
}

/* =========================================================
   Sekce „Komunita piaristů v České republice“ na mobilu – decentněji
   ========================================================= */
@media (max-width: 991px) {
  section.custom-section-padding-1 { padding: 36px 0 44px !important; }
  section.custom-section-padding-1 .col-md-8 > img { width: 62px !important; height: auto !important; margin-bottom: 12px !important; }
  section.custom-section-padding-1 h2 { font-size: 19px !important; line-height: 1.3 !important; margin: 0 0 12px !important; letter-spacing: .2px; }
  section.custom-section-padding-1 .km-lead { font-size: 14px !important; line-height: 1.65 !important; color: #6b6f78 !important; max-width: 320px; margin: 0 auto !important; }
}

/* =========================================================
   Podstránky – nižší pruh s nadpisem a drobečkovou navigací
   ========================================================= */
@media (max-width: 991px) {
  section.page-header.page-header-modern.page-header-background { padding: 22px 0 !important; } /* silnější selektor než styl z web-v11.js */
  .page-header.page-header-modern .row.my-5 { margin-top: 0 !important; margin-bottom: 0 !important; }
  .page-header.page-header-modern h1 { font-size: 24px !important; line-height: 1.2 !important; margin-bottom: 4px !important; }
  .page-header.page-header-modern p { font-size: 11px !important; letter-spacing: .5px; }
}

/* =========================================================
   Kontakty – menší fotka vedle textu místo fotky přes celou šířku
   ========================================================= */
@media (max-width: 991px) {
  .kt-people .kt-person { flex-direction: row !important; align-items: flex-start; gap: 16px; text-align: left !important; }
  .kt-people .kt-person > img {
    flex: 0 0 96px; width: 96px !important; height: 120px !important;
    object-fit: cover; object-position: center top; align-self: flex-start; border-radius: 8px; margin: 0 !important;
  }
  .kt-people .kt-person > div { flex: 1; min-width: 0; }
  .kt-people .kt-person h3 { font-size: 18px !important; margin-bottom: 2px !important; }
  .kt-people .kt-person .kt-titul { font-size: 11px !important; margin-bottom: 6px !important; }
  .kt-people .kt-person ul { font-size: 13px !important; padding-left: 16px; text-align: left; margin-bottom: 8px !important; }
  .kt-people .kt-person li { line-height: 1.45 !important; }
}

/* =========================================================
   Ohlášky – zmenšit zvětšené nadpisy vložené z Wordu
   ========================================================= */
@media (max-width: 991px) {
  .ohl-doc span[style*="font-size:1."],
  .ohl-doc span[style*="font-size: 1."] { font-size: 1.08em !important; }
}

/* =========================================================
   Fotky vložené do textu stránek s pevnou výškou z editoru
   (např. Ministranti) – na mobilu se nebudou deformovat
   ========================================================= */
@media (max-width: 991px) {
  .row.hlavni p img[style*="height"] { height: auto !important; max-width: 100% !important; }
}

/* =========================================================
   Tabulky v textu stránek (např. kontakty vedoucích u Ministrantů)
   – na mobilu pod sebou: jméno, telefon, e-mail
   ========================================================= */
@media (max-width: 767px) {
  .row.hlavni table { float: none !important; display: block; width: 100% !important; margin: 0 0 16px !important; }
  .row.hlavni table thead, .row.hlavni table tbody, .row.hlavni table tr { display: block; width: 100%; }
  .row.hlavni table th:not(:first-child) { display: none; }
  .row.hlavni table th, .row.hlavni table td { display: block; width: auto !important; padding: 0 !important; border: 0 !important; }
  .row.hlavni table tbody tr { padding: 10px 0; border-bottom: 1px solid #eee; }
  .row.hlavni table tbody tr:last-child { border-bottom: 0; }
  .row.hlavni table p { margin: 0 !important; text-align: left !important; }
  .row.hlavni table td:first-child { font-weight: 700; color: #212529; }
  .row.hlavni table a { word-break: break-word; }
}

/* =========================================================
   Patička – skrýt odkaz na Facebook (zůstává jen v hlavičce)
   Platí pro mobil i desktop.
   ========================================================= */
#footer .wt-fbot a[href*="facebook"],
#footer .wt-fbot a[href*="facebook"] + br { display: none !important; }

/* =========================================================
   Archiv Studánky 2020–2025 (tabulka .cs-table) – na mobilu karty
   s popisky Studánka / Lektoři / Akce u každého odkazu
   ========================================================= */
@media (max-width: 767px) {
  .row.hlavni table.cs-table thead { display: none; }
  .row.hlavni table.cs-table tbody tr { padding: 12px 14px; margin-bottom: 10px; border: 1px solid #eee; border-radius: 8px; background: #fff; }
  .row.hlavni table.cs-table tbody tr:last-child { border-bottom: 1px solid #eee; }
  .row.hlavni table.cs-table td:first-child { font-size: 16px; margin-bottom: 4px; }
  .row.hlavni table.cs-table td:not(:first-child) { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 !important; border-top: 1px solid #f3ece6 !important; }
  .row.hlavni table.cs-table td:not(:first-child)::before { color: #6c6f73; font-size: 13px; }
  .row.hlavni table.cs-table td:nth-child(2)::before { content: "Studánka"; }
  .row.hlavni table.cs-table td:nth-child(3)::before { content: "Lektoři"; }
  .row.hlavni table.cs-table td:nth-child(4)::before { content: "Akce"; }
}
