html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    background: #fefefe;
    color: #333;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 20, 7, 0.8);
    z-index: 1000;
    box-shadow: none; /* volitelné – můžeš ztlumit stín box-shadow: 0 2px 5px rgba(0,0,0,0.2); */
    padding: 1rem 2rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}

/* Menu odkazy */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    padding: 0.5rem;
}

/* Tlačítko pro mobil */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

.header {
    background-image: url('img/header.jpg');
    background-size: cover;
    background-position: center;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    text-align: center;
    padding-top: 100px; /* nebo víc podle výšky menu */
}

.header h1 {
    font-size: 2.5rem;
    background: rgba(0,0,0,0.5);
    padding: 1rem 2rem;
    border-radius: 10px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 1rem 2rem; /* místo 2rem jen odspodu */
}

h2 {
    color: #ba4e4e;
    margin-top: 2rem;
}

ul {
    padding-left: 1.2rem;
}

form { margin-top: 1rem; }
label { display: block; margin-top: 1rem; }
input, select, textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #ba4e4e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #a13f3f;
}

.qr {
    margin-top: 3rem;
    text-align: center;
}

.qr img {
    margin-top: 0.5rem;
    max-width: 200px;
}

/* Animace */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* Potvrzovací hláška */
.alert {
    margin-top: 1rem;
    padding: 1rem;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    display: none;
}


/* gallery*/

#gallery{
    padding-top: 2rem;
    text-align: center;
}

.gallery-form{
    margin: 2rem 0;
    padding: 2rem;
}

.filters{
    margin: 1rem 0;
}

.filters a {
    display: inline-block;
    padding: 0.5em 1em;
    margin: 0.2em;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: #f8f8f8;
    transition: background 0.3s;
}

.filters a:hover {
    background: #e0e0e0;
}

.filters a.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.gallery-item {
    width: 300px;
    /*height: 200px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery img:hover {
    transform: scale(1.05);
}

.gallery img.landscape {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery img.portrait {
    max-width: 200px;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* filter form*/
#filterForm{
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    margin: 1rem auto;
    text-align: center;
}
.pagination a {
    margin: 0 0.3rem;
    text-decoration: none;
    color: #1e1407;
    font-weight: bold;
    padding: 0.3rem 0.7rem;
    border: 2px solid #1e1407;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.pagination a.active, .pagination a:hover {
    background-color: #ba4e4e;
    color: white;
    border-color: #ba4e4e;
}


#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid #ccc;
    border-top: 6px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* potvrzení*/
.confirmed-list {
    margin-top: 1em;
    padding: 1em;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.confirmed-list.expanded {
    max-height: 500px; /* dostatečně velká hodnota, aby se vešel celý seznam */
}


.toggle-button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

.summary-box {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 1rem;
    flex-wrap: wrap; /* pro jistotu */
}

.summary-section {
    flex: 1;
    min-width: 200px;
    background: #fffdf9;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.summary-section h4 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: #3b2f1e;                   /* sladěno s nadpisy */
}

.summary-section p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
    color: #555;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: #f7f5f2;
    color: #3b2f1e;
    text-align: left;
}

thead th {
    padding: 14px 18px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
}

tbody tr:nth-child(even) {
    background-color: #fafafa;
}

tbody tr:hover {
    background-color: #f0f0f0;
}

td:first-child {
    font-weight: 500;
}

.rsvp-form-container {
    max-width: 600px;
    margin: 3rem auto;
    background-color: #fffdf9;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', sans-serif;
}

.rsvp-form-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #3b2f1e;
    font-size: 1.6rem;
}

.rsvp-form-container form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.rsvp-form-container label {
    font-weight: 600;
    color: #555;
}

.rsvp-form-container input[type="text"],
.rsvp-form-container input[type="email"],
.rsvp-form-container input[type="number"],
.rsvp-form-container select,
.rsvp-form-container textarea {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.rsvp-form-container button {
    background-color: #7b5c3d;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rsvp-form-container button:hover {
    background-color: #5f442c;
}

#success-alert {
    display: none;
    margin-top: 1rem;
    background: #dff0d8;
    padding: 0.8rem;
    border-radius: 6px;
    color: #3c763d;
    border: 1px solid #d0e9c6;
    text-align: center;
}


.gallery-form {
    max-width: 600px;
    margin: 3rem auto;
    background-color: #fffdf9;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', sans-serif;
}

.gallery-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #3b2f1e;
    font-size: 1.6rem;
}

.gallery-form form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.gallery-form label {
    font-weight: 600;
    color: #555;
}

.gallery-form input[type="file"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.gallery-form button {
    background-color: #7b5c3d;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-form button:hover {
    background-color: #5f442c;
}

#response-message {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 6px;
    background-color: #eaf6ea;
    color: #2b662b;
    border: 1px solid #cde5cd;
    text-align: center;
    font-weight: 500;
}

.drop-zone {
    position: relative;
    border: 2px dashed #bbb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #666;
    background-color: #fdfaf5;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.drop-zone.dragover {
    background-color: #fff5e6;
    border-color: #7b5c3d;
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.gallery-grid a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s;
}
.gallery-grid a:hover {
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
}
.gallery-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
}


.popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: #2ecc71;
    color: white;
    padding: 1em 2em;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    width:250px;

}

.popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.popup .popup-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1em;
}

.hidden {
    display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(30, 20, 7, 0.95); /* tmavší pro lepší čitelnost */
        position: absolute;
        top: 114px;
        right: 0;
        width: 100%;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        color: white;        /* bílá barva */
        margin-right: 1rem;  /* odsazení z pravé strany */
        user-select: none;   /* nelze označit text */
        text-shadow: 0 0 3px rgba(0,0,0,0.7);
    }

    .nav-links li {
        text-align: left;
        padding: 0.5rem 1rem;
    }

    .gallery-item {
        width: 150px;
        /*height: 200px;*/
    }

    .gallery img.landscape {
        max-width: 150px;
        max-height: 200px;
    }

    .gallery img.portrait {
        max-width: 200px;
        max-height: 150px;
    }

    /*table, thead, tbody, th, td, tr {
        display: block;
    }*/

    /*thead {
        display: none;
    }*/

    tbody tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
        background: #fff;
    }

    tbody td {
        padding: 10px 12px;
        text-align: right;
        position: relative;
    }

    tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        top: 10px;
        font-weight: bold;
        color: #777;
        text-align: left;
    }

}

#houseplan {
    position: relative;
    width:100%;
    aspect-ratio: 1294 / 742; /* udržuje proporce původního obrázku */
    background-image: url("img/house.jpg");
    background-size: cover; /* nebo contain dle potřeby */
    background-position: center;
    border-radius: 6px;
    overflow: visible;
    box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}

#houseplan-wrapper {
    position: relative;
    height: 70vh;
}

.room-group {
    position: absolute;
    transform: translate(-50%, -50%);
    width: auto;
    min-width: 120px;
    background: rgba(204, 176, 139, 0.9);
    /*border: 2px solid #444;*/
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 0.5em;

    display: flex;
    flex-direction: row;    /* sloupce vedle sebe */
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.5em;
}

.room {
    flex: 1 1 100%;
    font-weight: bold;
    text-align: left;
    margin-bottom: 0.5em;
    font-size: 0.35em;
    width: 100%;
}

.room-beds {
    display: flex;
    flex-direction: column; /* v jednom sloupci pod sebe */
    flex-wrap: nowrap;
}

.bed {
    flex: 0 0 auto;          /* neexpanduje */
    min-width: 90px;         /* aby byl čitelný text */
    background: #eee;
    padding: 0.4em;
    margin: 0.2em 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.35em;
    text-align: left;
    white-space: nowrap;     /* aby se jména nelámala */
}

.bed:hover {
    background: #ddd;
}

#chaletplan {
    position: relative;
    width:100%;
    aspect-ratio: 1294 / 742; /* udržuje proporce původního obrázku */
    background-image: url("img/chalet.jpg");
    background-size: cover; /* nebo contain dle potřeby */
    background-position: center;
    border-radius: 6px;
    overflow: visible;
    box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}

#chaletplan-wrapper {
    position: relative;
    height: 70vh;
}


@media (max-width: 700px) {
    .rsvp-form-container {
        margin: 2rem 0;
        padding: 1.5rem;
    }

    .gallery-form {
        margin: 2rem 0;
        padding: 1.5rem;
    }

    .summary-box {
        flex-direction: column;   /* na mobilu bloky pod sebou */
    }

    #houseplan {
        height: 70vh;
    }

    #houseplan-wrapper {
        height: 70vh;
    }

    .room-group {
        border-radius: 5px;
        min-width: 70px;
        padding: 0.1em;
        gap: 0.1em;
    }
    .room {
        font-size: 0.2em;
    }
    .bed {
        border-radius: 2px;
        min-width: 40px;
        font-size: 0.2em;
        padding: 0.10em;
    }

}
