/* =========================================
   1. PROMĚNNÉ A RESET
   ========================================= */
:root {
    --primary: #00AEEF;       /* Pánek Modrá */
    --primary-dark: #008ec2;
    --dark: #1a1e21;          /* Tmavě šedá pro text */
    --grey-light: #f8f9fa;    /* Pozadí sekcí */
    --white: #ffffff;
    --text-muted: #555555;
    --footer-text: #cccccc;

    /* Stíny a zaoblení */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px -5px rgba(0,0,0,0.1);
    --radius: 8px;

    /* Přechody */
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Layout */
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* =========================================
   2. LAYOUT A KONTEJNERY
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--grey-light); }
.text-center { text-align: center; }

/* =========================================
   3. TYPOGRAFIE
   ========================================= */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 1rem; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: 2.2rem; position: relative; display: inline-block; }
p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Modrá čárka pod nadpisy */
.heading-wrapper { margin-bottom: 3rem; position: relative; display: inline-block; }
.heading-wrapper::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--primary); margin-top: 15px; border-radius: 2px;
}
.text-center .heading-wrapper::after { margin: 15px auto 0; }

/* =========================================
   4. TLAČÍTKA (BTN)
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 32px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: 50px;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
    cursor: pointer;
}
.btn:hover {
    background: transparent; color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent; border: 2px solid var(--dark);
    color: var(--dark); padding: 12px 32px; font-weight: 700;
    border-radius: 50px; display: inline-block;
}
.btn-outline:hover { background: var(--dark); color: var(--white); }

/* =========================================
   5. HEADER A NAVIGACE
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.98);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.navbar { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo img { height: 45px; }

.nav-menu { display: flex; gap: 40px; }
.nav-link {
    font-weight: 600; font-size: 0.95rem; text-transform: uppercase;
    color: var(--dark); position: relative;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Hamburger Menu (Mobile) */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 26px; height: 3px; margin: 5px auto; background-color: var(--dark); transition: 0.3s; }

/* =========================================
   6. HERO SEKCE (Hlavní i podstránky)
   ========================================= */
/* Hlavní stránka */
.hero {
    height: 80vh; min-height: 500px;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4)), url('../media/panek_budova_cr.jpg') center/cover;
    display: flex; align-items: center; color: var(--white);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.hero p { color: rgba(255,255,255,0.9); font-size: 1.25rem; max-width: 600px; margin-bottom: 30px; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero-content { opacity: 0; animation: fadeInUp 1s forwards 0.5s; }

/* Podstránky (Bazar, Kariéra...) */
.page-header {
    height: 350px;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white);
    position: relative;
    background-color: #222; /* Fallback */
}
.page-header h1 { color: var(--white); text-shadow: 0 2px 10px rgba(0,0,0,0.5); margin: 0; }
.page-header p { color: #ddd; font-size: 1.2rem; margin-top: 10px; }

/* =========================================
   7. KARTY A GRIDY (Obecné)
   ========================================= */
.grid-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}

.card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition); border: 1px solid rgba(0,0,0,0.03);
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }

.card-img-wrapper { height: 220px; overflow: hidden; position: relative; flex-shrink: 0; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .card-img-wrapper img { transform: scale(1.05); }

.card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.3rem; margin-bottom: 10px; }

/* =========================================
   8. FEATURE SECTIONS (Zig-Zag styl)
   ========================================= */
.feature-section { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; }
.feature-section:nth-child(even) { flex-direction: row-reverse; } /* Střídání stran */
.feature-img { flex: 1; }
.feature-img img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.feature-text { flex: 1; }

/* Statistiky (černý pruh) */
.stats-bar {
    background: var(--dark); color: white; padding: 50px 0; margin-top: -80px; margin-bottom: 80px;
    position: relative; z-index: 2; border-radius: var(--radius);
    display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; text-align: center;
    box-shadow: var(--shadow-md);
}
.stat-item h3 { font-size: 3rem; color: var(--primary); margin: 0; }
.stat-item p { color: #ccc; margin: 0; text-transform: uppercase; font-size: 0.9rem; }

/* =========================================
   9. BAZAR - SPECIFICKÉ STYLY
   ========================================= */
.spec-tag {
    font-size: 0.8rem; background: #f0f2f5;
    padding: 4px 8px; border-radius: 4px; color: #555;
    display: inline-block; margin-right: 5px; margin-bottom: 5px;
    font-weight: 600;
}
.price-tag { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

/* Detail vozu */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.spec-table td { padding: 12px; border-bottom: 1px solid #eee; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-key { font-weight: 600; color: #555; width: 40%; }
.spec-val { font-weight: 700; color: #000; }

.back-link { display: inline-flex; align-items: center; gap: 5px; color: #666; margin-bottom: 20px; font-weight: 600; }
.back-link:hover { color: var(--primary); }

/* Galerie v detailu */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-top: 15px; }
.gallery-grid img { width: 100%; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; transition: 0.2s; border: 2px solid transparent; }
.gallery-grid img:hover { border-color: var(--primary); transform: scale(1.05); }

/* =========================================
   10. KARIÉRA (Akordeony & Seznamy)
   ========================================= */
/* Seznam benefitů (zelená fajfka) */
.check-list-green { list-style: none; }
.check-list-green li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list-green li::before {
    content: '✔'; position: absolute; left: 0; color: #2ecc71; font-weight: bold;
}
/* Seznam požadavků (červený bod) */
.check-list-red li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list-red li::before {
    content: '●'; position: absolute; left: 0; top: 2px; color: var(--primary); font-size: 0.8rem;
}

/* Moderní Akordeon */
details.modern-accordion {
    background: var(--white); border: 1px solid #eee; border-radius: var(--radius);
    margin-bottom: 15px; overflow: hidden; transition: var(--transition);
}
details.modern-accordion[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }

summary {
    padding: 20px; cursor: pointer; font-weight: 700; list-style: none;
    display: flex; justify-content: space-between; align-items: center; background: #fdfdfd;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--primary); transition: 0.3s; }
details[open] summary::after { transform: rotate(45deg); }
.accordion-content { padding: 25px; border-top: 1px solid #f0f0f0; }

/* Karta pozice uvnitř akordeonu */
.job-card {
    background: #fdfdfd; border: 1px solid #e5e5e5; border-radius: 8px;
    padding: 20px; margin-bottom: 20px; border-left: 4px solid var(--primary);
}
.job-card h4 { margin-bottom: 5px; color: var(--dark); font-size: 1.1rem; }
.job-card p { font-size: 0.9rem; margin-bottom: 10px; }

/* =========================================
   11. FORMULÁŘE (Kontakt)
   ========================================= */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-control {
    width: 100%; padding: 12px 15px;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: inherit; font-size: 1rem;
    transition: var(--transition); background: #fdfdfd;
}
.form-control:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* =========================================
   12. ANIMACE
   ========================================= */
/* Scroll Reveal (použito v script.js) */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Fade In (pro bazar) */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   13. STYLY PRO KONTAKTNÍ STRÁNKU (DOPLNĚNO)
   ========================================= */
/* Ikony v kartách kontaktů */
.contact-icon {
    width: 60px; height: 60px;
    background: rgba(0, 174, 239, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px; margin-left: auto; margin-right: auto;
}

/* Mapa - defaultně pro PC velká */
.map-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border-radius: var(--radius);
    border: 0;
}

/* Fakturační box */
.billing-box {
    background: #f8f9fa; border-left: 4px solid var(--primary);
    padding: 20px; margin-top: 30px; border-radius: 4px;
}
.billing-row { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 10px 0; }
.billing-row:last-child { border-bottom: none; }

/* Hlášky (Alerts) */
.alert-box { padding: 15px; border-radius: 8px; margin-bottom: 20px; display: none; font-weight: bold; text-align: center; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.pot-honey { opacity: 0; position: absolute; top: 0; left: 0; height: 0; width: 0; z-index: -1; }

/* =========================================
   14. RESPONZIVITA (Mobile)
   ========================================= */
@media (max-width: 900px) {
    /* Navigace */
    .hamburger { display: block; }
    .nav-menu {
        position: fixed; left: 0; top: 80px; width: 100%; background: var(--white);
        flex-direction: column; padding: 30px; gap: 20px; border-bottom: 2px solid var(--primary);
        transform: translateY(-150%); transition: 0.4s; box-shadow: var(--shadow-md);
    }
    .nav-menu.active { transform: translateY(0); }

    /* Hero */
    .hero { clip-path: none; text-align: center; height: auto; padding: 120px 20px; }

    /* Layout */
    .feature-section { flex-direction: column !important; gap: 40px; }
    .stats-bar { margin-top: 0; flex-direction: column; gap: 30px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    /* Kontakt Mobile */
    .map-frame { height: 300px; min-height: auto; }
}
/* =========================================
   15. FOOTER (PATIČKA)
   ========================================= */
.main-footer {
    background: var(--dark);
    color: #d0d0d0;
    padding: 70px 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 sloupce na PC */
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    color: var(--footer-text);
    margin-bottom: 15px;
}

/* Odkazy v patičce */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-text);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px; /* Efekt posunu při najetí */
}

/* Spodní lišta */
.footer-bottom {
    border-top: 1px solid #333;
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.footer-bottom a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Úprava pro mobil (vše pod sebe a na střed) */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .footer-links a:hover { padding-left: 0; color: var(--primary); }
}
/* =========================================
   16. COOKIE BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a1e21; /* Tmavá barva */
    color: #fff;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    display: none; /* Defaultně skryté, zobrazí JS */
    border-top: 4px solid var(--primary);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
    }
    .cookie-buttons .btn, .cookie-buttons .btn-outline {
        flex: 1;
        padding: 10px;
    }
}
/* =========================================
   17. VYLEPŠENÍ KARIÉRY (Inzeráty)
   ========================================= */

/* Celý box kategorie (např. Řidiči MKD...) */
.modern-accordion {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Jemný stín */
    overflow: hidden;
}

/* Hlavička akordeonu (to, na co se kliká) */
.modern-accordion summary {
    background: #f8f9fa;
    padding: 18px 25px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--dark);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    list-style: none; /* Skryje defaultní šipku */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Změna barvy po najetí myší nebo otevření */
.modern-accordion summary:hover,
.modern-accordion[open] summary {
    background: #eef2f5;
    color: var(--primary);
    border-bottom: 1px solid #e1e4e8;
}

/* Přidání vlastní šipky doprava/dolů */
.modern-accordion summary::after {
    content: '\f107'; /* FontAwesome šipka dolů */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.3s;
}
.modern-accordion:not([open]) summary::after {
    transform: rotate(-90deg); /* Když je zavřeno, šipka doprava */
}

/* Vnitřek inzerátu */
.job-card {
    padding: 30px;
    border-bottom: 1px solid #eee;
}
.job-card:last-child {
    border-bottom: none;
}

/* Nadpis pozice (Řidič MKD...) */
.job-card h4 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Popis pozice */
.job-desc {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 800px;
}

/* SEZNAM - To hlavní vylepšení */
.job-details ul {
    list-style: none; /* Zrušíme tečky */
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Dva sloupce na PC */
    gap: 12px 30px; /* Mezery mezi řádky a sloupci */
}

.job-details li {
    position: relative;
    padding-left: 30px; /* Místo pro ikonku */
    color: #333;
    font-weight: 500;
}

/* Přidání zelené fajfky před každý řádek */
.job-details li::before {
    content: '\f00c'; /* Kód ikony fajfky */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: #2ecc71; /* Zelená barva */
    font-size: 1rem;
}

/* Tlačítko Mám zájem */
.job-card .btn {
    background: var(--primary);
    color: #fff;
    border-radius: 30px; /* Kulatější tlačítko */
    padding: 10px 30px !important;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 174, 239, 0.3); /* Záře pod tlačítkem */
    transition: transform 0.2s;
}

.job-card .btn:hover {
    transform: translateY(-2px); /* Při najetí nadskočí */
    box-shadow: 0 6px 15px rgba(0, 174, 239, 0.4);
}
/* =========================================
   18. OPRAVA MOBILNÍHO ZOBRAZENÍ (Kariéra)
   ========================================= */
@media (max-width: 600px) {
    /* 1. Zmenšíme okraje stránky, aby bylo více místa */
    .container {
        padding: 0 15px;
    }

    /* 2. Zmenšíme vnitřní odsazení akordeonu a karet */
    .accordion-content {
        padding: 10px !important;
    }

    .job-card {
        padding: 15px !important; /* Původně tam bylo 30px, to je moc */
    }

    /* 3. Nadpis trochu zmenšíme, aby se nelámal po slovech */
    .job-card h4 {
        font-size: 1.2rem;
        word-wrap: break-word;
    }

    /* 4. Seznam (fajfky) dáme pod sebe na 1 sloupec */
    .job-details ul {
        grid-template-columns: 1fr !important; /* Roztáhne se na celou šířku */
        gap: 8px;
    }

    /* 5. Tlačítko "Mám zájem" roztáhneme a zakážeme zalamování textu */
    .job-card .btn {
        width: 100%;           /* Tlačítko přes celou šířku */
        display: block;        /* Aby se chovalo jako blok */
        text-align: center;
        margin-top: 15px;
        white-space: nowrap;   /* Zakáže zalomení "MÁM" a "ZÁJEM" */
        padding: 12px 10px !important; /* Upravíme padding */
    }

    /* Zarovnání kontejneru tlačítka na střed */
    .job-card > div:last-child {
        text-align: center !important;
    }
}
/* --- GALERIE VOZIDLA (Fix velikosti) --- */

/* Kontejner pro hlavní fotku (musíme ho přidat v JS, viz níže, nebo aplikovat na existující div) */
.car-gallery-stage {
    position: relative; /* Aby šly umístit šipky */
    width: 100%;
    height: 500px; /* PEVNÁ VÝŠKA - TOTO JE TO HLAVNÍ */
    background-color: #000; /* Černé pozadí pod fotkou */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* Samotná fotka */
.car-gallery-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;   /* Aby se neroztahovala */
    height: auto;  /* Aby se neroztahovala */
    object-fit: contain; /* KLÍČOVÉ: Fotka se celá vejde dovnitř */
    display: block;
}

/* Šipky (zatím tam nebudou, dokud neupravíme JS, ale styl už připravíme) */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
    user-select: none; /* Aby se neoznačoval text při klikání */
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.arrow-prev { left: 0; border-radius: 0 5px 5px 0; }
.arrow-next { right: 0; border-radius: 5px 0 0 5px; }