Galería AMEEC - Nuestra Historia /* ========== VARIABLES Y CONFIGURACIÓN BASE ========== */ :root { --verde-principal: #2F5F2F; --verde-claro: #D3DAC3; --beige-suave: #F5EBDF; --morado-accent: #C586F0; --blanco: #FFFFFF; --gris-texto: #333333; --sombra-suave: 0 2px 12px rgba(47, 95, 47, 0.08); --sombra-hover: 0 8px 24px rgba(47, 95, 47, 0.15); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--beige-suave); color: var(--gris-texto); line-height: 1.6; overflow-x: hidden; width: 100% !important; max-width: 100% !important; } h1, h2, h3 { font-family: 'Figtree', sans-serif; color: var(--verde-principal); font-weight: 700; } h4, h5, h6 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; } /* ========== CONTENEDOR PRINCIPAL ========== */ .gallery-container { max-width: 100% !important; width: 100% !important; margin: 0 auto; padding: 40px 20px; } /* ===== TRUCO PARA ANCHO COMPLETO ===== */ .full-width-section { width: 100vw; margin-left: calc(-50vw + 50%); } /* HERO - FUERA DEL CONTENEDOR PRINCIPAL */ .hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/11/img_7394-AGBv5gjg6QiENgB1.avif') center center; background-size: cover; background-attachment: fixed; position: relative; padding: 80px 20px; text-align: center; color: white; } .hero-content { max-width: 1200px; z-index: 2; animation: fadeInUp 1.2s ease-out; padding: 0 20px; width: 100%; box-sizing: border-box; } .hero-content h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; margin-bottom: 30px; letter-spacing: -1px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); color: white; line-height: 1.2; } .hero-subtitle { font-size: 1.4rem; font-weight: 400; line-height: 1.8; max-width: 900px; margin: 0 auto 50px; text-align: center; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); } .hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 40px; position: relative; z-index: 3; } .hero-btn { display: inline-block; padding: 14px 32px; border-radius: 10px; font-weight: 600; font-size: 1.1rem; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2); } .btn-primary { background-color: var(--verde-principal); color: white; border: 2px solid var(--verde-principal); } .btn-secondary { background-color: transparent; color: white; border: 2px solid white; } .btn-primary:hover { background-color: #224a30; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); } .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); } .scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 30px; height: 50px; border: 2px solid white; border-radius: 20px; cursor: pointer; animation: float 3s ease-in-out infinite; z-index: 10; } .scroll-indicator::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; background: white; border-radius: 50%; animation: scroll 2s infinite; } /* ========== NAVEGACIÓN DE AÑOS ========== */ .year-navigation { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 50px; padding: 20px; background: var(--blanco); border-radius: 15px; box-shadow: var(--sombra-suave); position: sticky; top: 20px; z-index: 100; width: 100%; } .year-nav-btn { padding: 12px 28px; background: var(--verde-claro); color: var(--verde-principal); border: 2px solid transparent; border-radius: 25px; font-family: 'Figtree', sans-serif; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; } .year-nav-btn:hover, .year-nav-btn.active { background: var(--verde-principal); color: var(--blanco); transform: translateY(-2px); box-shadow: var(--sombra-hover); } /* ========== FILTROS ========== */ .filter-section { margin-bottom: 40px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; width: 100%; } .filter-btn { padding: 8px 20px; background: var(--blanco); color: var(--verde-principal); border: 1px solid var(--verde-claro); border-radius: 20px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; } .filter-btn:hover, .filter-btn.active { background: var(--morado-accent); color: var(--blanco); border-color: var(--morado-accent); } /* ========== SECCIÓN DE AÑO ========== */ .year-section { margin-bottom: 80px; scroll-margin-top: 120px; width: 100%; } .year-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; padding-bottom: 15px; border-bottom: 3px solid var(--verde-claro); } .year-number { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; color: var(--verde-principal); opacity: 0.9; } .year-title { font-size: clamp(1.25rem, 3vw, 1.75rem); color: var(--morado-accent); } /* ========== GRILLA DE EVENTOS ========== */ .events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 30px; } /* ========== TARJETA DE EVENTO ========== */ .event-card { background: var(--blanco); border-radius: 15px; overflow: hidden; box-shadow: var(--sombra-suave); transition: all 0.3s ease; cursor: pointer; display: flex; flex-direction: column; } .event-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-hover); } .event-image { position: relative; width: 100%; height: 220px; background: linear-gradient(135deg, var(--verde-claro) 0%, var(--beige-suave) 100%); display: flex; align-items: center; justify-content: center; color: var(--verde-principal); font-size: 3rem; font-weight: 700; overflow: hidden; } .event-image::after { content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%; background: radial-gradient(circle, var(--morado-accent) 0%, transparent 70%); opacity: 0.05; z-index: 0; } .event-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; } .event-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; } .event-type { display: inline-block; padding: 5px 12px; background: var(--verde-claro); color: var(--verde-principal); border-radius: 15px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; width: fit-content; } .event-title { font-size: 1.15rem; color: var(--verde-principal); margin-bottom: 10px; font-weight: 600; line-height: 1.4; } .event-location { font-size: 0.9rem; color: var(--morado-accent); margin-bottom: 8px; font-weight: 500; } .event-date { font-size: 0.85rem; color: #666; margin-top: auto; } /* ========== CITA DESTACADA ========== */ .featured-quote { background: linear-gradient(135deg, var(--morado-accent) 0%, #b066e0 100%); border-radius: 15px; padding: 40px; margin: 40px 0; position: relative; color: var(--blanco); } .featured-quote::before { content: '"'; position: absolute; top: -20px; left: 20px; font-size: 8rem; font-family: 'Figtree', serif; opacity: 0.2; line-height: 1; } .quote-text { font-size: clamp(1.1rem, 2vw, 1.5rem); font-style: italic; line-height: 1.6; margin-bottom: 20px; position: relative; z-index: 1; } .quote-author { font-size: 1rem; font-weight: 600; text-align: right; opacity: 0.9; } /* ========== SECCIÓN TESTIMONIOS ========== */ .testimonials-section { background: var(--verde-principal); border-radius: 20px; padding: 60px 20px; margin-top: 80px; position: relative; overflow: hidden; width: 100%; } .testimonials-section::before { content: ''; position: absolute; top: -100px; left: -100px; width: 300px; height: 300px; background: var(--morado-accent); opacity: 0.1; border-radius: 50%; } .testimonials-header { text-align: center; margin-bottom: 50px; } .testimonials-header h2 { color: var(--blanco); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 15px; } .testimonials-header p { color: var(--verde-claro); font-size: 1.1rem; } .testimonials-carousel { position: relative; max-width: 900px; margin: 0 auto; } .testimonial-card { background: var(--blanco); border-radius: 15px; padding: 40px; box-shadow: var(--sombra-hover); display: none; animation: fadeIn 0.5s ease; } .testimonial-card.active { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .testimonial-text { font-size: 1.15rem; line-height: 1.8; color: var(--gris-texto); margin-bottom: 25px; font-style: italic; } .testimonial-author { display: flex; align-items: center; gap: 15px; } .author-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--verde-principal), var(--morado-accent)); display: flex; align-items: center; justify-content: center; color: var(--blanco); font-size: 1.5rem; font-weight: 700; } .author-info h4 { color: var(--verde-principal); margin-bottom: 5px; } .author-info p { color: #666; font-size: 0.9rem; } .carousel-controls { display: flex; justify-content: center; gap: 15px; margin-top: 30px; } .carousel-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--blanco); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; font-size: 1.25rem; color: var(--verde-principal); padding: 0; line-height: 1; } .carousel-btn:hover { background: var(--morado-accent); color: var(--blanco); transform: scale(1.1); } .carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; } .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--verde-claro); cursor: pointer; transition: all 0.3s ease; } .dot.active { background: var(--blanco); transform: scale(1.3); } /* ========== MODAL LIGHTBOX ========== */ .lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 1000; padding: 20px; overflow-y: auto; } .lightbox.active { display: flex; align-items: center; justify-content: center; } .lightbox-content { background: var(--blanco); border-radius: 20px; max-width: 900px; width: 100%; padding: 40px; position: relative; animation: modalSlideIn 0.4s ease; } @keyframes modalSlideIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } .lightbox-close { position: absolute; top: 15px; right: 15px; width: 40px; height: 40px; border-radius: 50%; background: var(--verde-principal); color: var(--blanco); border: none; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; z-index: 10; padding: 0; line-height: 1; } .lightbox-close:hover { background: var(--morado-accent); transform: rotate(90deg); } .lightbox-carousel { position: relative; width: 100%; height: 400px; max-height: 60vh; overflow: hidden; border-radius: 10px; background: #000; margin-bottom: 25px; } .carousel-item { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: none; } .carousel-item.active { display: flex; align-items: center; justify-content: center; } .carousel-item img { max-width: 100%; max-height: 100%; object-fit: contain; } .carousel-item iframe { width: 100%; height: 100%; border: none; } .carousel-controls-lightbox { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 10px; pointer-events: none; z-index: 10; } .carousel-btn-lb { pointer-events: all; background: rgba(255, 255, 255, 0.9); border: none; color: #333; font-size: 2rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.3); padding: 0; line-height: 1; } .carousel-btn-lb:hover { background: rgba(255, 255, 255, 1); transform: scale(1.1); } .carousel-indicators { display: flex; justify-content: center; gap: 8px; margin-top: 15px; } .indicator { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.3); cursor: pointer; transition: all 0.3s ease; } .indicator.active { background: var(--verde-principal); transform: scale(1.2); } .lightbox-title { font-size: 1.75rem; color: var(--verde-principal); margin-bottom: 15px; } .lightbox-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; } .detail-item { display: flex; flex-direction: column; gap: 5px; } .detail-label { font-size: 0.85rem; color: #666; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; } .detail-value { font-size: 1.05rem; color: var(--gris-texto); font-weight: 500; } .lightbox-description { font-size: 1rem; line-height: 1.7; color: var(--gris-texto); margin-bottom: 25px; } .lightbox-actions { display: flex; gap: 15px; flex-wrap: wrap; } .action-btn { padding: 12px 24px; border-radius: 25px; border: none; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease; } .btn-primary { background: var(--verde-principal); color: var(--blanco); } .btn-primary:hover { background: #1e3f1e; transform: translateY(-2px); } .btn-secondary { background: var(--morado-accent); color: var(--blanco); } .btn-secondary:hover { background: #b066e0; transform: translateY(-2px); } /* ========== RESPONSIVE ========== */ @media (max-width: 768px) { .gallery-container { padding: 20px 15px; } .hero-section { padding: 40px 20px; margin-bottom: 40px; } .year-navigation { gap: 10px; padding: 15px; top: 10px; } .year-nav-btn { padding: 10px 20px; font-size: 0.9rem; } .events-grid { grid-template-columns: 1fr; gap: 20px; } .featured-quote { padding: 30px 20px; } .testimonials-section { padding: 40px 15px; } .testimonial-card { padding: 25px; } .lightbox-content { padding: 25px; margin: 20px; } .year-header { flex-direction: column; align-items: flex-start; gap: 10px; } .lightbox-carousel { height: 300px; } } /* ========== ACCESIBILIDAD ========== */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } *:focus-visible { outline: 3px solid var(--morado-accent); outline-offset: 2px; } /* ========== ANIMACIONES DE SCROLL ========== */ .fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; } .fade-in.visible { opacity: 1; transform: translateY(0); }

Nuestra Historia

Descubre el camino de AMEEC desde 2021: convenios estratégicos, talleres educativos, proyectos de impacto social y nuestra labor en comunidades de Nayarit.
// ========== VARIABLES GLOBALES ========== let currentTestimonial = 1; const totalTestimonials = 5; let currentFilter = 'all'; let currentCarouselIndex = 0; let currentEventMedia = []; // ========== DATOS DE EVENTOS (Base de datos simplificada) ========== const eventsData = { 'event-2021-1': { title: 'Primer Logotipo AMEEC', type: 'Institucional', location: 'Constitución Formal', date: 'Mayo 2021', description: 'Creación del primer logotipo oficial de AMEEC.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/image-36.png'} ] }, 'event-2021-2': { title: 'Acciones en Pandemia', type: 'Comunidad', location: 'Nayarit', date: '2021', description: 'Evento comunidad realizado en Nayarit.', media: [] }, 'event-2021-3': { title: 'Rueda de Prensa', type: 'Medios', location: 'Tepic, Nayarit', date: '13 de Julio 2021', description: 'Primera rueda de prensa presentando oficialmente AMEEC.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/PrimerImagen.png'} ] }, 'event-2021-4': { title: 'Asamblea Ejidal: El Aguacate', type: 'Comunidad', location: 'El Aguacate, Nayarit', date: '27 de Junio 2021', description: 'Primera asamblea ejidal realizada en la comunidad de El Aguacate.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/asamblea1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/asamblea2.jpg'} ] }, 'event-2021-5': { title: 'Coastecomate', type: 'Comunidad', location: 'San Pedro Lagunillas, Nayarit', date: '23 de Noviembre 2021', description: 'Evento comunidad realizado en San Pedro Lagunillas, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/asamblea3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/asamblea4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/asamblea5.jpg'} ] }, 'event-2021-6': { title: 'Autoridades del Estado', type: 'Institucional', location: 'San Pedro Lagunillas, Nayarit', date: '15 de Diciembre 2021', description: 'Evento institucional realizado en San Pedro Lagunillas, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/autoridades2.jpg'} ] }, 'event-2021-7': { title: 'Talleres Educativos', type: 'Talleres', location: 'Tepic, Nayarit', date: '2021', description: 'Evento talleres realizado en Tepic, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/talleres1.png'} ] }, 'event-2022-1': { title: 'Secretario de Economía', type: 'Institucional', location: 'Tepic, Nayarit', date: '3 de Febrero 2022', description: 'Evento institucional realizado en Tepic, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/economia1-scaled.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/economia2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/economia3.jpg'} ] }, 'event-2022-2': { title: 'Cultura Wixárika', type: 'Cultura', location: 'El Roble Del Nayar, Nayarit', date: '19-25 de Marzo 2022', description: 'Evento cultura realizado en El Roble Del Nayar, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/wix2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/wix3.jpeg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/wix4.jpeg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/wix1.jpg'} ] }, 'event-2022-3': { title: 'Asamblea Ejidal: El Conde', type: 'Comunidad', location: 'San Pedro Lagunillas', date: '27 de Marzo 2022', description: 'Evento comunidad realizado en San Pedro Lagunillas.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/conde2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/conde1.jpg'} ] }, 'event-2022-4': { title: 'Asamblea Ejidal: Cerro Pelón', type: 'Comunidad', location: 'Cerro Pelón, Nayarit', date: '24 de Abril 2022', description: 'Evento comunidad realizado en Cerro Pelón, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cerro2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cerro1.jpg'} ] }, 'event-2022-5': { title: 'Acción Ciudadana', type: 'Comunidad', location: 'El Conde, San Pedro Lagunillas', date: '25 de Abril 2022', description: 'Evento comunidad realizado en El Conde, San Pedro Lagunillas.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/accion1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/accion2.jpg'} ] }, 'event-2022-6': { title: 'Asamblea Ejidal: Tequilita', type: 'Comunidad', location: 'Tequilita, Nayarit', date: '1 de Mayo 2022', description: 'Evento comunidad realizado en Tequilita, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/tequilita1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/tequilita2.jpg'} ] }, 'event-2022-7': { title: 'Invitación en Medios - Studio 21', type: 'Medios', location: 'Tepic, Nayarit', date: '3 de Mayo 2022', description: 'Evento medios realizado en Tepic, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/mesa2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/mesa1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/mesa3.jpg'} ] }, 'event-2022-8': { title: 'Reunión con CDDH', type: 'Institucional', location: 'Tepic, Nayarit', date: '20 de Octubre 2022', description: 'Evento institucional realizado en Tepic, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cddh1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cddh2.jpg'} ] }, 'event-2022-9': { title: 'Entrevista Radio Nayarit', type: 'Medios', location: 'Nayarit', date: '24 de Octubre 2022', description: 'Evento medios realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/radionayarit2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/radionayarit1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/radionayarit3.jpg'} ] }, 'event-2022-10': { title: 'Día de Muertos', type: 'Cultura', location: 'Coastecomate, San Pedro Lagunillas', date: '2-25 de Noviembre 2022', description: 'Evento cultura realizado en Coastecomate, San Pedro Lagunillas.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/diamuertos1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/diamuertos2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/diamuertos3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/diamuertos4.jpg'} ] }, 'event-2022-11': { title: 'Casa Violeta', type: 'Talleres', location: 'Tepic, Nayarit', date: '14-15 de Diciembre 2022', description: 'Evento talleres realizado en Tepic, Nayarit.', media: [] }, 'event-2023-1': { title: 'Presidio de los Reyes', type: 'Comunidad', location: 'Nayarit', date: '4-27 de Febrero 2023', description: 'Evento comunidad realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/presidio3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/presidio1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/presidio1.jpg'} ] }, 'event-2023-2': { title: 'Firma de Convenio UDG', type: 'Convenio', location: 'Nayarit', date: '6 de Marzo 2023', description: 'Evento convenio realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/convenio1.jpg'} ] }, 'event-2023-3': { title: 'Semana Tec Marzo 2023', type: 'Talleres', location: 'Tec de Mty Campus Santa Fe, CDMX', date: '23-27 de Marzo 2023', description: 'Evento talleres realizado en Tec de Mty Campus Santa Fe, CDMX.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_marzo3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_marzo4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_marzo1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_marzo2.jpg'} ] }, 'event-2023-4': { title: 'Semana Santa Cora 2023', type: 'Cultura', location: 'Santa Teresa Del Nayar', date: '5-9 de Abril 2023', description: 'Evento cultura realizado en Santa Teresa Del Nayar.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta4.jpg'} ] }, 'event-2023-5': { title: 'Entrevista Medios Locales', type: 'Medios', location: 'Nayarit', date: '19-27 de Abril 2023', description: 'Evento medios realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/medios1.jpg'} ] }, 'event-2023-6': { title: 'Semana Tec Mayo 2023', type: 'Talleres', location: 'Tec de Mty Campus Santa Fe, CDMX', date: '8-13 de Mayo 2023', description: 'Evento talleres realizado en Tec de Mty Campus Santa Fe, CDMX.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_mayo4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_mayo3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_mayo1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanatec_mayo2.jpg'} ] }, 'event-2023-7': { title: 'Rector UACH', type: 'Convenio', location: 'Universidad Autónoma Chapingo, Texcoco', date: '17 de Mayo 2023', description: 'Evento convenio realizado en Universidad Autónoma Chapingo, Texcoco.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_rector2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_rector3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_rector4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_rector1.jpg'} ] }, 'event-2023-8': { title: 'Proyecto de Investigación UACH', type: 'Convenio', location: 'UACH', date: '23 de Mayo 2023', description: 'Evento convenio realizado en UACH.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_departamentos1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_departamentos3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/uach_departamentos2.jpg'} ] }, 'event-2023-9': { title: 'Evento OSF 2023', type: 'Talleres', location: 'Tec de Mty Campus Santa Fe', date: '26 de Mayo 2023', description: 'Evento talleres realizado en Tec de Mty Campus Santa Fe.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_osf2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_osf1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_osf3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_osf4.jpg'} ] }, 'event-2023-10': { title: 'Comunidad Santa Teresa (Coras)', type: 'Cultura', location: 'Santa Teresa Del Nayar', date: '7-11 de Junio 2023', description: 'Evento cultura realizado en Santa Teresa Del Nayar.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/santateresa2.jpg'} ] }, 'event-2023-11': { title: 'Firma del Convenio UACH', type: 'Convenio', location: 'UACH', date: '13-15 de Junio 2023', description: 'Evento convenio realizado en UACH.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/convenio_uach1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/convenio_uach4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/convenio_uach3.jpg'} ] }, 'event-2023-12': { title: 'Departamento Forestal UACH', type: 'Convenio', location: 'UACH', date: '16 de Junio 2023', description: 'Evento convenio realizado en UACH.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/depto_forestal1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/depto_forestal2.jpg'} ] }, 'event-2023-13': { title: 'Presentación EMA', type: 'Institucional', location: 'Nayarit', date: '22 de Junio 2023', description: 'Evento institucional realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/ema1.png'} ] }, 'event-2023-14': { title: 'Bioconstrucción en la sierra', type: 'Talleres', location: 'Santa Teresa Del Nayar', date: '14 Julio - 26 Octubre 2023', description: 'Evento talleres realizado en Santa Teresa Del Nayar.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion1.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion2.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion3.png'} ] }, 'event-2023-15': { title: 'Reunión Derechos Humanos', type: 'Institucional', location: 'CDDH, Tepic', date: '16 de Agosto 2023', description: 'Evento institucional realizado en CDDH, Tepic.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/derechos1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/derechos2.jpg'} ] }, 'event-2023-16': { title: 'Firma de Convenio UT', type: 'Convenio', location: 'Nayarit', date: '7 de Septiembre 2023', description: 'Evento convenio realizado en Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/ut2.jpg'} ] }, 'event-2023-17': { title: 'Semana Tec Monterrey 2023', type: 'Talleres', location: 'Tec de Monterrey', date: '23-25 de Octubre 2023', description: 'Evento talleres realizado en Tec de Monterrey.', media: [] }, 'event-2023-18': { title: 'Presentación Medios Locales - 8NTV', type: 'Medios', location: 'Tepic, Nayarit', date: '9 de Noviembre 2023', description: 'Evento medios realizado en Tepic, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/medios5.png'} ] }, 'event-2023-19': { title: 'Proyecto Olas de Amor 2023', type: 'Comunidad', location: 'Chacala, Nayarit', date: '14 Nov - 16 Dic 2023', description: 'Evento comunidad realizado en Chacala, Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/olas6.jpg'} ] }, 'event-2023-20': { title: 'Talleres Santa Teresa', type: 'Talleres', location: 'Santa Teresa Del Nayar', date: '18-22 de Diciembre 2023', description: 'Evento talleres realizado en Santa Teresa Del Nayar.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/talleres7.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/talleres5.jpg'} ] }, 'event-2023-21': { title: 'Ganadores PNAP 2023', type: 'Institucional', location: 'Secretaría de Cultura, Tepic', date: '2023', description: 'Evento institucional realizado en Secretaría de Cultura, Tepic.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/premio1.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/premio2.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/premio3.png'} ] }, 'event-2023-podcast': { title: 'Podcast Dr. Vic', type: 'Medios', location: 'Online', date: '2023', description: 'Entrevista con el líder de AMEEC en el podcast del Dr. Vic, donde se discuten temas de cannabis medicinal y desarrollo comunitario.', media: [ {type: 'youtube', url: 'https://www.youtube.com/embed/mdo8sIzFDaY'} ] }, 'event-2024-1': { title: 'Proyecto Conservas', type: 'Comunidad', location: 'Isla del Rey, San Blas Nayarit', date: '20 Feb - 1 Abril 2024', description: 'Evento comunidad realizado en Isla del Rey, San Blas Nayarit.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/conservas20243.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/conservas20242.jpg'} ] }, 'event-2024-2': { title: 'Semana Santa Cora 2024', type: 'Cultura', location: 'Santa Teresa Del Nayar', date: '27 Marzo - 2 Abril 2024', description: 'Evento cultura realizado en Santa Teresa Del Nayar.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta20241.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta20242.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta20243.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/semanaSanta20244.jpg'} ] }, 'event-2024-3': { title: 'Evento UACH sobre Cáñamo Industrial', type: 'Convenio', location: 'UACH', date: '24 Abril - 13 Mayo 2024', description: 'Evento convenio realizado en UACH.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_canamo1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_canamo4.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/evento_canamo3.jpg'} ] }, 'event-2024-4': { title: 'Laboratorios Lamda', type: 'Institucional', location: 'Oficinas CDMX', date: '26 de Abril 2024', description: 'Evento institucional realizado en Oficinas CDMX.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/lamda20241.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/lamda20242.jpg'} ] }, 'event-2024-5': { title: 'Limpieza en la playa', type: 'Comunidad', location: 'Isla del Rey, San Blas', date: '19 de Mayo 2024', description: 'Evento comunidad realizado en Isla del Rey, San Blas.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/limpieza20241.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/limpieza20244.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/limpieza20242.jpg'} ] }, 'event-2024-6': { title: 'Bioconstrucción para Desarrollo', type: 'Talleres', location: 'Tec de Mty Campus Santa Fe', date: '3-4 de Junio 2024', description: 'Evento talleres realizado en Tec de Mty Campus Santa Fe.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion_desarrollo5.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion_desarrollo2.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/bioconstruccion_desarrollo1.jpg'} ] }, 'event-2024-7': { title: 'Presentación de Cierre Ing y Arq Bioconstrucción', type: 'Talleres', location: 'Tec de Monterrey', date: '5 de Junio 2024', description: 'Evento talleres realizado en Tec de Monterrey.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cierre_bioconstruccion1.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cierre_bioconstruccion8.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cierre_bioconstruccion7.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cierre_bioconstruccion3.jpg'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/cierre_bioconstruccion4.jpg'} ] }, 'event-2024-8': { title: 'Capacitación OSF', type: 'Talleres', location: 'Tec de Monterrey', date: '13-14 de Junio 2024', description: 'Evento talleres realizado en Tec de Monterrey.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/capacitacion_osf1.jpg'} ] }, 'event-2024-9': { title: 'Desayuno OSF', type: 'Institucional', location: 'Tec de Mty Campus Santa Fe', date: '2024', description: 'Evento institucional realizado en Tec de Mty Campus Santa Fe.', media: [ {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/desayuno_osf1.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/desayuno_osf2.png'}, {type: 'image', url: 'https://purple-rabbit-827277.hostingersite.com/wp-content/uploads/2025/10/desayuno_osf3.png'} ] } }; // ========== FUNCIONES PRINCIPALES ========== // Cargar thumbnails en las tarjetas document.addEventListener('DOMContentLoaded', function() { document.querySelectorAll('.event-card').forEach(card => { const eventId = card.dataset.event; const eventData = eventsData[eventId]; if (eventData && eventData.media && eventData.media.length > 0) { const imageDiv = card.querySelector('.event-image'); const firstMedia = eventData.media[0]; if (firstMedia.type === 'image') { imageDiv.innerHTML = `${eventData.title}`; } else if (firstMedia.type === 'youtube') { const videoId = extractYouTubeId(firstMedia.url); imageDiv.innerHTML = `${eventData.title}`; } } card.addEventListener('click', () => openLightbox(eventId)); }); }); function extractYouTubeId(url) { const match = url.match(/(?:youtube\.com\/embed\/|youtu\.be\/|youtube\.com\/watch\?v=)([^&\?\/]+)/); return match ? match[1] : ''; } // ========== NAVEGACIÓN POR AÑOS ========== function scrollToYear(year) { const section = document.getElementById(year); if (section) { section.scrollIntoView({ behavior: 'smooth', block: 'start' }); // Actualizar botones activos document.querySelectorAll('.year-nav-btn').forEach(btn => { btn.classList.remove('active'); if (btn.dataset.year === year) { btn.classList.add('active'); } }); } } // ========== FILTROS DE EVENTOS ========== function filterEvents(filter) { currentFilter = filter; const allCards = document.querySelectorAll('.event-card'); allCards.forEach(card => { const cardType = card.dataset.type; if (filter === 'all') { card.style.display = 'flex'; } else { if (cardType === filter) { card.style.display = 'flex'; } else { card.style.display = 'none'; } } }); // Actualizar botones activos document.querySelectorAll('.filter-btn').forEach(btn => { btn.classList.remove('active'); if (btn.dataset.filter === filter) { btn.classList.add('active'); } }); } // ========== LIGHTBOX MODAL ========== function openLightbox(eventId) { const eventData = eventsData[eventId]; if (!eventData) return; document.getElementById('lightbox-title').textContent = eventData.title; document.getElementById('lightbox-type').textContent = eventData.type; document.getElementById('lightbox-location').textContent = eventData.location; document.getElementById('lightbox-date').textContent = eventData.date; document.getElementById('lightbox-description').textContent = eventData.description; currentEventMedia = eventData.media || []; currentCarouselIndex = 0; renderCarousel(); document.getElementById('lightbox').classList.add('active'); document.body.style.overflow = 'hidden'; } function renderCarousel() { const carousel = document.getElementById('lightbox-carousel'); const indicators = document.getElementById('carousel-indicators'); carousel.innerHTML = ''; indicators.innerHTML = ''; if (currentEventMedia.length === 0) { carousel.innerHTML = '
📷
'; return; } currentEventMedia.forEach((media, index) => { const item = document.createElement('div'); item.className = 'carousel-item'; if (index === 0) item.classList.add('active'); if (media.type === 'image') { item.innerHTML = `Imagen ${index + 1}`; } else if (media.type === 'youtube') { item.innerHTML = ``; } carousel.appendChild(item); const indicator = document.createElement('span'); indicator.className = 'indicator'; if (index === 0) indicator.classList.add('active'); indicator.onclick = () => goToSlide(index); indicators.appendChild(indicator); }); if (currentEventMedia.length > 1) { const controls = document.createElement('div'); controls.className = 'carousel-controls-lightbox'; controls.innerHTML = ` `; carousel.appendChild(controls); } } function navigateCarousel(direction) { currentCarouselIndex = (currentCarouselIndex + direction + currentEventMedia.length) % currentEventMedia.length; updateCarousel(); } function goToSlide(index) { currentCarouselIndex = index; updateCarousel(); } function updateCarousel() { document.querySelectorAll('.carousel-item').forEach((item, index) => { item.classList.toggle('active', index === currentCarouselIndex); }); document.querySelectorAll('.indicator').forEach((indicator, index) => { indicator.classList.toggle('active', index === currentCarouselIndex); }); } function closeLightbox() { document.getElementById('lightbox').classList.remove('active'); document.body.style.overflow = ''; } document.getElementById('lightbox').addEventListener('click', function(e) { if (e.target === this) closeLightbox(); }); document.addEventListener('keydown', function(e) { const lightbox = document.getElementById('lightbox'); if (!lightbox.classList.contains('active')) return; if (e.key === 'Escape') closeLightbox(); else if (e.key === 'ArrowLeft' && currentEventMedia.length > 1) navigateCarousel(-1); else if (e.key === 'ArrowRight' && currentEventMedia.length > 1) navigateCarousel(1); }); // ========== CARRUSEL DE TESTIMONIOS ========== function showTestimonial(n) { const testimonials = document.querySelectorAll('.testimonial-card'); const dots = document.querySelectorAll('.dot'); if (n > totalTestimonials) currentTestimonial = 1; if (n card.classList.remove('active')); dots.forEach(dot => dot.classList.remove('active')); testimonials[currentTestimonial - 1].classList.add('active'); dots[currentTestimonial - 1].classList.add('active'); } function nextTestimonial() { currentTestimonial++; showTestimonial(currentTestimonial); } function previousTestimonial() { currentTestimonial--; showTestimonial(currentTestimonial); } function goToTestimonial(n) { currentTestimonial = n; showTestimonial(n); } // Auto-avanzar testimonios cada 8 segundos setInterval(() => { nextTestimonial(); }, 8000); // ========== COMPARTIR EVENTO ========== function shareEvent() { const title = document.getElementById('lightbox-title').textContent; const url = 'https://purple-rabbit-827277.hostingersite.com/galeria'; if (navigator.share) { navigator.share({ title: `${title} - AMEEC`, text: `Descubre este evento de AMEEC: ${title}`, url: url }).catch(() => { // Fallback si se cancela copyToClipboard(url); }); } else { copyToClipboard(url); } } function copyToClipboard(text) { navigator.clipboard.writeText(text).then(() => { alert('¡Enlace copiado al portapapeles!'); }); } // ========== ANIMACIONES DE SCROLL ========== function handleScrollAnimations() { const elements = document.querySelectorAll('.fade-in'); elements.forEach(element => { const elementTop = element.getBoundingClientRect().top; const windowHeight = window.innerHeight; if (elementTop { entries.forEach(entry => { if (entry.isIntersecting) { const yearId = entry.target.id; document.querySelectorAll('.year-nav-btn').forEach(btn => { btn.classList.remove('active'); if (btn.dataset.year === yearId) { btn.classList.add('active'); } }); } }); }, { threshold: 0.3 }); // Observar todas las secciones de año document.querySelectorAll('.year-section').forEach(section => { yearObserver.observe(section); }); // ========== EVENT LISTENERS ========== window.addEventListener('scroll', handleScrollAnimations); window.addEventListener('load', () => { handleScrollAnimations(); // Inicializar primer testimonio showTestimonial(1); }); // ========== ACCESIBILIDAD: NAVEGACIÓN CON TECLADO ========== document.querySelectorAll('.event-card').forEach(card => { card.setAttribute('tabindex', '0'); card.addEventListener('keypress', function(e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.click(); } }); }); // ========== MENSAJES DE CONSOLE (Solo para desarrollo) ========== console.log('%c🌱 AMEEC Galería', 'color: #2F5F2F; font-size: 20px; font-weight: bold;'); console.log('%cGalería cargada exitosamente', 'color: #C586F0; font-size: 14px;'); console.log('Total de eventos:', document.querySelectorAll('.event-card').length);
Scroll al inicio