/* Základní styly pro olkowitz.cz */

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== Header a navigace ===== */
header {
    background-color: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

/* Přidává se přes main.js při scrollu dolů */
header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 64px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.8rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

nav a:hover {
    color: #0133C5;
}

nav a[aria-current="page"] {
    color: #0133C5;
    font-weight: 700;
}

/* Skip link je skrytý mimo obrazovku, dokud na něj uživatel nepřejde klávesnicí */
.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -100px;
    background-color: #0133C5;
    color: #fff;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0.75rem;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #0133C5;
    outline-offset: 3px;
}

/* ===== Hlavní obsah ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Hero sekce (pouze index.html) ===== */
#hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    /* JPG jako fallback pro prohlížeče bez podpory WebP / image-set */
    background-image: url('../images/hero-bg.jpg');
    background-image: -webkit-image-set(url('../images/hero-bg.webp') type('image/webp'), url('../images/hero-bg.jpg') type('image/jpeg'));
    background-image: image-set(url('../images/hero-bg.webp') type('image/webp'), url('../images/hero-bg.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.35rem;
    margin-bottom: 2rem;
}

/* ===== Tlačítka ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    margin: 0.5rem;
    background-color: #0133C5;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #F9F203;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d9d300;
}

/* ===== Sekce akcí (events.html) ===== */
.event-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #0133C5;
}

.event-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.event-item p {
    margin: 0.3rem 0;
    color: #555;
}

.event-item button {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.6rem 1.4rem;
    background-color: #0133C5;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.event-item button:hover {
    background-color: #0056b3;
}

/* ===== Patička ===== */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #ddd;
    margin-top: 3rem;
    color: #666;
}

.footer-nav {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-logo {
    height: 44px;
    width: auto;
    margin-left: 1rem;
}

.footer-nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: #666;
}

.footer-nav a:hover {
    color: #0133C5;
}

.timeline-nav {
    display: flex;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.timeline-nav a {
    padding: 0.4rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.timeline-nav a:hover {
    background-color: #0133C5;
    color: white;
    border-color: #0133C5;
}

section[aria-labelledby] h2 {
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0133C5;
}

/* ===== Hamburger tlačítko ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
}

/* ===== Responzivita ===== */
@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.3s ease, visibility 0.3s ease;
    }

    nav.open {
        max-height: 300px;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0;
    }
}

/* ===== 404 stránka ===== */
.not-found {
    text-align: center;
    padding: 4rem 0;
}

.not-found h1 {
    font-size: 5rem;
    color: #0133C5;
    margin-bottom: 1rem;
}

.not-found p {
    max-width: 500px;
    margin: 0 auto 1rem;
}

/* ===== Kontaktní stránka ===== */
.divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-item dt {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.contact-item dd {
    margin: 0;
    color: #555;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
}

.map-container iframe {
    display: block;
}

/* Placeholder mapy – zobrazí se před načtením Google Maps */
.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 400px;
    padding: 2rem;
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    color: #333;
    text-align: center;
    transition: background-color 0.3s;
}

.map-placeholder:hover {
    background-color: #eef1f5;
}

.map-placeholder-icon {
    font-size: 2.5rem;
}

.map-placeholder-title {
    font-weight: 600;
    color: #0133C5;
}

.map-placeholder-note {
    font-size: 0.9rem;
    color: #555;
}

@media (min-width: 600px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Stránka O nás ===== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.value-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #0133C5;
    text-align: center;
}

.value-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.value-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* ===== Tlačítka u akcí (events.html) ===== */
.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.event-item .btn-share {
    background-color: #fff;
    color: #0133C5;
    border: 1px solid #0133C5;
}

.event-item .btn-share:hover {
    background-color: #eef1f5;
}

/* ===== Fotogalerie (gallery.html) ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

.gallery-item figcaption {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

/* ===== Lightbox (zvětšení fotografie) ===== */
.lightbox {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    overflow: visible;
}

.lightbox::backdrop {
    background-color: rgba(0, 0, 0, 0.85);
}

.lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #333;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    color: #0133C5;
}

/* ===== Sociální ikony v patičce ===== */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

.footer-social a {
    color: #666;
    display: inline-flex;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: #0133C5;
}

/* ===== Stránka Jak nás podpořit (support.html) ===== */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.support-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #0133C5;
}

.support-item h3 {
    margin-bottom: 1rem;
    color: #333;
}

.support-account {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.support-account dt {
    font-size: 0.9rem;
    color: #555;
}

.support-account dd {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: #0133C5;
}

.support-qr {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.support-note {
    font-size: 0.9rem;
    color: #555;
}

/* ===== Omezení animací pro uživatele, kteří o to žádají ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
