/* ========================================
   EXTERNAL WIDGETS STYLES
   ======================================== */

/* ========================================
   HERO POSTS LAYOUT (1 grande + 2 pequeños)
   ======================================== */

.asf-hero-posts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.asf-hero-main-post {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.asf-hero-main-image {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.asf-hero-main-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.asf-hero-main-post:hover .asf-hero-main-image img {
    transform: scale(1.05);
}

.asf-hero-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 30px;
    color: white;
}

.asf-hero-category {
    display: inline-block;
    padding: 6px 14px;
    background-color: #76B82A !important;
    color: white;
    border-radius: 6px !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.asf-hero-main-title {
    margin: 0 0 15px 0;
    font-size: 24px !important;
    line-height: 30px;
    color: white;
}

.asf-hero-main-title a {
    color: white !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
    text-decoration: none !important;
}

.asf-hero-main-title a:hover {
    opacity: 0.8;
    color: white !important;
}

.asf-hero-main-meta svg {
    font-size: 16px;
    width: 16px;
    fill: #fff;
}
.asf-list-card .asf-hero-main-meta,
.asf-grid-card .asf-hero-main-meta {
    color: #111928;
    font-size: 10px;
    gap: 5px;
}
.asf-list-card .asf-hero-main-meta > span,
.asf-grid-card .asf-hero-main-meta > span {
    gap: 5px;
}
.asf-list-card .asf-hero-main-meta svg,
.asf-grid-card .asf-hero-main-meta svg {
    fill:  #111928;
    width: 12px;
}
.asf-hero-main-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
    color: #fff;
    justify-content: space-between;
}
.asf-hero-main-meta > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.asf-hero-main-meta span::before {
    margin-right: 8px;
}
.d-flex.tema-tags {
    display: flex;
    justify-content: space-between;
}

.asf-hero-main-meta span:first-child::before {
    display: none;
}

/* Posts secundarios */
.asf-hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.asf-hero-secondary-post {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.asf-hero-secondary-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.asf-hero-secondary-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.asf-hero-secondary-post:hover .asf-hero-secondary-image img {
    transform: scale(1.05);
}

.asf-hero-secondary-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 20px;
    color: white;
}

.asf-hero-category-small {
    display: inline-block;
    padding: 4px 10px;
    background-color: #76B82A !important;
    color: white;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.asf-hero-secondary-title {
    margin: 0;
    font-size: 18px !important;
    line-height: 1.3;
}

.asf-hero-secondary-title a {
    color: white !important;
    font-size: 18px !important;
    text-decoration: none !important;
}

/* ========================================
   FEATURED GRID (Destacadas del día)
   ======================================== */

.asf-featured-grid-section {
    margin: 60px 0;
}

.asf-section-header {
    margin-bottom: 40px;
    padding-left: 15px;
    border-left: 6px solid #76B82A;
}

.asf-section-title {
    margin: 0 0 8px 0;
    font-size: 40px;
    color: #76B82B;
    font-weight: 700;
}

#asf-recent-section  .asf-section-title{ color: #637381;}
.asf-section-subtitle {
    margin: 0;
    font-size: 18px;
    color: #637381;
}

.asf-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.asf-featured-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.asf-featured-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.asf-grid-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.asf-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.asf-grid-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin: 20px 20px 0px 20px;
}

.asf-grid-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.asf-grid-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.asf-grid-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: #76B82A;
    color: white;
    border-radius: 5px;
    font-size: 8.6px;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 10px;
}

.asf-grid-card-title {
    margin: 0 0 10px 0;
    font-size: 18px !important;
    line-height: 1.4;
}

.asf-grid-card-title a {
    color: #111928 !important;
    text-decoration: none !important;
    font-size: 18px !important
    ;
    line-height: 25px;
    transition: color 0.3s ease;
    font-weight: 600;
}

.asf-grid-card-title a:hover {
    color: #7cb342;
}

.asf-grid-card-excerpt {
    color: #637381;
    font-size: 13px;
    line-height: 1.6;
    flex: 1;
}

.asf-grid-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    padding-top: 15px;
    justify-content: space-between;
}

/* ========================================
   RECENT LIST (Lo más reciente)
   ======================================== */

.asf-recent-list-section {
    margin: 60px 0;
}

.asf-recent-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    
}

.asf-list-card {
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}


.asf-list-card-image {
    flex-shrink: 0;
    width: 300px;
    height: 210px;
    border-radius: 10px;
    overflow: hidden;
}

.asf-list-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.asf-list-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asf-list-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: #76B82A;
    color: white;
    border-radius: 5px;
    font-size: 8.6px;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 10px;
}

.asf-list-card-title {
    margin: 0;
    font-size: 20px !important;
    line-height: 1.3;
}

.asf-list-card-title a {
    color: #111928 !important;
    text-decoration: none !important;
    font-size: 18px;
    line-height: 25px;
    transition: color 0.3s ease;
    font-weight: 600;
}

.asf-list-card-title a:hover {
    color: #7cb342;
}

.asf-list-card-excerpt {
    color: #637381;
    font-size: 13px;
    line-height: 1.6;
    flex: 1;
}

.asf-list-card-meta {
    display: flex;
    gap: 15px;
    font-size: 10px;
    padding-top: 10px;
    align-items: center;
}
.asf-list-author img {
    border-radius: 50% !important;
    width: 26px;
}
.asf-list-author {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #1F2A37;
}

.asf-list-author svg {
    width: 14px;
    height: 14px;
}

/* ========================================
   WIDGET PAGINATION
   ======================================== */

.asf-widget-pagination {
    margin-top: 30px;
    padding: 20px 0;
}

.asf-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.asf-pagination-wrapper .asf-prev-btn,
.asf-pagination-wrapper .asf-next-btn {
    font-size: 10px;
}

.asf-widget-page-btn {
padding: 4px 10px;
    background: white;
    color: #637381;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 25px;
}

.asf-widget-page-btn:hover {
    background: #f5f5f5;
    border-color: #7cb342;
    color: #7cb342;
}

.asf-widget-page-btn.active {
    background: #7cb342;
    color: white;
    border-color: #7cb342;
    cursor: default;
}

.asf-widget-page-btn.active:hover {
    background: #7cb342;
    color: white;
}

.asf-widget-page-btn.asf-prev-btn,
.asf-widget-page-btn.asf-next-btn {
    min-width: auto;
    padding: 10px 20px;
}

.asf-page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.asf-page-dots {
    color: #999;
    padding: 0 8px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .asf-pagination-wrapper {
        gap: 6px;
    }
    
    .asf-widget-page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 40px;
    }
    
    .asf-widget-page-btn.asf-prev-btn,
    .asf-widget-page-btn.asf-next-btn {
        padding: 8px 14px;
    }
}

/* ========================================
   WIDGET LOADING Y ERROR
   ======================================== */

.asf-widget-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 100;
}

.asf-widget-loading .asf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7cb342;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.asf-widget-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.asf-widget-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.asf-widget-error p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

.asf-widget-error a.asf-retry {
    color: #7cb342;
    font-weight: 600;
    text-decoration: none;
    margin-left: 10px;
}

.asf-widget-error a.asf-retry:hover {
    text-decoration: underline;
}

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

@media (max-width: 1024px) {
    .asf-hero-posts {
        grid-template-columns: 1fr;
    }
    
    .asf-hero-secondary {
        flex-direction: row;
    }
    
    .asf-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .asf-hero-main-image {
        height: 350px;
    }
    
    .asf-hero-secondary {
        flex-direction: column;
    }
    
    .asf-featured-grid,
    .asf-featured-grid[data-columns="2"],
    .asf-featured-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .asf-list-card {
        flex-direction: column;
    }
    
    .asf-list-card-image {
        width: 100%;
        height: 200px;
    }
    
    .asf-section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .asf-hero-main-title {
        font-size: 22px;
    }
    
    .asf-hero-secondary-title {
        font-size: 14px;
    }
    
    .asf-grid-card-title {
        font-size: 16px;
    }
    
    .asf-list-card-title {
        font-size: 18px;
    }
}
