/* Source: page/noticiascoop.php */
:root {
            --primary-green: #00a75d;
            --secondary-green: #28a745;
            --accent-blue: #007bff;
            --dark-blue: #123057;
            --light-bg: #f8f9fc;
            --white-glass: rgba(255,255,255,0.95);
            --shadow-light: rgba(0,0,0,0.1);
            --shadow-hover: rgba(0,167,93,0.25);
        }

        body { font-family: 'Poppins', sans-serif; }

        /* NAV ACTIVE PAGE */
        .navbar-nav .nav-link {
            color: #6c757d !important;
        }
        .navbar-nav .nav-link.active {
            color: var(--primary-green) !important;
            font-weight: 700 !important;
        }

        /* HERO SECTION */
        .hero-section{
            background: linear-gradient(135deg, #00a75d, #28a745, #007bff);
            color: #fff;
            padding: 90px 0 70px;
            text-align: center;
        }
        .hero-section h1{ font-size: 3rem; font-weight: 500; }    
        .hero-section p{ font-size: 1.25rem; opacity: .95; }

        /* FILTROS */
        .filters-section {
            padding: 60px 0;
            background: var(--light-bg);
            position: relative;
        }
        .filter-tabs {
            max-width: 800px;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
        }
        .filter-btn {
            background: #fff;
            border: 2px solid rgba(0,167,93,0.2);
            color: var(--dark-blue);
            padding: 12px 28px;
            border-radius: 50px;
            font-weight: 600;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        .filter-btn.active, .filter-btn:hover {
            background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
            color: #fff;
            border-color: var(--primary-green);
            transform: translateY(-2px);
            box-shadow: 0 10px 30px var(--shadow-hover);
        }

        /* GRID DE NOTICIAS */
        .news-section {
            padding: 0px 0 120px;
            background: linear-gradient(135deg, #f8f9fa 0%, var(--light-bg) 100%);
        }
        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
            gap: 30px;
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* CARD NOTICIA */
        .news-card {
            background: var(--white-glass);
            backdrop-filter: blur(25px);
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 20px 60px var(--shadow-light);
            border: 1px solid rgba(0,167,93,0.15);
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            height: 480px;
            display: flex;
            flex-direction: column;
        }
        .news-card:hover {
            transform: translateY(-15px);
            box-shadow: 0 40px 100px var(--shadow-hover);
            border-color: var(--primary-green);
        }

        .news-image {
            height: 300px;
            overflow: hidden;
            position: relative;
        }
        .news-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        .news-card:hover .news-image img {
            transform: scale(1.1);
        }

        .news-category {
            position: absolute;
            top: 20px;
            left: 20px;
            background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
            color: #fff;
            padding: 8px 20px;
            border-radius: 25px;
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .news-content {
            padding: 30px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .news-date {
            color: var(--accent-blue);
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 12px;
        }
        .news-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--dark-blue);
            margin-bottom: 15px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .news-excerpt {
            color: #6c757d;
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 20px;
            flex: 1;
        }
        .news-link {
            color: var(--primary-green);
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        .news-link:hover {
            color: var(--accent-blue);
            transform: translateX(5px);
        }

        /* MODAL */
        .news-modal .modal-content {
            border-radius: 24px;
            border: none;
            background: var(--white-glass);
            backdrop-filter: blur(30px);
            box-shadow: 0 30px 80px rgba(0,0,0,0.3);
        }
        .news-modal .modal-header {
            background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
            color: white;
            border-radius: 24px 24px 0 0 !important;
            border-bottom: none;
            padding: 25px 30px;
        }
        .news-modal .modal-title {
            font-size: 1.6rem;
            font-weight: 700;
            margin: 0;
        }
        .news-modal .modal-body {
            padding: 40px 30px;
        overflow-x: hidden;
        }
        .news-modal .modal-body img {
            max-width: 100%;
            height: auto;
        }
        .news-full-image {
            width: 100%;
            height: 500px;
            object-fit: cover;
            border-radius: 20px;
            margin-bottom: 25px;
            box-shadow: 0 15px 40px rgba(0,0,0,0.2);
        }
        .news-full-date {
            color: var(--accent-blue);
            font-size: 0.95rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 15px;
        }
        .news-full-title {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--dark-blue);
            line-height: 1.3;
            margin-bottom: 20px;
        }

        /*  CONTENIDO ESTRUCTURADO */
        .news-full-content {
            font-size: 1.1rem;
            line-height: 1.9;
            color: #4a5568;
            margin-bottom: 30px;
        }
        .news-full-content p {
            margin-bottom: 1.5rem;
            line-height: 1.7;
        }
        .news-full-content ul, .news-full-content ol {
            margin: 1.5rem 0;
            padding-left: 1.8rem;
        }
        .news-full-content li {
            margin-bottom: 0.8rem;
            line-height: 1.6;
        }
        .news-full-content h2, .news-full-content h3 {
            color: var(--dark-blue);
            font-weight: 600;
            margin: 2rem 0 1rem 0;
            padding-bottom: 0.3rem;
            border-bottom: 1px solid #e0e6ed;
        }
        .news-full-content strong {
            color: var(--dark-blue);
        }


        .news-main-image-wrap {
            margin: 0 auto 24px;
            max-width: 900px;
            border-radius: 18px;
            overflow: hidden;
            box-shadow: 0 15px 40px rgba(0,0,0,0.2);
        }
        .news-main-image {
            width: 100%;
            height: min(52vh, 420px);
            object-fit: cover;
            object-position: center;
            display: block;
        }
        .news-gallery-section {
            margin: 30px 0 10px;
            padding-top: 18px;
            border-top: 1px solid #e4eaf1;
        }
        .news-gallery-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--dark-blue);
            margin-bottom: 14px;
        }
        .news-mini-carousel {
            max-width: 460px;
            margin: 0 auto;
        }
        .news-mini-carousel .carousel-inner {
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 10px 24px rgba(0,0,0,0.18);
        }
        .news-mini-image {
            width: 100%;
            height: 210px;
            object-fit: cover;
            object-position: center;
            display: block;
        }
        .news-mini-carousel .carousel-control-prev,
        .news-mini-carousel .carousel-control-next {
            width: 44px;
            height: 44px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(18, 48, 87, 0.82);
            border-radius: 50%;
            opacity: 1;
            box-shadow: 0 8px 20px rgba(0,0,0,0.35);
        }
        .news-mini-carousel .carousel-control-prev { left: 12px; }
        .news-mini-carousel .carousel-control-next { right: 12px; }
        .news-mini-carousel .carousel-control-prev-icon,
        .news-mini-carousel .carousel-control-next-icon {
            filter: brightness(0) invert(1);
            width: 1rem;
            height: 1rem;
        }
        .news-mini-carousel .carousel-indicators {
            margin-bottom: -4px;
        }
        .news-mini-carousel .carousel-indicators button {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background-color: rgba(18, 48, 87, 0.35);
            border: none;
        }
        .news-mini-carousel .carousel-indicators .active {
            background-color: var(--primary-green);
        }
        /* COMPARTIR */
        .news-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            padding: 25px 0;
            border-top: 2px solid rgba(0,167,93,0.1);
            margin-top: 30px;
            justify-content: space-between;
            align-items: center;
        }
        .meta-share {
            color: #6c757d;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .share-section {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        .share-btn {
            width: 45px;
            height: 45px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            text-decoration: none;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        .share-facebook { background: #1877F2; }
        .share-twitter { background: #1DA1F2; }
        .share-whatsapp { background: #25D366; }
        .share-linkedin { background: #0077B5; }
        .share-copy { 
            background: linear-gradient(135deg, var(--primary-green), var(--accent-blue));
            cursor: pointer;
        }
        .share-btn:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        }

        /* RESPONSIVE */
        @media (max-width: 992px) {
            .news-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 25px; }
            .hero-section h1 { font-size: 2.8rem; }
        }
        @media (max-width: 768px) {
            .hero-section { padding: 80px 0 60px; }
            .hero-section h1 { font-size: 2.3rem; }
            .news-grid {
                grid-template-columns: repeat(2, 1fr); /* 2 noticias por fila */
                gap: 20px;
            }
            .news-card {
                height: auto;
                min-height: 420px;
            }
            .news-image { height: 200px; }
            .news-modal .modal-body { padding: 30px 20px; }
        .news-modal .modal-body img {
            max-width: 100%;
            height: auto;
        }
            .news-full-title { font-size: 1.8rem; }
            .news-main-image { height: 260px; }
            .news-mini-carousel { max-width: 320px; }
            .news-mini-image { height: 170px; }
            .news-mini-carousel .carousel-control-prev,
            .news-mini-carousel .carousel-control-next {
                width: 38px;
                height: 38px;
            }
            .news-meta { flex-direction: column; gap: 20px; text-align: center; }
            .share-section { justify-content: center; }
            .news-full-content p { line-height: 1.6; margin-bottom: 1.2rem; }
            .carousel img {
                height: auto;
                max-height: 250px;
                object-fit: cover;
            }
        }
        @media (max-width: 420px) {
            .news-grid {
                grid-template-columns: 1fr; /* 1 columna solo cuando ya no hay dignidad */
            }
        }
        .galeria {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }

        .galeria img {
            width: 100%;
            height: 160px;
            object-fit: cover;
            border-radius: 10px;
        }

/* CAROUSEL ANIMATIONS */
.carousel-fade .carousel-item {
    transition: opacity 1.2s ease-in-out;
}
.carousel-fade .carousel-item.active {
    opacity: 1;
}
.carousel-fade .carousel-item:not(.active) {
    opacity: 0;
}
.carousel-control-prev, .carousel-control-next {
    transition: all 0.4s ease;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
    background: rgba(0, 167, 93, 0.8);
    transform: scale(1.1);
}
.carousel-indicators button {
    transition: all 0.3s ease;
}
.carousel-indicators .active {
    background-color: var(--primary-green);
    transform: scale(1.2);
}



/* ============================================================================
   BUTTON ANIMATIONS ENHANCED
   ============================================================================ */
.filter-btn,
.news-link,
.share-btn,
.news-mini-carousel .carousel-control-prev,
.news-mini-carousel .carousel-control-next,
.news-modal .btn-close {
    transition: transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .28s ease, background-color .28s ease, color .28s ease, border-color .28s ease, opacity .28s ease;
}

.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
    transition: transform .55s ease;
}

.filter-btn:hover::before {
    transform: translateX(110%);
}

.filter-btn:active {
    transform: translateY(0) scale(.98);
}

.news-link i {
    transition: transform .28s ease;
}

.news-link:hover i {
    transform: translateX(5px);
}

.news-link:active {
    transform: translateX(2px) scale(.98);
}

.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::after {
    content: "";
    position: absolute;
    width: 160%;
    height: 160%;
    top: -130%;
    left: -35%;
    background: radial-gradient(circle, rgba(255,255,255,.28) 0%, transparent 60%);
    transform: rotate(18deg);
    transition: top .45s ease;
}

.share-btn:hover::after {
    top: 55%;
}

.share-btn:hover {
    transform: translateY(-4px) scale(1.06);
}

.share-btn:active {
    transform: translateY(-1px) scale(.96);
}

.news-mini-carousel .carousel-control-prev:hover,
.news-mini-carousel .carousel-control-next:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(0, 167, 93, 0.92);
    box-shadow: 0 12px 26px rgba(0,0,0,0.35);
}

.news-mini-carousel .carousel-control-prev:active,
.news-mini-carousel .carousel-control-next:active {
    transform: translateY(-50%) scale(.95);
}

.news-modal .btn-close {
    opacity: .95;
}

.news-modal .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg) scale(1.07);
}

.news-modal .btn-close:active {
    transform: rotate(90deg) scale(.94);
}

@media (prefers-reduced-motion: reduce) {
    .filter-btn,
    .news-link,
    .share-btn,
    .news-mini-carousel .carousel-control-prev,
    .news-mini-carousel .carousel-control-next,
    .news-modal .btn-close,
    .filter-btn::before,
    .share-btn::after,
    .news-link i {
        transition: none !important;
        animation: none !important;
    }
}
