/**
 * Haupt-CSS für Peter Piek Website
 * Responsive Design mit CSS-Variablen für einfache Anpassung
 */
 :root{
    --submit-color: #00ff00;
    --cancel-color: #ff4444;
    --font-family: 'Courier New', monospace;
    --font-size: 12pt;
    --header-height: 80px;
    --max-width: 1200px;    

}


/* Reset und Grundlagen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg_color);
    color: var(--text_color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.6;

    
}

/* Links */
a {
    text-decoration: none;

}


/* Links in Beschreibungen hervorheben */
.post-text a,
.main-painting-description a,
.main-photo-description a,
.site-description a,
.main-site-description a {
    color: var(--link_color);
    text-decoration: underline;
    background: transparent;
    border-radius: 2px;
    padding: 0 2px;
}

.post-text a:hover,
.main-painting-description a:hover,
.main-photo-description a:hover,
.site-description a:hover,
.main-site-description a:hover {
    background-color: var(--link_hover_bg);
    color: var(--text_color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg_color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    column-gap: clamp(10px, 2vw, 30px);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-right: 25px;
}

.logo-image {
    height: 48px;
    width: auto;
    display: block;
}

.nav-link {
    color: var(--nav_link_color) !important;
    font-weight: lighter;
    font-size: 1.2rem;
    position: relative;
    padding: 3px 5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--nav_hover_text_color) !important;
    background-color: var(--nav_link_hover_bg_color) !important;
}
.logout-btn {
    color: var(--section_color) !important;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    transition: all 0.3s ease;
    color: var(--nav_link_color);
    font-size: 1.5rem;
}

.mobile-menu-toggle:hover {
    border-radius: 4px;
    color: var(--nav_hover_text_color);
}

/* Icon-Animation */
.mobile-menu-toggle i {
    transition: all 0.3s ease;
    color: var(--nav_link_color);
}

/* Wenn Menü aktiv ist: Icon in Hover-Farbe */
.mobile-menu-toggle.active i {
    color: var(--nav_hover_text_color);
}

/* Wenn Menü wieder geschlossen: Icon zurück zur normalen Farbe */
.mobile-menu-toggle:not(.active) i {
    color: var(--nav_link_color);
}

/* Header Spacer */
.header-spacer {
    height: var(--header-height);
}

/* Main Content */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height) - 150px);
}

/* Main Content mit sticky category-tabs */
.main-content.has-sticky-tabs {
    min-height: calc(100vh - var(--header-height) - 100px - 60px); /* 60px für category-tabs */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text_color);
    margin-bottom: 10px;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    font-weight: bold;
}

h2 {
    font-size: 1.5rem;
    font-weight: bold;
}

h3 {
    font-size: 1.2rem;
    font-weight: bold;
}

h4 {
    font-size: 1.2rem;
    font-weight: bold;
}



/* Images */
img {
    max-width: 100%;
    height: auto;
    border: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--link_color);
    color: var(--text_color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-family);
    font-size: var(--font-size);
}

.btn:hover {
    background-color: var(--link_hover_bg);
    color: var(--text_color);
}

/* Footer */
.footer {
    background-color: var(--bg_color);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text_color);
}

.footer-links {
    font-size: 0.9rem;
}

.footer-links a {
    margin: 0 10px;
}

/* Admin Link */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.admin-link a {
    display: block;
    padding: 10px 15px;
    background-color: var(--section_color);
    color: var(--text_color);
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
}

.admin-link a:hover {
    background-color: var(--link_hover_bg);
    color: var(--text_color);
}

/* Admin Floating Buttons */
.admin-floating-btn {
    position: fixed;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--nav_link_hover_bg_color);
    color: var(--nav_hover_text_color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    opacity: 0.85;
}

.admin-floating-btn:hover {
    opacity: 1;
    filter: brightness(1.1);
}

#pp-color-trigger {
    left: 20px;
}

#pp-admin-trigger {
    left: 70px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text_color);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--link_color);
    color: var(--text_color);
}

.pagination .current {
    background-color: var(--link_color);
    color: var(--text_color);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 30px !important;
        --font-size: 11pt;
    }
    
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 30px !important;
        background-color: var(--bg_color);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
    }
    
    .logo-image {
        height: 12px;
    }
    
    .header-logo {
        display: flex;
        align-items: center;
        margin-right: auto;
    }
    
    .nav-item {
        display: none; /* Menüeinträge im Header verstecken */
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg_color);
        border-top: 1px solid var(--border-color);
        gap: 0;
        padding: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        z-index: 9999;
        width: 100%;
    }
    
    .nav-list.active {
        display: flex;
        flex-direction: column;
        animation: slideDown 0.3s ease-out;
        z-index: 9999;
        visibility: visible;
        opacity: 1;
    }
    
    .nav-list.active .nav-item {
        display: block; /* Menüeinträge im Dropdown anzeigen */
        width: 100%;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-link {
        display: block;
        padding: 12px 15px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.3s ease;
        color: var(--nav_link_color);
        font-size: 1.1rem;
        text-decoration: none;
        background-color: transparent;
    }
    
    .nav-link:hover {
        background-color: var(--nav_link_hover_bg_color);
        color: var(--nav_hover_text_color);
    }
    
    .nav-link.active {
        background-color: var(--nav_link_hover_bg_color);
        color: var(--nav_hover_text_color);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        padding: 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 45px !important;
    }
    
    .header {
        height: 45px !important;
        padding: 0 12px;
    }
    
    .logo-image {
        height: 28px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        right: 12px;
        padding: 6px;
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Secret Color Panel */
.pp-color-panel {
    position: fixed;
    /* Position wird dynamisch per JS gesetzt (top/left) */
    width: auto;
    min-width: 260px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(0,0,0,0.9);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    color: var(--text_color);
    font-family: var(--font-family);
    backdrop-filter: blur(2px);
}
.pp-color-panel.hidden { display: none; }
.pp-color-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--section_color);
}
.pp-color-close {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text_color);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}
.pp-color-panel-content { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; }
.pp-color-row { display: contents; }
.pp-color-label { font-size: 0.9rem; align-self: center; }
.pp-color-input { width: 40px; height: 28px; border: none; background: transparent; cursor: pointer; }
.pp-color-panel-footer { margin-top: 10px; display: flex; justify-content: stretch; gap: 8px; }
.pp-color-btn {
    flex: 1;
    height: 36px;
    background: var(--nav_link_hover_bg_color);
    border: 1px solid var(--border-color);
    color: var(--text_color);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.pp-color-btn:hover {
    background: var(--nav_link_hover_bg_color);
    color: var(--nav_hover_text_color);
    filter: brightness(1.1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--link_color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar verstecken */
::-webkit-scrollbar {
    display: none;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .admin-link {
        display: none;
    }
    
    .header-spacer {
        height: 0;
    }
    
    .main-content {
        padding: 0;
    }
} 