/* ============================================
   PIRANOT V4 - SECTION COLORS & STYLING
   ============================================ */

:root {
    --color-noticias: #c40000;
    --color-piracicaba: #8b5cf6;
    --color-regiao: #10b981;
    --color-entretenimento: #ec4899;
    --color-esportes: #f59e0b;
    --color-saude: #06b6d4;
    --color-economia: #3b82f6;
    --color-tecnologia: #6366f1;
    --color-blog: #8b5cf6;
    --color-loterias: #fbbf24;
}

/* ============================================
   SECTION HEADERS WITH COLORED LINES
   ============================================ */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--color-noticias, #ccc);
}

/* Color-coded sections */
.section[data-category="ultimas-noticias"] .section-head {
    border-bottom-color: var(--color-noticias);
}

.section[data-category="piracicaba"] .section-head {
    border-bottom-color: var(--color-piracicaba);
}

.section[data-category="regiao-metropolitana"] .section-head {
    border-bottom-color: var(--color-regiao);
}

.section[data-category="entretenimento"] .section-head {
    border-bottom-color: var(--color-entretenimento);
}

.section[data-category="esportes"] .section-head {
    border-bottom-color: var(--color-esportes);
}

.section[data-category="saude"] .section-head {
    border-bottom-color: var(--color-saude);
}

.section[data-category="economia"] .section-head {
    border-bottom-color: var(--color-economia);
}

.section[data-category="tecnologia"] .section-head {
    border-bottom-color: var(--color-tecnologia);
}

.section[data-category="blogs"] .section-head {
    border-bottom-color: var(--color-blog);
}

.section[data-category="loterias"] .section-head {
    border-bottom-color: var(--color-loterias);
}

.section-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.section-head a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 4px;
}

.section-head a:hover {
    background: #f0f0f0;
    color: var(--primary);
}

/* ============================================
   FEATURED CARD STYLING
   ============================================ */

.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-noticias), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.section[data-category="ultimas-noticias"] .card::before { background: linear-gradient(90deg, var(--color-noticias), transparent); }
.section[data-category="piracicaba"] .card::before { background: linear-gradient(90deg, var(--color-piracicaba), transparent); }
.section[data-category="regiao-metropolitana"] .card::before { background: linear-gradient(90deg, var(--color-regiao), transparent); }
.section[data-category="entretenimento"] .card::before { background: linear-gradient(90deg, var(--color-entretenimento), transparent); }
.section[data-category="esportes"] .card::before { background: linear-gradient(90deg, var(--color-esportes), transparent); }

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: #d8d8d8;
}

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

.card .thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.card .thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.card:hover .thumb::after {
    background: rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 16px;
}

.card-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.section[data-category="ultimas-noticias"] .card-category { background: rgba(196, 0, 0, 0.1); color: var(--color-noticias); }
.section[data-category="piracicaba"] .card-category { background: rgba(139, 92, 246, 0.1); color: var(--color-piracicaba); }
.section[data-category="regiao-metropolitana"] .card-category { background: rgba(16, 185, 129, 0.1); color: var(--color-regiao); }
.section[data-category="entretenimento"] .card-category { background: rgba(236, 72, 153, 0.1); color: var(--color-entretenimento); }
.section[data-category="esportes"] .card-category { background: rgba(245, 158, 11, 0.1); color: var(--color-esportes); }

.card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
}

.card p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    gap: 10px;
    align-items: center;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   GRID VARIATIONS
   ============================================ */

.section .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.section .grid.featured {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ============================================
   RELATED POSTS SECTION
   ============================================ */

.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e8e8e8;
}

.related-posts-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-dark);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.related-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.related-card-thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
}

.related-card-body {
    padding: 12px;
}

.related-card h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.related-card-meta {
    font-size: 11px;
    color: var(--text-light);
}

/* ============================================
   FEATURED STORY INDICATOR
   ============================================ */

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(11, 59, 143, 0.3);
}

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

@media (max-width: 768px) {
    .section-head h2 {
        font-size: 20px;
    }

    .section .grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-head h2 {
        font-size: 18px;
    }

    .section .grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
