/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #667eea;
    --text-color: #333;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'EB Garamond', serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 18px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.75rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.lang-link.active {
    background: var(--accent-color);
    color: var(--white);
}

.lang-separator {
    color: var(--border-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
    padding-top: 1rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.page-content ul, .page-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* Gallery Styles */
.gallery-header {
    margin-bottom: 0rem;
    text-align: center;
}

.gallery-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

.category-card-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-content {
    padding: 1.5rem;
}

.category-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.category-card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-light);
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-item-image img {
    transform: scale(1.05);
}

.gallery-item-title {
    padding: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
}

/* Image Detail */
.image-detail {
    max-width: 1400px;
    margin: 0 auto;
}

.image-detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.image-detail-photo {
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 600px;
}

.image-detail-photo img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
    transition: transform 0.3s;
}

.image-detail-photo img:hover {
    transform: scale(1.02);
}

.image-detail-info {
    padding: 3rem 2rem;
}

.image-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.image-description {
    color: var(--text-color);
    line-height: 1.8;
}

.image-description p {
    margin-bottom: 1rem;
}

.image-story {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.image-story h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.image-story p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Empty State */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Tag Filter */
.tag-filter-container {
    max-width: 600px;
    margin: 1rem auto 2.5rem;
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.tag-filter-wrapper {
    width: 100%;
}

.tag-filter-wrapper label {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.tag-filter-wrapper .tag-select {
    width: 100%;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #e5e7eb;
    border-radius: 50px !important;
    min-height: 46px;
    padding: 6px 10px;
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    background: var(--white);
}

.select2-container .select2-search--inline .select2-search__field {
    height: 21px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: none;
    border-radius: 50px !important;
    padding: 6px 14px;
    font-size: 0.9rem;
    margin: 3px;
    font-weight: 500;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--text-color);
    margin-right: 8px;
    padding: 3px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--accent-color);
}

.select2-dropdown {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'EB Garamond', serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding-left: 5px;
    padding-right: 5px;
    margin-left: 19px;
    max-width: 510px;
}

.select2-search--dropdown {
    padding-top: 10px;
    padding-bottom: 8px;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
}

.select2-results {
    padding-bottom: 4px;
}

.select2-results__option {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px 0;
}

/* Quick Theme Buttons */
.quick-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.quick-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 2px solid;
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quick-theme-btn.active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-theme-btn .pin-icon {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Gallery Item Category Label */
.gallery-item-category {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
    margin-left: 1rem;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-container p {
    margin: 0;
}

.admin-link {
    color: var(--white);
    opacity: 0.8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.admin-link:hover {
    opacity: 1;
}

/* Footer links and icons - always white */
.site-footer a {
    color: var(--white) !important;
    text-decoration: none;
    transition: opacity 0.3s;
}

.site-footer a:hover {
    color: var(--white) !important;
    opacity: 0.8;
}

.site-footer i,
.site-footer .fa,
.site-footer .fas,
.site-footer .fab,
.site-footer .far {
    color: var(--white) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .image-detail-container {
        grid-template-columns: 1fr;
    }

    .image-detail-photo {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
    }

    .site-logo {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .categories-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .page-content {
        padding: 2rem 1.5rem;
    }

    .content-container {
        padding: 0 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    body { font-size: 16px; }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .categories-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .image-detail-photo {
        min-height: 300px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .back-link,
    .language-switcher {
        display: none;
    }

    .main-content {
        padding: 0;
    }

    .page-content {
        box-shadow: none;
        padding: 0;
    }
}
