/* =============================
   PALETA DE COLORES Y VARIABLES
   ============================= */
:root {
  --morado-oscuro: #2c2a4a;
  --morado-medio: #393575;
  --morado-claro: #5e548e;
  --morado-pastel: #ce93d8;
  --morado-suave: #f3e5f5;
  --texto-oscuro: #2d0a5d;
  --texto-claro: #ffffff;
  --card-bg: #ffffff;
  --bg: #fdfcfe;
  --sombra-sutil: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--texto-oscuro);
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===================
   HEADER Y NAVEGACIÓN
   =================== */
.header {
  background: linear-gradient(135deg, var(--morado-oscuro), var(--morado-medio));
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

/* Contenedor del header con espacio en los lados */
.header-container {
  display: flex;
  align-items: center;         /* Centra veritcalmente todo */
  justify-content: space-between;
  padding: 0 2rem;
  height: 80px;                /* Altura uniforme para centrar elementos */
}
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}


.mobile-logo {
  display: none;
}

@media (max-width: 768px) {
  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    z-index: 1;           /* Asegura que quede detrás del menú */
    position: relative;   /* Necesario para que el z-index funcione */
  }

  /* Oculta el logo móvil si el menú está abierto */
  .hamburger.active ~ .mobile-logo {
    display: none !important;
  }
}



.navbar {
  flex: 1;                     /* Toma todo el espacio disponible */
  display: flex;
  justify-content: center;     /* Centra horizontalmente */
  align-items: center;         /* Centra verticalmente */
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;         /* Asegura que los enlaces estén centrados verticalmente */
  height: 100%;
}

.nav-links li {
  list-style: none;
}

.nav-links li a {
  color: var(--texto-claro); /* Letras blancas */
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  width: 100%;
  text-align: center;
  margin: 0rem 0; /* Reducido para que entren más opciones */
  border-radius: 30px;
  transition: background 0.3s ease, color 0.3s ease; /* Transición suave para color y fondo */
}

/* Cambio de color de fondo al pasar el cursor */
.nav-links li a:hover {
  background: var(--morado-suave); /* Fondo al pasar el cursor */
  color: var(--morado-oscuro); /* Color de texto al pasar el cursor */
}

/* Configuración inicial de la hamburguesa */
.hamburger {
  display: none; /* solo visible en móvil */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  width: 35px;
  height: 30px;
   z-index: 1001; /* Asegura que esté por encima del menú lateral */
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Extra - Opcional: Estilización de la hamburguesa en el estado normal */
.hamburger span:nth-child(1), 
.hamburger span:nth-child(2), 
.hamburger span:nth-child(3) {
  background-color: #fff; /* Color de las líneas */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =======================
   RESPONSIVE NAVBAR MOVIL
   ======================= */
@media (max-width: 768px) {
  .header-container {
    justify-content: flex-start; /* Cambiado de space-between a flex-start */
    align-items: center;
    position: relative;
  }

  .logo {
    flex: 1;
    display: flex;
    justify-content: flex-start; /* Logo alineado a la izquierda */
    z-index: 10;
  }

  .mobile-logo {
    margin-left: 0; /* Sin margen izquierda */
    max-width: 140px;
    height: auto;
  }

  .hamburger {
    display: flex;
    order: 1; /* Para que el hamburguesa quede antes del logo */
    margin-left: 1rem; /* Separación del borde izquierdo */
    margin-right: 0; /* Sin margen derecha */
    background: none;
    border: none;
    cursor: pointer;
  }

  .navbar {
    justify-content: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 5;
  }

  .nav-links {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
    overflow: hidden;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: var(--morado-oscuro);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 200px;
    padding: 0 1rem;
  }
  .nav-links.show {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    padding: 1rem;
  }

 .nav-links li {
  width: 100%;
}

.nav-links li a {
  width: 100%;
  padding: 0.8rem 1rem;
  text-align: left;
  display: block;
  color: var(--texto-claro);
  font-size: 1rem;
  border-radius: 6px;
}

.nav-links li a:hover {
  background: var(--morado-suave);
  color: var(--morado-oscuro);
}


  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
    max-width: 160px;
    height: auto;
    margin-left: 0.5rem;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }

  .mobile-logo {
    display: none;
  }

  .nav-links {
    display: flex !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    width: auto !important;
    box-shadow: none !important;
  }
}

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.475), rgba(0, 0, 0, 0.475)),
    url('https://images.unsplash.com/photo-1600880292203-757bb62b4baf?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
  background-size: cover;
  background-position: center top;
  padding: 17rem 1rem;
  color: var(--texto-claro);
  text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}
.quote {
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--morado-pastel);
}
.btn {
    background: var(--morado-claro);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
    display: inline-block;
}
.btn:hover {
    background: var(--morado-medio);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

section {
    padding: 4rem 0;
}
h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    color: var(--morado-oscuro);
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--morado-claro);
    margin: 0.5rem auto 0;
}

/* Los demás estilos no fueron modificados */

.about-content,
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}
.about-text,
.contact-info,
.contact-form {
    flex: 1;
}
.about-text p {
    line-height: 1.7;
    margin-bottom: 1rem;
}
.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.about-image img:hover {
    transform: scale(1.02);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
.products-grid {
  justify-items: center;
}

.products-grid,
.aseguradoras-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    grid-auto-rows: minmax(240px, auto);
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    place-items: center;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .product-card {
    width: 100%;
  }
}

.service-card,
.product-card,
.aseguradora-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center; 
}
  
.service-card:hover,
.product-card:hover,
.aseguradora-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.panel-toggle {
    display: none;
}
.panel-label {
    text-align: center;
    cursor: pointer;
}
.aseguradora-IMG {
    width: 250px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 0.8rem auto;
    display: block;
    transition: transform 0.3s;
}
.panel-label:hover .aseguradora-IMG {
    transform: scale(1.05);
}
.panel-info {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
}
.panel-toggle:checked ~ .panel-info {
    max-height: 300px;
    padding-top: 1rem;
}
.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
}
.form-group {
    margin-bottom: 1.5rem;
}
input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
.footer {
    background: var(--morado-oscuro);
    color: var(--texto-claro);
    padding: 3rem 0 1rem;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.footer-links h4,
.footer-logo h3 {
    color: var(--morado-pastel);
    margin-bottom: 1rem;
}
.footer-links ul {
    list-style: none;
    padding: 0;
}
.footer-links a {
    color: var(--texto-claro);
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}
.footer-links a:hover {
    opacity: 1;
    color: var(--morado-pastel);
}
.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}
@media (max-width: 1024px) {
    .aseguradoras-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
  .header-container {
    justify-content: space-between;
    position: relative;
  }
  .logo {
    flex: 1;
    display: flex;
    justify-content: center;
    z-index: 10;
  }
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    justify-content: center;
    z-index: 5;
  }
  .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  .nav-links li a {
    width: 100%;
    display: block;
    padding: 1rem;
  }
  .aseguradoras-container {
      grid-template-columns: 1fr;
      padding: 1rem;
      grid-auto-rows: minmax(200px, auto);
  }
}

.flip-card {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: var(--sombra-sutil);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}
.flip-card-front {
    background: #fff;
}
.flip-card-front img {
    max-width: 70%;
    max-height: 45%;
    object-fit: contain;
}
.flip-card-back {
    background: #f8f8f8;
    color: var(--morado-oscuro);
    transform: rotateY(180deg);
    padding: 1rem;
}
.flip-card-back h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--morado-oscuro);
}
.flip-card-back p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    padding: 0 0.5rem;
}

.mobile-logo {
  display: none;
}

@media (max-width: 768px) {
  .desktop-logo {
    display: none;
  }
  .mobile-logo {
    display: block;
    max-width: 160px;
    height: auto;
    margin-left: 1rem;
  }
}

.desktop-img {
  display: block;
}
.mobile-img {
  display: none;
}

@media (max-width: 768px) {
  .desktop-img {
    display: none;
  }
  .mobile-img {
    display: block;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .header-container {
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    order: 1;
  }

  .mobile-logo {
    display: block;
    max-width: 140px;
    height: auto;
    margin-left: 0.5rem;
  }

  .desktop-logo {
    display: none;
  }

  .hamburger {
    display: flex;
    order: 2;
    margin-right: 1rem;
    background: none;
    border: none;
  }

  .hero {
  background: linear-gradient(rgba(0, 0, 0, 0.475), rgba(0, 0, 0, 0.475)),
    url('../img/equipo-movil.jpg') no-repeat center center;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 10rem 1rem; /* Menor padding en móvil si hace falta */
  color: var(--texto-claro);
  text-align: center;
}

}

@media (max-width: 768px) {
  .hero {
  background: linear-gradient(rgba(0, 0, 0, 0.475), rgba(0, 0, 0, 0.475)),
    url('../img/equipo-movil.jpg') no-repeat center center;
  background-size: cover;
  background-position: center;
}

}

@media (max-width: 768px) {
  .logo {
    display: flex;
    justify-content: center;
    flex: 1;
  }

  .mobile-logo {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
    height: 40px;
    width: auto;
    margin-left: auto;
  }

  .hamburger {
    display: flex;
  }

 .nav-links {
  position: fixed;
  top: 0;
  left: -100%; /* Inicialmente fuera de pantalla a la izquierda */
  height: 100%;
  width: 250px;
  background: var(--morado-oscuro);
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1rem;
  gap: 1rem;
  transition: left 0.4s ease-in-out;
  z-index: 999;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.nav-links.show {
  left: 0; /* Se desliza hacia dentro desde la izquierda */
}


  .nav-links li {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
  }

  .nav-links li a {
    display: block;
    width: 100%;
  }
}

.full-width-center {
  grid-column: 1 / -1; /* Ocupar toda la fila */
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-card p {
  flex-grow: 1;
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}
.flip-card,
.product-card,
.aseguradora-card {
  min-height: 250px; /* Ajustable según necesidad */
}

/* Flechas completamente invisibles y con área amplia */
.swiper-button-next,
.swiper-button-prev {
  opacity: 0;
  pointer-events: auto;
  width: 15%; /* Ocupa el 15% del ancho lateral */
  height: 100%; /* Toda la altura del carrusel */
  top: 0;
  margin-top: 0;
  z-index: 10;
}

/* Elimina el ícono visual de la flecha */
.swiper-button-next::after,
.swiper-button-prev::after {
  display: none;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Paginación (puntos) en morado */
.swiper-pagination-bullet {
  background-color: #ccc;
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background-color: #6f42c1; /* Morado */
}

.swiper-slide {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: white;
  min-height: 500px;
  display: flex;
  align-items: center;      /* Centra verticalmente */
  justify-content: center;  /* Centra horizontalmente */
}

/* Ahora el overlay cubre todo el slide */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Oscurece toda la imagen */
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;  /* Centra el texto verticalmente */
  align-items: center;      /* Centra el texto horizontalmente */
  text-align: center;
}

.overlay h3, .overlay p, .overlay ul {
  max-width: 800px; /* Para que no se vea demasiado ancho en pantallas grandes */
}
/* === Fondos para escritorio === */
.bienes-bg {
  background-image: url('../img/segurosbienespatri.jpg');
}

.personales-bg {
  background-image: url('../img/segurospersonalessalud.jpg');
}

.responsabilidad-bg {
  background-image: url('../img/segurosresponsabilidadgarantia.jpg');
}

/* Ajustes comunes */
.bienes-bg,
.personales-bg,
.responsabilidad-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* === Fondos para pantallas móviles === */
@media (max-width: 768px) {
  .bienes-bg {
    background-image: url('../img/segurodebienesmovil.jpg');
  }

  .personales-bg {
    background-image: url('../img/segurospersonalesmovil.jpg');
  }

  .responsabilidad-bg {
    background-image: url('../img/segurosresponsabilidadmovil.jpg');
  }
}

.btn-login {
  background-color: var(--morado-claro);
  color: white !important;
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 2px 8px rgba(94, 84, 142, 0.25);
  text-decoration: none;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--morado-claro), var(--morado-oscuro));
  border: 1px solid var(--morado-pastel);
  color: rgb(162, 6, 253) !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

#toast.show {
  display: block;
  opacity: 1;
}
