/* Blog Page Styles - Modern Premium Design */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --yellow-primary: #FFD700;
    --yellow-glow: rgba(255, 215, 0, 0.3);
    --dark-bg: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --text-muted: #888888;
    --border-color: rgba(255, 215, 0, 0.1);
    --success-green: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==== BLOG HERO SECTION ==== */
.blog-hero {
    min-height: 60vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    position: relative;
    padding: 6rem 0 4rem;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 30%, var(--yellow-glow) 0%, transparent 50%),
                radial-gradient(circle at 75% 70%, var(--yellow-glow) 0%, transparent 50%);
    opacity: 0.1;
    pointer-events: none;
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ==== BLOG HEADER ==== */
.blog-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: #0e0e0e;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.15);
    margin-bottom: 2rem;
}

.blog-title {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--yellow-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==== CATEGORIES NAVIGATION ==== */
.categories-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    background: var(--dark-card);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.category-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--yellow-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 1rem;
}

.category-item {
    display: inline-block;
}

.category-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    color: var(--yellow-primary);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.category-link.active {
    color: var(--yellow-primary);
    background: rgba(255, 215, 0, 0.15);
    font-weight: 600;
}

.category-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* ==== BLOG GRID ==== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ==== BLOG CARDS ==== */
.blog-card {
    background: var(--dark-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--yellow-primary);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2), 
                0 0 40px rgba(255, 215, 0, 0.1);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.blog-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--yellow-primary);
}

.blog-excerpt {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-meta {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-category {
    display: inline-block;
    background: rgba(255, 215, 0, 0.15);
    color: var(--yellow-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.blog-date {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==== PAGINATION ==== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-card);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    background: transparent;
}

.pagination-link:hover {
    background: rgba(255, 215, 0, 0.15);
    color: var(--yellow-primary);
    transform: translateY(-1px);
}

.pagination-link.active {
    background: var(--yellow-primary);
    color: var(--dark-bg);
    box-shadow: 0 4px 15px var(--yellow-glow);
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-link.disabled:hover {
    background: transparent;
    color: var(--text-secondary);
    transform: none;
}

/* ==== SINGLE POST PAGE ==== */
.single-post-hero {
    min-height: 70vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    position: relative;
    padding: 6rem 0 4rem;
}

.single-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 30%, var(--yellow-glow) 0%, transparent 50%),
                radial-gradient(circle at 75% 70%, var(--yellow-glow) 0%, transparent 50%);
    opacity: 0.1;
    pointer-events: none;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--yellow-primary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-to-blog:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.back-to-blog svg {
    width: 16px;
    height: 16px;
}

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.single-post-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.single-post-title {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--yellow-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.single-post-meta {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.single-post-meta a {
    color: var(--yellow-primary);
    text-decoration: none;
    font-weight: 500;
}

.single-post-meta a:hover {
    text-decoration: underline;
}

.single-post-image {
    width: 100%;
    max-height: 500px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.single-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-body {
    background: var(--dark-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.single-post-body h1,
.single-post-body h2,
.single-post-body h3,
.single-post-body h4,
.single-post-body h5,
.single-post-body h6 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.single-post-body h1 { font-size: 2rem; }
.single-post-body h2 { font-size: 1.75rem; }
.single-post-body h3 { font-size: 1.5rem; }
.single-post-body h4 { font-size: 1.25rem; }
.single-post-body h5 { font-size: 1.1rem; }
.single-post-body h6 { font-size: 1rem; }

.single-post-body p {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.single-post-body a {
    color: var(--yellow-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.single-post-body a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

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

.single-post-body li {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.single-post-body blockquote {
    border-left: 4px solid var(--yellow-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: rgba(255, 215, 0, 0.05);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.single-post-body blockquote p {
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.single-post-body code {
    background: rgba(255, 215, 0, 0.1);
    color: var(--yellow-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.single-post-body pre {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.single-post-body pre code {
    background: none;
    color: var(--text-primary);
    padding: 0;
}

/* ==== ANIMATIONS ==== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .single-post-body {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero,
    .single-post-hero {
        padding: 4rem 0 2rem;
        min-height: auto;
    }
    
    .blog-container,
    .single-post-content {
        padding: 0 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-list {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .category-label {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .blog-title,
    .single-post-title {
        font-size: 2.5rem;
    }
    
    .blog-subtitle {
        font-size: 1.1rem;
    }
    
    .single-post-body {
        padding: 1.5rem;
    }
    
    .single-post-body h1 { font-size: 1.75rem; }
    .single-post-body h2 { font-size: 1.5rem; }
    .single-post-body h3 { font-size: 1.25rem; }
    .single-post-body h4 { font-size: 1.1rem; }
    .single-post-body h5 { font-size: 1rem; }
    .single-post-body h6 { font-size: 0.9rem; }
    
    .single-post-body p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero,
    .single-post-hero {
        padding: 3rem 0 2rem;
    }
    
    .blog-container,
    .single-post-content {
        padding: 0 1rem;
    }
    
    .blog-card {
        border-radius: 16px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-title,
    .single-post-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .single-post-body {
        padding: 1rem;
    }
    
    .pagination {
        padding: 0.75rem 1rem;
    }
    
    .pagination-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ==== PERFORMANCE OPTIMIZATIONS ==== */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .category-link,
    .pagination-link,
    .back-to-blog {
        transition: none;
    }
    
    .blog-card,
    .single-post-header,
    .single-post-image,
    .single-post-body {
        animation: none;
    }
}

/* Improve text rendering */
.blog-title,
.single-post-title,
.blog-card-title {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
