/* ==========================================================================
   STAFF SECTION
   ========================================================================== */
.descripcion-mision {
  background-color: #f1f0ed;
  text-align: center;
  padding: 50px 20px;
}

.descripcion-mision h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 3.8rem;
  color: #444e56;
  font-weight: 400;
}

.descripcion-mision p {
  margin: 0 auto 40px;
  font-size: 1.3rem;
  font-weight: 400;
  color: #686868;
  line-height: 1.6;
  max-width: 1000px;
}

.descripcion-mision #texto-descripcion-mision {
  padding-right: 200px;
  padding-left: 200px;
}

.staff-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  max-width: 1600px;
  margin: 40px auto 0;
  flex-wrap: wrap;
}

.staff-card {
  flex: 1;
  min-width: 400px;
  max-width: 500px;
  height: 500px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.staff-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.staff-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: filter 0.3s ease;
}

.staff-card:hover img {
  filter: brightness(0.98); /* Subtle black filter on hover */
}

.staff-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
  color: white;
  text-align: left;
  transition: padding 0.3s ease;
}

/* First card - text at bottom (default) */
.staff-card .staff-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
}

.staff-info h3 {
  margin: 0 0 5px 0;
  font-size: 2rem;
  font-weight: 700;
  transition: font-weight 0.3s ease;
  color: white;
}

.staff-card:hover .staff-info h3 {
  font-weight: 800;
}

.staff-info .staff-title {
  margin: 0 0 15px 0;
  font-weight: 600;
  color: #55c9cc;
  font-size: 1.1rem;
  transition: font-weight 0.3s ease;
}

.staff-card:hover .staff-info .staff-title {
  font-weight: 600;
}

.staff-info p:not(.staff-title) {
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 300;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  margin-bottom: 0;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

.staff-card:hover .staff-info p:not(.staff-title) {
  font-weight: 400;
}

/* ==========================================================================
   NEWS SECTION
   ========================================================================== */
.noticias {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #55c9cc;
  padding: 60px 40px; 
}

.noticias-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.noticias h2 {
  font-size: 2.8rem;
  color: #ffffff;
  margin-bottom: 40px;
  margin-top: 0;
  font-weight: 400;
  text-align: center;
  max-width: 800px;
}

.noticia {
  position: relative;
  color: #ffffff;
  background-color: transparent;
  text-decoration: none;
  padding: 25px;
  height: 280px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
}

.noticia::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 0;
  transition: all 0.3s ease;
}

.noticia:hover::before {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background: rgba(255, 255, 255, 0.1);
}

.noticia::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
  z-index: 0;
  transition: all 0.3s ease;
}

.noticia:hover::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.6));
}

.noticia:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.noticia:hover p {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.noticia h3, .noticia h4, .noticia p {
  position: relative;
  z-index: 1;
}

.noticia h3 {
  margin-top: 0;
  font-size: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 5px;
  font-weight: bold;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.noticia h4 {
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 10px;
  margin-left: 5px;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.9);
}

.noticia p {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-top: 0;
  margin-right: 10px;
  margin-left: 10px;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.descripcion-proyectos {
  margin: 20px 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.texto-introduccion {
  font-weight: 800;
  max-width: 1000px;
  margin: 0 auto 40px;
  text-align: center;
}

.descripcion-proyectos h2 {
  font-size: 3.8rem;
  font-weight: 400;
  color: #444e56;
  margin-bottom: 20px;
  margin-top: 30px;
}

.descripcion-proyectos p {
  font-size: 1.4rem;
  font-weight: 400;
  color: #686868;
  line-height: 1.6;
  margin-bottom: 25px;
}

.btn {
  display: inline-block;
  background-color: #ffa500;
  color: #ffffff;
  padding: 12px 24px;
  margin-top: 10px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #ce8602;
  cursor: pointer;
}

.carrousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1600px;
  gap: 15px;
  margin: 0 auto;
  position: relative;
}

.carrousel-contenedor {
  overflow-x: auto;
  width: 100%;
  max-width: 1600px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #555555 #ffffff;
  padding-bottom: 15px;
  margin: 0 auto;
}

.carrousel-contenedor::-webkit-scrollbar {
  height: 4px;
}

.carrousel-contenedor::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.carrousel-track {
  display: flex;
  gap: 25px;
  transition: transform 0.5s ease-in-out;
  padding: 10px;
  justify-content: center;
}

.proyecto {
  flex: 0 0 400px;
  background-color: #ffa500;
  color: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-snap-align: center;
}

.proyecto:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.foto-proyecto {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.texto-proyecto {
  padding: 20px;
}

.texto-proyecto h2 {
  margin: 0 0 4px 0;
  font-size: 1.6rem;
  color: #ffffff;
}

.texto-proyecto h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.8;
}

.carrusel-boton {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  z-index: 10;
}

.carrusel-boton svg {
  width: 40px;
  height: 40px;
  fill: #555555;
  transition: fill 0.3s ease;
}

.carrusel-boton:hover svg {
  fill: #000000;
}

.proyecto {
  /* añade transición suave del color de fondo */
  transition: background-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Mobii App */
.carrousel-track > a.proyecto[href$="#mobiiapp"]:is(:hover, :focus-visible) {
  background-color: #a7bd00; /* azul */
  color: #fff;
}

/* Pink Rides */
.carrousel-track > a.proyecto[href$="#pinkrides"]:is(:hover, :focus-visible) {
  background-color: #e91287; /* magenta */
  color: #fff;
}

/* MS Rigal */
.carrousel-track > a.proyecto[href$="#msrigal"]:is(:hover, :focus-visible) {
  background-color: #ffadf4; /* gris muy oscuro */
  color: #fff;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* Staff cards - using the improved version for mobile */
  .staff-container {
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
  }
  
  .staff-card {
    width: 100%;
    max-width: 350px;
    min-width: unset;
    height: 400px;
    margin: 0 auto;
  }
  
  .staff-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Ensure text is readable on smaller screens */
  .staff-info h3 {
    font-size: 1.4rem;
  }
  
  .staff-info .staff-title {
    font-size: 1rem;
  }
  
  .staff-info p:not(.staff-title) {
    font-size: 0.95rem;
  }
  
  /* Prevent overflow from parent containers */
  .descripcion-mision {
    padding: 40px 10px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }
  
  .descripcion-mision h2 {
    font-size: 2.5rem;
  }
  
  .descripcion-mision p {
    font-size: 1.1rem;
  }
  
  .descripcion-mision #texto-descripcion-mision {
    padding-right: 20px;
    padding-left: 20px;
  }
  
  /* News section on mobile */
  .noticias {
    padding: 40px 20px;
  }
  
  .noticias h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
  }
  
  .noticias-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
  }
  
  .noticia {
    width: 88%;
    max-width: 370px;
    margin: 0 auto 10px auto;
    height: 250px;
  }
  
  .noticia p {
    font-size: 1.3rem;
  }
  
  /* Touch device hover effects for news cards */
  .noticia:active::before {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.1);
  }
  
  .noticia:active::after {
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.6));
  }
  
  /* Projects section on mobile */
  .descripcion-proyectos {
    margin-top: 40px;
  }
  
  .descripcion-proyectos h2 {
    font-size: 2.5rem;
  }
  
  .descripcion-proyectos p {
    font-size: 1.1rem;
  }
  
  .texto-introduccion {
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .carrousel-wrapper {
    padding: 0 0px;
  }
  
  .carrousel-track {
    justify-content: flex-start;
  }
  
  .proyecto {
    flex: 0 0 260px;
  }
  
  .carrusel-boton {
    display: none;
  }
}