/*
 * NOVEDADES.CSS - Instituto Lao
 * Página de eventos y noticias
 * Colores: Dorado elegante + Rojo institucional
 */

/* ===========================
   1. HERO SECTION
   =========================== */
.hero-novedades {
    background: linear-gradient(135deg, #e2c20e 0%, #f0bc12 50%, #da5f0e 100%);
    padding: 8rem 0 6rem;
    margin-top: 100px; /* Solo navbar, sin topbar extra */
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Partículas de caracteres chinos */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.08;
    pointer-events: none;
}

.particle {
    position: absolute;
    font-size: 8rem;
    font-weight: bold;
    color: white;
    font-family: 'Noto Sans SC', sans-serif;
    animation: float 25s infinite ease-in-out;
}

.particle:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 50%;
    left: 75%;
    animation-delay: 5s;
}

.particle:nth-child(3) {
    top: 70%;
    left: 25%;
    animation-delay: 10s;
}

.particle:nth-child(4) {
    top: 25%;
    left: 60%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.08;
    }
    50% {
        transform: translateY(-40px) rotate(5deg);
        opacity: 0.15;
    }
}

/* Contenido del hero */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    line-height: 1.7;
}

/* ===========================
   3. EVENTOS (Google Calendar)
   =========================== */
.eventos-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #fff6f0 0%, #FFFFFF 100%);
}

.section-header-novedades {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title-novedades {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title-novedades::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #F4C430, #D4AF37);
    border-radius: 2px;
}

.section-subtitle-novedades {
    font-size: 1.15rem;
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-top: 1.5rem;
}

/* Grid de eventos */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: start;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
/* Card de evento */
.evento-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%; /* Para que todas tengan la misma altura */
}

.evento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(244, 196, 48, 0.2);
    border-color: #F4C430;
}

/* Imagen del evento */
.evento-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.evento-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.evento-card:hover .evento-image img {
    transform: scale(1.08);
}

.evento-fecha {
    background: linear-gradient(135deg, #F4C430 0%, #D4AF37 100%);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.evento-dia {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.evento-mes {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.evento-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.evento-hora {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.evento-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.evento-descripcion {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Botón agregar a calendario */
.evento-add-calendar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #F4C430 0%, #D4AF37 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.evento-add-calendar:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #C9A12C 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 196, 48, 0.4);
}

.evento-add-calendar svg {
    flex-shrink: 0;
}

/* Loading spinner */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-gray-200);
    border-top-color: #F4C430;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin-top: 1rem;
    color: var(--color-gray-600);
    font-weight: 500;
}

/* ===========================
   4. NOTICIAS
   =========================== */
.noticias-section {
    padding: 6rem 0;
    background: white;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* Card de noticia */
.noticia-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.noticia-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.noticia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-image img {
    transform: scale(1.08);
}

.noticia-categoria {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.noticia-categoria.academico {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.noticia-categoria.cultural {
    background: rgba(222, 41, 16, 0.9);
    color: white;
}

.noticia-categoria.instituto {
    background: rgba(255, 159, 90, 0.9);
    color: white;
}

.noticia-categoria.noticias {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.noticia-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.noticia-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-500);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.noticia-meta .icon {
    flex-shrink: 0;
}

.noticia-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.noticia-descripcion {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: 0;
    flex: 1;
}

/* ===========================
   5. CTA SECTION
   =========================== */
.cta-novedades {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-novedades::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(244, 196, 48, 0.03) 10px,
        rgba(244, 196, 48, 0.03) 20px
    );
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: linear-gradient(135deg, #F4C430 0%, #D4AF37 100%);
    color: #1F2937;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(244, 196, 48, 0.4);
    transition: all 0.3s ease;
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(244, 196, 48, 0.5);
    background: linear-gradient(135deg, #D4AF37 0%, #F4C430 100%);
}

.btn-cta-primary svg {
    transition: transform 0.3s ease;
}

.btn-cta-primary:hover svg {
    transform: translateX(5px);
}

.btn-cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
}

/* ===========================
   6. RESPONSIVE
   =========================== */

/* Tablet (< 1024px) */
@media screen and (max-width: 1024px) {
    .hero-novedades {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .eventos-grid,
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .section-title-novedades {
        font-size: 2.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

/* Mobile (< 767px) */
@media screen and (max-width: 767px) {
    .hero-novedades {
        padding: 4rem 0 3rem;
        margin-top: 100px; /* Solo navbar en mobile */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .particle {
        font-size: 5rem;
    }
    
    .eventos-section,
    .noticias-section {
        padding: 4rem 0;
    }
    
    .section-header-novedades {
        margin-bottom: 3rem;
    }
    
    .section-title-novedades {
        font-size: 2rem;
    }
    
    .section-subtitle-novedades {
        font-size: 1rem;
    }
    
    .eventos-grid,
    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .evento-card,
    .noticia-card {
        max-width: 100%;
    }
    
    .evento-titulo,
    .noticia-titulo {
        font-size: 1.25rem;
    }
    
    .cta-novedades {
        padding: 3rem 0;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Small Mobile (< 480px) */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .noticia-image {
        height: 200px;
    }
}

/* ===========================
   7. BOTONES FLOTANTES
   =========================== */

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    text-decoration: none;
    overflow: visible;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-10px);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.7;
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.whatsapp-text {
    position: absolute;
    right: 70px;
    background: var(--color-white);
    color: var(--color-dark);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    white-space: nowrap;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    pointer-events: none;
}

.whatsapp-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--color-white);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.whatsapp-float svg {
    position: relative;
    z-index: 2;
    fill: white;
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-fixed);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-4px);
}

/* Responsive para botones flotantes */
@media screen and (max-width: 767px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 85px;
        right: 20px;
    }
}
