/*!
 * e-cestujeme.cz – společný vzhled webu (ec-ui.css)
 * Načítá se za Bootstrapem (Bootswatch Yeti) a za common.css.
 * Všechny třídy mají prefix .ec- , aby se nepletly s Bootstrapem ani se starým common.css.
 */

:root {
  --ec-header-h: 4.25rem;          /* výška lepicí hlavičky – pro sticky prvky a kotvy */
  --ec-overlay: rgba(0, 40, 60, .55);
  --ec-radius: .75rem;
  --ec-radius-sm: .5rem;
  --ec-shadow-hover: 0 .35rem 1rem rgba(0, 0, 0, .09);
}

html { scroll-padding-top: calc(var(--ec-header-h) + 1rem); }  /* kotvy (#ubytovani…) se neschovají pod hlavičku */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

.ec-skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 2000; }

/* ---------- Hlavička ---------- */
.ec-header .navbar-brand { font-weight: 700; letter-spacing: .01em; }
.ec-header .navbar-brand .fa-solid { color: var(--bs-primary); }
.ec-header .nav-link.active { color: var(--bs-primary); font-weight: 600; }
@media (min-width: 992px) {
  .ec-dropdown-countries { min-width: 30rem; }
}

/* ---------- Úvodní blok titulní stránky ---------- */
.ec-hero {
  background:
    linear-gradient(var(--ec-overlay), var(--ec-overlay)),
    var(--ec-hero-img, url("../images/more-chorvatsko-pozadi.jpg")) center / cover no-repeat;
  color: #fff;
}
.ec-hero h1 { color: #fff; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ec-hero .lead { text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.ec-hero-usp li + li { margin-top: .5rem; }

/* ---------- Záhlaví podstránek (drobečky + H1) ---------- */
.ec-page-head { background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
.ec-page-head .breadcrumb { margin-bottom: .5rem; font-size: .875rem; background: transparent; padding: 0; }
.ec-page-head h1 { font-weight: 700; margin-bottom: .25rem; }
.ec-page-head .ec-page-meta { color: var(--bs-secondary-color); }

/* varianta s fotkou (země, oblast, místo) – stejný styl jako úvod titulní stránky */
.ec-page-head--image {
  background:
    linear-gradient(var(--ec-overlay), var(--ec-overlay)),
    var(--ec-head-img) center / cover no-repeat;
  color: #fff; border-bottom: 0;
}
.ec-page-head--accommodation { --ec-head-img: url('/images/hory-rakousko-pozadi.jpg'); }
.ec-page-head--country { --ec-head-img: url('/images/rakousko-pozadi.jpg'); }
.ec-page-head--image h1 { text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ec-page-head--image .ec-page-meta,
.ec-page-head--image .breadcrumb-item,
.ec-page-head--image .breadcrumb-item.active,
.ec-page-head--image .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.85); }
.ec-page-head--image .breadcrumb a { color: #fff; }
@media (min-width: 992px) { .ec-page-head--image { padding-block: 3rem !important; } }

/* ---------- Vyhledávací karta ---------- */
.ec-search-card { border: 0; border-radius: var(--ec-radius); }
.ec-search-card .form-label { font-weight: 600; margin-bottom: .25rem; }
.ec-btn-search { padding-block: .85rem; font-weight: 600; }

/* levý panel podstránek */
@media (min-width: 992px) {
  .ec-sidebar-sticky {
    padding-bottom: .25rem;
  }
  .ec-search-panel .ec-search-card { box-shadow: none !important; border: 1px solid var(--bs-border-color); }
  .ec-search-panel--catalog .ec-search-card .col-sm-6,
  .ec-search-panel--catalog .ec-search-card .col-6,
  .ec-search-panel--catalog .ec-search-card .col-7,
  .ec-search-panel--catalog .ec-search-card .col-5,
  .ec-search-panel--catalog .ec-search-card .row-cols-sm-2 > * { width: 100%; }
}
@media (max-width: 991.98px) {
  .ec-search-panel .ec-search-card { box-shadow: none !important; }
  .ec-search-panel .ec-search-card .card-body { padding: 0 !important; }
  .ec-search-panel--catalog .ec-search-card .card-title { display: none; }
}

/* plovoucí tlačítko na mobilu */
.ec-mobile-search {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  z-index: 1030; border-radius: 2rem; padding-inline: 1.5rem;
}
.ec-has-mobile-search { padding-bottom: 4.5rem; }  /* aby tlačítko nepřekrylo patičku */
@media (min-width: 992px) { .ec-has-mobile-search { padding-bottom: 0; } }

.ec-help-card { background: var(--bs-success-bg-subtle); border-radius: var(--ec-radius); }

/* ---------- Ikony v kroužku ---------- */
.ec-icon-circle {
  width: 3rem; height: 3rem; font-size: 1.2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary);
}
.ec-icon-circle--lg { width: 3.5rem; height: 3.5rem; font-size: 1.4rem; }

/* ---------- Dlaždice (země, oblasti, místa) ---------- */
.ec-tile {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; height: 100%;
  border: 1px solid var(--bs-border-color); border-radius: var(--ec-radius-sm);
  background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.ec-tile:hover, a.ec-tile:focus-visible {
  border-color: var(--bs-primary); box-shadow: var(--ec-shadow-hover);
  transform: translateY(-2px); color: var(--bs-primary);
}
.ec-tile .fa-solid { color: var(--bs-primary); }
.ec-tile--compact { padding: .55rem .75rem; gap: .5rem; font-size: .925rem; }
.ec-filter-input { min-width: 14rem; }
.ec-tile--soon { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border-style: dashed; }
.ec-tile--soon .fa-solid { color: var(--bs-secondary-color); }

/* ---------- Karty s výhodami / obsahem ---------- */
.ec-card { border: 0; border-radius: var(--ec-radius); box-shadow: 0 .125rem .5rem rgba(0,0,0,.06); }

/* ---------- Obsah na této stránce ---------- */
.ec-toc { border-radius: var(--ec-radius); }
.ec-toc .nav-link { padding: .25rem .75rem; border-radius: 2rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); font-size: .9rem; }
.ec-toc .nav-link:hover, .ec-toc .nav-link:focus-visible { border-color: var(--bs-primary); }

/* ---------- Článek (popisy zemí, oblastí, míst) ---------- */
.ec-article { line-height: 1.7; }
.ec-article h2 { margin-top: 2rem; font-weight: 600; }
.ec-article h2:first-child { margin-top: 0; }
.ec-article .ec-figure { margin: .35rem 0 1rem; }
.ec-article .ec-figure img { border-radius: var(--ec-radius-sm); width: 100%; height: auto; }
.ec-article--country > img {
  width: 42%;
  max-width: 22rem;
  height: auto;
  border-radius: var(--ec-radius-sm);
}
@media (max-width: 767.98px) {
  .ec-article--country > img {
    float: none !important;
    width: 100%;
    max-width: 100%;
    margin: .35rem 0 1rem !important;
  }
}
@media (min-width: 768px) {
  .ec-article .ec-figure { width: 42%; max-width: 22rem; }
  .ec-article .ec-figure--start { float: left; margin-right: 1.5rem; }
  .ec-article .ec-figure--end   { float: right; margin-left: 1.5rem; }
}
.ec-article::after { content: ""; display: table; clear: both; }

.ec-section-title { font-weight: 600; margin-bottom: 1rem; }

/* ---------- Mapa ---------- */
.ec-map { border-radius: var(--ec-radius); overflow: hidden; border: 1px solid var(--bs-border-color); }
.ec-map > #mapa_poi, .ec-map > #mapa_obj { height: 26rem; }
@media (max-width: 575.98px) { .ec-map > #mapa_poi, .ec-map > #mapa_obj { height: 18rem; } }

/* ---------- Karta ubytování (místo, výsledky) ---------- */
.ec-object-card { border: 1px solid var(--bs-border-color); border-radius: var(--ec-radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ec-object-card:hover, .ec-object-card:focus-within { box-shadow: var(--ec-shadow-hover); transform: translateY(-2px); }
.ec-object-card .ec-object-img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--bs-tertiary-bg); }
.ec-object-card .card-title a { color: inherit; text-decoration: none; }
.ec-object-card--off .ec-object-img { filter: grayscale(.7); opacity: .75; }
.ec-object-card--off .card-title a { color: var(--bs-secondary-color); }
.ec-price { font-weight: 700; font-size: 1.15rem; color: var(--bs-success); white-space: nowrap; }
.ec-price-old { text-decoration: line-through; color: var(--bs-secondary-color); font-size: .875rem; white-space: nowrap; }
.ec-stars { color: #f5a623; font-size: .85rem; letter-spacing: .05em; white-space: nowrap; }
.ec-stars .ec-star-empty { color: var(--bs-border-color); }

/* výsledek hledání – vodorovná karta */
@media (min-width: 768px) {
  .ec-result .ec-object-img { height: 100%; aspect-ratio: auto; min-height: 12rem; }
}

/* ---------- Detail objektu / pokoje ---------- */
.ec-gallery { border-radius: var(--ec-radius); overflow: hidden; }
.ec-gallery .carousel-item img { aspect-ratio: 3 / 2; object-fit: cover; }
.ec-summary { border-radius: var(--ec-radius); }
@media (min-width: 992px) { .ec-summary-sticky { position: sticky; top: calc(var(--ec-header-h) + 1rem); } }
.ec-amenities li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.ec-amenities .ec-yes { color: var(--bs-success); }
.ec-amenities .ec-no  { color: var(--bs-secondary-color); }
.ec-amenities li.ec-off { color: var(--bs-secondary-color); }

/* filtry (obsazenost, délka pobytu) */
.ec-filter-group .btn { min-width: 5.5rem; }

/* ---------- Tabulka termínů – na mobilu jako karty ---------- */
.ec-terms td .ec-price { font-size: 1rem; }
@media (max-width: 767.98px) {
  .ec-terms thead { display: none; }
  .ec-terms, .ec-terms tbody, .ec-terms tr, .ec-terms td { display: block; width: 100%; }
  .ec-terms tr {
    border: 1px solid var(--bs-border-color); border-radius: var(--ec-radius-sm);
    margin-bottom: .75rem; padding: .5rem .75rem; background: var(--bs-body-bg);
  }
  .ec-terms td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .ec-terms td::before { content: attr(data-label); font-weight: 600; text-align: left; color: var(--bs-secondary-color); }
  .ec-terms td.ec-term-action::before { content: none; }
  .ec-terms td.ec-term-action { padding-top: .5rem; }
  .ec-terms td.ec-term-action .btn { width: 100%; }
  .ec-terms.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: transparent; }
}

/* ---------- Výsledky hledání (souhrn podle zemí / oblastí) ---------- */
.ec-criteria .badge { font-weight: 500; }
.ec-region-list .list-group-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.ec-region-list .list-group-item:hover { background: var(--bs-tertiary-bg); }

/* ---------- Formuláře (kontakty, rezervace) ---------- */
.ec-form-card .form-label { font-weight: 600; }
.ec-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* past na roboty */

/* ---------- Informační stránky ---------- */
.ec-prose { max-width: 48rem; line-height: 1.7; }
.ec-info-nav .list-group-item.active { font-weight: 600; }

/* ---------- Patička ---------- */
.ec-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.ec-footer a:hover, .ec-footer a:focus-visible { color: #fff; text-decoration: underline; }

/* ---------- Omezené animace ---------- */
@media (prefers-reduced-motion: reduce) {
  .ec-tile, .ec-object-card { transition: none; }
  a.ec-tile:hover, .ec-object-card:hover { transform: none; }
}

/* nadpis na fotce vždy bílý (některá témata barví nadpisy) */
.ec-page-head--image h1, .ec-page-head--image .lead { color: #fff; }
