/* ==========================================================================
   ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ
   ========================================================================== */
:root {
    --olivova: #3d4a35;
    --svetla-modra: #e1e8ed;
    --text-tmavy: #2c3327;
    --bila: #ffffff;
    --akcent: #f39c12; /* Doplňková oranžová pro tlačítka */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--svetla-modra);
    color: var(--text-tmavy);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ==========================================================================
   HLAVIČKA A NAVIGACE
   ========================================================================== */
header {
    background-color: var(--olivova);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
}

/* Logo držíme v malé pevné šířce, aby jeho původní rozměr
   neposouval navigaci zbytečně doprava. */
.logo {
    flex: 0 0 70px;
    width: 70px;
    margin-right: 35px;
}

.logo img {
    display: block;
    width: 60px;
    height: auto;
    transition: transform 0.6s ease;
}

nav {
    margin-right: 0;
}

/* Přihlašovací tlačítko zůstane vpravo. */
.nav-actions {
    margin-left: auto;
}

.logo img:hover {
    transform: translateX(6px) rotate(-2deg) scale(1.04);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: var(--bila);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover {
    color: var(--akcent);
}

.btn-login {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    border: 1px solid white;
    transition: 0.3s;
}

.btn-login:hover {
    background: var(--akcent);
    border-color: var(--akcent);
}


/* ==========================================================================
   HERO SEKCE (ÚVODNÍ STRANA)
   ========================================================================== */
.hero {
    padding: 60px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--olivova);
    line-height: 1.1;
    margin-bottom: 20px;
}

.subtitle {
    font-weight: bold;
    color: var(--text-tmavy);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.btn-main {
    display: inline-block;
    background-color: var(--olivova);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    margin-top: 25px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-main:hover {
    background-color: var(--text-tmavy);
    transform: translateY(-2px);
}


/* ==========================================================================
   SEKCE O NÁS / MANIFEST
   ========================================================================== */
.about {
    padding: 80px 0;
    background-color: var(--olivova);
    color: var(--bila);
}

.section-title {
    text-align: left;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.about-text {
    max-width: 900px;
    margin: 30px auto;
    text-align: left;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.lead {
    font-size: 1.3rem !important;
    color: var(--akcent);
}

.mission-tag {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    opacity: 0.8;
}

.quote-box {
    border-left: 4px solid var(--akcent);
    padding: 10px 25px;
    margin: 30px 0;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline {
    display: inline-block;
    border: 1px solid var(--bila);
    color: var(--bila);
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--bila);
    color: var(--olivova);
}


/* ==========================================================================
   KARTY AKTIVIT
   ========================================================================== */
.activities {
    padding: 80px 0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.activity-item {
    display: flex;
    background: var(--bila);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-3px);
    border-color: var(--olivova);
}

.activity-img {
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fcfcfc;
    padding: 20px;
}

.activity-img img {
    width: 80%;
    height: auto;
    object-fit: contain;
}

.activity-info {
    flex: 2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price {
    font-weight: bold;
    color: var(--olivova);
    margin: 10px 0;
}

.btn-sm {
    background: var(--svetla-modra);
    color: var(--text-tmavy);
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    align-self: flex-start;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
    text-align: center;
}

.btn-sm:hover {
    background: var(--olivova);
    color: white;
}


/* ==========================================================================
   KALENDÁŘ AKCÍ A DYNAMICKÁ GALERIE
   ========================================================================== */
.events {
    padding: 60px 0;
}

.events-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.column-title {
    font-size: 1.6rem;
    color: var(--olivova);
    margin-bottom: 25px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 2px solid rgba(61, 74, 53, 0.1);
    padding-bottom: 10px;
}

.events-list {
    min-height: 200px;
}

.event-row {
    background: white;
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 16px;
    display: flex;
    gap: 25px;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.event-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--olivova);
}

.event-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background-color: var(--olivova);
    opacity: 0.8;
}

.event-row.event-past::before {
    background-color: #cbd5e0; /* Šedá linka pro proběhlé akce */
}

.event-row .date {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--olivova);
    min-width: 100px;
    text-align: center;
    line-height: 1;
}

.event-row .date span {
    display: block;
    font-size: 0.85rem;
    color: #718096;
    margin-top: 5px;
    font-weight: 400;
}

.event-row .details h3 {
    font-size: 1.3rem;
    margin: 0 0 5px 0;
    color: #1a202c;
    letter-spacing: -0.02em;
}

.past-label {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

/* GALEIE */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(61, 74, 53, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}


/* ==========================================================================
   INTERNÍ ČLENSKÁ ZÓNA
   ========================================================================== */
.member-zone {
    background: #f0f4f0;
    padding: 80px 0;
    border-top: 5px solid var(--olivova);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.member-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

#member-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#member-list-table th {
    text-align: left;
    color: var(--olivova);
    border-bottom: 2px solid #eee;
    padding: 10px;
}

#member-list-table td {
    padding: 10px;
    border-bottom: 1px solid #f9f9f9;
}

.attendance-box {
    background: #fafafa;
    border-left: 4px solid var(--olivova);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
}

.attendance-box button {
    background: var(--olivova);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.85rem;
}


/* ==========================================================================
   FAQ SEKCE (ČASTÉ DOTAZY)
   ========================================================================== */
.faq-section {
    padding: 80px 0;
    background-color: #f4f7f6;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.faq-item {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    color: #333;
    text-align: left;
    padding: 18px 25px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f9f9f9;
    border-color: var(--akcent);
    color: var(--akcent);
}

.faq-question.active {
    background: var(--olivova);
    color: white;
    border-color: var(--olivova);
    border-radius: 12px 12px 0 0;
}

.faq-question i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: var(--akcent);
}

.faq-question.active i {
    transform: rotate(180deg);
    color: white;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.faq-answer p {
    padding: 20px 25px;
    margin: 0;
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}


/* ==========================================================================
   VYSKAKOVACÍ MODÁLNÍ OKNA (MODALS & LIGHTBOX)
   ========================================================================== */
.modal, .lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.lightbox {
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--olivova);
    color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.close-button, .close-lightbox, .close-contact {
    position: absolute;
    right: 25px; top: 15px;
    font-size: 35px; cursor: pointer; color: white;
    z-index: 10;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    border: 3px solid white;
}

.modal-content h2 {
    color: var(--akcent);
    text-align: center;
    margin-bottom: 5px;
}

.modal-subtitle {
    text-align: center;
    font-style: italic;
    margin-bottom: 30px;
    opacity: 0.8;
}

.manifest-list {
    list-style: none;
    padding: 0;
    margin-top: 25px;
}

.manifest-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fdfdfd;
    margin-bottom: 12px;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.manifest-list li:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.manifest-list i {
    font-size: 1.5rem;
    color: var(--olivova);
    width: 35px;
    text-align: center;
}

.manifest-list div {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.4;
}

/* STYLY PRO FORMULÁŘE V MODÁLU */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: white;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.btn-submit {
    background-color: var(--akcent);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #d35400;
}


/* ==========================================================================
   PATIČKA WEBU
   ========================================================================== */
.site-footer {
    background-color: var(--olivova);
    color: white;
    padding: 60px 0 20px 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.footer-info h3 {
    color: var(--akcent);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.contact-links {
    list-style: none;
    padding: 0;
}

.contact-links li {
    margin-bottom: 15px;
}

.contact-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.contact-links a:hover {
    color: var(--akcent);
}

.motto {
    margin-top: 30px;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--akcent);
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}


/* ==========================================================================
   KOMPLETNÍ OPTIMALIZACE PRO MOBILY A TABLETY (Displeje <= 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    
    /* Gridy naskládáme pod sebe */
    .about-grid, 
    .events-grid, 
    .footer-grid, 
    .member-grid {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    /* Úvodní HERO sekce pod sebou, obrázek nahoře */
    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px 0;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    /* Hlavička a menu na střed pod sebe */
    .nav-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo {
        flex: 0 0 auto;
        width: auto;
        margin-right: 0;
    }

    .logo img {
        width: 60px;
        margin: 0 auto;
    }

    nav {
        margin-right: 0;
        width: 100%;
    }

    .nav-actions {
        margin-left: 0;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    nav ul li a {
        margin: 0 8px;
    }

    /* TUNING AKTIVIT PRO MOBIL: Ikona nad textem, tlačítko na střed */
    .activity-item {
        flex-direction: column;
        text-align: center;
    }

    .activity-img {
        max-width: 100%;
        width: 100%;
        background-color: #f7f9fa;
        padding: 30px;
    }

    .activity-img img {
        width: 40%; /* Menší ikona na mobilu, ať to vypadá vkusně */
    }

    .activity-info {
        padding: 20px;
    }

    .btn-sm {
        align-self: center;
        width: 100%; /* Plná šířka tlačítka pro snadné klikání prstem */
        padding: 10px;
    }

    /* Modaly přes celý displej */
    .modal-content {
        width: 95% !important;
        margin: 5% auto;
        padding: 20px;
    }

    /* Tabulka členů dostane posuvník */
    .member-card.list {
        overflow-x: auto;
    }

    .footer-map {
        order: -1; /* Mapa v patičce bude na mobilu jako první */
    }
    
    .member-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}