/* Blog Styles - Dark Theme */
.blog-hero {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%),
                url('https://images.pexels.com/photos/1545743/pexels-photo-1545743.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover no-repeat;
    color: var(--text-primary, #ffffff);
    padding: 8rem 0 4rem;
    text-align: center;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--luway-green, #B3B760);
}

.blog-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary, #a0a0a0);
}

.admin-controls {
    margin-top: 2rem;
}

.admin-controls .btn {
    margin: 0 0.5rem;
}

/* Blog Posts Grid */
.blog-posts {
    padding: 4rem 0;
    background: var(--dark-bg, #0a0a0a);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--dark-card, #1a1a1a);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--dark-border, #2a2a2a);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(179, 183, 96, 0.15);
    border-color: var(--luway-green, #B3B760);
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--dark-surface, #111111);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted, #666);
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tag {
    background: rgba(179, 183, 96, 0.2);
    color: var(--luway-green, #B3B760);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #ffffff);
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dark-border, #2a2a2a);
}

.read-more {
    color: var(--luway-green, #B3B760);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #d4d88a;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Loading States */
.loading-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #a0a0a0);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--luway-green, #B3B760);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.load-more-section {
    text-align: center;
    margin-top: 2rem;
}

.load-more-section .btn {
    background: transparent;
    border: 2px solid var(--luway-green, #B3B760);
    color: var(--luway-green, #B3B760);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-section .btn:hover {
    background: var(--luway-green, #B3B760);
    color: #000;
}

/* Modals - Dark Theme */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-content {
    background: var(--dark-card, #1a1a1a);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--dark-border, #2a2a2a);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--dark-border, #2a2a2a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark-surface, #111111);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary, #ffffff);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted, #666);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary, #ffffff);
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles - Dark Theme */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary, #ffffff);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--dark-border, #2a2a2a);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--dark-surface, #111111);
    color: var(--text-primary, #ffffff);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--luway-green, #B3B760);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted, #666);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Image Upload */
.image-upload {
    position: relative;
}

.image-upload input[type="file"] {
    margin-bottom: 1rem;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Editor Toolbar - Dark Theme */
.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--dark-border, #2a2a2a);
    background: var(--dark-surface, #111111);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    color: var(--text-primary, #ffffff);
}

.editor-toolbar button:hover {
    background: var(--luway-green, #B3B760);
    color: #000;
    border-color: var(--luway-green, #B3B760);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-border, #2a2a2a);
}

/* Post Preview - Dark Theme */
.post-preview {
    max-width: none;
}

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

.post-preview h1,
.post-preview h2,
.post-preview h3 {
    color: var(--text-primary, #ffffff);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-preview h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--luway-green, #B3B760);
    padding-bottom: 0.5rem;
}

.post-preview h2 {
    font-size: 1.5rem;
}

.post-preview h3 {
    font-size: 1.25rem;
}

.post-preview p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-secondary, #b0b0b0);
}

.post-preview ul,
.post-preview ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-secondary, #b0b0b0);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card {
        margin: 0 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .modal-large {
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .editor-toolbar {
        justify-content: center;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .admin-controls .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-tags {
        width: 100%;
        justify-content: flex-start;
    }
}