/* ================================
   BLOG SECTION - KOMPLETT NEU
   ================================ */

/* Globale Selektion deaktivieren */
* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Blog Section */
.blog-section {
    padding: 100px 0;
    background: transparent;
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-section .section-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff;
}

/* Blog Grid - 3 Cards nebeneinander */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(21, 101, 192, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(21, 101, 192, 0.3);
}

/* Card Image */
.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

/* Card Content */
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta Info */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: #888;
}

.blog-card-author {
    color: var(--primary);
    font-weight: 500;
}

.blog-card-date::before {
    content: '•';
    margin-right: 12px;
}

/* Card Title */
.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Excerpt */
.blog-card-excerpt {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Read More Link */
.blog-card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.blog-card-link:hover {
    color: var(--primary);
    gap: 12px;
}

.blog-card-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

/* ================================
   LOADING & STATES
   ================================ */

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #888;
}

.loading-spinner {
    border: 3px solid #2a2a2a;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty & Error States */
.empty-state,
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg,
.error-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3,
.error-state h3 {
    color: #e0e0e0;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-state p,
.error-state p {
    color: #888;
    font-size: 1rem;
}

/* ================================
   POST MODAL
   ================================ */

.post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.post-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.post-modal-content {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(21, 101, 192, 0.2);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 60px;
    box-shadow: 0 20px 60px rgba(21, 101, 192, 0.3);
}

/* Custom scrollbar for post modal */
.post-modal-content::-webkit-scrollbar {
    width: 8px;
}

.post-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 10px 0;
}

.post-modal-content::-webkit-scrollbar-thumb {
    background: rgba(21, 101, 192, 0.5);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.post-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(21, 101, 192, 0.8);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar */
.post-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 101, 192, 0.5) rgba(0, 0, 0, 0.3);
}

.post-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.post-modal-close:hover {
    background: #2a2a2a;
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Post Content */
.post-content {
    max-width: 100%;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 0.85rem;
}

.post-author {
    color: var(--primary);
    font-weight: 500;
}

.post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 30px 0;
}

.post-body {
    color: #d0d0d0;
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-body h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 50px 0 25px;
}

.post-body h2 {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 40px 0 20px;
}

.post-body h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body strong {
    color: #ffffff;
    font-weight: 600;
}

.post-body em {
    font-style: italic;
}

.post-body u {
    text-decoration: underline;
}

.post-body s {
    text-decoration: line-through;
}

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

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

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.post-body code {
    background: #1a1a1a;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.post-body pre {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 24px 0;
    color: #b0b0b0;
    font-style: italic;
}

.post-body ul, 
.post-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-body li {
    margin-bottom: 10px;
}

/* ================================
   RESPONSIVE
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-section .section-title {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-modal-content {
        padding: 40px 30px;
        max-height: 80vh;
        width: 95%;
        margin: 0 auto;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-section {
        padding: 40px 0;
    }
    
    .blog-section .container {
        padding: 0 1rem;
    }
    
    .blog-section .section-title {
        font-size: 1.75rem;
    }
    
    .blog-hero {
        padding: 120px 1rem 60px;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-card-image {
        height: 160px;
    }
    
    .blog-card-content {
        padding: 1.25rem;
    }
    
    .blog-card-title {
        font-size: 1.1rem;
    }
    
    .blog-card-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
    
    .blog-card-meta {
        font-size: 0.8rem;
    }
    
    .post-modal-content {
        padding: 30px 24px;
        max-height: 85vh;
        width: 95%;
        margin: 0 auto;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-meta {
        font-size: 0.8rem;
        gap: 10px;
    }
    
    .post-body {
        font-size: 0.95rem;
    }
    
    .post-body h2 {
        font-size: 1.4rem;
    }
    
    .post-body h3 {
        font-size: 1.2rem;
    }
    
    .post-body h4 {
        font-size: 1.05rem;
    }
    
    .post-modal-close {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }
}

/* Touch Optimizations for Blog */
@media (hover: none) and (pointer: coarse) {
    .blog-card {
        min-height: 48px;
    }
    
    .blog-card:hover {
        transform: none;
    }
    
    .blog-card:active {
        transform: scale(0.98);
    }
    
    .blog-card-link {
        min-height: 48px;
        padding: 0.75rem 0;
    }
    
    .post-modal-close {
        min-width: 48px;
        min-height: 48px;
    }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .blog-hero {
        padding: 100px 2rem 40px;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .post-modal-content {
        max-height: 90vh;
    }
}
    }
}
}
