/* =============================
   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;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.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);
}

.navbar {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-end; /* Cambiado para que los enlaces estén al final */
}

.nav-links {
  display: flex; /* Asegura que los enlaces estén en fila */
  gap: 2rem; /* Espacio entre los enlaces */
}

.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;
  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: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 50px; /* Aumento el tamaño del icono */
  height: 40px; /* Aumento la altura del icono */
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 4px; /* Aumento el grosor de las líneas */
  width: 100%;
  background: white;
  border-radius: 5px;
  transition: all 0.3s ease; /* Transición más suave */
  position: relative;
}

/* Animación cuando la hamburguesa está activa (se convierte en "X") */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px); /* Primera línea rota en 45 grados */
  transform-origin: center center; /* Rota desde el centro */
}

.hamburger.active span:nth-child(2) {
  opacity: 0; /* La línea del medio desaparece */
  transform: scaleX(0); /* Escala horizontalmente la línea para que desaparezca */
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px); /* Tercera línea rota en -45 grados */
  transform-origin: center center; /* Rota desde el centro */
}

/* 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) {
  .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;
}
.nav-links.show {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  padding: 1rem;
}


  .nav-links li {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
  }

  .nav-links li a {
    width: 100%;
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .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 {
    max-height: 0;
    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;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease;
  }

  .nav-links.show {
    max-height: 500px;
    padding: 1rem;
  }

  .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 */
}
