:root {
    --primary-color: #003366;
    --accent-color: #d4af37;
    --text-color: #333;
    --bg-light: #f9f9f9;
    
    /* Fluidní typografie a odsazení */
    --fs-h2: clamp(1.8rem, 4vw, 3rem);
    --fs-h3: clamp(1.2rem, 2.5vw, 1.75rem);
    --fs-p: clamp(1rem, 1.5vw, 1.15rem);
    --section-padding: clamp(40px, 8vw, 80px) 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: var(--fs-p);
    overflow-x: hidden; /* Zabrání horizontálnímu scrollování */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* TOP BAR */
.top-bar {
    background: #222;
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: clamp(10px, 2vw, 20px);
    flex-wrap: wrap;
}

/* HEADER */
.main-header {
    background: #fff;
    padding: clamp(15px, 2vw, 20px) 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    text-decoration: none;
    color: var(--primary-color);
}
.logo span { color: var(--accent-color); }

/* NAVIGACE - DESKTOP */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: clamp(15px, 3vw, 30px);
}
.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
}
.main-nav a:hover { color: var(--accent-color); }

/* HAMBURGER MENU (Skryté na desktopu) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
}
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1600&q=80') center/cover;
    min-height: clamp(400px, 60vh, 700px);
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: var(--section-padding);
}
.hero h2 { font-size: var(--fs-h2); margin-bottom: 15px; }
.hero p { font-size: var(--fs-p); margin-bottom: 30px; }

/* TLAČÍTKA */
.btn {
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 30px);
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-color); color: #fff; }
.btn-secondary { background: #fff; color: var(--primary-color); }

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* POMOCNÉ TŘÍDY */
.py-5 { padding: var(--section-padding); }
.bg-light { background: var(--bg-light); }
.text-center { text-align: center; }
.mt-4 { margin-top: clamp(20px, 4vw, 40px); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* POKROČILÝ GRID */
/* auto-fit a minmax zajistí plynulé zalamování bez složitých media queries */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 4vw, 40px); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 4vw, 40px); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
/* Natvrdo vynucená mřížka 2x2 */
.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Vždy 2 stejně široké sloupce */
    gap: clamp(20px, 4vw, 30px);
}
/* KARTY */
.card {
    background: #fff;
    padding: clamp(20px, 4vw, 40px);
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-5px); }
.card h3, .card h4 { margin-bottom: 15px; color: var(--primary-color); }
.card p { flex-grow: 1; } /* Zajistí, že tlačítka dole budou zarovnaná, i když je text různě dlouhý */
.read-more { color: var(--accent-color); text-decoration: none; font-weight: bold; display: inline-block; margin-top: 20px; }

.reason-item {
    background: #fff;
    padding: clamp(15px, 3vw, 25px);
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

/* FOOTER */
.main-footer { background: var(--primary-color); color: #fff; }
.main-footer h3 { margin-bottom: 20px; color: var(--accent-color); }
.main-footer p, .footer-links a { color: #ccc; margin-bottom: 10px; text-decoration: none; }
.footer-links ul { list-style: none; }
.footer-bottom { background: #001f3f; text-align: center; padding: 20px 0; margin-top: 40px; }

/* =========================================
   MEDIA QUERIES (TABLETY A MOBILY)
========================================= */

@media(max-width: 768px) {
    /* Skrytí datovky na malých displejích v top-baru */
    .hide-mobile { display: none; }
    .top-bar .container { justify-content: center; }

    /* Hamburger Menu Aktivace */
    .menu-toggle { display: block; }
    
    /* Mobilní navigace (vysouvací/překrývající) */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%); /* Skryté nahoře */
        opacity: 0;
        transition: all 0.4s ease-in-out;
        z-index: -1;
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        z-index: 998;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .main-nav li {
        border-bottom: 1px solid #eee;
    }

    .main-nav a {
        display: block;
        padding: 20px;
        font-size: 1.1rem;
    }

    /* Animace Hamburgeru do křížku */
    .menu-toggle.active .hamburger { background: transparent; }
    .menu-toggle.active .hamburger::before { transform: rotate(45deg); }
    .menu-toggle.active .hamburger::after { transform: rotate(-45deg); }

    /* Úprava Hero sekce pro mobily */
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; }
}
@media(max-width: 768px) {
    /* ... stávající mobilní kód ... */

    .grid-2x2 {
        grid-template-columns: 1fr; /* Na mobilu se seřadí po jednom pod sebe */
    }
}