/* Modern Blog Section Styles */
.blog-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--blog-bg, #0a0a0a);
    padding: 5rem 1rem;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.3s ease;
}

/* Light Mode Variables */
body:not(.dark-mode) .blog-section {
    --blog-bg: #f8fafc;
    --blog-card-bg: rgba(255, 255, 255, 0.8);
    --blog-card-border: #e2e8f0;
    --blog-text-primary: #1e293b;
    --blog-text-secondary: #64748b;
    --blog-text-meta: #94a3b8;
    --blog-modal-bg: #ffffff;
    --blog-button-bg: #f1f5f9;
    --blog-button-border: #cbd5e1;
    --blog-button-text: #475569;
}

/* Background Decorative Blobs */
.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 24rem;
    height: 24rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.blog-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 31.25rem;
    height: 31.25rem;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

.blog-container {
    max-width: 87.5rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Header Section */
.blog-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 4rem;
    gap: 1.5rem;
}

.blog-header-content h4 {
    color: #f97316;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.blog-header-content h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--blog-text-primary, white);
    letter-spacing: -0.025em;
    line-height: 1;
}

.blog-header-content .gradient-text {
    background: linear-gradient(to right, #fb923c, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.archive-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background: var(--blog-button-bg, #18181b);
    border: 1px solid var(--blog-button-border, #27272a);
    color: var(--blog-button-text, #d4d4d8);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-btn:hover {
    border-color: rgba(249, 115, 22, 0.5);
    background: var(--blog-button-bg, #27272a);
    color: var(--blog-text-primary, white);
}

.archive-btn i {
    color: #f97316;
    transition: transform 0.3s ease;
}

.archive-btn:hover i {
    transform: translateX(0.25rem);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.blog-card {
    position: relative;
    border-radius: 2rem;
    background: var(--blog-card-bg, rgba(24, 24, 27, 0.5));
    border: 1px solid var(--blog-card-border, #27272a);
    overflow: hidden;
    transition: all 0.5s ease;
    cursor: pointer;
}

.blog-card:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 25px 50px -12px rgba(249, 115, 22, 0.1);
}

.blog-card.featured {
    aspect-ratio: 16/10;
}

.blog-card:not(.featured) {
    aspect-ratio: 4/5;
}

/* Image Layer */
.blog-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.blog-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--blog-bg, #0a0a0a), rgba(10, 10, 10, 0.2), transparent);
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

body:not(.dark-mode) .blog-image::before {
    background: linear-gradient(to top, rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.3), transparent);
}

.blog-card:hover .blog-image::before {
    opacity: 0.6;
}

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

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

/* Content Layer */
.blog-content {
    position: absolute;
    inset: 0;
    z-index: 20;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.blog-category {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blog-text-primary, white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body:not(.dark-mode) .blog-category {
    background: rgba(30, 41, 59, 0.1);
    border: 1px solid rgba(30, 41, 59, 0.2);
}

.blog-category i {
    color: #fb923c;
    font-size: 0.75rem;
}

.blog-arrow {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-arrow {
    opacity: 1;
    transform: translateY(0);
}

.blog-arrow i {
    color: var(--blog-text-primary, white);
    font-size: 1.25rem;
}

.blog-bottom {
    transform: translateY(0.5rem);
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-bottom {
    transform: translateY(0);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--blog-text-meta, #a1a1aa);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-meta i {
    font-size: 0.75rem;
}

.blog-title {
    font-weight: 700;
    color: var(--blog-text-primary, white);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.blog-card.featured .blog-title {
    font-size: 1.875rem;
}

.blog-card:not(.featured) .blog-title {
    font-size: 1.25rem;
}

.blog-excerpt {
    color: var(--blog-text-secondary, #d4d4d8);
    line-height: 1.5;
    max-width: 32rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-line {
    height: 0.125rem;
    width: 0;
    background: #f97316;
    transition: width 0.5s ease-out;
}

.blog-card:hover .blog-line {
    width: 4rem;
}

/* Newsletter Card */
.newsletter-card {
    border-radius: 2rem;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 25rem;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><g fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><polygon points="36 34 6 34 6 4 36 4"/></g></g></svg>');
    opacity: 0.1;
    mix-blend-mode: overlay;
}

.newsletter-card h3 {
    font-size: 1.875rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 10;
    line-height: 1.2;
}

.newsletter-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.newsletter-form {
    width: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    height: 48px;
    box-sizing: border-box;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.newsletter-form button {
    background: black;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
    height: 48px;
    box-sizing: border-box;
    align-self: center;
    min-width: 120px;
}

.newsletter-form button:hover {
    background: #27272a;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 9999px;
    background: var(--blog-button-bg, #18181b);
    border: 1px solid var(--blog-button-border, #27272a);
    color: var(--blog-button-text, white);
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    border-color: #f97316;
    background: var(--blog-button-bg, #27272a);
}

.load-more-btn i {
    color: #f97316;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: rotate(90deg);
}

/* Blog Modal */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.blog-modal.active {
    display: flex;
}

.blog-modal-content {
    background: var(--blog-modal-bg, #18181b);
    border-radius: 1rem;
    max-width: 50rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.blog-modal-header {
    position: relative;
    height: 20rem;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.blog-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.blog-modal-body {
    padding: 2rem;
}

.blog-modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--blog-text-meta, #a1a1aa);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blog-text-primary, white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-modal-excerpt {
    color: var(--blog-text-secondary, #d4d4d8);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Design */

/* Small Mobile Phones (320px - 374px) */
@media (max-width: 374px) {
    .blog-section {
        padding: 3rem 0.75rem;
    }
    
    .blog-header-content h2 {
        font-size: 2rem;
    }
    
    .blog-content {
        padding: 1rem;
    }
    
    .blog-card.featured .blog-title {
        font-size: 1.25rem;
    }
    
    .blog-card:not(.featured) .blog-title {
        font-size: 1rem;
    }
    
    .newsletter-card {
        padding: 1.5rem;
        min-height: 20rem;
    }
    
    .newsletter-card h3 {
        font-size: 1.5rem;
    }
}

/* Medium Mobile Phones (375px - 424px) */
@media (min-width: 375px) and (max-width: 424px) {
    .blog-section {
        padding: 4rem 1rem;
    }
    
    .blog-header-content h2 {
        font-size: 2.5rem;
    }
}

/* Large Mobile Phones (425px - 767px) */
@media (min-width: 425px) and (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card.featured {
        aspect-ratio: 16/9;
    }
}

/* Small Tablets (768px - 1023px) */
@media (min-width: 768px) {
    .blog-header {
        flex-direction: row;
        align-items: flex-end;
    }
    
    .blog-header-content h2 {
        font-size: 4.5rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-card.featured {
        grid-column: span 2;
        aspect-ratio: 16/9;
    }
    
    .blog-card:not(.featured) {
        aspect-ratio: 3/4;
    }
    
    .blog-content {
        padding: 2rem;
    }
    
    .blog-card.featured .blog-title {
        font-size: 2.25rem;
    }
    
    .blog-card:not(.featured) .blog-title {
        font-size: 1.5rem;
    }
    
    .blog-excerpt {
        opacity: 1;
        font-size: 1rem;
    }
}

/* Medium Tablets (1024px - 1199px) */
@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-card.featured {
        grid-column: span 2;
    }
}

/* Large Tablets & Small Laptops (1200px - 1439px) */
@media (min-width: 1200px) {
    .blog-section {
        padding: 5rem 2rem;
    }
    
    .blog-header-content h2 {
        font-size: 5rem;
    }
}

/* Medium Laptops (1440px - 1679px) */
@media (min-width: 1440px) {
    .blog-section {
        padding: 6rem 2rem;
    }
    
    .blog-header-content h2 {
        font-size: 5.5rem;
    }
}

/* Large Laptops & Small Monitors (1680px - 1919px) */
@media (min-width: 1680px) {
    .blog-grid {
        gap: 2rem;
    }
    
    .blog-content {
        padding: 2.5rem;
    }
}

/* Medium Monitors (1920px - 2559px) */
@media (min-width: 1920px) {
    .blog-section {
        padding: 8rem 3rem;
    }
    
    .blog-header-content h2 {
        font-size: 6rem;
    }
    
    .blog-card.featured .blog-title {
        font-size: 3rem;
    }
    
    .blog-card:not(.featured) .blog-title {
        font-size: 1.75rem;
    }
}

/* Large Monitors (2560px - 3439px) */
@media (min-width: 2560px) {
    .blog-container {
        max-width: 120rem;
    }
    
    .blog-section {
        padding: 10rem 4rem;
    }
    
    .blog-grid {
        gap: 2.5rem;
    }
    
    .blog-content {
        padding: 3rem;
    }
}

/* Vertical Monitors (Portrait orientation) */
@media (orientation: portrait) and (min-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-card.featured {
        grid-column: span 2;
    }
}

/* 49" Odyssey OLED G9 (5120x1440) */
@media (min-width: 5120px) {
    .blog-container {
        max-width: 160rem;
    }
    
    .blog-section {
        padding: 12rem 6rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .blog-card.featured {
        grid-column: span 2;
    }
    
    .blog-header-content h2 {
        font-size: 8rem;
    }
}

/* 57" Odyssey Neo G9 (7680x2160) */
@media (min-width: 7680px) {
    .blog-container {
        max-width: 200rem;
    }
    
    .blog-section {
        padding: 15rem 8rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4rem;
    }
    
    .blog-card.featured {
        grid-column: span 3;
    }
    
    .blog-header-content h2 {
        font-size: 10rem;
    }
    
    .blog-content {
        padding: 4rem;
    }
}