/* ========================================= */
/* Bento News Grid Styles                    */
/* ========================================= */

:root {
    --bento-gap: 1.5rem;
    --bento-radius: 20px;
}

.bento-news-section {
    padding: 6rem 6vw;
    background: var(--bg-base);
}

/* Header with Background */
.news-page-header {
    position: relative;
    padding: 140px 1rem 6rem;
    background-image: url('../news.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: white;
    overflow: hidden;
}

.news-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}

.news-page-header .container {
    position: relative;
    z-index: 2;
}

.news-page-header .text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.news-page-header .section-badge {
    background: rgba(255,255,255,0.15);
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.news-page-header .section-badge svg,
.news-page-header .section-badge i {
    stroke: white !important;
}

.news-page-header .hero-description {
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Logo Wrapper for News Page */
.news-page-header .logo-wrapper {
    display: inline-flex !important;
    justify-content: center;
    padding: 0.8rem 1.5rem !important;
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    margin-bottom: 2.5rem !important;
    transition: all 0.4s var(--ease-smooth);
}

.news-page-header .logo-wrapper:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.35) !important;
}

.news-page-header .logo-large {
    max-width: clamp(320px, 50vw, 750px);
    height: auto;
    object-fit: contain;
}

.bento-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: var(--bento-gap);
    max-width: 1400px;
    margin: 0 auto;
}

/* Teaser specific layout (Index page) */
.bento-news-grid.teaser {
    grid-template-columns: repeat(3, 1fr);
}

/* Engineering Minimalist Design - V2 with Texture */
.bento-news-card {
    position: relative;
    background: #ffffff;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 24px 24px; /* Technical Dot Grid */
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: var(--bento-radius);
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Better space distribution */
    text-decoration: none;
    transition: all 0.5s var(--ease-spring);
    overflow: hidden;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Abstract Sketches Backgrounds */
.bento-news-card::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 90%;
    height: 80%;
    opacity: 0.18; /* Higher opacity */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center right;
    pointer-events: none;
    z-index: 0;
    transition: all 0.8s var(--ease-smooth);
    filter: brightness(0.9) contrast(1.1);
}

.bento-news-card.sketch-bridge::after { background-image: url('../assets/sketches/bridge.png'); }
.bento-news-card.sketch-building::after { background-image: url('../assets/sketches/building.png'); }
.bento-news-card.sketch-road::after { background-image: url('../assets/sketches/road.png'); }
.bento-news-card.sketch-general::after { background-image: url('../assets/sketches/building.png'); opacity: 0.1; }

.bento-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-1);
    background-color: #fff;
}

.bento-news-card:hover::after {
    transform: scale(1.1) translate(-20px, 10px);
    opacity: 0.3;
}

.bento-news-card .bento-news-content {
    position: relative;
    z-index: 2;
    padding: 1rem 0; /* Adjusted padding */
}

/* Remove white background from content for dark cards */
.bento-news-card.large .bento-news-content {
    background: transparent;
}

/* Card Icons */
.bento-news-icon-bg {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
    z-index: 3;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    transition: all 0.4s var(--ease-spring);
}

.bento-news-card:hover .bento-news-icon-bg {
    background: var(--accent-1);
    color: white;
    transform: scale(1.1) rotate(10deg);
}

.bento-news-icon-bg i {
    width: 22px;
    height: 22px;
}

/* Card Sizes */
.bento-news-card.large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
}

.bento-news-card.wide {
    grid-column: span 2;
}

.bento-news-card.tall {
    grid-row: span 2;
    justify-content: center; /* Center content in tall boxes */
}

.bento-news-card.tall .bento-news-content {
    margin-top: auto;
}

.bento-news-tag {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--accent-1);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bento-news-content {
    position: relative;
    z-index: 1;
}

.bento-news-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.large .bento-news-meta {
    color: rgba(255, 255, 255, 0.6);
}

.bento-news-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
}

.large .bento-news-title {
    font-size: 2rem;
}

.bento-news-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.bento-news-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent-1);
    font-size: 0.95rem;
    transition: gap 0.3s;
}

.large .bento-news-link {
    color: white;
}

.bento-news-card:hover .bento-news-link {
    gap: 0.8rem;
}


/* Responsive */
@media (max-width: 1024px) {
    .bento-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-news-grid.teaser {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-news-grid {
        grid-template-columns: 1fr;
    }
    .bento-news-grid.teaser {
        grid-template-columns: 1fr;
    }
    .bento-news-card.large, .bento-news-card.wide {
        grid-column: span 1;
    }
    .large .bento-news-title {
        font-size: 1.6rem;
    }
}
