/* =========================================
   Design tokens (variables)
========================================= */

:root {
    --bg: #cdd6cd;
    --panel: #D5ECD4;
    --muted: #a6b0bf;
    --text: #d6cfcf;
    --brand: #A7C957;
    --brand-2: #8daa48;
    --danger: #d64a1a;
    --warning: #ffb020;
    --card: #444848;
    --input: #fff;
    --border: #212838;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
    --radius: 16px;
}


/* =========================================
   Base / Reset
========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding-top: 50px;
    font-family: "Avenir", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}


/* =========================================
   Layout: Header & Navigation
========================================= */

header {
    position: fixed;
    top: 0;
    z-index: 50;
    width: 100%;
    backdrop-filter: saturate(120%) blur(6px);
    background: rgba(10, 12, 16, .7);
    border-bottom: 1px solid var(--border);
}

.navigace {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    color: #ffffff;
    background-color: transparent;
    font-weight: bold;
    padding-left: 10px;
    margin-right: 10px;
}

.menu-button-container {
    display: none;
}

.menu {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

nav button {
    width: 20%;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

#menu-toggle {
    display: none;
}

.logo {
    height: 65px;
    padding: 0;
}


/* =========================================
   Layout: Main & Sections
========================================= */

main {
    max-width: 1200px;
    width: 100%;
    margin: 28px auto;
    padding: 0 18px;
    flex: 1;
}

.section {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.split {
    display: grid;
    gap: 16px;
}


/* =========================================
   Components: Buttons, Chips, Pills, Badges
========================================= */

.btn,
button {
    appearance: none;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #141a23, #10151c);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: .2s ease;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: #2a3347;
}

.btn.brand {
    border-color: transparent;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #08130e;
}

.btn.navi {
    background: transparent;
}

.btn.navi:hover {
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #08130e;
}
.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;   /* 5 vlevo, 1 vpravo */
    gap: 4px;
}

.rating-input input {
    display: none;                 /* schovat radio buttony */
}

.rating-input label {
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.15s ease;
}

/* vybarvení vybraných hvězdiček */
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #ffd36b;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #0f151e;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: #18202b;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

/* =========================================
   Components: Cards & Content
========================================= */

.card {
    background: linear-gradient(180deg, #444848, #4d5050);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card .body {
    padding: 14px;
}

.card h3 {
    margin: 0 0 4px 0;
}

.card-panel {
    padding: 16px;
    display: grid;
    gap: 14px;
}

.card-padding {
    padding: 16px;
}

.card-comment {
    padding: 12px;
    margin: 10px 0;
}

.card-text {
    margin: 10px 0 12px;
}

/* varianta pro katalog */
.card-kat {
    background: linear-gradient(180deg, #444848, #4d5050);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
    transition: transform 0.15s ease;
}


.card-kat .body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-link:hover .card-kat {
    transform: translateY(-2px);
}

.card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-kat:hover {
    background: #4e5353;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
}


/* =========================================
   Forms & Filters & Tables
========================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    min-width: 640px;
}

.filters {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--input);
    color: grey;
}


textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    font-size: 12px;
    color: var(--muted);
}

.field {
    display: grid;
    gap: 6px;
}

.stack {
    display: grid;
    gap: 12px;
}

.card-tags {
    font-size: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table th {
    color: var(--muted);
    font-weight: 600;
}

.login-register-info {
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.register-link {
    text-decoration: underline;
    color: var(--text);
}

.register-link:hover {
    text-decoration-thickness: 2px;
}
.edit {
    margin-top: 16px;           /* odsazení od tabulky */
    display: flex;
    gap: 8px;
    flex-wrap: wrap;            /* na malém displeji pod sebe */
}

/* =========================================
   Images & Helpers
========================================= */

.karta-obr {
    opacity: 80%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hide {
    display: none !important;
}


/* =========================================
   Footer
========================================= */

.footer {
    background: rgb(10, 12, 16);
    color: var(--text);
    font-size: 12px;
    opacity: 1;
    width: 100%;
    min-height: 50px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.footer a {
    color: var(--text);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-logo img {
    max-height: 40px;
}


/* =========================================
   Alerts & Ratings
========================================= */

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    background: #171c24;
    border: 1px solid var(--border);
}

.alert.warn {
    border-color: rgba(255, 176, 32, .35);
}
.alert-success {
    border-color: var(--brand-2);
    background: #1b2a1b;
}
.alert-link {
    text-decoration: underline;
    color: var(--text);
    font-weight: 500;
}

.alert-link:hover {
    text-decoration-thickness: 2px;
}

.rating {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.rating svg {
    width: 16px;
    height: 16px;
}


/* =========================================
   Page-specific wrappers
========================================= */

.page-login,
.page-profile {
    max-width: 640px;
    margin-inline: auto;
}

.page-login .card,
.page-profile .card {
    padding: 18px 20px;
}
.page-profile .card {
    margin-bottom: 16px;
}

/* horní blok: fotka + info */
.profile-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-avatar img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.profile-info {
    flex: 1;
    display: grid;
    gap: 6px;
}

.profile-info h2 {
    margin: 0 0 4px;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* seznamy uložených / komentovaných / navštívených lokalit */
.profile-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.profile-list-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.profile-list-item a {
    font-weight: 600;
}

.admin-header {
    margin: 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.banner {
    margin-top: 10px;
}

.banner-img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    height: 250px;
}

/* =========================================
   Breakpoints
========================================= */

@media (min-width: 1024px) {
    .grid.cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 720px) {
    .grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .split {
        grid-template-columns: 2fr 1fr;
    }
}

@media (min-width: 860px) {
    .filters {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* =========================================
   Mobile (<= 640px)
========================================= */

@media (max-width: 640px) {
    .nav-links {
        position: relative;
        padding-right: 0;
    }

    .menu-button-container {
        display: flex;
        margin-left: auto;
        margin-right: 15px;
        cursor: pointer;
        z-index: 1100;
    }

    .logo {
        margin-left: 5px;
    }

    .menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        padding: 0;
        gap: 30px;
    }

    .menu > li {
        width: auto;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
    }

    .menu > li a {
        font-size: 24px;
        color: white;
        font-weight: 600;
        text-align: center;
        padding: 0;
        background: none;
    }

    .menu .btn,
    .menu .btn.navi {
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    .menu .btn:hover,
    .menu .btn.navi:hover {
        background: none;
        color: white;
        transform: none;
        text-decoration: underline;
    }

    .menu > li:not(:last-child) {
        border: none;
    }

    #menu-toggle {
        display: none;
    }

    #menu-toggle:checked ~ .menu {
        display: flex;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-logo {
        align-self: center;
    }

    /* nové mobilní úpravy pro admin stránku */
    .section .row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-header {
        font-size: 1.3rem;
    }

    .card-padding {
        padding: 12px;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions .btn {
        flex: 1 1 100%;
        width: 100%;
        text-align: center;
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
