/* Home Featured Posts Styles (1280px Standard) */
.h-destacadas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

.h-destacadas-grid a {
    color: inherit;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.h-destacadas-grid a:hover {
    text-decoration: underline;
    color: inherit;
}

/* Nota Principal */
.featured-entry {
    grid-column: span 3;
    width: 100%;
    height: 540px;
    position: relative;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.featured-entry > a {
    display: block;
    width: 100%;
    height: 100%;
}

.featured-entry > a > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-entry .entry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Slightly lighter for readability */
    z-index: 1;
}

.featured-entry .entry-details {
    position: absolute;
    bottom: 50px;
    left: 50px;
    right: 50px;
    z-index: 2;
}

.featured-entry .entry-title-wrapper {
    display: flex;
    align-items: stretch;
    margin-top: 10px;
    gap: 15px;
}

.featured-entry .entry-line {
    width: 5px;
    background-color: #ff5100;
}

.featured-entry h2 {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0;
    line-height: 1.2;
}

/* Columna Lateral (3 Notas) */
.secondary-entries {
    grid-column: span 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 540px;
    justify-content: space-between;
}

.secondary-entry {
    position: relative;
    color: #fff;
    width: 100%; /* Fill the grid column */
    height: 160px; /* Precise height for 3 items with 30px gaps approx */
    border-radius: 6px;
    overflow: hidden;
}

.secondary-entry > a {
    display: block;
    width: 100%;
    height: 100%;
}

.secondary-entry > a > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.secondary-entry .entry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.secondary-entry .entry-details {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    padding: 0;
}

.secondary-entry h2 {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 0 5px;
    color: #fff !important;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Overrides — Tablet */
@media (max-width: 1024px) {
    .h-destacadas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-entry, .secondary-entries {
        grid-column: span 1;
        height: auto;
    }
    
    .featured-entry {
        aspect-ratio: 16 / 9;
    }
    
    .secondary-entries {
        flex-direction: row;
        gap: 15px;
    }
    
    .secondary-entry {
        height: auto;
        aspect-ratio: 16 / 9;
        flex: 1;
    }
    
    .featured-entry h2 {
        font-size: 26px !important;
    }
    
    .featured-entry .entry-details {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Responsive Overrides — Mobile (375px target) */
@media (max-width: 640px) {
    .h-destacadas-grid {
        gap: 12px;
    }

    .featured-entry {
        aspect-ratio: 4 / 3;
        min-height: 260px;
    }

    .featured-entry h2 {
        font-size: 20px !important;
    }

    .featured-entry .entry-details {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .featured-entry .entry-title-wrapper {
        gap: 10px;
    }

    .featured-entry .entry-line {
        width: 3px;
    }

    /* Secondary entries: horizontal cards */
    .secondary-entries {
        flex-direction: column;
        gap: 10px;
    }
    
    .secondary-entry {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        height: auto;
        min-height: 85px;
        aspect-ratio: unset;
        border-radius: 6px;
        overflow: hidden;
        background: #f5f5f5; /* Light grey background */
        border: 1px solid #eee;
    }
    
    .secondary-entry > a {
        width: 110px;
        flex-shrink: 0;
        display: block;
        height: auto;
    }
    
    .secondary-entry > a > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px 0 0 6px;
        display: block;
    }
    
    .secondary-entry .entry-overlay {
        display: none;
    }
    
    .secondary-entry .entry-details {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: #f5f5f5; /* Light grey background */
        border-radius: 0 6px 6px 0;
        flex: 1;
        min-width: 0;
    }
    
    .secondary-entry h2 {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #1a1a1a !important; /* Black text */
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin: 0;
    }

    .secondary-entry:nth-child(n+3) {
        display: none !important; /* Muestra solo 2 notas laterales */
    }

    .secondary-entry .hatch-post-meta,
    .secondary-entry .hatch-post-meta a,
    .secondary-entry .hatch-post-meta .author-name,
    .secondary-entry .hatch-post-meta .date-text,
    .secondary-entry .hatch-post-meta .meta-separator {
        color: #000 !important;
        font-weight: 500;
        font-size: 10px;
        margin-top: 4px;
    }

    /* Force icons to be black */
    .secondary-entry .hatch-post-meta svg,
    .secondary-entry .hatch-post-meta img {
        filter: brightness(0) !important;
        fill: #000 !important;
    }
}

/* Global Icon Fixes for this section (Calendar/User) */
.h-destacadas-grid .entry-meta img {
    width: 11px !important;
    height: 11px !important;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

