/* === Obecné styly === */
*,
html {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Zajištění konzistentního box modelu */
}

body {
    position: relative;
    font-family: 'Inter', sans-serif; /* Výchozí font pro celý dokument */
}

/* Zamezení vertikálního posouvání při třídě no-scroll */
.no-scroll {
    overflow-y: hidden;
}

/* === Animace pro efekt třesení === */
html.shake,
body.shake {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform-origin: center;
    will-change: transform;
}

html.shake *,
body.shake * {
    transform: inherit !important; /* Dědí transformaci při třesení */
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-20px, -10px) rotate(-2deg); }
    20% { transform: translate(20px, 10px) rotate(2deg); }
    30% { transform: translate(-15px, -5px) rotate(-1deg); }
    40% { transform: translate(15px, 5px) rotate(1deg); }
    50% { transform: translate(-10px, -3px) rotate(-0.5deg); }
    60% { transform: translate(10px, 3px) rotate(0.5deg); }
    70% { transform: translate(-5px, -2px) rotate(-0.3deg); }
    80% { transform: translate(5px, 2px) rotate(0.3deg); }
    90% { transform: translate(-2px, -1px) rotate(-0.1deg); }
}

/* === Hlavička === */
header {
    padding: 1.25rem;
    background: #FFFFFF;
    z-index: 2;
    position: relative;
}

header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

nav a img {
    height: 5.75rem; /* Výška loga v navigaci */
}

header nav ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style-type: none;
}

header nav ul li {
    padding: 2.5rem;
}

header nav ul li a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.25rem;
    transition: color 0.2s;
}

header nav ul li a:hover,
header nav ul li a#active {
    color: #e95b5b; /* Barva při najetí nebo aktivním stavu */
}

/* === Hamburger Menu === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger span {
    width: 100%;
    height: 0.25rem;
    background: #333333;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

/* === Výběrové prvky (select) === */
.language-selector select,
.year-selector,
main .hero-center .contact-right .contact-form select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    min-width: 120px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10.293 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L10 12.586l3.293-3.293a1 1 0 011.414 1.414l-4 4z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
}

.language-selector select:hover,
.year-selector:hover,
main .hero-center .contact-right .contact-form select:hover {
    background-color: #f9fafb;
}

.language-selector select:focus,
.year-selector:focus,
main .hero-center .contact-right .contact-form select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

/* === Hlavní obsah === */
main {
    padding: 1.25rem;
    position: relative;
    min-height: calc(100vh - 7.5rem);
    z-index: 1;
}

main.contact-page {
    min-height: calc(100vh - 7.5rem);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* === Diagonální pozadí === */
.diagonal-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        135deg,
        #ed9759 0,
        #ed9759 50px,
        #FFFFFF 50px,
        #FFFFFF 100px
    );
    background-size: 200% 200%;
    animation: moveDiagonal 45s linear infinite;
    z-index: 0;
}

@keyframes moveDiagonal {
    0% { background-position: 100% 100%; }
    100% { background-position: 0 0; }
}

/* === Text "Coming Soon" === */
.coming-soon {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    font-size: 8rem;
    font-weight: 700;
    color: #333333;
    z-index: 1;
}

.coming-soon-text {
    margin-right: 0.5rem;
}

.dots {
    display: inline-block;
    width: 2rem;
    text-align: left;
}

.dots::after {
    content: '.';
    display: inline-block;
    animation: dotsAnimation 2s infinite;
}

@keyframes dotsAnimation {
    0% { content: '.'; }
    50% { content: '..'; }
    100% { content: '...'; }
}

/* === Hlavní sekce Hero === */
main .hero {
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

main .hero p {
    text-align: center;
    max-width: 45%;
}

main.contact-page .hero-center {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 0.5rem;
    border-radius: 0.375rem;
    gap: 2rem;
    margin-top: 1rem; /* Přidán margin-top pro odstup od headeru */
}

.success-message {
    color: green;
    margin-bottom: 1rem;
}
.error-message {
    color: red;
    margin-bottom: 1rem;
}

main .hero-center {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 2rem;
    border-radius: 0.375rem;
    gap: 2rem;
}

/* === Kontaktní sekce - levá část === */
main .hero-center .contact-left .contact-socials {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
}

main .hero-center .contact-left .contact-socials .social-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

main .hero-center .contact-left .contact-socials .social-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333333;
}

main .hero-center .contact-left .contact-socials .social-text p {
    font-size: 0.875rem;
    color: #666666;
}

main .hero-center .contact-left .contact-socials .social-text a {
    font-size: 0.875rem;
    color: #e95b5b;
    text-decoration: none;
}

main .hero-center .contact-left .contact-socials .social-text a:hover {
    text-decoration: underline;
}

/* === Kontaktní formulář - pravá část === */
main .hero-center .contact-right .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    max-width: 400px;
    width: 100%;
}

main .hero-center .contact-right .contact-form .form-row {
    display: flex;
    gap: 1rem;
}

main .hero-center .contact-right .contact-form .form-group {
    flex: 1;
}

main .hero-center .contact-right .contact-form h2,
main .hero-center .contact-right .contact-form label {
    font-weight: 600;
    color: #333333;
}

main .hero-center .contact-right .contact-form input,
main .hero-center .contact-right .contact-form textarea,
main .hero-center .contact-right .contact-form select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
    width: 100%;
    box-sizing: border-box;
}

main .hero-center .contact-right .contact-form textarea {
    resize: vertical;
    max-width: 100%;
}

main .hero-center .contact-right .contact-form input:focus,
main .hero-center .contact-right .contact-form textarea:focus,
main .hero-center .contact-right .contact-form select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

main .hero-center .contact-right .contact-form input[type="submit"] {
    background-color: #ED7520;
    color: white;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

main .hero-center .contact-right .contact-form input[type="submit"]:hover {
    background-color: #d36314;
}

/* === Filtry galerie === */
.gallery-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-divider {
    width: 1px;
    height: 2rem;
    background-color: #d1d5db;
}

.gallery-btn button {
    padding: 0.75rem 1.5rem;
    background-color: #ED7520;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.gallery-btn button:hover,
.gallery-btn button.active {
    background-color: #d36314;
}

/* === Galerie === */
main .gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.year-divider h3 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin: 1rem 0 0.5rem;
    color: #333;
}

.year-divider hr {
    border: 0;
    height: 1px;
    background: #d1d5db;
    margin: 0.5rem 0;
}

.year-group {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(5, 1fr);
}

main .gallery article {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
}

main .gallery article:hover {
    cursor: pointer;
}

main .gallery article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s;
}

main .gallery article:hover img {
    transform: scale(1.15); /* Zvětšení obrázku při najetí */
}

main .gallery article p {
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
    color: #333;
}

.gallery article.hidden {
    display: none;
}

/* === Modální okno === */
.modal {
    display: none;
    position: fixed;
    z-index: 3;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    margin: auto;
    display: block;
    height: 80%;
    max-width: 85vw;
    max-height: 85vh;
    pointer-events: none;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* === Patička === */
footer {
    display: flex;
    padding: 5rem 1.25rem 1.5rem 1.25rem;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    width: 100%;
}

footer .spacer {
    width: 150px; /* Šířka odpovídající přibližně šířce odkazu pro symetrii */
}

footer p {
    flex: 0 0 auto;
    margin: 0;
    text-align: center;
}

footer a {
    font-family: 'Inter', sans-serif;
    color: #000000;
    text-decoration: none;
    transition-duration: 0.2s;
    text-align: right;
}

footer a:hover {
    color: #e95b5b;
}
/* === Responzivní design === */
@media only screen and (max-width: 1600px) {
    .year-group {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media only screen and (max-width: 1200px) {
    .year-group {
        grid-template-columns: repeat(3, 1fr);
    }

    .coming-soon {
        font-size: 6rem; /* Smaller "Coming Soon" text */
    }
}

@media only screen and (max-width: 768px) {
    .year-group {
        grid-template-columns: repeat(2, 1fr);
    }

    main.contact-page .hero-center {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    padding-top: 7rem; /* Zvýšený padding-top pro odstup od headeru a hamburger menu */
    margin-top: 0; /* Odebrán margin-top, protože padding-top řeší odstup */
    }    

    /* Hamburger menu styles for mobile */
    header nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #FFFFFF;
        padding: 1rem 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 2;
    }

    header nav ul.active {
        display: flex;
    }

    header nav ul li {
        padding: 1rem;
        text-align: center;
        width: 100%;
    }

    header nav ul li a {
        font-size: 1.1rem;
        display: block;
    }

    .language-selector select {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .hamburger {
        display: flex;
    }

    /* Gallery filter buttons responsiveness */
    .gallery-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .gallery-btn {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 1rem;
        width: 100%;
        max-width: 300px; /* Limit button width for better appearance */
    }

    .gallery-btn button {
        width: 100%;
        box-sizing: border-box;
    }

    .filter-divider {
        display: none; /* Hide vertical divider on mobile */
    }

    .gallery-year-filter {
        width: 100%;
        max-width: 300px; /* Match button width */
        margin: 0 auto;
        padding-top: 1rem;
        border-top: 1px solid #d1d5db; /* Horizontal line above year selector */
    }

    .year-selector {
        width: 100%; /* Ensure select element matches button width */
        box-sizing: border-box;
    }

    /* Hero text wider on mobile */
    main .hero p {
        max-width: 90%;
    }

    /* Modal image to preserve aspect ratio on mobile */
    .modal-content {
        height: auto;
        width: auto;
        max-width: 90vw;
        max-height: 70vh; /* Reduced to leave space for caption */
        object-fit: contain; /* Preserve aspect ratio */
    }

    #caption {
        margin-top: 10px;
        width: 90%;
        max-width: 90vw;
        height: auto;
        max-height: 20vh; /* Ensure caption fits within viewport */
    }

    .coming-soon {
        font-size: 3.5rem; /* Smaller "Coming Soon" text */
    }

    footer {
        flex-direction: column;
    }

    footer a,
    footer p {
        font-family: 'Inter', sans-serif;
        color: #000000;
        text-decoration: none;
        transition-duration: 0.2s;
        text-align: right;
        font-size: 0.85rem;
    }
}

@media only screen and (max-width: 480px) {
    .year-group {
        grid-template-columns: 1fr;
    }

    main .hero-center .contact-right .contact-form .form-row {
        flex-direction: column;
    }

    nav a img {
        height: 4rem; /* Smaller logo on very small screens */
    }

    .coming-soon {
        font-size: 2.5rem; /* Smaller "Coming Soon" text */
    }
}