/**
 * Homepage Styles
 * Styly pro homepage - hero sekce a dekorativní elementy
 */

* {
    box-sizing: content-box;
}

/* Homepage Body Override */
body.homepage {
    margin: 0;
    /* nepřerušovat scroll a nezamykat výšku */
    /* overflow: hidden; */
    /* height: 100vh; */
}

/* Hero Section */
.hero-section {
    position: relative;

    /* DESKTOP default: stabilní výška */
    min-height: calc(100vh - 80px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* tlačítka vždy dole */
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: black;

    /* neschovávat obsah, ať nic neleze „pod hranu“ */
    /* overflow: hidden; */
    overflow: visible;

    /* menší spodní mezera (místo 130/800 px) */
    padding-bottom: 2rem;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    justify-content: space-evenly;
    z-index: 10;
    width: 80%;
    max-width: 1200px;
}

.hero-button {
    background: var(--theme-secondary-color);
    color: var(--theme-primary-color);
    width: 25%;
    min-width: 100px;
    max-width: 300px;
    border: 1px solid var(--theme-primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
}

.hero-button:hover {
    background: var(--theme-primary-color);
    color: var(--theme-secondary-color);
    box-shadow: 0 8px 25px var(--theme-secondary-color);
    text-decoration: none;
}

/* Decorative Elements */
.decorative-top-left-wrapper,
.decorative-bottom-left-wrapper,
.decorative-bottom-right-wrapper {
    position: fixed;
    pointer-events: none;
    z-index: 5;
}

/* Top Left Decorative */
.decorative-top-left-wrapper {
    top: 4rem;
    left: 4rem;
    aspect-ratio: 592 / 1660;
    width: 12%;
    height: auto;
}

/* Bottom Left Decorative */
.decorative-bottom-left-wrapper {
    bottom: 0;
    left: 0;
    aspect-ratio: 900 / 612;
    width: 30%;
    height: auto;
}

/* Bottom Right Decorative */
.decorative-bottom-right-wrapper {
    bottom: 0;
    right: 10%;
    aspect-ratio: 1174 / 1084;
    width: 30%;
    height: auto;
}

/* Hide dropdown on desktop only to prevent z-index conflicts with decorative elements */
@media (min-width: 1101px) {
    body.homepage .nav-dropdown-content,
    body.homepage .nav-dropdown:hover .nav-dropdown-content {
        display: none;
    }
}

/* Top Right Decorative with Date */
.decorative-top-right-wrapper {
    position: fixed;
    top: 2rem;
    right: -15rem;
    width: 650px;
    height: auto;
    z-index: 1500;
    aspect-ratio: 1.84 / 1;
    transition: all 0.3s ease;
}

.decorative-top-right-wrapper::after {
    content: attr(data-date);
    position: absolute;
    top: 43%;
    left: 35%;
    transform: translate(-50%, -50%);
    color: var(--theme-primary-color);
    font-size: 1.5rem;
    z-index: 1002;
    font-family: var(--font-family-medium);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== přepnutí na dynamickou výšku pro tablety/mobily (≤1024px) ===== */
@media (max-width: 1024px) {
    .hero-section {
        min-height: calc(100dvh - 80px); /* mobilní dynamika, reaguje na lištu */
    }
}

/* =============== TABLETY A MENŠÍ NOTEBOOKY (≤1100px) =============== */
@media (max-width: 1100px) {
    * {
        box-sizing: border-box;
    }

    .hero-section {
        /* místo původního padding-bottom: 800px */
        padding-bottom: 2rem;
    }

    .hero-buttons {
        width: 90%;
        gap: 1rem;
    }

    .hero-button {
        font-size: 1.3rem;
    }

    /* Dekorace */
    .decorative-top-left-wrapper {
        width: 20%;
        left: 1rem;
        top: 4rem;
    }

    .decorative-top-right-wrapper {
        right: -8rem;
        top: 2.8rem;
        width: 50%;
    }

    .decorative-bottom-left-wrapper {
        width: 45%;
    }

    .decorative-bottom-right-wrapper {
        width: 50%;
        right: 0;
    }

    .decorative-top-right-wrapper::after {
        font-size: 1rem;
    }
}

/* =============== TABLETY NA VÝŠKU A VĚTŠÍ MOBILY (≤768px) =============== */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    .hero-section {
        /* na mobilech držíme dynamické chování */
        min-height: 100dvh;
        padding-bottom: 80px; /* větší mezera pro palec */
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: 400px;
    }

    .hero-button {
        width: 100%;
        font-size: 1.1rem;
        padding: 5px 10px;
    }

    /* Dekorace */
    .decorative-top-left-wrapper {
        width: 18%;
        left: 0.5rem;
    }

    .decorative-top-right-wrapper {
        width: 60%;
        top: 2rem;
        right: -6rem;
    }

    .decorative-top-right-wrapper::after {
        font-size: 1rem;
        text-align: center;
    }

    .decorative-bottom-left-wrapper {
        width: 40%;
    }

    .decorative-bottom-right-wrapper {
        width: 40%;
    }
}

/* =============== MENŠÍ MOBILY (≤480px) =============== */
@media (max-width: 480px) {
    * {
        box-sizing: border-box;
    }

    .hero-section {
        padding-bottom: 80px;
    }

    .hero-buttons {
        gap: 0.75rem;
        max-width: 340px;
    }

    .hero-button {
        font-size: 1rem;
        padding: 5px 10px;
    }

    /* Dekorace – radši schovat pro čistší vzhled */
    .decorative-top-right-wrapper {
        width: 60%;
        left: 1rem;
        top: 3rem;
        pointer-events: none;
    }

    .decorative-top-right-wrapper:after {
        font-size: 0.8rem;
    }

    .decorative-top-left-wrapper {
        display: none;
    }

    .decorative-bottom-left-wrapper {
        width: 50%;
    }

    .decorative-bottom-right-wrapper {
        bottom: 5rem;
        width: 60%;
    }
}
