/* CSS para Página de Noticias - Cooperativa 15 de Diciembre */

/* Variables CSS */
:root {
    --primary-color: #f39c12;
    --secondary-color: #e67e22;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base styles */
.pagina-noticias {
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* News Hero Section */
.news-hero {
    background: linear-gradient(135deg, 
                rgba(243, 156, 18, 0.9) 0%, 
                rgba(230, 126, 34, 0.9) 100%),
                url('../img/hero-noticias-bg.jpg') center/cover;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    animation: heroSectionSlideDown 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.1);
    z-index: 1;
    opacity: 0;
    animation: overlayFadeIn 0.6s ease-out 0.8s forwards;
}

.news-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: heroContentFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-title i {
    font-size: 3rem;
    animation: pulse 2s infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}



/* Featured News Section */
.featured-news {
    padding: 60px 0;
    background: var(--white);
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: featuredCardSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s forwards;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-image {
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-light);
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.news-meta .category {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category.eventos {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.category.logros {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.category.servicios {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.category.comunidad {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.news-meta .date {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1.1rem;
}



/* News Grid Section */
.news-grid {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.2s forwards;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

/* Animaciones escalonadas para las tarjetas */
.news-card:nth-child(1) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.9s forwards; }
.news-card:nth-child(2) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.0s forwards; }
.news-card:nth-child(3) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.1s forwards; }
.news-card:nth-child(4) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.2s forwards; }
.news-card:nth-child(5) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.3s forwards; }
.news-card:nth-child(6) { animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.4s forwards; }

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
}

.news-content {
    padding: 25px;
}

.news-content .news-meta {
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.news-content .news-meta .author {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-content h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* Load More Section */
.load-more-section {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.8s forwards;
}

.load-more-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}



/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSectionSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes featuredCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}



/* Hidden/Filtered states */
.news-card.hidden {
    display: none;
}

/* RESPONSIVE DESIGN */

/* Tablets */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title i {
        font-size: 2.2rem;
    }
    
    .featured-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-content {
        padding: 30px;
    }
    
    .news-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    

}

/* Mobile phones */
@media screen and (max-width: 768px) {
    /* Acelerar animaciones en móviles para mejor UX */
    .news-hero {
        animation-duration: 0.8s;
        animation-delay: 0.1s;
    }
    
    .news-hero-content {
        animation-duration: 0.6s;
        animation-delay: 0.4s;
    }
    
    .featured-card {
        animation-duration: 0.6s;
        animation-delay: 1.0s;
    }
    
    .section-header {
        animation-duration: 0.5s;
        animation-delay: 1.6s;
    }
    
    .news-card:nth-child(1) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.1s forwards; }
    .news-card:nth-child(2) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.2s forwards; }
    .news-card:nth-child(3) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.3s forwards; }
    .news-card:nth-child(4) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.4s forwards; }
    .news-card:nth-child(5) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.5s forwards; }
    .news-card:nth-child(6) { animation: cardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.6s forwards; }
    
    .load-more-section {
        animation-delay: 2.8s;
        animation-duration: 0.4s;
    }

    .news-hero {
        min-height: 250px;
    }
    
    .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-title i {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    

    
    .featured-content {
        padding: 25px 20px;
    }
    
    .featured-content h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-content {
        padding: 20px;
    }
    

}

/* Small mobile phones */
@media screen and (max-width: 480px) {
    .news-hero-content {
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    

    
    .featured-news,
    .news-grid {
        padding: 40px 0;
    }
    
    .featured-content {
        padding: 20px 15px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-content h3 {
        font-size: 1.2rem;
    }
    

}

/* Very small screens */
@media screen and (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .news-image {
        height: 180px;
    }
    
    .featured-content h2 {
        font-size: 1.3rem;
    }
    

}