/* === THEME TOKENS ======================================================= */
:root{
  --ap-bg: #0b0e13;
  --ap-surface: #0f1320;
  --ap-card: #ffffff;
  --ap-text: #0c1222;
  --ap-muted: #667085;
  --ap-primary: #0A66C2;
  --ap-primary-600: #0956a5;
  --ap-accent: #7c5cff;
  --ap-success: #16a34a;
  --ap-chip: #f1f5f9;
  --ap-chip-text: #0b1b2b;

  --ap-radius: 16px;
  --ap-shadow: 0 10px 30px rgba(15, 23, 42, .15);
}

/* === GLOBAL LAYOUT UPGRADE ============================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.section { margin: 36px 0; }
.section__head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.section__title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin:0; letter-spacing:.2px; }
.link-more { color: var(--ap-primary); text-decoration: none; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

.container--bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 0 24px; }

/* === HERO MODERN ======================================================== */
.hero--modern { margin-top: 0; }
.hero-grid { display: grid; gap: 16px; grid-auto-rows: 1fr; }
@media (min-width: 900px){
  .hero-grid { grid-template-columns: 2fr 1fr; }
  .hero-grid .hero-card.is-featured { grid-row: span 2; }
}
.hero-card { position: relative; border-radius: var(--ap-radius); overflow: hidden; box-shadow: var(--ap-shadow); }
.hero-card__image img { width:100%; height:100%; object-fit: cover; display:block; aspect-ratio: 16/9; }
.hero-card.is-featured .hero-card__image img { aspect-ratio: 21/9; }
.hero-card__placeholder { background:#f3f4f6; aspect-ratio: 16/9; }
.hero-card__overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(4,7,14,0) 40%, rgba(4,7,14,.65) 100%);
}
.hero-card__badge{
  position:absolute; top:12px; left:12px;
  background: rgba(255,255,255,.85);
  color:#0b1325; padding:.35rem .6rem; border-radius:999px;
  font-size:.8rem; backdrop-filter: blur(6px);
}
.hero-card__title{
  position:absolute; left:16px; right:16px; bottom:42px;
  color:#fff; margin:0; font-weight:700; font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.hero-card__meta{
  position:absolute; left:16px; right:16px; bottom:12px;
  color:#eef2ff; font-size:.9rem; display:flex; gap:8px; flex-wrap:wrap;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.hero-card a { display:block; }
.hero-card:hover img { transform: scale(1.03); transition: transform .45s ease; }
.hero-card img { transition: transform .45s ease; }

/* === CHIPS FILTER RAIL ================================================== */
.filters-rail { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.chips{ display:flex; gap:8px; overflow:auto; padding-bottom:4px; }
.scroll-shadow{ -webkit-mask: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); }
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  background: var(--ap-chip); color: var(--ap-chip-text);
  text-decoration:none; border:1px solid #e6eaef; font-weight:600; white-space:nowrap;
}
.chip:hover{ border-color:#cfd8e3; }
.chip.is-active{ background:#e8f1fb; border-color:#cfe3ff; color:#0b3a7a; }

.findforme-inline .card--cta{ border-style: solid; border-color:#e8eef6; }

/* === TABS =============================================================== */
.tabs { display:flex; gap:8px; }
.tab{
  background:#fff; border:1px solid #e5e7eb; padding:8px 12px; border-radius:10px;
  font-weight:600; cursor:pointer;
}
.tab.is-active{ background:#0A66C2; color:#fff; border-color:#0A66C2; }

/* === CARD GRID UPGRADE ================================================== */
.cards-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards-grid .card{ border:1px solid #eef1f5; border-radius:16px; overflow:hidden; background:#fff; box-shadow: 0 2px 12px rgba(15,23,42,.06); }
.cards-grid .card:hover{ transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,23,42,.12); transition: all .25s ease; }

/* === CATEGORY TILES ===================================================== */
.categories-tiles{ display:grid; gap:12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tile{
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  padding:16px; border-radius:14px; text-decoration:none; color:#0e1726;
  background: linear-gradient(180deg, #fff, #f6f8fb);
  border:1px solid #edf2f7;
  box-shadow: 0 2px 10px rgba(15,23,42,.06);
}
.tile:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px rgba(15,23,42,.12); transition: all .25s ease; }
.tile__emoji{ font-size:1.4rem; }
.tile__title{ font-weight:700; }

/* === BAND (NEWSLETTER) ================================================== */
.section--band .band{
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  background: radial-gradient(1200px 480px at 20% 10%, rgba(124,92,255,.25), transparent),
              radial-gradient(1200px 520px at 80% 20%, rgba(10,102,194,.25), transparent),
              linear-gradient(180deg, #0f1320, #0b0e13);
  color:#fff; padding:48px 24px;
}
.band__content{ max-width: 1200px; margin:0 auto; text-align:center; }
.band__content h2{ margin:0 0 8px; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.band__content p{ margin:0 0 16px; color:#e6e9f2; }
.band__content .button, .band__content input, .band__content .select{
  border-radius: 12px;
}

/* === MAP ================================================================ */
.map-embed iframe{ width:100%; border-radius:16px; box-shadow: var(--ap-shadow); }

/* === ACCESSIBILITY & MOTION ============================================ */
@media (prefers-reduced-motion: reduce){
  .hero-card img, .cards-grid .card, .tile { transition: none !important; }
}


/* --- Event cards: stejné výšky, fix obrázků, clamp titulku --- */
.cards-grid .card.card--event{
  display:flex; flex-direction:column;
}
.card--event .card__image img{
  width:100%; height:auto; display:block;
  aspect-ratio: 3 / 2;           /* stejné okénko */
  object-fit: cover;              /* vyplnit bez deformace */
}
.card--event .card__body{
  display:flex; flex-direction:column; gap:8px; flex:1;
}
.card--event .card__title{
  display:-webkit-box;
  -webkit-line-clamp: 2;          /* max 2 řádky */
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: calc(1.1rem * 1.3 * 2); /* rezerva, ať se řádky neskáčou */
}
.card--event .card__meta{
  min-height: 1.8em;              /* lehká rezerva na jeden řádek meta */
}
.card--event .card__footer{
  margin-top:auto;                /* patička dolů */
}
