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

body {
    font-family: Arial, sans-serif;
    background: url("../images/background.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #111;
}

/* ===== MENU ===== */
.menu {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.35); /* SKUTOČNE PRIEHĽADNÉ */
    border-bottom: 1px solid rgba(255,255,255,0.4);
}

.menu-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.logo {
    margin-right: 20px;
}

.menu-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.menu-list > li {
    position: relative;
    padding: 20px 15px;
}

/* zvislé deliace čiary */
.menu-list > li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 30%;
    height: 40%;
    width: 1px;
    background: rgba(0,0,0,0.3);
}

.menu-list a {
    text-decoration: none;
    color: #000;
    font-size: 15px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6); /* čitateľnosť */
}

.menu-list a:hover {
    color: #004d2c;
}

/* ===== SUBMENU ===== */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255,255,255,0.95); /* skoro nepriehľadné */
    border: 1px solid #ddd;
    min-width: 220px;
    z-index: 1000;
    list-style: none;   /* ← zruší odrážky */
    padding-left: 0;    /* ← istota, že nič neodskočí */
    margin: 0;
}

.submenu li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    font-size: 14px;
}

.has-submenu:hover .submenu {
    display: block;
}

/* LOGIN */
.login a {
    font-weight: bold;
}

/* ===== CONTENT ===== */
.content {
    max-width: 900px;
    margin: 80px auto;
    padding: 60px;
    background: rgba(255, 255, 255, 0.55); /* svetlý presvit */
    border-radius: 6px;
    text-align: left;
}

.content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    text-align: center;
}

.content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    text-align: center;
}

.content p {
    font-size: 18px;
    line-height: 1.6;
    color: #000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

/* ===== Buttons ===== */
.btn {
    display:inline-block;
    padding:5px 10px;
    border-radius:4px;
    text-decoration:none;
    font-size:14px;
}

.edit {
    background:#4caf50;
    color:white;
}

.edit:hover {
    background:#43a047;
}

.delete {
    background:#e53935;
    color:white;
    border:none;
    cursor:pointer;
}

.delete:hover {
    background:#d32f2f;
}

/* ===== ADMIN TABLE ===== */
table {
    border-collapse: collapse;
    width: 100%;
    background: rgba(255,255,255,0.7);
}

th {
    background: rgba(0,0,0,0.1);
    font-weight: bold;
}

td, th {
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.2);
    text-align: left;
}

table img {
    border-radius: 4px;
}

/* ===== FORMS ===== */
input, textarea, select {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #aaa;
    width: 100%;
    max-width: 400px;
}

textarea {
    min-height: 90px;
}

select[multiple] {
    height: 120px;
}

button {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

/* ===== PAGINATION ===== */
.pages {
    margin-top: 20px;
    text-align: center;
}

.pages a, .pages b {
    display: inline-block;
    padding: 6px 10px;
    margin: 2px;
    border-radius: 4px;
}

.pages a {
    background: rgba(255,255,255,0.6);
    text-decoration: none;
    color: #000;
}

.pages a:hover {
    background: rgba(255,255,255,0.9);
}

.pages b {
    background: #4caf50;
    color: white;
}

/* overlay login */
.overlay {
    display: none; /* skrytý pri načítaní */
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    z-index:1000;
    align-items:center;
    justify-content:center;
}

.login-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
}

.login-box .error {
    color: red;
    margin-bottom: 10px;
}

.login-box .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.login-box input {
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.login-box button[type="submit"] {
    padding: 10px 20px;
    border: none;
    background: #27ae60;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.login-box button[type="submit"]:hover {
    background: #2ecc71;
}

/* ===== PHOTO GALLERY – rovnomerné rozmiestnenie ===== */
/*
.gallery {
    display: flex;
    flex-wrap: wrap;           
    justify-content: space-between;
    margin-top: 30px;
}

.gallery a {
    display: block;
    height: 200px;
    flex: 1 1 auto;
    margin-bottom: 15px;
    text-align: center; 
}

.gallery img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: inline-block;
}
*/
/* do lava zarovnat */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Zmena z space-between na flex-start */
    margin-top: 30px;
}

.gallery a {
    display: block;
    height: 200px;
    flex: 0 0 auto;  /* Obrázky sa nemenia, držia svoju prirodzenú šírku */
    margin-right: 10px;  /* medzera medzi fotkami */
    margin-bottom: 15px;
    text-align: center;
}

.gallery img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: inline-block;
}


/* ===== PHOTO DETAIL PAGE – FIX ===== */
.content.photo-detail {
    display: block;
    width: 95%;               /* flexibilné podľa viewportu */
    max-width: 1080px;        /* maximálna šírka kontajnera */
    margin: 60px auto;
    padding: 20px;            /* priestor okolo */
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85); /* svetlé pozadie pre čitateľný text */
    border-radius: 6px;
    text-align: left;          /* základné zarovnanie textu doľava */
}

/* FOTO RÁM */
.photo-frame {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 25px;
    text-align: left;
}

.photo-frame img {
    max-width: 100%;           /* nikdy širšie než kontajner */
    width: auto;
    max-height: 700px;         /* maximálna výška obrázku */
    height: auto;              /* zachovanie proporcií */
    display: block;
    margin: 0;                 /* centrovanie obrázku */
    border-radius: 6px;
    object-fit: contain;       /* obrázok sa neoreže */
}

/* TEXT POD FOTKOU */
.photo-info {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;          /* všetok text zarovnaný doľava */
}

.photo-info h1,
.photo-info h2,
.photo-info p,
.photo-info .meta {
    text-align: left;          /* explicitne aj pre všetky pod-elementy */
    margin-bottom: 10px;
    line-height: 1.5;
}

.photo-info h1 {
    font-size: 26px;
    color: inherit;            /* farba textu podľa témy (day/night) */
}

.photo-info .meta {
    font-size: 0.9em;
    color: #555;
}

/* ===== THEME SYSTEM ===== */
body.theme-day {
    background: #e0e0e0;
    color: #111;
}

body.theme-day .menu {
    background: #fff;
}

body.theme-day .content,
body.theme-day .content.photo-detail,
body.theme-day .photo-info {
    background: #fff;
    color: #111;
}

body.theme-day .content h1,
body.theme-day .content h2,
body.theme-day .place-description,
body.theme-day .photo-info h1,
body.theme-day .photo-info h2,
body.theme-day .photo-info p {
    color: #111; /* tmavý text na svetlom pozadí */
}

/* ---------------------------------- */
body.theme-night {
    background: #0f1115;
    color: #e6e6e6;
}

body.theme-night .menu {
    background: rgba(0,0,0,0.7);
}

body.theme-night .content,
body.theme-night .content.photo-detail,
body.theme-night .photo-info {
    background: rgba(30,30,30,0.85);
    color: #e6e6e6; /* svetlý text */
}

body.theme-night .content h1,
body.theme-night .content h2,
body.theme-night .place-description,
body.theme-night .photo-info h1,
body.theme-night .photo-info h2,
body.theme-night .photo-info p {
    color: #f0f0f0; /* svetlejší text, dobre čitateľný */
}

body.theme-night .submenu {
    background: rgba(0,0,0,0.8);   /* tmavé pozadie */
    border-color: rgba(255,255,255,0.2); /* jemný rám */
}

body.theme-night a {
    color: #fff;
}

body.theme-night .submenu a {
    color: #fff;  /* odkazy biele */
}

body.theme-night .submenu a:hover {
    color: #4caf50; /* napr. zvýraznenie pri hover */
}

body.theme-night .meta {
    color: #fff; /* biely text v dark mode */
}

/* ---------------------------------- */
/* Obrázok zostáva celá šírka */
.wide-photo {
    width: 100%;
}

.wide-photo .wide-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* Texty vedľa seba */
.meta-wrapper {
    display: flex;
    gap: 20px;            /* medzera medzi bunkami */
    flex-wrap: wrap;       /* umožní zalomenie na mobil */
    margin-top: 20px;
}

.meta-wrapper .meta-text {
    flex: 1 1 45%;         /* približne polovica, ale rastie podľa priestoru */
}

/* Mobilné zobrazenie */
@media (max-width: 768px) {
    .meta-wrapper {
        flex-direction: column; /* texty pod sebou */
    }

    .meta-wrapper .meta-text {
        flex: 1 1 100%;
    }
}

.meta .author {
    display: block;       /* nový riadok */
    text-align: right;    /* zarovnanie doprava */
    margin-top: 5px;      /* malý odstup od citátu */
    font-style: normal;   /* nech nezachová kurzívu z citátu */
    font-weight: bold;    /* voliteľne zvýrazniť meno */
}

.site-footer {
    border-top: 1px solid #ddd;
    margin-top: 40px;
    padding: 20px 0;
    font-size: 14px;
}

.footer-inner {
    max-width: 1200px;   /* rovnaké ako .content alebo .menu-inner */
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

.site-footer p {
    margin: 5px 0;
}

.search-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;   /* dôležité */
    width: 100%;                     /* dôležité */
    margin-bottom: 30px;
}

.search-form {
    flex: 0 0 420px;                 /* pevná šírka formulára */
    max-width: 320px;
}

.search-info {
    flex: 1;                         /* zaberie zvyšok priestoru */
    max-width: 400px;
}

/* === DESKTOP (default) === */
.search-info-desktop {
    display: block;
}

.search-info-mobile {
    display: none;
}

/* === MOBILE === */
@media (max-width: 768px) {

    .search-wrapper {
        flex-direction: column;
    }

    .search-info-desktop {
        display: none;
    }

    .search-info-mobile {
        display: block;
        margin-top: 0;
        padding: 12px;
        border-radius: 6px;
    }

    .search-info-mobile summary {
        cursor: pointer;
        font-weight: bold;
    }
}

/* === Skyvanie textu ako na FB === */
.place-description .toggle-text {
    display: inline-block;
    margin-left: 5px;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}

/* zakaz praveho kliku a stihnutiu obrazka */
.photo-wrapper {
    position: relative;
    display: inline-block;
}

.photo-protect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: not-allowed;
}

