/* =========================================
   GLOBÁLNÍ NASTAVENÍ A RESET
   ========================================= */
html, body {
    font-family: "Open Sans", sans-serif;
    background-color: #fffefa;
    color: #333; /* Jemnější černá pro lepší čitelnost */
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Pomocné třídy --- */
.cursor-pointer { cursor: pointer; }
.no-decoration { text-decoration: none; }

/* --- Tlačítko "Zpět nahoru" --- */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 10px;
    transition: transform 0.3s ease;
}

#scrollTopBtn:hover {
    transform: translateX(-50%) translateY(-5px);
}

/* --- Animace načtení --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    animation: fadeIn 1s ease-out forwards;
}

/* =========================================
   NAVIGACE
   ========================================= */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 11%;
    width: 100%;
    position: sticky; /* Menu zůstává nahoře při scrollování */
    top: 0;
    background: rgba(255, 254, 250, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

nav a img { width: 100px;}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Skrytí ovládacích prvků menu na desktopu */
#menu-toggle, .hamburger-label {
    display: none;
}

nav a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #f8c858;
}

nav .nav-main-page {
    background-color: #fadd9a;
    padding: 8px 20px;
    border-radius: 20px;
    color: #000;
    transition: transform 0.2s ease, background 0.3s ease;
}

nav .nav-main-page:hover {
    background-color: #f8cf6a;
    transform: scale(1.05);
}

/* =========================================
   SEKCE 1: HERO (ÚVOD)
   ========================================= */
#hero {
    max-width: 1400px;
    margin: 0px auto;
    min-height: 85vh;
    display: flex;
    align-items: center; 
    justify-content: space-between;
    padding: 0 5%;
    gap: 50px;
}

.hero-content {
    flex: 1;
    z-index: 10;
    max-width: 800px;
}

#hero h1 {
    font-family: "Anton", sans-serif;
    font-size: clamp(2rem, 3.5vw, 4.5em); 
    line-height: 1.1;
    margin-bottom: 25px;
    margin-top: -280px; /* OPRAVA: Sníženo z -250px, aby text na menších monitorech neutíkal nahoru mimo okno */
}

#hero .main-lbl {
    font-size: 1em;
    color: #555;
    line-height: 1.7;
    width: 100%;
}

#hero button {
    margin-top: 40px;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    background-color: #fadd9a;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(250, 221, 154, 0.4);
    transition: all 0.3s ease;
}

#hero button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(250, 221, 154, 0.6);
}

#visual-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visuals {
    width: 100%;
    max-width: 200px; /* OPRAVA: Zmenšeno z 320px pro kompaktnější vzhled */
    max-height: 50vh; /* OPRAVA: Zamkne výšku obrázku maximálně na čtvrtinu obrazovky, takže nikdy nezpůsobí scrollbar */
    object-fit: contain; /* Zabezpečí, že se semafor nedeformuje */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    margin-top: -300px;
}



.content-boxes {
    padding: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: -300px;
    width: 100%;
}

.box {
    
    text-decoration: none;
    color: black;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 200px;
    flex: 1 1 300px;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.box h3 { font-size: 1.5em; text-align: center; margin-top: 20px; z-index: 5; font-family: "Anton", sans-serif; }
.box img { width: 50%; max-height: 150px; object-fit: contain; transition: 0.3s; }
.box button {
    margin-bottom: 20px; width: 100px; height: 35px;
    border-radius: 20px; border: none; background-color: #fadd9a; font-weight: bold; cursor: pointer; z-index: 5;
}

.hover-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80%; text-align: center; opacity: 0; transition: 0.3s; z-index: 4;
}
/* Hover efekty */
.box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    background-color: #fffefa;
}

.box:hover img { opacity: 0; }
.box:hover .hover-text { opacity: 1; }
.box:hover button { background-color: #fadd9a; transform: scale(1.1); }


/* =========================================
   FOOTER (PATIČKA)
   ========================================= */
footer {
    background-color: #1a1a1a;
    padding: 60px 20px;
    color: #fffefa;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.icon-col img {
    width: 35px;
    filter: brightness(0) invert(1); /* Ikony budou bílé */
    opacity: 0.6;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.icon-col img:hover {
    opacity: 1;
}

/* =========================================
   MEDIA QUERIES (RESPONZIVITA)
   ========================================= */

/* =========================================
   MEDIA QUERIES (RESPONZIVITA)
   ========================================= */

@media screen and (min-width: 1920px) {
    #hero {
        padding: 0 5%;
    }

    .content-boxes {
        gap: 40px;
    }
}

/* ===============================
   NOTEBOOKY A MENŠÍ MONITORY
   =============================== */
@media screen and (max-width: 1200px) {

    #hero {
        min-height: auto;
        padding: 80px 5%;
    }

    #hero h1 {
        margin-top: -120px;
    }

    .hero-visuals {
        margin-top: -120px;
    }

    .content-boxes {
        margin-top: -100px;
    }
}

/* ===============================
   TABLETY
   =============================== */
@media screen and (max-width: 1024px) {

    nav {
        padding: 20px 5%;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        min-height: auto;
        padding: 50px 5%;
    }

    .hero-content {
        max-width: 100%;
    }

    #hero h1 {
        margin-top: 0;
    }

    #hero .main-lbl {
        max-width: 700px;
        margin: auto;
    }

    #visual-wrapper {
        margin: 0;
    }

    .hero-visuals {
        margin-top: 0;
        max-width: 180px;
        max-height: 300px;
    }

    .content-boxes {
        margin-top: 0;
        padding: 30px;
        gap: 20px;
    }

    .box {
        flex: 1 1 calc(50% - 20px);
        max-width: 320px;
        height: 200px;
    }
}

/* ===============================
   MOBILY
   =============================== */
@media screen and (max-width: 768px) {

    .hamburger-label {
        display: block;
        cursor: pointer;
    }

    .hamburger-label img {
        width: 30px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fffefa;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    }

    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    #hero {
        padding-top: 30px;
        gap: 30px;
    }

    #hero h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-visuals {
        max-width: 150px;
    }

    .content-boxes {
        padding: 20px;
    }

    .box {
        flex: 1 1 calc(50% - 20px);
        max-width: none;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===============================
   MALÉ MOBILY
   =============================== */
@media screen and (max-width: 600px) {

    nav a img {
        width: 70px;
    }

    #hero {
        padding: 20px;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .hero-visuals {
        max-width: 120px;
    }

    .content-boxes {
        padding: 15px;
    }

    .box {
        flex: 1 1 100%;
        max-width: 100%;
        height: 180px;
    }

    .box h3 {
        font-size: 1.3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    #page-7 .submit-btn {
        width: 100%;
    }
}

/* ===============================
   VELKÉ MONITORY
   =============================== */
@media screen and (min-width: 1600px) {

    #hero {
        max-width: 1600px;
    }

    .hero-visuals {
        max-width: 220px;
    }

    .content-boxes {
        max-width: 1700px;
        margin-left: auto;
        margin-right: auto;
    }
}