/* Playfair Display Font */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/playfair-display-v40-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/playfair-display-v40-latin-700.woff2') format('woff2');
}

/* Montserrat Font */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/montserrat-v31-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/montserrat-v31-latin-600.woff2') format('woff2');
}

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

:root {
    --primary-green: #45663C;
    --accent-purple-start: #ea6666;
    --accent-purple-end: #a24b4b;
    --text-dark: #1a1a2e;
    --text-gray: #6c757d;
    --text-medium: #2c3e50;
    --border-color: #e1e8ed;
    --white: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--primary-green);
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    color: var(--text-dark);
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 30px;
    padding: 40px 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    backdrop-filter: blur(10px);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
    border-radius: 30px;
    z-index: 0;
    pointer-events: none;
}

/* Header */
.header {
    background: transparent;
    border-bottom: none;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.wappen-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.wappen-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wappen-img:hover {
    transform: scale(1.1);
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0 auto;
    flex-shrink: 0;
}

.site-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.site-title a:hover {
    color: var(--accent-purple-start);
}

.decorative-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple-start), var(--accent-purple-end));
    margin: 20px auto;
    border-radius: 2px;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-purple-start);
}

/* User profile dropdown */
.user-profile-dropdown {
    position: relative;
    display: flex;
    margin-left: 0.5rem;
}

.profile-avatar-container {
    width: 50px;
    height: 50px;
    cursor: pointer;
    position: relative;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple-start);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-avatar:hover {
    transform: scale(1.1);
    border-color: var(--accent-purple-end);
    box-shadow: 0 4px 12px rgba(234, 102, 102, 0.4);
}

.profile-dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 2px solid var(--accent-purple-start);
    z-index: 1000;
}

.user-profile-dropdown:hover .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.profile-dropdown-name {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.profile-dropdown-link {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 0.5rem;
}

.profile-dropdown-link:hover {
    background: linear-gradient(135deg, rgba(234, 102, 102, 0.1), rgba(162, 75, 75, 0.1));
    color: var(--accent-purple-start);
}

.profile-dropdown-logout {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--accent-purple-start);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-radius: 8px;
    text-align: center;
}

.profile-dropdown-logout:hover {
    background: linear-gradient(135deg, rgba(234, 102, 102, 0.1), rgba(162, 75, 75, 0.1));
    color: var(--accent-purple-end);
}

/* Search bar */
.search-bar {
    margin-top: 0.5rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-purple-start);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-button {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    border-radius: 12px;
    pointer-events: none;
}

.search-button:hover {
    transform: translateY(-2px);
}

/* Main content */
.main {
    min-height: calc(100vh - 300px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.content-wrapper-full {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.main-content {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.main-content-full {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Page title */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.post-count {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Search info */
.search-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Posts list */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.post-preview {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--accent-purple-start);
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--accent-purple-start);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.post-date {
    color: var(--text-gray);
    font-weight: 300;
}

.post-author {
    color: var(--text-gray);
    font-weight: 400;
    font-style: italic;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    border-radius: 20px;
    pointer-events: none;
}

.tag:hover {
    transform: translateY(-2px);
}

.tag.active {
    background: var(--text-dark);
}

.post-excerpt {
    color: var(--text-medium);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.read-more {
    color: var(--accent-purple-start);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--accent-purple-end);
    text-decoration: underline;
}

/* Individual post page */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--border-color);
}

.post-title-full {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: 'Playfair Display', serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-dark);
}

.post-content h1 { font-size: 2.5rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.75rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.post-content a {
    color: var(--accent-purple-start);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--accent-purple-end);
}

.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.post-content pre {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    border: none;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-purple-start);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-gray);
    font-style: italic;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0 12px 12px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    flex: 1;
    max-width: 45%;
    border: 2px solid transparent;
}

.post-nav-link:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--accent-purple-start);
    transform: translateY(-5px);
}

.post-nav-link.next {
    text-align: right;
    align-items: flex-end;
}

.post-nav-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.post-nav-title {
    font-weight: 600;
    color: var(--accent-purple-start);
    font-family: 'Playfair Display', serif;
}

.back-to-home {
    margin-top: 2rem;
    text-align: center;
}

.back-to-home a {
    color: var(--accent-purple-start);
    text-decoration: none;
    font-weight: 600;
}

.back-to-home a:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-title {
    font-family: 'Playfair Display', serif;
    font-size: 8rem;
    background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    border-radius: 12px;
    pointer-events: none;
}

.button:hover {
    transform: translateY(-2px);
}

.button-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.button-secondary:hover {
    background: #f8f9fa;
    border-color: var(--accent-purple-start);
}

/* No posts message */
.no-posts {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.no-posts a {
    color: var(--accent-purple-start);
    text-decoration: none;
    font-weight: 600;
}

.no-posts a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 1.5rem 0 1rem;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .container {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .header-content {
        align-items: center;
    }

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

    .site-title {
        font-size: 2rem;
    }

    .post-title-full {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-nav-link {
        max-width: 100%;
    }

    .post-nav-link.next {
        text-align: left;
        align-items: flex-start;
    }

    .error-title {
        font-size: 5rem;
    }

    .wappen-container {
        width: 50px;
        height: 50px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .header-content {
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }
}

/* Edit button */
.edit-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--accent-purple-start), var(--accent-purple-end));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.edit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    border-radius: 8px;
    pointer-events: none;
}

.edit-button:hover {
    transform: translateY(-2px);
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    body::before {
        display: none;
    }

    .header,
    .sidebar,
    .footer,
    .post-navigation,
    .back-to-home,
    .search-bar {
        display: none;
    }

    .container {
        box-shadow: none;
        padding: 0;
    }

    .main-content {
        padding: 0;
    }
}
