/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
  --color-primary: #79c832;
  --color-secondary: #3fc89a;
  --color-accent-orange: #f49c15;
  --color-accent-red-light: #f55624;
  --color-accent-red: #ed2b4b;
  --color-background: #f7edd5;
  --color-text: #000000;

  --font-title: "BigNoodleTitling";
  --font-body-light: "futura-light";
  --font-body-medium: "futura-medium";

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  --transition-fast: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   RESET Y CONFIGURACIÓN BASE
   ===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* =====================================================
   FUENTES PERSONALIZADAS (RUTAS RELATIVAS CORREGIDAS)
   ===================================================== */
@font-face {
  font-family: "BigNoodleTitling";
  src: url("../fonts/big_noodle_titling.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "futura-light";
  src: url("../fonts/futuralight.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "futura-medium";
  src: url("../fonts/Futura Medium.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =====================================================
   BARRA DE NAVEGACIÓN
   ===================================================== */
.nav-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.nav-bar.scrolled {
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-text);
  height: 18vh;
  position: fixed;
}

.nav-container {
  max-width: 1900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
}

.nav-container.containerscroll {
  height: 18vh;
}

.logo-icon {
  width: clamp(100px, 15vw, 350px);
  height: auto;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  overflow: hidden;
  flex-shrink: 0;
}

.logo-icon img {
  max-width: 100%;
  max-height: 100%;
  width: 50%;
  height: auto;
  object-position: center;
}

.logo-icon.shrink .imglogo {
  height: 17vh;
  width: 7vw;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  gap: var(--spacing-md);
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-title);
  background-color: var(--color-background);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 10px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-text);
  cursor: pointer;
  display: inline-block;
}

/* Hover con diferentes colores */
.nav-bar ul li:nth-child(1) .nav-link:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
}

.nav-bar ul li:nth-child(2) .nav-link:hover {
  background: var(--color-accent-red);
  transform: translateY(-2px);
}

.nav-bar ul li:nth-child(3) .nav-link:hover {
  background: var(--color-accent-orange);
  transform: translateY(-2px);
}

.nav-bar ul li:nth-child(4) .nav-link:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.nav-bar ul li:nth-child(5) .nav-link:hover {
  background: var(--color-accent-red-light);
  transform: translateY(-2px);
}

/* =====================================================
   DROPDOWN DE CAPACITACIONES
   ===================================================== */
.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: " ▼";
  font-size: 0.9rem;
  margin-left: 0.4rem;
  transition: transform var(--transition-fast);
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-background);
  min-width: 250px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: var(--transition-fast);
  z-index: 1001;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: var(--spacing-sm) 1.5rem;
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition-fast);
  border-bottom: 1px solid #f0f0f0;
  font-weight: 500;
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--color-accent-orange);
  color: var(--color-text);
  padding-left: 2rem;
}

/* =====================================================
   SECCIÓN COLLAGE/BANNER
   ===================================================== */
.collage-section {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-background);
}

.collage-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  overflow: hidden;
}

.collage-image {
  position: absolute;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.8) rotate(15deg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid var(--color-text);
  will-change: transform;
}

.collage-image.animate {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.collage-image:hover {
  transform: scale(1.1) rotate(-5deg);
  z-index: 10;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Posicionamiento de imágenes del collage (RUTAS RELATIVAS CORREGIDAS) */
.img-1 {
  bottom: 32.9%;
  right: 39.8%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(100px, 25.9vh, 350px);
  animation: float 5s ease-in-out infinite reverse;
  overflow: hidden;
}

.img-1 video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Similar a background-size: cover */
  object-position: center; /* Similar a background-position: center */
  border-radius: 20px;
}

.video-container {
  background-color: #000; /* Fondo negro mientras carga el video */
}

.img-2 {
  top: 42%;
  left: 26.7%;
  width: clamp(80px, 14vw, 250px);
  height: clamp(150px, 36vh, 300px);
  background-image: url("../media/banner-formacion-a-medida/actividad.jpg");
  animation: float 10s ease-in-out infinite;
}

.img-3 {
  top: 42%;
  left: 60.4%;
  width: clamp(80px, 14vw, 250px);
  height: clamp(150px, 36vh, 300px);
  background-image: url("../media/banner-formacion-a-medida/lorevigia.jpg");
  animation: float 9s ease-in-out infinite;
}

.img-4 {
  top: 5%;
  left: 43.5%;
  width: clamp(80px, 14vw, 250px);
  height: clamp(150px, 36vh, 300px);
  background-image: url("../media/banner-formacion-a-medida/abrazo.jpg");
  animation: float 10s ease-in-out infinite;
}

.img-5 {
  top: 13%;
  left: 24.2%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(120px, 28.9vh, 250px);
  background-image: url("../media/banner-formacion-a-medida/estudio.jpg");
  animation: float 7s ease-in-out infinite;
}

.img-6 {
  top: 13%;
  left: 57.8%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(120px, 28.9vh, 250px);
  background-image: url("../media/banner-formacion-a-medida/mesa.jpg");
  animation: float 6s ease-in-out infinite;
}

.img-7 {
  top: 67.3%;
  right: 39.8%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(120px, 28.9vh, 250px);
  background-image: url("../media/banner-formacion-a-medida/pintura.jpg");
  animation: float 8s ease-in-out infinite reverse;
}

.img-8 {
  top: 42%;
  left: 7.4%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(120px, 28.9vh, 250px);
  background-image: url("../media/banner-formacion-a-medida/pregunta.jpg");
  animation: float 10s ease-in-out infinite;
}

.img-9 {
  top: 42%;
  left: 74.7%;
  width: clamp(120px, 19.1vw, 500px);
  height: clamp(120px, 28.9vh, 250px);
  background-image: url("../media/banner-formacion-a-medida/regalo.jpg");
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
}

/* =====================================================
   CONTENIDO BANNER
   ===================================================== */
.banner-content {
  text-align: center;
  color: white;
  z-index: 20;
  position: relative;
  padding: clamp(15px, 3vw, 30px);
  background: rgba(247, 237, 213, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  opacity: 0;
  animation: titleReveal 2s ease-out 2.5s forwards;
  display: block;
  max-width: 90%;
  margin: 0 auto;
}

.title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0;
  opacity: 0;
  color: var(--color-primary);
  letter-spacing: clamp(2px, 0.5vw, 5px);
  transform: translateY(50px);
  animation: titleSlideIn 1.5s ease-out 3s forwards;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: scale(0.3) rotateY(90deg);
    filter: blur(20px);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1) rotateY(45deg);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: blur(0px);
  }
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =====================================================
   SECCIÓN DE CONTENIDO PRINCIPAL
   ===================================================== */
.principal-section {
  background: var(--color-background);
  padding: clamp(40px, 8vw, 80px) clamp(10px, 3vw, 20px);
  min-height: 100vh;
}

.containers {
  max-width: 1800px;
  margin: 0 clamp(20px, 4vw, 80px);
  margin-bottom: 4%;
}

.content-title {
  font-family: var(--font-body-medium);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
}

.content-subtitle {
  font-family: var(--font-body-medium);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
}

.container-text {
  display: block;
}

.content-text {
  font-family: var(--font-body-light);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--color-text);
  text-align: justify;
  flex: 1;
  min-width: 300px;
  line-height: 1.8;
  margin-top: 2%;
}

.content-text strong {
  font-family: var(--font-body-medium);
  color: var(--color-primary);
}

/* Lista de actividades */
.activities {
  list-style: none;
  text-align: left;
  padding: var(--spacing-md) 0;
  margin: var(--spacing-md) 0;
}

.activities li {
  font-family: var(--font-body-light);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  padding: var(--spacing-xs) 0;
  color: var(--color-text);
}

/* Texto destacado en verde */
.green {
  margin-top: var(--spacing-md);
  color: var(--color-primary);
  text-align: center;
  font-family: var(--font-body-medium);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  padding: var(--spacing-md);
  background: rgba(121, 200, 50, 0.1);
  border-radius: 15px;
  border: 2px solid var(--color-primary);
}

.content-text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary);
  transition: var(--transition-fast);
}

.content-text a:hover {
  color: #5a9624;
  border-bottom-color: #5a9624;
}

/* =====================================================
   SECCIÓN DE CONTACTO (MISMO ESTILO QUE INDEX/NOSOTROS)
   ===================================================== */
.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
  margin: var(--spacing-lg) 0;
}

/* CONTACTO - Completamente centrado y llamativo */
.contacto {
  width: 100%;
  max-width: 800px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  background: linear-gradient(
    135deg,
    rgba(121, 200, 50, 0.1) 0%,
    rgba(121, 200, 50, 0.05) 100%
  );
  border-radius: 20px;
  border: 2px solid var(--color-primary);
  box-shadow: 0 8px 30px rgba(121, 200, 50, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contacto:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(121, 200, 50, 0.25);
}

.contacto p {
  font-family: var(--font-body-medium);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.iconos-contacto {
  display: flex;
  gap: 35px;
  justify-content: center;
  align-items: center;
  margin-top: var(--spacing-md);
}

.iconos-contacto a {
  display: inline-block;
  transition: all var(--transition-fast);
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.iconos-contacto a:hover {
  transform: scale(1.2) rotate(5deg);
  box-shadow: 0 8px 25px rgba(121, 200, 50, 0.3);
}

.iconos-contacto img {
  width: 80px;
  height: auto;
  display: block;
}

/* SÍGUENOS - Centrado y discreto */
.iconos {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-md);
}

.iconos p {
  font-family: var(--font-body-medium);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  font-weight: 500;
}

.iconos-redes {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin-top: var(--spacing-xs);
}

.iconos-redes a {
  display: inline-block;
  transition: transform var(--transition-fast);
  opacity: 0.8;
}

.iconos-redes a:hover {
  transform: scale(1.15);
  opacity: 1;
}

.iconos-redes img {
  width: 45px;
  height: auto;
}

/* =====================================================
   MENÚ MÓVIL
   ===================================================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  margin: 3px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-bar.scrolled .mobile-menu-btn span {
  background: #333;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* =====================================================
   MEDIA QUERIES - RESPONSIVE
   ===================================================== */

@media screen and (max-width: 1366px) {
  .nav-link {
    font-size: clamp(0.8rem, 1.8vw, 1rem);
  }
}

@media screen and (max-width: 1024px) {
  .nav-container {
    padding: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo-icon {
    width: 120px;
    flex-shrink: 0;
  }

  .imglogo {
    width: 100%;
    height: auto;
    max-width: 120px;
  }

  .nav-bar.scrolled .imglogo {
    width: 65%;
  }

  .mobile-menu-btn {
    display: flex;
    flex-shrink: 0;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--color-background);
    width: 100%;
    text-align: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md) 0;
    gap: 0;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  /* Colores de fondo en móvil */
  .nav-bar ul li:nth-child(1) .nav-link {
    background: var(--color-secondary);
  }

  .nav-bar ul li:nth-child(2) .nav-link {
    background: var(--color-accent-red);
  }

  .nav-bar ul li:nth-child(3) .nav-link {
    background: var(--color-accent-orange);
  }

  .nav-bar ul li:nth-child(4) .nav-link {
    background: var(--color-primary);
  }

  .nav-bar ul li:nth-child(5) .nav-link {
    background: var(--color-accent-red-light);
  }

  .nav-item {
    margin: 0.5rem 0;
  }

  .nav-link {
    padding: var(--spacing-sm);
    display: block;
    font-size: 1.1rem;
    width: 90%;
    margin: 0 auto;
  }

  /* Dropdown en móvil - siempre desplegado */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: transparent;
    max-height: 500px;
    overflow: visible;
    transition: none;
  }

  .dropdown-item {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    background-color: rgba(247, 237, 213, 0.7);
    margin: 0.25rem 0;
    border-radius: 8px;
  }

  .dropdown-item:hover {
    background-color: var(--color-primary);
  }

  .dropdown-toggle::after {
    display: none;
  }

  /* Collage simplificado para móvil */
  .collage-section {
    padding: 20px;
  }

  .collage-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
    opacity: 0.6;
  }

  .collage-image {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    animation: none !important;
  }

  .collage-image:hover {
    transform: scale(1);
    z-index: 1;
  }

  /* Banner optimizado para móvil */
  .banner-content {
    padding: 25px 20px;
    background: rgba(247, 237, 213, 0.95);
    backdrop-filter: blur(10px);
    max-width: 95%;
    box-shadow: var(--shadow-lg);
  }

  .title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: clamp(1px, 1vw, 2px);
  }

  /* Contenido principal en móvil */
  .principal-section {
    padding: 40px 15px;
  }

  .containers {
    margin: 0 var(--spacing-sm);
    margin-bottom: 8%;
  }

  .content-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  .content-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .content-text {
    font-size: 1rem;
    text-align: left;
    margin-top: 1rem;
    line-height: 1.6;
  }

  .activities {
    padding: var(--spacing-sm) 0;
    margin: var(--spacing-sm) 0;
  }

  .activities li {
    font-size: 1rem;
    padding: 5px 0;
  }

  .green {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    padding: var(--spacing-sm);
  }

  /* Contacto en móvil */
  .contact {
    padding: var(--spacing-md) 0;
    gap: var(--spacing-md);
  }

  .contacto {
    max-width: 95%;
    padding: var(--spacing-md);
    border-width: 1.5px;
  }

  .contacto p {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    margin-bottom: var(--spacing-sm);
  }

  .iconos-contacto {
    gap: 20px;
    flex-wrap: wrap;
  }

  .iconos-contacto a {
    padding: 10px;
  }

  .iconos-contacto img {
    width: 65px;
  }

  .iconos {
    max-width: 90%;
    padding: var(--spacing-sm);
  }

  .iconos p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }

  .iconos-redes {
    gap: 12px;
  }

  .iconos-redes img {
    width: 40px;
  }
}

/* Móviles pequeños */
@media screen and (max-width: 480px) {
  .containers {
    margin: 0 10px;
  }

  .content-title {
    font-size: 1.4rem;
  }

  .content-text {
    font-size: 0.95rem;
  }

  .activities li {
    font-size: 0.9rem;
  }

  .green {
    font-size: 1rem;
    padding: 10px;
  }

  .contacto {
    padding: var(--spacing-sm);
  }

  .contacto p {
    font-size: 1.2rem;
  }

  .iconos-contacto img {
    width: 60px;
  }

  .iconos-redes img {
    width: 35px;
  }
}

/* =====================================================
   ACCESIBILIDAD - REDUCIR MOVIMIENTO
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .nav-link:hover,
  .contacto:hover,
  .iconos-contacto a:hover,
  .iconos-redes a:hover {
    transform: none;
  }
}
