/* ===================================
   SENZAI BLOG - PUBLIC PAGES
   Styling för index.php och post.php
   =================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

/* ===================================
   HEADER
   =================================== */

.header {
    /* Gradient sätts av PHP-inline styles */
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.header-simple {
    background: var(--accent-primary);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.back-link-header {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.back-link-header:hover {
    color: #fff;
}

/* ===================================
   NAVIGATION
   =================================== */

.nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ===================================
   EMPTY STATE
   =================================== */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-tertiary);
}

/* ===================================
   POST CARD (Index page)
   =================================== */

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    transition: all 0.3s;
}

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

.post-meta {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.post-meta .date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

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

.post-excerpt {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.read-more:hover {
    border-bottom-color: var(--accent-primary);
}

/* ===================================
   SINGLE POST (post.php)
   =================================== */

.post-single {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
}

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

.draft-notice {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.post-title-single {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

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

.post-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-primary);
}

.post-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

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

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

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

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

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

.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-tertiary);
}

.post-content code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.back-link {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    padding: 12px 24px;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    transition: all 0.3s;
}

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

/* ===================================
   ADMIN ACTIONS
   =================================== */

.admin-actions {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-actions a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-actions a:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    color: var(--text-tertiary);
    font-size: 14px;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }
    
    .post-card {
        padding: 30px 20px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-single {
        padding: 30px 20px;
    }
    
    .post-title-single {
        font-size: 32px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .post-content h2 {
        font-size: 24px;
    }
    
    .post-content h3 {
        font-size: 20px;
    }
}