/* Reset & Basics */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; }
h1, h2, h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: #2c3e50; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* Colors based on Infopack */
:root {
    --primary: #d6336c; /* Pink/Reddish */
    --secondary: #20c997; /* Teal/Green */
    --dark: #343a40;
    --light: #f8f9fa;
    --blue-overlay: rgba(44, 62, 80, 0.9);
}

/* Container */
.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* Navbar */
.navbar { background: #fff; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.nav-links a:hover { color: var(--primary); }
.btn-highlight { background: var(--primary); color: #fff !important; padding: 8px 15px; border-radius: 20px; }
.btn-highlight:hover { background: #b01b50; }

/* Hero Section UPDATED FOR VIDEO BACKGROUND */
.hero { 
    height: 160vh; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: #fff;
    overflow: hidden; /* Importante para que el video no se salga */
    background: #333; /* Fondo de seguridad por si el video tarda en cargar */
}

/* Estilo para el video de fondo */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto hace que el video se comporte como una imagen de fondo */
    z-index: 0;
}

/* La capa oscura va ENCIMA del video (z-index 1) */
.hero .overlay { 
    position: absolute; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7)); 
    z-index: 1;
}

/* El texto va ENCIMA de todo (z-index 2) */
.hero-content { 
    position: relative; 
    z-index: 2; 
    max-width: 800px; 
    background: rgba(0, 0, 0, 0.4); 
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.2);
}

.tagline { display: block; font-size: 1.3rem; margin-bottom: 10px; font-weight: 300; letter-spacing: 2px; text-shadow: 2px 2px 4px #000; }
.hero h1 { font-size: 4.5rem; margin-bottom: 20px; color: #fff; text-shadow: 4px 4px 8px #000, 0 0 20px rgba(214, 51, 108, 0.5); font-weight: 900; }
.hero p { font-size: 1.4rem; margin-bottom: 30px; text-shadow: 2px 2px 5px #000; font-weight: 600; }
.hero-meta { display: flex; justify-content: center; gap: 30px; margin-bottom: 40px; font-weight: 600; text-shadow: 2px 2px 4px #000; }

.btn-primary { background: var(--secondary); color: #fff; padding: 15px 40px; border-radius: 50px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.btn-primary:hover { background: #17a078; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }

/* Sections General */
.section { padding: 80px 0; }
.bg-light { background: #fff; }
.bg-blue { background: #2c3e50; color: #fff; }
.section-header { text-align: center; margin-bottom: 50px; }
.divider { width: 60px; height: 3px; background: var(--primary); margin: 15px auto; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.objectives-box { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-left: 5px solid var(--secondary); }
.objectives-box h3 { margin-bottom: 20px; color: var(--secondary); }
.objectives-box ul li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; }
.objectives-box i { color: var(--secondary); margin-top: 5px; }

/* Team Section & Javi Social Links */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.team-member { background: #f8f9fa; padding: 40px 30px; border-radius: 10px; text-align: center; border: 1px solid #eee; transition: 0.3s; display: flex; flex-direction: column; align-items: center; }
.team-member:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.team-member .img-wrapper { margin-bottom: 20px; }
.team-photo { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.team-member h3 { margin-bottom: 5px; font-size: 1.3rem; }
.team-member .role { color: var(--primary); font-weight: bold; margin-bottom: 15px; font-size: 0.9rem; text-transform: uppercase; }

/* Facilitator Social Links */
.facilitator-social {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
}
.facilitator-social a {
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #ddd;
    transition: 0.3s;
}
.facilitator-social a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}


/* Logistics & Map */
.logistics-icons { display: flex; justify-content: center; gap: 50px; margin-top: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.l-item { display: flex; flex-direction: column; align-items: center; font-size: 1.2rem; }
.l-item i { font-size: 3rem; margin-bottom: 15px; color: var(--secondary); }
.white-text h2 { color: #fff; }
.map-container { 
    max-width: 800px; 
    margin: 0 auto; 
    border: 5px solid #fff; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Partners & Video */
.host-partner { text-align: center; margin-bottom: 60px; }
.host-partner img { max-height: 150px; margin-bottom: 20px; }
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; align-items: center; justify-items: center; }
.partner-item { text-align: center; }
.partner-item img { max-height: 80px; filter: grayscale(100%); opacity: 0.7; transition: 0.3s; }
.partner-item img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }
.partner-item p { font-size: 0.8rem; margin-top: 10px; font-weight: 600; color: #777; }

/* VIDEO CONTAINER (Nuevo) */
.video-container {
    max-width: 700px;
    margin: 30px auto 60px; /* Centrado */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #eee;
}
.video-container video {
    width: 100%;
    display: block;
}

/* Resources (UPDATED for 2 columns) */
.resources-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.resource-card { 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 10px; 
    padding: 40px; 
    width: 100%;
    max-width: 450px; 
    text-align: center; 
    transition: 0.3s; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.resource-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.1); transform: translateY(-5px); }
.resource-card i { font-size: 4rem; color: #e74c3c; margin-bottom: 20px; }
.resource-card i.fa-google-drive { color: #1FA463; } /* Color Drive */

.btn-download { display: inline-block; margin-top: 20px; background: #333; color: #fff; padding: 10px 25px; border-radius: 5px; }
.btn-download:hover { background: #000; }
.btn-drive { background: #1FA463; }
.btn-drive:hover { background: #167a4a; }

/* GALLERY & SLIDER */
.gallery-section { background: url('img/fondo.png') center/cover; position: relative; color: #fff; }
.gallery-section::before { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: var(--blue-overlay); }
.gallery-section .container { position: relative; z-index: 2; }

/* Slider Styles */
.slideshow-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border: 5px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    background: #000;
}
.mySlides { display: none; }
.mySlides img { object-fit: cover; height: 450px; }

.dot {
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}
.active { background-color: var(--primary); }

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}
@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

.btn-gallery-big { display: inline-block; margin-top: 30px; background: #fff; color: #333; padding: 15px 30px; border-radius: 50px; font-weight: bold; font-size: 1.2rem; transition: 0.3s; }
.btn-gallery-big i { color: #4285F4; margin-right: 10px; }
.btn-gallery-big:hover { background: #eee; transform: scale(1.05); }


/* Contact & Footer */
.contact-icons { display: flex; justify-content: center; gap: 40px; margin-top: 40px; }
.c-icon { 
    font-size: 3rem; 
    width: 80px; height: 80px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; 
    color: #fff; 
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.c-icon:hover { transform: translateY(-5px) scale(1.1); }
.insta { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.face { background: #1877F2; }
.whats { background: #25D366; }

.music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
}
.music-player p { font-size: 0.8rem; font-weight: bold; color: var(--primary); margin-right: 5px; }
.music-player audio { height: 25px; outline: none; }

footer { background: #222; color: #aaa; padding: 40px 0; text-align: center; font-size: 0.9rem; margin-bottom: 60px; }
.eu-logo { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 20px; }
.eu-logo img { height: 40px; width: auto; }

/* WELCOME OVERLAY (Para activar música) */
#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/fondo.png') no-repeat center center/cover;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
#welcome-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: -1;
}
#start-btn {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(214, 51, 108, 0.6);
}
#start-btn:hover {
    transform: scale(1.1);
    background: #fff;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } 
    .hero h1 { font-size: 2.5rem; }
    .about-grid { grid-template-columns: 1fr; }
    .logistics-icons { gap: 30px; }
    .music-player { bottom: 10px; left: 50%; transform: translateX(-50%); width: 90%; justify-content: center; }
    .mySlides img { height: 250px; } 
}

/* --- Diagram Section Styles --- */
.diagram-wrapper {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee; /* Una línea sutil para separar */
}

.diagram-wrapper h3 {
    margin-bottom: 30px;
    color: var(--secondary); /* Usa el verde del tema */
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diagram-wrapper img {
    max-width: 600px; /* Tamaño máximo para que no se vea gigante */
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    /* Opcional: una sombra muy suave si la imagen es transparente */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
}

.diagram-wrapper img:hover {
    transform: scale(1.02); /* Efecto zoom suave al pasar el ratón */
}

/* Ajuste Responsive para el diagrama */
@media (max-width: 768px) {
    .diagram-wrapper {
        margin-top: 40px;
    }
    .diagram-wrapper img {
        max-width: 100%;
    }
}