/* =========================================================
   ÚHŠ Jánské koupele — redesign homepage
   Vzdušný, čistý vzhled; branding: navy + hasičská červená
   ========================================================= */

:root {
    --navy: #0e294b;
    --navy-dark: #0a1f3a;
    --navy-soft: #43597a;
    --red: #d81515;
    --red-dark: #b01111;
    --red-tint: #fdeeee;
    --blue: #2fa8e1;
    --blue-dark: #1b7fb8;
    --blue-tint: #e8f2fa;
    --bg: #ffffff;
    --bg-soft: #eef5fb;
    --line: #e3ebf2;
    --text: #46586d;
    --heading: var(--navy);
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(14, 41, 75, 0.06);
    --shadow-md: 0 12px 32px rgba(14, 41, 75, 0.10);
    --section-pad: clamp(64px, 9vw, 112px);
    --header-h: 78px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
    width: min(1200px, 100% - 48px);
    margin-inline: auto;
}

/* ---------- Typografie ---------- */

h1, h2, h3 {
    color: var(--heading);
    line-height: 1.18;
    font-weight: 700;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }

.kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-dark);
    margin-bottom: 10px;
}

.lead {
    font-size: clamp(1.02rem, 1.4vw, 1.15rem);
    max-width: 34em;
    margin-top: 18px;
}

.accent { color: var(--red); }

/* Šipky v odkazech */
.arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}

/* ---------- Tlačítka ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(216, 21, 21, 0.25);
}

.btn-primary:hover {
    background: var(--red-dark);
    box-shadow: 0 10px 24px rgba(216, 21, 21, 0.3);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--navy);
    background: #fff;
}

.btn-ghost:hover {
    border-color: var(--navy);
}

.btn-sm { padding: 9px 22px; font-size: 0.9rem; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

/* ---------- Přeskočit na obsah ---------- */

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transform: translateY(-200%);
}

.skip-link:focus-visible {
    transform: none;
}

/* ---------- Hlavička ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: var(--header-h);
}

.brand { flex-shrink: 0; }
.brand img { width: 150px; height: auto; }

.main-nav { margin-left: auto; }

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.main-nav a {
    display: block;
    padding: 8px 13px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--navy);
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.main-nav a:hover { background: var(--bg-soft); }

.main-nav a.is-active {
    color: var(--red);
    font-weight: 600;
}

/* Přihlášení uvnitř menu — jen pro mobilní panel */
.nav-item-login { display: none; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.login-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy-soft);
    white-space: nowrap;
}

.login-link:hover { color: var(--navy); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
    background:
        radial-gradient(720px 420px at 85% 0%, rgba(47, 168, 225, 0.10), transparent 65%),
        linear-gradient(180deg, #f2f7fb 0%, #ffffff 100%);
    padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 8vw, 96px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin-top: 26px;
}

.hero-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}

.hero-chips li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

/* Video karta */
.video-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-md);
}

.video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 8px);
    background: var(--navy-dark);
    display: block;
}

.video-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.video-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.video-tab:hover { background: #eaf2f8; }

.video-tab.is-active {
    background: #fff;
    border-color: var(--red);
    cursor: default;
}

.video-tab img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.video-tab-text { display: flex; flex-direction: column; min-width: 0; }

.video-tab-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-tab-text small {
    font-size: 0.76rem;
    color: var(--navy-soft);
}

/* ---------- Sekce ---------- */

.section { padding: var(--section-pad) 0; }

.section-soft { background: var(--bg-soft); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(30px, 4vw, 46px);
}

.section-head .kicker { margin-bottom: 6px; }

.link-more {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--red);
    white-space: nowrap;
    padding-bottom: 4px;
}

.link-more:hover { color: var(--red-dark); }
.link-more:hover .arrow { transform: translateX(4px); }

/* ---------- Novinky ---------- */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
    gap: 24px;
}

.news-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-soft);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.news-card:hover .news-thumb img { transform: scale(1.045); }

.news-thumb--contain img,
.news-thumb--placeholder img {
    object-fit: contain;
    padding: 22px;
}

.news-thumb--placeholder {
    background: linear-gradient(135deg, #eef5fa 0%, #f8fbfd 100%);
}

.news-thumb--placeholder img {
    max-width: 200px;
    margin-inline: auto;
    opacity: 0.85;
}

.news-card:hover .news-thumb--contain img,
.news-card:hover .news-thumb--placeholder img { transform: none; }

.news-date {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    color: var(--navy);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.news-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    flex: 1;
}

.news-body h3 {
    font-size: 1.02rem;
    line-height: 1.35;
}

.news-body p {
    font-size: 0.88rem;
    color: var(--navy-soft);
}

.news-more {
    margin-top: auto;
    padding-top: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--red);
}

.news-card:hover .news-more { color: var(--red-dark); }
.news-card:hover .news-more .arrow { transform: translateX(4px); }

/* ---------- Kurzy ---------- */

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 24px;
}

.course-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 21, 21, 0.35);
    box-shadow: var(--shadow-md);
}

.course-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--red-tint);
    color: var(--red);
}

.course-icon svg { width: 24px; height: 24px; }

.course-name {
    font-weight: 700;
    color: var(--navy);
    font-size: 1.02rem;
    line-height: 1.4;
}

.course-desc {
    font-size: 0.88rem;
    color: var(--navy-soft);
}

.course-more {
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--red);
}

.course-card:hover .course-more { color: var(--red-dark); }
.course-card:hover .course-more .arrow { transform: translateX(4px); }

/* ---------- Projekty ---------- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 18px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    background: var(--blue-tint);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.project-item small {
    font-weight: 500;
    color: var(--navy-soft);
}

.project-item .arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.project-item:hover {
    background: #dcecf8;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.project-item:hover .arrow {
    transform: translateX(3px);
    background: var(--blue-dark);
}

/* ---------- Areál ---------- */

.areal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.areal-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
}

.areal-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.areal-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10, 31, 58, 0.72) 100%);
}

.areal-card:hover img { transform: scale(1.05); }

.areal-label {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 1;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* ---------- Partneři ---------- */

.partners {
    padding: clamp(48px, 6vw, 72px) 0;
    border-top: 1px solid var(--line);
}

.partners-title {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy-soft);
    margin-bottom: 34px;
}

.partners-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 5vw, 56px);
}

.partners-row img {
    height: 52px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.7;
}

/* ---------- Patička ---------- */

.site-footer {
    background: var(--navy);
    color: #b9c7d9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    padding: clamp(52px, 7vw, 80px) 0;
}

.footer-col h3 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.footer-about address {
    font-style: normal;
    line-height: 1.8;
    font-size: 0.94rem;
}

.footer-about strong { color: #fff; }

.footer-menu,
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-menu a,
.footer-contact a {
    font-size: 0.94rem;
    transition: color 0.15s ease;
}

.footer-menu a:hover,
.footer-contact a:hover { color: #fff; }

.footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.82rem;
    color: #8fa2ba;
}

.footer-bottom a {
    color: #b9c7d9;
    font-weight: 600;
}

.footer-bottom a:hover { color: #fff; }

/* ---------- Podstránky ---------- */

.page-hero {
    background:
        radial-gradient(640px 360px at 90% 10%, rgba(47, 168, 225, 0.25), transparent 65%),
        linear-gradient(135deg, var(--navy) 0%, #123a66 55%, #16558c 100%);
    color: #cfe2f2;
    padding: clamp(44px, 6.5vw, 76px) 0;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 800;
}

.page-hero .lead {
    color: #cfe2f2;
    margin-top: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #a8cbe4;
    margin-bottom: 14px;
}

.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: 0.55; }

.prose { max-width: 780px; }

.prose p + p { margin-top: 14px; }

.prose h2 {
    font-size: 1.45rem;
    margin: 36px 0 12px;
}

.prose h3 {
    font-size: 1.15rem;
    margin: 26px 0 10px;
}

.prose ul,
.prose ol { margin: 14px 0 14px 22px; }

.prose li + li { margin-top: 6px; }

.prose img {
    border-radius: var(--radius);
    margin: 22px 0;
}

.prose a {
    color: var(--red);
    font-weight: 600;
}

.prose a:hover { color: var(--red-dark); }

/* ---------- Animace při scrollu ----------
   Skryté jen s aktivním JS (<html class="js">), jinak je vše viditelné */

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

.site-footer a:focus-visible {
    outline-color: #fff;
}

/* ---------- Responzivita ---------- */

/* Užší desktop: zhuštění navigace, ať se vejde až do 1200 px */
@media (max-width: 1340px) {
    .header-inner { gap: 16px; }
    .main-nav a { padding: 8px 9px; font-size: 0.88rem; }
}

@media (max-width: 1200px) {
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        margin: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
    }

    .nav-open .main-nav {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    body.nav-open { overflow: hidden; }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 20px;
    }

    .main-nav a {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .nav-item-login {
        display: block;
        border-top: 1px solid var(--line);
        margin-top: 8px;
        padding-top: 8px;
    }

    .nav-toggle { display: flex; }
    .login-link { display: none; }
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-media {
        max-width: 620px;
        width: 100%;
        margin-inline: auto;
    }
    .areal-grid { grid-template-columns: 1fr; }
    .areal-card { aspect-ratio: 16 / 9; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .container { width: min(1200px, 100% - 40px); }
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .hero-cta .btn { flex: 1 1 auto; }
    .video-switch { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-inner { justify-content: center; text-align: center; }
}

/* Malé telefony: zmenšit logo a rozestupy, ať se hlavička vejde */
@media (max-width: 480px) {
    .brand img { width: 120px; }
    .header-inner { gap: 12px; }
    .header-actions { gap: 10px; }
    .btn-sm { padding: 8px 16px; font-size: 0.86rem; }
}
