:root {
  --color-principal: #fbc735;
  --color-principal-hover: #d9a62a;
}

/* Botón iniciar sesión o perfil */
.menu li a.login,
.menu li a.perfil {
  background: #F9C031;
  color: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  transition: background 0.3s ease;
}

.menu li a.login::after,
.menu li a.perfil::after {
  display: none;
}

.menu li a.login:hover,
.menu li a.perfil:hover {
  background: #D89A1E;
}

.carrusel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carrusel .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 100%;
  background-size: cover;
  background-position: center;
  transition: left 0.8s ease-in-out;
  display: flex;
  align-items: center;
}

.carrusel .slide.active {
  left: 0;
}

.carrusel .slide.prev {
  left: -100%;
}

/* Contenido base */
.carrusel .content {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px 40px;
  border-radius: 10px;
  max-width: 500px;
}

.carrusel .content h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.carrusel .content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.carrusel .content .btn {
  background: #F9C031;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.carrusel .content .btn:hover {
  background: #D89A1E;
}

/* 🔥 Alineaciones diferentes por slide */
.carrusel .slide.left {
  justify-content: flex-start;
  padding-left: 8%;
}

.carrusel .slide.center {
  justify-content: center;
  text-align: center;
}

.carrusel .slide.right {
  justify-content: flex-end;
  padding-right: 8%;
  text-align: right;
}

/* Controles */
.carrusel button.prev,
.carrusel button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.carrusel button.prev {
  left: 20px;
}

.carrusel button.next {
  right: 20px;
}

.carrusel button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Seccion login */

.login-section {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('./imagenes/login-fondo.jpg') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.login-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* oscurece la imagen */
  z-index: 1;
}

.login-container {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.login-text h2 {
  color: #fbc735;
  margin-bottom: 10px;
}

.login-text p {
  color: #333;
  margin-bottom: 25px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-form .input-box {
  position: relative;
}

.login-form input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
  /* ✅ evita desbordes */
}

.login-form input:focus {
  border-color: #fbc735;
}

.login-form i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

.login-form button {
  background: #fbc735;
  color: #1f2937;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.login-form button:hover {
  background: #d9a62a;
  transform: scale(1.05);
}

.register-link {
  margin-top: 10px;
  font-size: 0.9rem;
}

.register-link a {
  color: #fbc735;
  font-weight: bold;
  text-decoration: none;
}

/* ------------------ */
/* Clientes carrusel */
/* ------------------ */
.clientes {
  text-align: center;
  padding: 60px 10%;
  background: #f9f9f9;
  overflow: hidden;
}

.clientes h2 {
  color: #fbc735;
  margin-bottom: 30px;
}

.carrusel-clientes {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carrusel-track {
  display: flex;
  gap: 60px;
  will-change: transform;
}

.carrusel-track img {
  height: 80px;
  object-fit: contain;
  transition: transform .3s;
}

.carrusel-track img:hover {
  transform: scale(1.1);
}

/* ==== SECCIÓN GENERAL ==== */
.info-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 50px 20px;
  background: #f8f9fa;
  font-family: "Poppins", sans-serif;
}

/* ==== ENLACE ==== */
.info-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* ==== TARJETA ==== */
.info-card {
  width: 340px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
  /* ✅ Mantiene todas las tarjetas iguales */
}

/* 👉 HOVER ACTIVADO EN EL ENLACE */
.info-link:hover .info-card {
  transform: translateY(-8px);
  cursor: pointer;
}

/* ==== IMAGEN ==== */
.info-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.info-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

/* 👉 ZOOM ACTIVADO AL HOVER DEL ENLACE */
.info-link:hover .info-image img {
  transform: scale(1.05);
}

/* ==== OVERLAY ==== */
.info-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  background: rgba(251, 199, 53, 0.85);
  /* #fbc735 con transparencia */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: width 0.4s ease;
  z-index: 2;
}

/* 👉 EXPANSIÓN ACTIVADA AL HOVER DEL ENLACE */
.info-link:hover .info-overlay {
  width: 100%;
}

/* ==== ÍCONO ==== */
.info-icon {
  color: #fff;
  font-size: 2rem;
  transition: transform 0.3s ease;
  z-index: 3;
}

.info-link:hover .info-icon {
  transform: scale(1.3);
}

/* ==== TEXTO ==== */
.info-card h3 {
  color: #fbc735;
  margin: 18px 20px 10px;
  font-size: 1.2rem;
  font-weight: 600;
  min-height: 55px;
  /* ✅ asegura que los títulos ocupen el mismo alto */
}

.info-card p {
  color: #444;
  font-size: 0.95rem;
  margin: 0 20px 20px;
  line-height: 1.6;
  flex-grow: 1;
  /* ✅ iguala el espacio del texto */
  display: flex;
  align-items: flex-start;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 900px) {
  .info-section {
    flex-direction: column;
    align-items: center;
  }

  .info-card {
    width: 90%;
    min-height: auto;
    /* ✅ permite adaptarse mejor en pantallas pequeñas */
  }

  .info-image {
    height: 180px;
  }
}

/* ======== 🌙 MODO OSCURO ======== */
body.dark-mode {
  background: #1b1b1b;
  color: #e8e8e8;
}

/* Fondo general de la sección */
body.dark-mode .info-section {
  background: #1b1b1b;
}

/* Tarjetas */
body.dark-mode .info-card {
  background: #2a2a2a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Hover */
body.dark-mode .info-link:hover .info-card {
  transform: translateY(-8px);
  box-shadow: 0 6px 18px rgba(251, 199, 53, 0.25);
}

/* Imágenes */
body.dark-mode .info-image {
  background: #222;
}

body.dark-mode .info-image img {
  opacity: 0.9;
  filter: brightness(0.85) contrast(1.1);
}

/* Overlay dorado con transparencia */
body.dark-mode .info-overlay {
  background: rgba(251, 199, 53, 0.25);
}

body.dark-mode .info-link:hover .info-overlay {
  background: rgba(251, 199, 53, 0.8);
}

/* Íconos */
body.dark-mode .info-icon {
  color: #fbc735;
}

body.dark-mode .info-link:hover .info-icon {
  transform: scale(1.3);
  color: #fff;
}

/* Títulos */
body.dark-mode .info-card h3 {
  color: #fbc735;
}

/* Texto */
body.dark-mode .info-card p {
  color: #ccc;
}

/* Bordes o resaltes */
body.dark-mode .info-card::before {
  content: "";
  display: block;
  height: 4px;
  background: #fbc735;
  opacity: 0.15;
}

/* Transiciones suaves al cambiar de tema */
body.dark-mode,
body.dark-mode .info-card,
body.dark-mode .info-image img,
body.dark-mode .info-overlay,
body.dark-mode .info-icon,
body.dark-mode .info-card h3,
body.dark-mode .info-card p {
  transition: all 0.3s ease-in-out;
}

/* -------------------- */
/* 📱 Responsividad */
/* -------------------- */
@media (max-width: 1024px) {
  .carrusel-track {
    gap: 40px;
    animation-duration: 25s;
    /* más rápido en tablets */
  }

  .carrusel-track img {
    height: 80px;
  }
}

@media (max-width: 768px) {
  .carrusel-track {
    gap: 30px;
    animation-duration: 20s;
  }

  .carrusel-track img {
    height: 60px;
  }
}

/* ============================ */
/* 📱 Centrado del carrusel en móviles */
/* ============================ */
@media (max-width: 768px) {
  .carrusel .slide {
    justify-content: center !important;
    /* fuerza centrado horizontal */
    padding: 0 !important;
    /* quita márgenes laterales */
    text-align: center !important;
    /* centra el texto */
  }

  .carrusel .content {
    max-width: 90%;
    background: rgba(0, 0, 0, 0.55);
    padding: 25px 20px;
    border-radius: 10px;
  }

  .carrusel .content h2 {
    font-size: 1.8rem;
  }

  .carrusel .content p {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .carrusel .content .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  /* 🔹 Botones de control más chicos */
  .carrusel button.prev,
  .carrusel button.next {
    font-size: 1.5rem;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .clientes {
    padding: 40px 5%;
  }

  .carrusel-track {
    gap: 20px;
    animation-duration: 15s;
    /* un poco más rápido en móviles */
  }

  .carrusel-track img {
    height: 45px;
  }
}

/* ==========================================================
   🤝 SECCIÓN CLIENTES Y PROVEEDORES
   ========================================================== */
.socios {
  background: #fff;
  padding: 80px 20px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  text-align: center;
  transition: background 0.3s ease;
}

.socio-card {
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  width: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, background 0.3s ease;
}

.socio-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 40px 30px;
}

.socio-card:hover {
  transform: translateY(-5px);
}

.socio-card i {
  font-size: 50px;
  color: #fbc735;
  margin-bottom: 15px;
}

.socio-card h3 {
  font-size: 1.8rem;
  color: #1f2937;
  margin-bottom: 15px;
}

.socio-card p {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 30px;
}

.btn-wrapper {
  margin-top: auto;
}

.socio-btn {
  background: #fbc735;
  color: #1f2937;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s;
}

.socio-btn:hover {
  background: #d9a62a;
  transform: scale(1.05);
}

/* MODO DARK SOCIO */

body.dark-mode .clientes {
  background: #1e1e1e;
}

body.dark-mode .socios {
  background: #1e1e1e;
}

body.dark-mode .socio-card {
  background: #242424;
  color: #eee;
  box-shadow: 0 3px 8px rgba(255, 255, 255, 0.08);
}

body.dark-mode .socio-card h3 {
  color: #F9C031;
}

body.dark-mode .socio-card p {
  color: #ccc;
}

/* Seccion Footer */

.footer {
  background: #1f2937;
  /* gris oscuro */
  color: #fff;
  padding: 20px 10%;
  text-align: center;
  font-size: 0.9rem;
}

.footer-links {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-links a {
  color: var(--color-principal, #fbc735);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--color-principal-hover, #d9a62a);
}

.footer-copy {
  font-size: 0.85rem;
  color: #ccc;
}

/* Responsivo */
@media (max-width: 600px) {
  .footer {
    padding: 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================
   💼 SECCIÓN TRABAJA CON NOSOTROS
   ========================================================== */
.trabaja {
  width: 100%;
  background: #f9f9f9;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.trabaja-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  height: 100vh;
}

.trabaja-img img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 400px;
}

.trabaja-info h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1f2937;
}

.trabaja-info p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: #333;
}

.trabaja-btn {
  background: var(--color-principal);
  color: #1f2937;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s;
}

.trabaja-btn:hover {
  background: var(--color-principal-hover);
  transform: scale(1.05);
}

/* ==========================================================
   📱 TABLET (≤ 992px)
   ========================================================== */
@media (max-width: 992px) {
  .trabaja-container {
    grid-template-columns: 1fr;
    text-align: center;
    height: auto;
    padding: 60px 20px;
    gap: 30px;
  }

  .trabaja-img img {
    max-height: 320px;
  }

  .trabaja-info h2 {
    font-size: 1.8rem;
  }

  .trabaja-info p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .trabaja-btn {
    margin: 6px 0;
    width: auto;
  }
}

/* ==========================================================
   📱 CELULAR GRANDE (≤ 768px)
   ========================================================== */
@media (max-width: 768px) {

  .trabaja-container {
    padding: 40px 15px;
  }

  .trabaja-info h2 {
    font-size: 1.6rem;
  }

  .trabaja-info p {
    font-size: 0.95rem;
  }

  .trabaja-img img {
    max-height: 280px;
  }

  .trabaja-btn {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 8px auto;
    text-align: center;
  }
}

/* ==========================================================
   📱 CELULAR MEDIANO (≤ 576px)
   ========================================================== */
@media (max-width: 576px) {

  .trabaja-info h2 {
    font-size: 1.4rem;
  }

  .trabaja-info p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .trabaja-img img {
    max-height: 240px;
  }
}

/* ==========================================================
   📱 CELULAR CHICO (≤ 420px)
   ========================================================== */
@media (max-width: 420px) {

  .trabaja-info h2 {
    font-size: 1.2rem;
  }

  .trabaja-info p {
    font-size: 0.85rem;
  }

  .trabaja-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  .trabaja-img img {
    max-height: 200px;
  }
}