:root {
    /* Podzimní paleta z oznámení */
    --primary-color: #7c2a31; /* Hluboká vínová */
    --primary-hover: #9e3f47;
    --secondary-color: #c47e64; /* Tlumená oranžová/cihlová */
    --text-color: #3e2723; /* Tmavě hnědá pro text */
    --bg-color: #ffffff; /* Čistě bílá, aby splynula s obrázky s bílým pozadím */
    --section-bg: #fdfbf9; /* Krémová barva pro bloky */
    --white: #ffffff;
    --light-border: #eaddd7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    /* Odebrali jsme velký padding, už není potřeba, kocour se roluje s obsahem */
}

/* --- Rohové květinové dekorace --- */
.corner-decoration {
    position: fixed;
    z-index: 1; 
    max-width: 250px;
    width: 30%;
    height: auto;
    pointer-events: none;
    opacity: 0.95;
    mix-blend-mode: multiply; 
}

.corner-tl { top: 0; left: 0; }
.corner-tr { top: 0; right: 0; transform: scaleX(-1); }
.corner-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner-br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* --- Ikona kocoura Garfielda --- */
.garfield-icon {
    position: absolute; /* ZMĚNA: Už není fixed, visí dole na kontejneru */
    z-index: 5;
    bottom: -70px; /* Záleží na ořezu obrázku – visí kousek pod kontejnerem */
    left: 50%;
    transform: translateX(-50%);
    max-width: 160px;
    width: 30%;
    height: auto;
    opacity: 0.95;
    pointer-events: none; 
    animation: garfieldSway 4s ease-in-out infinite; 
    transform-origin: top center; /* ZMĚNA: Houpá se za tlapky (vršek obrázku), ne přes střed */
}

/* Jemné kolébání pro Garfielda jako kyvadlo */
@keyframes garfieldSway {
    0%, 100% { transform: translateX(-50%) rotate(-2deg); }
    50% { transform: translateX(-50%) rotate(2deg); }
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1, h2 { position: relative; z-index: 10; } 

header {
    text-align: center;
    padding: 8rem 1rem 4rem 1rem;
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--secondary-color);
    font-style: italic;
}

.header-date {
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem; /* Spodní padding na nule, aby hrana seděla na bloku RSVP */
    position: relative; /* DŮLEŽITÉ: Garfield se teď absolutně chytá tohoto kontejneru */
    z-index: 10; 
}

section {
    background: var(--section-bg);
    padding: 3rem;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(124, 42, 49, 0.05);
    border: 1px solid var(--light-border);
}

/* RSVP blok bude poslední, odebereme mu spodní margin, ať na něm kocour dobře visí */
section#rsvp {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 3px solid var(--secondary-color); /* Vizuální hrana, za kterou se kocour chytí */
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.info-block h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Ikony pro harmonogram --- */
#harmonogram ul {
    list-style-type: none;
    text-align: center;
    font-size: 1.15rem;
    line-height: 2.2;
}

#harmonogram li {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#harmonogram .harmonogram-icon {
    font-size: 1.3rem;
    color: var(--secondary-color);
    width: 25px;
    text-align: center;
}


/* --- Formuláře --- */
.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--primary-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--light-border);
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    background-color: var(--white);
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 1rem;
}
.checkbox-group input {
    width: auto;
    margin-top: 5px;
    transform: scale(1.2);
}
.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

/* Ubytování */
.accommodation-section {
    background-color: var(--white); 
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eddcd5;
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.accommodation-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-info {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 1rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    transition: all 0.3s;
    width: 100%;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(124, 42, 49, 0.2);
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(124, 42, 49, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
    margin-top: 1rem;
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Flash messages --- */
.flash-message {
    padding: 1.2rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}
.flash-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

.map-container iframe {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Fotogalerie --- */
.upload-area {
    border: 3px dashed var(--light-border);
    padding: 3rem;
    text-align: center;
    background-color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}
.upload-area:hover {
    border-color: var(--secondary-color);
}
.upload-area input[type=file] {
    display: none;
}
.upload-btn-style {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.gallery-item:hover {
    transform: scale(1.03);
    z-index: 3;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Admin tabulky --- */
.admin-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 15px;
    border-bottom: 1px solid var(--light-border);
    text-align: left;
}
th {
    background-color: var(--section-bg);
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}
tr.status-nedorazim { background-color: #fff0f0; color: #aaa; }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem;
    font-size: 0.9rem;
    color: var(--text-color);
    background-color: rgba(196, 126, 100, 0.05);
    border-top: 3px solid var(--secondary-color);
    position: relative; 
    bottom: 0;
    width: 100%;
    height: auto;
    z-index: 10;
    margin-top: 5rem; /* Zvětšený odstup, aby měl kocour místo na houpání a nemlátil se do textu footeru */
}

footer a {
    position: relative;
    z-index: 11;
    pointer-events: auto; 
}

/* --- Responzivita --- */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    section { padding: 1.5rem; }
    header h1 { font-size: 3rem; }
    .subtitle { font-size: 1.5rem; }
    .corner-decoration { width: 45%; opacity: 0.6; }
    .garfield-icon { max-width: 70px; bottom: -45px; } /* Na mobilu menší a blíž */
    header { padding-top: 4rem; }
}