/**
 * Noticias Fresh - Diseño dinámico, moderno y ordenado
 * Patiño Abogados Consultores
 */

/* ===== SECCIÓN NOTICIAS - CONTENEDOR PRINCIPAL ===== */
.news-section-fresh {
    padding: 3rem 0 4rem;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.news-section-fresh .background-11 {
    background: transparent !important;
}

/* ===== CABECERA ===== */
.news-section-fresh h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1d23;
}

.news-section-fresh .short {
    border-color: #28282a;
    opacity: 1;
}

/* ===== TOOLBAR REFRESHED ===== */
.news-toolbar-fresh {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 2.5rem 0 3rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.news-search-fresh {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.news-search-fresh input {
    width: 100%;
    padding: 14px 52px 14px 20px;
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.news-search-fresh input:focus {
    border-color: #28282a;
    box-shadow: 0 0 0 4px rgba(40, 40, 42, 0.08);
    outline: none;
}

.news-search-fresh button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: #28282a;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.news-search-fresh button:hover {
    background: #1a1d23;
    transform: translateY(-50%) scale(1.05);
}

/* Filtros estilo pills modernos */
.news-filters-fresh {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.filter-btn-fresh {
    padding: 10px 20px;
    border: 2px solid #e8ecf0;
    background: #fff;
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn-fresh:hover {
    border-color: #28282a;
    color: #28282a;
    transform: translateY(-2px);
}

.filter-btn-fresh.active {
    background: #28282a;
    border-color: #28282a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(40, 40, 42, 0.25);
}

/* ===== NOTICIA DESTACADA ===== */
.news-featured-wrap {
    margin-bottom: 2.5rem;
}

.news-featured-card {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.news-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.news-featured-card .feat-img-wrap {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.news-featured-card .feat-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    pointer-events: none;
}

.news-featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-featured-card:hover img {
    transform: scale(1.08);
}

.news-featured-card .feat-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.news-featured-card .feat-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 2rem 1.5rem;
    z-index: 2;
}

.news-featured-card .feat-date {
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.news-featured-card .feat-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.news-featured-card .feat-excerpt {
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured-card .feat-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.95;
}

.news-featured-card .feat-cta i {
    transition: transform 0.3s ease;
}

.news-featured-card:hover .feat-cta i {
    transform: translateX(4px);
}

/* ===== GRID DE NOTICIAS - ESTILO BENTO ===== */
.news-grid-fresh {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .news-grid-fresh {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .news-grid-fresh {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

/* ===== TARJETAS FRESH ===== */
.news-card-fresh {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-fresh:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: rgba(40, 40, 42, 0.08);
}

.news-card-fresh .card-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-card-fresh .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-fresh:hover .card-img-wrap img {
    transform: scale(1.1);
}

/* Badges por categoría - colores distintivos */
.news-card-fresh .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    z-index: 2;
}

.category-badge.civil { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.category-badge.comercial { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.category-badge.laboral { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.category-badge.concursal { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.category-badge.legis { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.category-badge.constitucional { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.category-badge.administrativo { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.category-badge.default { background: linear-gradient(135deg, #28282a 0%, #1a1d23 100%); }

.news-card-fresh .card-body-fresh {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-fresh .card-date {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card-fresh .card-title-fresh {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1d23;
    margin-bottom: 10px;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-fresh:hover .card-title-fresh {
    color: #28282a;
}

.news-card-fresh .card-title-fresh a {
    color: inherit;
    text-decoration: none;
}

.news-card-fresh .card-excerpt-fresh {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-fresh .card-link-fresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #28282a;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.25s ease;
}

.news-card-fresh .card-link-fresh:hover {
    gap: 12px;
    color: #1a1d23;
}

.news-card-fresh .card-link-fresh i {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}

.news-card-fresh:hover .card-link-fresh i {
    transform: translateX(4px);
}

/* ===== ANIMACIONES DE ENTRADA ===== */
@keyframes newsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-col-fresh {
    animation: newsFadeInUp 0.6s ease-out forwards;
}

.news-col-fresh:nth-child(1) { animation-delay: 0.05s; }
.news-col-fresh:nth-child(2) { animation-delay: 0.1s; }
.news-col-fresh:nth-child(3) { animation-delay: 0.15s; }
.news-col-fresh:nth-child(4) { animation-delay: 0.2s; }
.news-col-fresh:nth-child(5) { animation-delay: 0.25s; }
.news-col-fresh:nth-child(6) { animation-delay: 0.3s; }
.news-col-fresh:nth-child(7) { animation-delay: 0.35s; }
.news-col-fresh:nth-child(8) { animation-delay: 0.4s; }
.news-col-fresh:nth-child(9) { animation-delay: 0.45s; }

/* ===== PAGINACIÓN FRESH ===== */
.pagination-fresh {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 3rem;
}

.pagination-fresh .page-link {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.25s ease;
}

/* Compatibilidad con tarjetas legacy en grid fresh */
.news-grid-fresh .news-card-modern {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.news-grid-fresh .news-card-modern .news-image-standard {
    height: 200px;
}

/* ===== MODAL AMPLIACIÓN NOTICIA ===== */
.news-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.news-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.news-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.news-modal-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.news-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
}

.news-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.news-modal-loading,
.news-modal-error {
    padding: 3rem 2rem;
    text-align: center;
}

.news-modal-content {
    padding: 2rem;
}

.news-modal-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #28282a;
    margin-bottom: 12px;
}

.news-modal-date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 12px;
}

.news-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1d23;
    margin-bottom: 1.5rem;
}

.news-modal-image-wrap {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.news-modal-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.news-modal-body {
    color: #374151;
    line-height: 1.7;
    font-size: 1rem;
    max-height: 35vh !important;
    min-height: 120px;
    overflow-x: scroll !important;
    overflow-y: scroll !important;
    padding: 1rem 0;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

.news-modal-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 5px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 5px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.news-modal-body::-webkit-scrollbar-corner {
    background: #e5e7eb;
}

.news-modal-source {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.news-modal-source a {
    color: #28282a;
    font-weight: 600;
}

@media (max-width: 767px) {
    .news-modal-container {
        max-height: 85vh;
        margin: 10px;
    }
    .news-modal-content {
        padding: 1.5rem;
    }
    .news-modal-title {
        font-size: 1.25rem;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .news-featured-card .feat-img-wrap {
        height: 240px;
    }
    .news-featured-card .feat-title {
        font-size: 1.25rem;
    }
    .news-featured-card .feat-content {
        padding: 1.5rem 1.25rem 1rem;
    }
    .news-toolbar-fresh {
        margin: 1.5rem 0 2rem;
        padding: 1.25rem;
    }
}
