/* ===== GENERAL ===== */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'emoji !important';
}
main {
    flex: 1;
}

/* ===== HEADER ===== */
header {
    width: 100%;
    height: 250px;
    background-color: #FFF;
    text-align: center;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 190px;
    transition: all 0.1s ease;
}

.logo-header .logo {
    max-width: 300px;
    height: auto;
    transition: all 0.1s ease;
    transform-origin: center;
}

body.sticky-header .logo-header {
    height: 60px;
}

body.sticky-header .logo-header .logo {
    transform: scale(0, 0);
    -moz-transform: scale(0, 0);
    -ms-transform: scale(0, 0);
    -webkit-transform: scale(0, 0);
}

/* ===== LOGO ===== */
.logo-container {
    text-align: center;
    background: white;
    padding: 10px 0;
    width: 100%;
    transition: all 1.3s ease;
    height: 100px; /* Altura fija para el contenedor */
}

.logo-container::after {
    content: '';
    display: block;
    height: 0;
    transition: height 0.1s ease;
}

.logo {
    max-width: 300px;
    height: auto;
    transition: max-width 0.1s ease;
}

/* Logo en modo menú */
.logo-container.menu-mode {
    position: absolute; /* Cambiado de fixed a absolute */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    padding: 5px 20px;
    background: transparent;
    width: auto;
}

.logo-container.menu-mode::after {
    height: 40px; /* Compensa el espacio cuando el logo se mueve */
}

.logo-container.menu-mode .logo {
    max-width: 100px;
}

/* ===== MENÚ ===== */
header nav {
    position: absolute;
    bottom: 0;
    height: 60px;
    width: 100%;
    background-color: #0C3758;
    z-index: 1001;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    height: 100%;
}

.nav-menu > li {
    position: relative;
    height: 100%;
}

.nav-menu > li > a {
    height: 100%;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    padding: 0 20px;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8em;
} 
/* Cambia el fondo al pasar el mouse */
.nav-menu > li > a:hover {
  background: #068e89;
}

.nav-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0C3758;
    min-width: 200px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 1002;
}

/* Eliminar estos estilos que muestran el submenu en hover */
/* .nav-menu li:hover > .submenu {
    display: block;
} */

/* Añadir estos estilos para mostrar submenú cuando el li padre tiene clase active */
.nav-menu li.active > .submenu {
    display: block;
}

.nav-menu .submenu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    
    font-size: 1em;
    text-align: start;
}

.nav-menu .submenu li a:hover {
    background: #068e89;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    font-size: 30px;
    padding: 5px 15px;
    color: white;
    border: none;
    background: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1003;
    }

    .nav-menu {
        display: none;
        position: absolute;  /* Cambiado de fixed a absolute */
        top: 100%;         /* Cambiado para que esté debajo de la barra */
        left: 0;
        width: 100%;
        height: auto;      /* Eliminado height fijo */
        background: #0C3758;
        flex-direction: column;
        padding: 0;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu > li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu > li > a {
        width: 100%;
        padding: 12px 20px;    /* Reducido el padding */
        font-size: 0.8em;      /* Mantenido el tamaño original */
        background: #0C3758;   /* Mismo color que escritorio */
    }

    .nav-menu > li > a:active {
        transform: none;       /* Elimina cualquier transformación al presionar */
    }

    .nav-menu .submenu {
        position: static;
        width: 100%;
        display: none;
        background: #0C3758;   /* Mismo color que el menú principal */
        padding: 0;
    }

    .nav-menu li.active > .submenu {
        display: block;
    }

    .nav-menu .submenu li {
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu .submenu li a {
        padding: 12px 30px;
        font-size: 0.8em;
    }

    .nav-menu .submenu li a:active {
        transform: none;       /* Elimina cualquier transformación al presionar */
    }
}

/* ===== FOOTER ===== */
.footer {
    background: #0C3758;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    width: 100%;
}

.footer h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: white;
}

.footer-letras {
    font-size: 1em;
    color: white;
    margin: 10px 0;
}

.redes {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.redes li a {
    color: white;
    font-size: 24px;
    transition: color 0.3s ease;
}

.redes li a:hover {
    color: #068e89;
}

#contenedorFooter {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#contenedor-redes {
    margin: 30px 0;
}

@media (max-width: 1200px) {
    .nav {
        order: 2;
        width: 100%;
    }
    
    .logo-container.menu-mode {
        order: 1;
        width: 100%;
        padding: 5px 0;
        background: #0C3758;
    }
    
    .logo-container.menu-mode::after {
        height: 0; /* No necesitamos compensación en móvil */
    }
}

* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
}

body {
  background-color: #ecf0f2;
  font-family: helvetica, arial, sans-serif;
  font-size: 16px;
  padding-top: 250px;
  transition: padding-top 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

header nav {
  position: absolute;
  bottom: 0;
  height: 60px;
  width: 100%;
  background-color: #0C3758;
}

header nav a {
  color: #FFF;
  display: inline-block;
  padding: 10px 15px;
  line-height: 1;
  text-decoration: none;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
}

header nav a:hover {
  -moz-box-shadow: 0 0 0 1px #fff;
  -webkit-box-shadow: 0 0 0 1px #fff;
  box-shadow: 0 0 0 1px #fff;
}

h2 {
  font-size: 34px;
  text-transform: uppercase;
  font-weight: 100;
  line-height: 2;
  color: #2c3e50;
}

p {
  margin-bottom: 2rem;
  line-height: 2;
  color: #0C3758;
}

.wrapper {
  width: 940px;
  margin: 0 auto;
}

section {
  padding: 20px;
  margin-bottom: 40px;
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
}
/* Sticky Header Style */
/* ---------------------------------------- */

body.sticky-header {
  padding-top: 100px;
  transition: padding-top 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sticky-header header {
  height: 60px;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sticky-header header h1 {
  -moz-transform: scale(0, 0);
  -ms-transform: scale(0, 0);
  -webkit-transform: scale(0, 0);
  transform: scale(0, 0);
}

/* ===== CAROUSEL ===== */
* {box-sizing:border-box}
body {font-family: Verdana, sans-serif; margin:0}
.mySlides {display: none}
img {vertical-align: middle;}

/* Slideshow container */
.slideshow-container {
  max-width: 1500px;
  position: relative;
  margin: 10px auto;
}

/* Hide the images by default */
.mySlides {
  display: none;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 0;
    bottom: 0;          /* Asegura que llega hasta abajo */
    width: 80px;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    font-size: 40px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;  /* Fuerza transparencia */
    transition: color 0.3s ease;
    outline: none;      /* Elimina el outline al hacer focus */
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

.prev:hover, .next:hover,
.prev:focus, .next:focus,
.prev:active, .next:active {
    background-color: transparent !important;
    color: #068e89;
    text-decoration: none;
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #068e89;
}

/* Fading animation */
.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
  .prev, .next,.text {font-size: 11px}
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
  .prev, .next,.text {font-size: 11px}
}

/* ===== CUADROS ===== */
.cuadros-container {
    display: flex;
    gap: 5px;
    max-width: 1500px;
    margin: 0 auto;
    width: calc(100% - 15px);
}

.cuadro {
    flex: 0 1 calc(25% - 20px);
    aspect-ratio: 1;
    min-width: 10px;
    flex-basis: calc(50% - 20px); /* Asegura 2 cuadros por fila */
    max-width: calc(50% - 20px);  /* Mantiene el ancho máximo */
}

.cuadro-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

.cuadro:hover .cuadro-content {
    transform: rotateY(180deg);
}

.cuadro img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 55, 88, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay span {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 0 15px;
    transform: rotateY(0deg); /* Iniciar normal */
    backface-visibility: visible;
    transition: transform 0.7s ease;
}

.cuadro:hover .cuadro-content .overlay span {
    transform: rotateY(180deg); /* Mantener la orientación normal mientras gira */
}

.cuadro:hover .overlay {
    background: rgba(12, 55, 88, 1);
}

@media (min-width: 992px) {
    .cuadro {
        flex-basis: calc(25%);
        max-width: calc(24.7%);
    }
    .overlay span {
        font-size: 1.3em;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .cuadro {
        flex-basis: calc(25%);
        max-width: calc(24.7%);
    }
    .overlay span {
        font-size: 0.8em;
    }
}

@media (max-width: 767px) {
    .overlay span {
        font-size: 0.8em;
    }
}


/* Carousel heading */
.heading {
  display: block;
  text-align: center;
}

/* Container for the entire carousel */
.multi-carousel-container {
  cursor: grab;
  height: 500px;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

/* Cursor styles for dragging */
.multi-carousel-container.dragging,
#multiCarousel.dragging {
  cursor: grabbing;
}

/* Wrapper for all slides */
.multi-carousel-inner {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Individual slide */
.multi-carousel-item,
.clone {
  box-sizing: border-box;
  flex: 0 0 33.333333%;
  padding: 0 5px;
  position: relative; /* Essential for item-number positioning */
}

/* Control buttons */
.multi-carousel-control-prev,
.multi-carousel-control-next {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  position: absolute;
  text-decoration: none;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
  width: 40px;
  z-index: 10;
}

.multi-carousel-control-prev:hover,
.multi-carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.multi-carousel-control-prev {
  left: 10px;
}

.multi-carousel-control-next {
  right: 10px;
}

/* Image container with dynamic height */
.img-container {
  border-radius: 1.5rem;
  height: var(--carousel-height, 80vh);
  overflow: hidden;
  position: relative;
}

/* Image styling */
.img-container img,
#carouselInner img {
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  user-drag: none;
  width: 100%;
  -webkit-user-drag: none;
  transition: transform 0.3s ease;
}

.img-container:hover img {
  transform: translateZ(0) scale(1.02);
}

/* Item number styling - guaranteed visibility */
.item-number {
  align-items: center;
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  display: inline-flex;
  font-size: 120%;
  font-weight: bold;
  height: 35px;
  justify-content: center;
  left: 1rem;
  position: absolute;
  top: 1rem;
  width: 35px;
  z-index: 2; /* Higher than default but below controls */
  /* Isolation prevents z-index context issues */
  isolation: isolate;
}

/* Carousel cursor styling */
#multiCarousel {
  cursor: grab;
  touch-action: pan-y;
}

/* Disable text selection during drag */
#multiCarousel.dragging {
  user-select: none;
  -webkit-user-select: none;
}

/* Responsive adjustments for screens smaller than 720px (45em) */
@media (max-width: 45em) {
  .multi-carousel-item,
  .clone {
    flex: 0 0 100%;
  }
}


* {
    box-sizing: border-box;
}
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}
a {
    text-decoration: none;
}
img, video {
    max-width: 100%;
}
section {
    padding: 2rem;
}
figure {
    margin: 0;
}
figure img {
    display: block;
}
.flexContainer {
    display: flex;
    flex-wrap: wrap;
}


/***CAROUSEL***/
section#pepites {
    padding:1rem 0;
    margin-right: 2%;
    margin-left: 2%;
}
section#pepites h2{
    text-align: center;
}
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}
#pepites .flexContainer.carousel-track{
    transition:transform 0.5 ease-in-out;
    flex-wrap: nowrap;
}
#pepites figure.slide {
    flex:0 0 calc(33.333% - 10px);/* 3 cards visible, dont une partiellement */
    margin:0 10px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: 1px 1px 5px #111;
}
#pepites img{
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: all 0.8s ease;
}
/* A completer: figcaption, lien et hover img (scale), figcaption in absolute sur l'image, le scale sur l'image  */

.prev, .next {
cursor:pointer;
position:absolute;
left:0;
height: 100%;
background-color: rgba(255,255,255,0.4);
width: 50px;
display:flex;
align-items:center;
font-size: 3rem;
font-weight: 600;
padding: 10px;
z-index: 10;
}

.next{
    left:auto;
    right:0;
}

.carousel-track{
    transition: all 0.5s ease;
}