body {
  margin: 0;
  font-family: 'Berlin Sans', sans-serif;
  background-color: #faf2f0;
  color: #003284;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* HEADER */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: #003284;
}

body {
  padding-top: 60px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-header {
  height: 80px;
}

/* MENÚ NORMAL */
.nav-header {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-header ul {
  display: flex;
  gap: 35px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-header a {
  color: #faf2f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.nav-header a:hover {
  color: #edd85f;
}

/* SWITCH IDIOMA */
.lang-switch button {
  background: none;
  border: none;
  color: #faf2f0;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 10px;
  transition: color 0.3s;
}

.lang-switch button:hover {
  color: #edd85f;
}

/* MENÚ HAMBURGUESA */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 25px;
  top: 50%;
  z-index: 101;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: #faf2f0;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* ANIMACIÓN "X" */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  /* NAV OCULTO POR DEFECTO */
  .nav-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #003284;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    text-align: center;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease;
    border-top: 2px solid #edd85f;
  }

  /* NAV VISIBLE */
  .nav-header.active {
    max-height: 300px;
    opacity: 1;
    padding: 20px 0;
  }

  .nav-header ul {
    flex-direction: column;
    gap: 20px;
  }

  .lang-switch {
    margin-top: 15px;
  }
}

/* HERO */
.hero {
  position: relative;
  background-image: url("../img/105-BON28223.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #faf2f0;
  overflow: hidden;
  margin: 0;
  padding: 0 20px;
}

/* Capa de oscurecimiento */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 50, 132, 0.35), rgba(0, 50, 132, 0.45));
  backdrop-filter: blur(2px);
  z-index: 1;
}

/* Contenido encima */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

#subtitle {
  color: #edd85f;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  line-height: 1.6;
  color: #faf2f0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* CTA BUTTONS */
.cta-buttons {
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Colores base */
.btn.primary {
  background-color: #003284;
  color: #fff;
}

.btn.secondary {
  background-color: #c43a41;
  color: #fff;
  margin-left: 10px;
}

.btn.tertiary {
  background-color: #0097b2;
  color: #fff;
  margin-left: 10px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}


/* ===== SECCIÓN CONTACTO ===== */
.contact {
  background: linear-gradient(135deg, #f0f4fa 0%, #e8f1ff 100%);
  margin: 70px auto;
  max-width: 1000px;
  border-radius: 24px;
  padding: 80px 70px; 
  box-shadow: 0 6px 18px rgba(0, 50, 132, 0.1);
  text-align: center;
  color: #003284;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Título */
.contact h2 {
  color: #003284;
  margin-bottom: 30px;
  font-size: 2rem;
}

/* Texto */
.contact p {
  line-height: 1.7;
  margin-bottom: 25px;
  font-size: 1.05rem;
  color: #003284;
}

/* Botones centrados */
.contact .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 35px;
}

/* Botones */
.contact .btn {
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Colores dentro de la paleta */
.contact .btn.primary {
  background-color: #003284;
  color: white;
}

.contact .btn.secondary {
  background-color: #c72d36;
  color: white;
}

.contact .btn.tertiary {
  background-color: #0097b2;
  color: white;
}

/* Hover */
.contact .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

/* Ajuste de anclaje Contacto */
section#contact {
  scroll-margin-top: 150px; 
  padding-top: 0;
}


/* SECCIONES */
.about, .location {
  padding: 60px 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.about h2, .location h2 {
  color: #003284;
  margin-bottom: 20px;
}
.about-intro {
  font-size: 1.1rem;
  color: #003284;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}
.about-cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-cards .card {
  flex: 1;
  min-width: 0; 
  background: linear-gradient(135deg, #f0f4fa 0%, #e8f1ff 100%);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  padding: 30px 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.about-cards .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 50, 132, 0.2);
}

.about-cards .card img {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
}

.about-cards .card h3 {
  color: #003284;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.about-cards .card p {
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
}

/* 📱 Responsive */
@media (max-width: 950px) {
  .about-cards {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .about-cards .card {
    width: 90%;
  }
}


/* MAPA */
.location iframe {
  margin-top: 30px;
  border-radius: 12px;
}

/* --- Botón "Ver mapa" --- */
.btn-map {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background: linear-gradient(90deg, #003284, #1996b8);
  color: #faf2f0;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 50, 132, 0.25);
}

.btn-map:hover {
  background: linear-gradient(90deg, #c43a41, #edd85f);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* DIRECCIÓN Y HORARIO DESTACADOS */
.address, .schedule {
  font-size: 1.1rem;
  margin: 5px 0;
  color: #003284;
}
.address strong, .schedule strong {
  color: #c43a41;
}

/* CARRUSEL */
.carousel-section {
  text-align: center;
  padding: 60px 20px;
  background-color: #faf2f0;
}

.carousel-section h2 {
  color: #003284;
  margin-bottom: 30px;
  font-size: 2rem;
}

.carousel-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.carousel-slide {
  display: none;
}

.carousel-slide img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  border-radius: 18px;
}

/* === FLECHAS DEL CARRUSEL (alineadas y funcionales) === */
.carousel-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: bold;
  font-size: 28px;
  text-align: center;
  line-height: 46px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  user-select: none;
}

.prev:hover, .next:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

/* Flecha izquierda */
.prev {
  left: 20px;
}

/* Flecha derecha */
.next {
  right: 20px;
}

/* En mobile, un poco más pequeñas */
@media (max-width: 768px) {
  .prev, .next {
    width: 38px;
    height: 38px;
    font-size: 24px;
    line-height: 38px;
  }
}

/* Dots (indicadores) */
.dots-container {
  text-align: center;
  margin-top: 18px;
}

.dot {
  cursor: pointer;
  height: 14px;
  width: 14px;
  margin: 0 6px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.4s;
}

.active, .dot:hover {
  background-color: #003284;
}

/* Transición */
.fade {
  animation: fade 1s ease-in-out;
}

@keyframes fade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-slide img {
    height: 400px;
  }
  .prev, .next {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

/* FOOTER */
footer {
  background: #003284;
  color: white;
  text-align: center;
  padding: 30px 10px;
}

.social-links {
  margin-bottom: 10px;
}

.social-links a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #edd85f;
}

/* RESPONSIVE */
@media (max-width: 850px) {
  .header-content {
    flex-direction: column;
    gap: 20px;
  }

  .nav-header {
    flex-direction: column;
    gap: 10px;
  }

  .nav-header ul {
    flex-direction: column;
    align-items: center;
  }

  .btn.secondary {
    margin-left: 0;
    margin-top: 10px;
  }
}

section[id] {
  scroll-margin-top: 70px;
  padding-top: 15px;
}


/* ===== PARTNERS SECTION ===== */
.partners {
  text-align: center;
  padding: 60px 20px;
  background-color: #faf2f0;
}

.partners h2 {
  color: #003284;
  font-size: 2rem;
  margin-bottom: 10px;
}

.partners-subtitle {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 40px;
}

.partners-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.partners-logos img {
  max-height: 80px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.partners-logos img[alt="ULOCK Logo"] {
  max-height: 110px; 
}

.partners-logos img:hover {
  filter: grayscale(0%);
  transform: scale(1.08);
}
/* ===== FIX ULTRA SEGURO: eliminar scroll horizontal sin alterar layout ===== */
@media (max-width: 768px) {
  body {
    overflow-x: clip; 
  }

  html {
    width: 100%;
    max-width: 100%;
  }

  /* Previene que elementos hijos desborden sin forzar reflujo */
  body > * {
    max-width: 100vw;
  }
}

/* === FIX RESPONSIVE BOTONES SIN SCROLL HORIZONTAL === */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* Ajuste general */
  .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin: 20px auto 0;
    padding: 0 10px;
    box-sizing: border-box;
  }

  /* Botones adaptativos */
  .btn {
    width: 90%;
    max-width: 320px;
    text-align: center;
    border-radius: 50px;
    padding: 14px 0;
    font-weight: bold;
    display: inline-block;
  }

  /* Elimina márgenes que generaban desbordes */
  .btn.secondary,
  .btn.tertiary {
    margin-left: 0 !important;
  }

  /* Contacto */
  .contact {
    padding: 50px 20px;
    margin: 40px 10px;
    text-align: center;
  }

  .contact .cta-buttons {
    gap: 15px;
  }

  /* Previene overflow en contenedores */
  section, .hero, .about, .location, .carousel-section, .partners {
    overflow-x: hidden;
    max-width: 100vw;
  }
}
@media (max-width: 450px) {
  .hero {
    min-height: 100vh;
    padding: 100px 20px 90px;
  }
}

/* === HERO compacto === */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: unset;
    padding: 100px 20px 60px;
    background-attachment: scroll;
    display: block;
    text-align: center;
  }

  .hero-content {
    max-width: 90%;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  #subtitle {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 18px;
  }

  /* Botones */
  .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 15px;
  }

  .btn {
    width: 80%;
    max-width: 320px;
    border-radius: 50px;
    padding: 12px 0;
  }

}

/* === RESEÑAS === */

.reviews {
  background: linear-gradient(135deg, #f0f4fa 0%, #e8f1ff 100%);
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.reviews h2 {
  font-size: 2rem;
  color: #003284;
  margin-bottom: 50px;
  font-weight: 700;
}

.reviews-carousel {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 100vw;
  padding: 20px 0;
}

.reviews-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollReviews 120s linear infinite;
  padding: 0 20px;
  box-sizing: border-box;
}

.review-card {
  flex: 0 0 340px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0, 50, 132, 0.15);
  padding: 25px 20px;
  box-sizing: border-box;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0, 50, 132, 0.25);
  z-index: 2;
}

.review-text {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.5;
}

.review-author {
  font-weight: bold;
  color: #003284;
  font-size: 1rem;
  margin-bottom: 5px;
}

.stars {
  color: #edd85f;
  font-size: 1.1rem;
}

/* === Animación global === */
@keyframes scrollReviews {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .reviews {
    padding: 60px 0;
  }

  .reviews h2 {
    font-size: 1.6rem;
    margin-bottom: 35px;
  }

  .reviews-track {
    animation: scrollReviews 200s linear infinite;
    gap: 16px;
  }

  .review-card {
    flex: 0 0 85vw; 
    padding: 22px 18px;
    border-radius: 16px;
  }

  .review-card:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 50, 132, 0.15);
  }
}

/* Evita scroll lateral */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
}
