
/* === GLOBÁLNÍ STYLY === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #1e1f23;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    box-sizing: border-box;
}

/* === HEADER A FOOTER === */
.main-header, .main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1f23;
    padding: 1rem 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    transition: box-shadow 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1000; /* aby byla nad ostatním obsahem */
}

.main-header:hover {
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.35); /* Modrý nádech efektu */
}

/* logout */
.logout-btn {
    margin-left: 1rem;
    background-color: #262727;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0px 20px rgba(0, 147, 245, 0.247);
}

.logout-btn:hover {
    box-shadow: 0 8px 24px rgba(255, 0, 157, 0.35);
}

/* Odkazy uprostřed */
.center-menu {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex: 1;
    flex-wrap: wrap;
}

.center-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.center-menu a:hover {    
    box-shadow: 0 8px 24px rgba(255, 0, 157, 0.35);
    transition: all 0.5s ease;
}

/* Jazykové přepínače + nastavení vpravo */
.right-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
}

.language-switch button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #fff;
    padding: 0.3rem 0.6rem;
    transition: background 0.3s;
}

.settings-icon i {
    font-size: 1.4rem;
    color: #fff;
}

.settings-icon {
    position: relative;
    cursor: pointer;
}

.settings-icon .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #2a2a2e;
    min-width: 140px;
    z-index: 1;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgb(0, 170, 255);
    padding: 0.5rem 0;
    text-align: left;
}

.settings-icon .dropdown-content a {
    color: white;
    padding: 0.5rem 1rem;
    display: block;
    text-decoration: none;
    transition: background 0.2s ease;
}

.settings-icon .dropdown-content a:hover {
    background-color: #1e1f23;
}

.settings-icon:hover .dropdown-content {
    display: block;
}



/* === RESPONSIVITA headeru pod 768px === */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

     
    .center-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
        width: 100%;
    }

    .center-menu a {
        font-size: 1rem;
        padding: 0.5rem 0;
    }

    .right-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    .language-switch button {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }

    .settings-icon i {
        font-size: 1.2rem;
    }
    
}

.main-footer {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 8px 24px rgba(255, 0, 157, 0.35);
}

/* === HLAVNÍ OBSAH === */
.main-form {
    min-height: calc(100vh - 160px);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* === FORMULÁŘ === */
.form-container {
    width: 100%;
    max-width: 400px;
    background: #2b2d33;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    box-sizing: border-box;
}

/* === RESPONSIVITA === */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .center-menu {
        justify-content: flex-start;
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .right-controls {
        margin-top: 1rem;
        align-self: flex-end;
    }
}

/* === STYL PRO FORMULÁŘOVÁ POLE === */
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="submit"],
.form-container button {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #3c3f47;
    color: #fff;
    transition: background-color 0.3s ease;
}

.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus,
.form-container input[type="password"]:focus {
    background-color: #50535c;
    outline: none;
}

/* === TLAČÍTKO === */
.form-container input[type="submit"],
.form-container button {
    background-color: #3a7bfd;
    cursor: pointer;
    font-weight: bold;
}

.form-container input[type="submit"]:hover,
.form-container button:hover {
    background-color: #5b94ff;
}

/* === ZAROVNÁNÍ NADPISU === */
.form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* === ZAROVNÁNÍ CHYBOVÉ HLÁŠKY === */
.form-container p {
    text-align: center;
}

/* === OPRAVA INPUTŮ — ZAROVNÁNÍ A ŠÍŘKA === */
.form-container form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-container input,
.form-container button {
    width: 100%;
    box-sizing: border-box;
}

.form-container a {
    color: #ffffff;
    text-decoration: none;
    background-color: #2c2c2c; /* tmavší pozadí */
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.form-container a:hover {
    background-color: #444;
    color: #ffcc00; /* nebo jiná zvýrazňující barva */
    text-decoration: underline;
}

.form-container a {
    color: #ffffff;
    text-decoration: none;
    background-color: #2c2c2c;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

.form-container a:hover {
    background-color: #444;
    color: #ffffff;
    text-decoration: none; /* zruší i hover podtržení */
}

/* === classifieds-nahled inzerce */

.feature-box {
    background-color: #2e2f35;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #f1f1f1;
    text-align: center;
    max-width: 300px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.feature-box:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 170, 255, 0.4);
}

.feature-icon {
    font-size: 2.8rem;
    color: #00aaff;
    margin: 12px auto;
}

.feature-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 32px;
    padding: 40px;
    justify-items: center;
}

/* === Stylizace formuláře přidání inzerátu === */
.add-ad-form {
    background-color: #2a2b30;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.1);
    max-width: 700px;
    margin: 2rem auto;
    color: #fff;
}

.add-ad-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.add-ad-form label {
    display: block;
    margin: 0.8rem 0 0.3rem;
}

.add-ad-form input,
.add-ad-form textarea,
.add-ad-form select {
    width: 100%;
    padding: 0.6rem;
    border: none;
    border-radius: 0.5rem;
    background-color: #1e1f23;
    color: #fff;
    margin-bottom: 1rem;
}

.add-ad-form input[type="file"] {
    background-color: transparent;
    padding: 0.2rem;
}

.add-ad-form button {
    background-color: #007acc;
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-ad-form button:hover {
    background-color: #0099ff;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .edit-btn, .delete-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        border-radius: 4px;
        width: 100%;
        margin: 0.3rem 0;
    }
    
}

/* === category_admin === */

.admin-container { max-width: 800px; margin: auto; padding: 2rem; background: #2a2c30; border-radius: 12px; }
        h2 { color: #fff; }
        form { margin-bottom: 2rem; }
        input, textarea, select {
            width: 100%;
            padding: 0.5rem;
            margin: 0.5rem 0;
            border-radius: 8px;
            border: none;
        }
        label { color: #ccc; }
        button {
            background: #0088cc;
            color: white;
            padding: 0.5rem 1.2rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease;
        }
        button:hover {
            background: #006fa1;
        }
        .message {
            padding: 1rem;
            margin-bottom: 1rem;
            border-radius: 8px;
        }
        .success { background-color: #51695b; color: #fff; }
        .error { background-color: #e74c3c; color: #fff; }

/* === category_admin odhlaseni === */        
        
        .admin-logout-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: #ff4d4d;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease;
}

.admin-logout-btn:hover {
    background-color: #cc0000;
    transform: scale(1.05);
}

.image-wrapper .gallery-image {
    display: none;
}
.image-wrapper .gallery-image.active {
    display: block;
}
.image-nav span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 4px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}
.image-nav span.active {
    background: #333;
}

/* ===SLIDER===INZERCE===VYHLEDAVANI===CLASSFIEDS */
.ads-slider-container {
            overflow-x: auto;
            display: flex;
            gap: 16px;
            padding: 16px;
            scroll-snap-type: x mandatory;
        }
        .ad-box {
            flex: 0 0 auto;
            width: 280px;
            scroll-snap-align: start;
        }
        .ad-box img {
            width: 100%;
            border-radius: 8px;
        }
        .ads-slider h2 {
            text-align: center;
            margin-top: 30px;
        }
        .search-bar {
            text-align: center;
            margin: 30px 0;
        }
        .search-bar input {
            width: 300px;
            padding: 8px;
        }
        .features {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
        }
        .feature-box {
            background: #222;
            color: #fff;
            padding: 20px;
            width: 200px;
            border-radius: 12px;
            text-align: center;
            transition: 0.3s;
            text-decoration: none;
        }
        .feature-box:hover {
            background: #333;
        }
        .feature-box i {
            font-size: 36px;
            margin-bottom: 10px;
        }

        /*===index.php slider===*/

    .ads-carousel-section {
    margin-top: 4rem;
    padding: 0 1rem;
}

.ads-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
}

.ads-carousel::-webkit-scrollbar {
    display: none; /* Skrýt scroll na vzhled */
}

.ads-carousel.dragging {
    cursor: grabbing;
    user-select: none;
}

/* ✨ Animace vstupu */
@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.ad-card {
    flex: 0 0 250px;
    height: 350px; /* přidáno */
    background-color: #2c2f36;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    scroll-snap-align: start;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}


.ad-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.35); /* Modrý nádech efektu */
}

.ad-card:active {
    transform: scale(0.97);
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.3);
}


.ad-card-image {
    height: 160px;
    overflow: hidden;
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-card-info {
    padding: 1rem;
}

.ad-card-info h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.ad-card-info p {
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.ad-price {
    font-weight: bold;
    font-size: 1rem;
}
/* Skrytí menu na menších obrazovkách */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #222;
    color: white;
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.center-menu a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
}

.language-switch button {
    margin: 0 4px;
    padding: 4px 8px;
    background: #444;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.language-switch button:hover {
    background-color: #666;
}

.hamburger-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* MOBILE MENU */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #333;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.mobile-menu.open,
.menu-overlay.open {
    display: block;
}

.close-btn {
    background: none;
    color: white;
    font-size: 24px;
    border: none;
    float: right;
    cursor: pointer;
}

.mobile-nav a {
    display: block;
    color: white;
    padding: 10px 0;
    border-bottom: 1px solid #444;
    text-decoration: none;
}

.mobile-nav a:hover {
    background-color: #444;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
    }

    .center-menu {
        display: none; /* skryj hlavní menu na mobilu */
    }
}















