/* ======================================
   Baťův kanál - Historie - Modern CSS
   Awwwards-inspired redesign
   ====================================== */

/* ---- Custom Properties ---- */
:root {
    --navy: #09306b;
    --navy-dark: #061e42;
    --gold: #c9a96e;
    --gold-light: #e8d5b0;
    --sand: #f5f0e8;
    --slate: #1a1a2e;
    --white: #fff;
    --grey-100: #f8f9fa;
    --grey-200: #e9ecef;
    --grey-400: #ced4da;
    --grey-600: #6c757d;
    --radius: 16px;
    --radius-sm: 8px;
    --transition: .4s cubic-bezier(.25,.46,.45,.94);
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--navy-dark);
    background: var(--white);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    text-transform: none;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.white { color: #fff; }
.bold { font-weight: 700; }

/* ---- Hero Section ---- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transform: scale(1.05);
    transition: transform 8s ease-out;
}
.hero:hover .hero-bg { transform: scale(1); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(6,30,66,.85) 0%,
        rgba(9,48,107,.6) 40%,
        rgba(201,169,110,.25) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 700px;
    padding: 0 2rem;
}
.hero-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: .95;
    margin-bottom: .8rem;
    text-shadow: 0 4px 40px rgba(0,0,0,.3);
}
.hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    opacity: .85;
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}
.hero-scroll {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
    transition: var(--transition);
    text-decoration: none;
}
.hero-scroll:hover { opacity: 1; color: var(--gold); transform: translateY(4px); }
.hero-scroll svg { animation: hero-bounce 2s ease-in-out infinite; }
@keyframes hero-bounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* legacy compat */
.jumbotron { display: none; }

/* ---- Timeline bar (legacy — hidden) ---- */
.cas { display: none; }
.cas2 { display: none; }

/* ---- Year number badge ---- */
.entry-year-badge {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 900;
    color: var(--gold);
    opacity: .15;
    line-height: 1;
    margin-bottom: -1.5rem;
    letter-spacing: -.04em;
}
.rok {
    font-size: 7rem;
    line-height: 6rem;
    color: var(--gold);
    text-align: center;
    position: absolute;
    left: 50%;
    margin-left: -90px;
    font-family: 'Playfair Display', serif;
}
.img_rok { margin-top: 80px; }
.obal { position: relative; }

/* ---- Entry image ---- */
.entry-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}
.entry-img {
    width: 100%;
    border-radius: var(--radius);
    transition: transform .6s ease;
}
.entry-img-wrap:hover .entry-img { transform: scale(1.04); }

/* ---- Entry typography ---- */
.entry-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--navy);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -.01em;
}
.entry-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

/* ---- Caption under image ---- */
.popisek {
    font-family: 'Inter', sans-serif;
    display: block;
    font-size: .78rem;
    font-weight: 500;
    text-align: right;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 12px 0 25px 0;
}

/* ---- Dark background section ---- */
.back {
    background: var(--slate);
    color: rgba(255,255,255,.8);
    padding: 60px 0;
    margin-top: 20px;
}
.back h2, .back h3, .back h4 { color: var(--white); }
.back a { color: var(--gold); }
.back a:hover { color: var(--gold-light); }
.back-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(255,255,255,.75);
}
.back img.img-fluid {
    margin-top: 24px;
    margin-bottom: 16px;
    border-radius: var(--radius);
}

/* ---- Detail button ---- */
.tlacitko {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 16px 40px;
    background: var(--gold);
    color: var(--navy-dark);
    border-radius: 50px;
    text-decoration: none;
    margin-top: 30px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(201,169,110,.3);
}
.tlacitko:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
}

/* ---- Side images ---- */
.mimon { max-width: 200px; border-radius: var(--radius-sm); }
@media (max-width: 767.98px) {
    .mimon { display: none; }
    .mobil767 { display: none; }
}

/* ---- Footer ---- */
footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.7);
    padding: 60px 0 40px;
    border-top: none;
    min-height: auto;
}
footer .copy {
    text-transform: uppercase;
    margin-top: 20px;
    font-size: .82rem;
    letter-spacing: .06em;
    color: rgba(255,255,255,.4);
}
footer .motto {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    line-height: 1.4;
    color: var(--gold);
}
.footer-logo { opacity: .8; transition: var(--transition); }
.footer-logo:hover { opacity: 1; }
.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}
.footer-links a {
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.5);
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 30px;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ---- Back to top ---- */
#zpet_nahoru {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--navy);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 48px;
    font-size: 1.5rem;
    z-index: 9999;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    transition: var(--transition);
    backdrop-filter: blur(8px);
}
#zpet_nahoru:hover { background: var(--gold); transform: translateY(-3px); }
#zpet_nahoru.show { display: flex; align-items: center; justify-content: center; }

/* ---- Documents section ---- */
.docs-section {
    padding: 80px 0;
    background: var(--grey-100);
}
.docs-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 2px 20px rgba(0,0,0,.04);
    transition: var(--transition);
    height: 100%;
}
.docs-card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
    transform: translateY(-4px);
}
.docs-card h4 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold-light);
}
.docs-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.docs-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--grey-200);
}
.docs-card li:last-child { border-bottom: none; }
.docs-card a {
    font-weight: 500;
    font-size: .95rem;
    color: var(--navy);
}
.docs-card a:hover { color: var(--gold); }

/* ---- Filter bar ---- */
#filter-bar {
    z-index: 1000;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(9,48,107,.08);
    padding: 16px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,.06);
}
.filter-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--grey-600);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: .12em;
}

/* ---- Timeline picker ---- */
#timeline-picker {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 0;
    user-select: none;
    -webkit-user-select: none;
    padding-top: 8px;
    padding-bottom: 0;
}
#timeline-picker::before {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 0; right: 0;
    height: 2px;
    background: var(--grey-200);
    border-radius: 2px;
    z-index: 0;
}
.tp-dot {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    padding: 0 2px;
}
.tp-dot .tp-label {
    font-family: 'Inter', sans-serif;
    font-size: .65rem;
    font-weight: 500;
    color: var(--grey-400);
    margin-bottom: 6px;
    white-space: nowrap;
    transition: all .3s ease;
}
.tp-dot .tp-circle {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--grey-200);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--grey-200);
    transition: all .3s ease;
    flex-shrink: 0;
}
.tp-dot:hover .tp-circle {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px var(--navy);
}
.tp-dot.tp-milestone .tp-label {
    font-weight: 700;
    color: var(--grey-600);
}

/* In-range state */
.tp-dot.tp-in-range .tp-circle {
    background: var(--navy);
    box-shadow: 0 0 0 2px var(--navy);
}
.tp-dot.tp-in-range .tp-label {
    color: var(--navy);
}
.tp-dot.tp-in-range.tp-milestone .tp-label {
    font-weight: 800;
}

/* Edge dots (the from/to handles) */
.tp-dot.tp-edge .tp-circle {
    width: 22px; height: 22px;
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--gold);
    cursor: grab;
    animation: tp-pulse 1.5s ease-in-out 1;
    position: relative;
    margin-bottom: -4px;
}
.tp-dot.tp-edge .tp-label {
    font-size: .78rem;
    font-weight: 800;
    color: var(--gold);
}
/* Handle arrows on edge dots */
.tp-dot.tp-edge .tp-circle::after {
    content: '\2194';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: var(--white);
    line-height: 1;
    pointer-events: none;
}
@keyframes tp-pulse {
    0%   { box-shadow: 0 0 0 3px var(--gold); }
    50%  { box-shadow: 0 0 0 10px rgba(201,169,110,.25); }
    100% { box-shadow: 0 0 0 3px var(--gold); }
}

/* Hint text under the timeline */
.tp-hint {
    font-family: 'Inter', sans-serif;
    font-size: .68rem;
    color: var(--grey-400);
    text-align: center;
    margin-top: 6px;
    letter-spacing: .04em;
}

/* Category buttons */
.btn-category {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    padding: 6px 20px;
    border: 1.5px solid var(--grey-200);
    border-radius: 30px;
    background: transparent;
    color: var(--grey-600);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: .02em;
}
.btn-category:hover {
    border-color: var(--navy);
    color: var(--navy);
}
.btn-category.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    box-shadow: 0 2px 12px rgba(9,48,107,.2);
}

/* Timeline entry transition */
.timeline-entry {
    overflow: hidden;
    padding: 40px 0 0;
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .8s cubic-bezier(.25,.46,.45,.94), transform .8s cubic-bezier(.25,.46,.45,.94);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Boat entries ---- */
.boat-entry .container { padding-top: 30px; padding-bottom: 30px; }
.boat-entry h2 { margin-bottom: 5px; }
.boat-entry .rounded { border-radius: var(--radius) !important; overflow: hidden; }
.boat-entry img { transition: transform .6s ease; }
.boat-entry img:hover { transform: scale(1.04); }
.rok-boat {
    position: relative;
    left: auto;
    margin-left: 0;
    font-size: 4rem;
    line-height: 4rem;
    margin-bottom: 10px;
    color: var(--gold);
}
.boat-divider {
    height: 1px;
    background: linear-gradient(to right, transparent 10%, var(--grey-200) 50%, transparent 90%);
    margin: 0;
}

/* ---- No results ---- */
#no-results p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .hero { min-height: 500px; }
    .entry-year-badge { font-size: 4rem; }
}
@media (max-width: 767.98px) {
    .hero-bg { background-attachment: scroll; }
    .entry-year-badge { font-size: 3rem; }
    .timeline-entry { padding: 20px 0 0; }
    .back { padding: 40px 0; }
    .docs-section { padding: 40px 0; }
}
