/* ============================================
   AiX24 Modern Blog Theme - Light Color Scheme
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f6 100%);
    color: #1a202c;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* p {
    margin-bottom: 1rem;
    color: #334155;
} */

a {
    text-decoration: none;
    color: #3b82f6;
    transition: all 0.2s ease;
}

a:hover {
    color: #2563eb;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.logo span {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #3b82f6;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #334155;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3b82f6;
}

.btn-login {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #334155;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-radius: 1rem;
        gap: 1rem;
        margin-top: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .navbar {
        flex-wrap: wrap;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-radius: 2rem;
    margin: 2rem 0;
}

.hero h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Layout - Main + Sidebar */
.blog-layout {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
}

.main-content {
    flex: 3;
}

.sidebar {
    flex: 1;
}

@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
    }
}

/* Post Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.post-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.02);
}

.post-card-image {
    height: 200px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.post-card-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    background: #eff6ff;
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #0f172a;
}

.post-title a:hover {
    color: #3b82f6;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #475569;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Single Post Page */
.single-post {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta-single {
    display: flex;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.post-category-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2, .post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
    display: inline-block;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #334155;
    display: block;
}

.widget-list a:hover {
    color: #3b82f6;
}

.widget-list .post-date {
    font-size: 0.7rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.25rem;
}

.category-count {
    float: right;
    background: #f1f5f9;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    color: #64748b;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-about h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #94a3b8;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.admin-layout {
    display: flex;
    gap: 2rem;
}

.admin-sidebar {
    flex: 1;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.admin-sidebar a {
    display: block;
    padding: 0.75rem 0;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.admin-sidebar a:hover {
    color: #3b82f6;
}

.admin-content {
    flex: 3;
}

.form-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #0f172a;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    ring: 2px solid #3b82f6;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.pagination .active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-card, .single-post, .sidebar-widget {
    animation: fadeIn 0.4s ease-out;
}