:root {
    --bg: white;
    --text: black;
    --primary: red;
}

body.dark {
    --bg: #111;
    --text: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial;
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* HLAVICKA */
header {
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    color: white;
    position: sticky;
    top: 0;
    z-index: 2000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    color: #c30000;
    font-family: system-ui;
    font-weight: 900;
    text-shadow: -1px -1px 0 #000000, 1px -1px 0 #5b0000, -1px 1px 0 #000000, 1px 1px 0 #ff0000;
    font-size: 50px;
}

.logo a {
    color: #c30000;
    text-decoration: none;
    text-shadow: -1px -1px 0 #000000, 1px -1px 0 #5b0000, -1px 1px 0 #000000, 1px 1px 0 #ff0000;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}



nav a {
    position: relative;
    color: white;
    text-decoration: none;
    padding: 5px 0;
    transition: 0.3s;
}

/* MENU ANIMACE */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary);
}

nav a:active {
    transform: scale(0.95);
}

nav a.active {
    color: var(--primary);
}

nav a.active::after {
    width: 100%;
}



#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

#theme-toggle img {
    width: 40px;
    height: 40px;
}


#theme-toggle:hover img {
    transform: scale(1.2) rotate(10deg);
    filter: brightness(1.2);
}

#theme-toggle:active img {
    transform: scale(0.95);
}


.menu-toggle {
    display: none;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* HERO */
.hero {
    background: linear-gradient(45deg, black, red);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    padding: 100px 20px;
}

.section h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

/* TLACITKO */
.btn {
    background: red;
    color: white;
    padding: 10px 20px;
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 10px;
    max-width: 150px;
    align-self: center;
}

/* SEKCE */
.section {
    padding: 60px 0;
    text-align: center;
    font-size: 1.1rem;
}

.section.dark {
    background: #222;
    color: white;
}

/* KARTY */
.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background: white;
    color: black;
    font-size: 1.1rem;
    padding: 20px;
    border-radius: 10px;
    min-width: 250px;
    transition: 0.3s;
}

body.dark .card {
    background: #333;
    color: white;
}

.card:hover {
    transform: translateY(-5px);
}




/* ------ FORMULAR ------*/

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #550000;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

/* KOLONKA */
.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
    transition: 0.3s;
    background: var(--bg);
    padding: 0 5px;
}

/* FLOAT EFEKT */
.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -8px;
    font-size: 0.8rem;
    color: var(--primary);
}

/* FOCUS ANIMACE */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* TEXTOVE POLICKO */
.form-group textarea {
    min-height: 120px;
    resize: none;
}

/* MODERNI TLACITKO */
.btn {
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.btn::after {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}


/* ------ FORMULAR KONEC ------*/





/* PATICKA */

.footer-top {
    background: #111;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}


/* VYCHOZI (denni mod) */
.footer-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    transition: 0.3s;
    color: black;
}

/* TEXT */
.footer-item span {
    color: #666;
}

.footer-item strong {
    font-size: 1.1rem;
    color: black;
}

/* NOCNI MODE */
body.dark .footer-item {
    background: #1a1a1a;
    color: white;
}

body.dark .footer-item span {
    color: #aaa;
}

body.dark .footer-item strong {
    color: white;
}

.footer-item:hover {
    transform: translateY(-3px);
    background: #ffcfcf;
}


.footer-bottom {
    background: black;
    color: #ccc;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #222;
}

/* ANIMACE */
.fade {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s;
}

.fade.visible {
    opacity: 1;
    transform: translateY(0);
}


/* HLASENI - USPESNA POPTAVKA */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;
    transition: 0.3s;

    z-index: 3000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

body.dark .overlay-box {
    background: #222;
    color: white;
}


/* RESPONZIVNI CAST */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        z-index: 1001;
        margin-bottom: 5px;
        padding: 5px 10px;
        font-size: 30px;
    }


    nav {
    position: fixed;
    top: 84px;
    left: 0;
    transform: translateX(-100%);
    width: 100%;
    height: calc(100vh - 60px);
    background: rgb(0 0 0 / 95%);
    backdrop-filter: blur(10px);
    
    display: flex;
    justify-content: center;
    align-items: center;

    transition: 0.4s;
    z-index: 1500;
}

    nav.active {
    transform: translateX(0);
}

    nav ul {
        flex-direction: column;
        gap: 30px;
    }


    nav ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s;
}

nav.active ul li {
    opacity: 1;
    transform: translateY(0);
}

nav.active ul li:nth-child(1) { transition-delay: 0.1s; }
nav.active ul li:nth-child(2) { transition-delay: 0.2s; }
nav.active ul li:nth-child(3) { transition-delay: 0.3s; }
nav.active ul li:nth-child(4) { transition-delay: 0.4s; }
nav.active ul li:nth-child(5) { transition-delay: 0.5s; }



    nav ul li a {
        font-size: 1.5rem;
    }



    /* TYPOGRAFIE */
    body {
        font-size: 18px;
    }

    .section h2 {
        font-size: 2.2rem;
        margin-bottom: 35px;
    }

    .section p {
        font-size: 1.1rem;
    }

    /* HERO */
    .hero h2 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    /* KARTY */
    .card {
        font-size: 1.1rem;
        padding: 25px;
        border-radius: 20px;
    }

    /* FORMULAR */
    form {
        max-width: 100%;
        gap: 15px;
    }

    input, textarea {
        font-size: 1rem;
        padding: 15px;
        border-radius: 12px;
    }

    textarea {
        min-height: 120px;
    }

    /* TLACITKO */
    .btn {
        font-size: 1.1rem;
        padding: 12px 25px;
        border-radius: 12px;
    }

    /* LOGO */
    .logo {
        font-size: 2rem;
    }

    /* PATICKA */
    .footer-top {
        padding: 50px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-item {
        text-align: center;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }


    /* MEZERA MEZI SEKCEMI */
    .section {
        padding: 80px 0;
    }

    /* SABLONA KARET */
    .cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: 400px;
    }
}