@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Estilos generales y del body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Fira Sans", sans-serif;
}

body {
    color: #2E4975;
    line-height: 1.6;
}

nav {
    display: block;
    unicode-bidi: isolate;
    margin-left: 8%;
    padding-top: 0;
}

nav ul {
    --gap: 2rem;
    list-style: none;
    display: flex;
    gap: var(--gap);
    justify-content: space-evenly;
    align-items: center;
}

nav li {
    position: relative;
    padding: 0 1rem;
}

nav > ul > li:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    margin-right: calc(var(--gap) / 2);
    width: 1px;
    background-color: white;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav > ul > li:hover > a {
    color: #ffb74d;
}

/* Submenú */
nav ul .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #e0e0e0;
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 180px;
    z-index: 1000;
}

nav ul .submenu li {
    position: relative;
    transition: background-color 0.3s ease;
}

nav ul .submenu li::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 1px;
    background-color: #000;
}

nav ul .submenu li:last-child::after {
    content: none;
}

nav ul .submenu a {
    color: #000000;
    font-weight: 500;
    padding: 0.75rem 1rem;
    display: block;
    transition: color 0.2s ease;
}

nav ul .submenu li:hover {
    background-color: #cacaca;
}

nav ul .submenu a:hover {
    color: #2E4975;
}

nav li:hover > .submenu,
nav li:has(.submenu:hover) > .submenu {
    display: block; 
}

.active {
    color: red;
}

.sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub img {
    flex-shrink: 0;
}

#btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: transparent;
    padding: 0;
    border: none;
}

#btn img {
    max-width: 70%;
    max-height: 70%;
}

/* Responsividad */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .nav ul {
        flex-direction: column;
        gap: 1rem;
    }
}


/* --- Sección del Equipo (Team Section) --- */
.carrusel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  transition: background-image 0.8s ease-in-out;
}

/* Ajusta la proporción en pantallas pequeñas */
@media (max-width: 768px) {
  .carrusel {
    aspect-ratio: 4 / 3; /* un poco más vertical */
  }

  .carrusel button {
    font-size: 1.5rem;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .carrusel {
    aspect-ratio: 1 / 1; /* cuadrado en celulares muy pequeños */
  }

  .carrusel button {
    font-size: 1.2rem;
  }
}

.carrusel button {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(44, 44, 44);
  border-radius: 50%;
  cursor: pointer;
  transition-duration: .3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.13);
  border: none;
  color: white;
  font-size: 1.1em;
}

.carrusel button:first-child{
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}


.carrusel button:last-child{
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.team-section  {
    width: 100%;
    text-align: center;
    background: #fff;
    max-width: 100%;
    box-sizing: border-box;
}

.team-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.team-section p {
    text-align: justify;
    font-size: 15px;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Tarjetas de Misión, Visión, Valores */
.fix {
  display: flex;
  justify-content: center;
}

.team-principios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 1200px; /* ancho máximo centrado */
  background: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  justify-items: center;
}


.team-card-principios1,
.team-card-principios2,
.team-card-principios3 {
    background: #fff;
    padding: 20px;
    border: #2e58b3 solid 2px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    width: 100%;
}

.mascota {
    position: absolute;
    top: -40px;  /* empieza fuera de la tarjeta */
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    opacity: 0;  /* invisible al inicio */
}

.team-card-principios1:hover .mascota,
.team-card-principios2:hover .mascota,
.team-card-principios3:hover .mascota {
    bottom: -10px;   /* sube un poquito como asomándose */
    opacity: 1;
}

.team-card-principios1:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 3px 6px 20px rgba(0, 0, 0, 0.4);
    color: white;
    background-color: #60a566;
    border: #60a566;
}

.team-card-principios2:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 3px 6px 20px rgba(0, 0, 0, 0.4);
    color: white;
    background-color: #FFB74D;
    border: #FFB74D;
}

.team-card-principios3:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 3px 6px 20px rgba(0, 0, 0, 0.4);
    color: white;
    background-color: #de406d;
    border: #de406d;
}

/*Nueva idea*/


/* Contenedor de las flip cards */
.team-flip-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.team-flip-card {
    background-color: transparent;
    width: 250px;
    height: 350px;
    perspective: 1000px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    cursor: pointer;
}

.team-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.shadow{
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.team-flip-card:hover .team-flip-card-inner {
    transform: rotateY(180deg);
}

.team-flip-card-front,
.team-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
}

.team-flip-card-front {
    color: #2E4975;
}

.team-flip-card-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-radius: 10px;
}

.team-flip-card-front h3 {
    margin-top: 10px;
    font-size: 1.5rem;
}

.team-flip-card-back {
    transform: rotateY(180deg);
    background: #2E4975;
    color: white;
    text-align: center;
}

.team-flip-card-back h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.team-flip-card-back p {
    font-size: 1rem;
    color: #f0f0f0;
    margin: 5px 0;
    text-align: center;
    word-break: break-word;
}

.team-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    border: 3px solid #ffb74d;
}

.team-linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0077B5;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.team-linkedin-btn:hover {
    background-color: #006faa;
}

.team-linkedin-btn img {
    width: 20px;
    height: 20px;
    border: 1px solid; border-radius: 5px;
}

/* Foto pequeña en la parte trasera */
.team-flip-card-back .team-profile-img-small {
    width: 80px;   /* tamaño reducido */
    height: 80px;
    border-radius: 50%;  /* redonda */
    object-fit: cover;
    margin: 0 auto 10px; /* centrada con espacio abajo */
    display: block;
}

.team-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 100%;
    display: block;
    background-color: #ffb74d;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
}

.team-flip-container {
    display: flex;
    justify-content: center; /* centra horizontalmente */
    flex-wrap: wrap;
    gap: 20px;
    width: 100%; /* que no se encoja */
    padding: 20px 0px;
}

/* Estilo que se aplicará cuando el elemento sea visible */
.visible {
    opacity: 1; /* Lo hace visible */
    transform: translateY(0); /* Lo regresa a su posición original */
}

/* Phones (≤480px) */
@media (max-width: 480px) {
  .intro {
    flex-direction: column;
    height: auto;
    padding: 20px;
  }

  .video-container {
    margin-left: 0;
    height: 240px;
    width: 100%;
  }

  .mtd-steps {
    grid-template-columns: 1fr;
  }

  .mtd-participacion-wrapper {
    flex-direction: column;
  }

  .participacion-reducida {
    width: 100%;
  }

  .lema-container {
    font-size: 28px;
    padding-left: 16px;
  }

  .intro h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  .intro p {
    font-size: 1rem;
    text-align: justify;
  }

  .objetivo-general {
    height: auto;
    flex-direction: column;
    padding: 12px;
  }

  .objetivo-general .text {
    width: 90%;
    padding: 12px;
    font-size: 0.9rem;
  }

  .hero-quienes {
    height: 40vh; /* reduce height */
    background-position: center top; /* keep focus */
  }
}

/* Tablets (481px–768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .intro {
    flex-direction: column;
    padding: 30px 10px;
  }

  .video-container {
    width: 100%;
    height: 280px;
    margin: 0 auto;
  }

  .team-flip-container {
    justify-content: center;
  }

  .objetivo-general {
    flex-direction: column;
    padding: 20px;
  }

  .objetivo-general .text {
    font-size: 1rem;
  }

  .lema-container {
    font-size: 32px;
  }

  .intro h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 1.1rem;
  }

  .hero-quienes {
    height: 50vh; /* a bit taller than phones */
    background-position: center center;
  }
}

/* Laptops (769px–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .video-container {
    height: 360px;
    width: 90%;
    margin-left: 0;
  }

  .mtd-steps {
    grid-template-columns: 1fr 1fr;
  }

  .lema-container {
    font-size: 36px;
  }

  .intro h1 {
    font-size: 2.3rem;
  }

  .intro p {
    font-size: 1.2rem;
  }

  .team-card-principios1,
  .team-card-principios2,
  .team-card-principios3 {
    width: 240px;
  }

  .team-flip-card {
    width: 220px;
    height: 320px;
  }

  .hero-quienes {
    height: 60vh; /* closer to desktop */
    background-position: center center;
  }
}

/* Large screens (≥1200px) */
@media (min-width: 1200px) {
  .video-container {
    width: 300px;
    height: 480px;
    margin-left: 25%;
  }

  .mtd-participacion-wrapper {
    flex-direction: row;
  }

  .mtd-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .lema-container {
    font-size: 40px;
  }

  .objetivo-general .text {
    font-size: 1.2rem;
  }

  .intro h1 {
    font-size: 2.8rem;
  }

  .intro p {
    font-size: 1.3rem;
  }

  .team-card-principios1,
  .team-card-principios2,
  .team-card-principios3 {
    width: 300px;
  }

  .team-flip-card {
    width: 260px;
    height: 370px;
  }

  .text-box {
    max-width: 500px;
    font-size: 1.1rem;
  }

  .hero-quienes {
    height: 70vh; /* default desktop size */
    background-attachment: fixed; /* nice effect on big screens */
  }
}

@media (max-width: 480px) {
  #start {
    flex-direction: column;   /* stack vertically */
    align-items: center;
    text-align: center;
  }

  #logo {
    width: 80px;
    height: 80px;
    margin: 8px 0;
  }

  #title {
    font-size: 1.8rem;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .team-principios {
    grid-template-columns: 1fr; /* una columna */
    gap: 20px; /* menos espacio entre cajas */
    justify-items: center;
  }

  .team-card-principios1,
  .team-card-principios2,
  .team-card-principios3 {
    width: 80%; /* ocupa todo el ancho disponible */
  }

}

/* Responsive para pantallas pequeñas (móviles) */
@media (max-width: 480px) {
  .text-box {
    padding: 15px;
    margin: 10px;
  }

  .text-box h1 {
    font-size: 1.5em;
    text-align: center;
  }

  .text-box p {
    font-size: 0.95em;
    text-align: justify;
  }
}

/* Responsive para pantallas medianas (tablets, etc.) */
@media (min-width: 481px) and (max-width: 1024px) {
  .text-box {
    padding: 20px;
    margin: 20px auto;
    max-width: 90%;
  }

  .text-box h1 {
    font-size: 1.8em;
    text-align: center;
  }

  .text-box p {
    font-size: 1em;
    text-align: justify;
  }
}

/* Responsive para pantallas grandes (escritorio) */
@media (min-width: 1025px) {
  .text-box {
    padding: 30px;
    margin: 40px auto;
    max-width: 800px;
  }

  .text-box h1 {
    font-size: 2em;
    text-align: center;
  }

  .text-box p {
    font-size: 1.1em;
    text-align: justify;
  }
}
