/* Základní nastavení */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #E0E0E0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #1e1e1e;
    border-top: 5px solid #4d9fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader.fade-out {
    opacity: 0;
}

/* Cookie lišta */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    margin-right: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons button,
.cookie-buttons a {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

#acceptCookies {
    background: #4d9fff;
    color: white;
}

#rejectCookies {
    background: transparent;
    border: 1px solid #4d9fff;
    color: #4d9fff;
}

.cookie-buttons a {
    color: #4d9fff;
}

/* Tlačítko pro návrat nahoru */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4d9fff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top:hover {
    background: #3a7acc;
    transform: translateY(-3px);
}

#back-to-top.show {
    display: flex;
}

/* Hlavička a navigace */
header {
    background-color: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.header-container {
    padding: 20px 40px;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #E0E0E0;
    font-size: 2em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: #E0E0E0;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #4d9fff;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: rgba(30,30,30,0.95);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    margin-top: 5px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: visibility 0s linear 0.2s, opacity 0.2s linear;
    padding: 5px 0;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.dropdown-content a {
    color: #E0E0E0;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
    background: transparent;
}

.dropdown-content a:hover {
    color: #4d9fff;
}

/* Patička */
footer {
    background-color: rgba(30, 30, 30, 0.95);
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.social-links {
    margin-bottom: 10px;
}

.social-links a {
    font-size: 24px;
    color: #E0E0E0;
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #4d9fff;
}

/* Hero sekce pro galerii */
.hero-gallery {
    position: relative;
    height: 60vh;
    background: url('pozadi_galerie.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: brightness(0.7);
    z-index: 1;
}

.hero-gallery-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    background: rgba(0,0,0,0.4);
    border-radius: 15px;
    padding: 40px;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-gallery-content h2 {
    font-size: 3.8em;
    margin-bottom: 20px;
    color: #4d9fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-gallery-content p {
    font-size: 1.6em;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Galerie sekce */
.gallery {
    padding: 100px 20px;
    background: linear-gradient(145deg, rgba(40,40,40,0.95), rgba(30,30,30,0.95));
}

.gallery-content {
    max-width: 1400px;
    margin: 0 auto;
}

.category-heading {
    color: #4d9fff;
    font-size: 2em;
    margin: 40px 0 20px;
    text-align: center;
    border-bottom: 2px solid #4d9fff;
    padding-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.gallery-item {
    display: flex;
    background: linear-gradient(145deg, rgba(60,60,60,0.95), rgba(40,40,40,0.95));
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(77,159,255,0.1);
}

.gallery-image {
    width: 50%;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-text {
    padding: 20px;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-text p {
    font-size: 1.1em;
    line-height: 1.5;
}

/* Reference sekce */
/* Ponechána původní definice – bez úprav uvnitř rámečku */
.reference-sekce {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

/* Přidání pozadí za celou sekci (včetně prostoru okolo rámečku) */
.reference-sekce::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: url('pozadi_reference.jpg') no-repeat center center/cover;
    z-index: -1;
    border-radius: 20px;
}

.reference-sekce h2 {
    color: #4d9fff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 4em;
}

.reference-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.reference-box {
    background-color: rgba(40, 40, 40, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    flex-grow: 1;
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

.reference-content {
    display: none;
    text-align: center;
}

.reference-content.active {
    display: block;
}

.jmeno-box {
    background-color: #4d9fff;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.jmeno-box h4 {
    color: #E0E0E0;
    margin: 0;
    font-size: 1.1em;
}

.ref-btn {
    background: none;
    border: none;
    color: #4d9fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.ref-btn:hover {
    color: #3a7acc;
}

/* Responzivní design */
@media screen and (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item {
        flex-direction: column;
    }
    .gallery-image,
    .gallery-text {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-banner p {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .cookie-buttons button,
    .cookie-buttons a {
        width: 100%;
    }
    #back-to-top {
        bottom: 80px;
    }
}
