/* style.css */

:root {
    --color-primario: #00154f;
    --color-secundario: #20a5d8;
    --color-gris: #767676;
    --blanco: #ffffff;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-primario);
    background-color: var(--blanco);
    line-height: 1.6;
  }
  
  /* Hero actualizado */
  .hero {
    position: relative;
    background: var(--color-primario);
    color: var(--blanco);
    padding: 3rem 2rem;
    overflow: hidden;
  }
  
  .hero::before {
    content: "";
    background: url('../img/banner_landigpage_domotica.png') no-repeat center/cover;
    opacity: 0.30;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }
  
  .hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    position: relative;
    z-index: 1; /* Poner el contenido encima de la marca de agua */
    flex-wrap: wrap;
  }
  
  .hero-texto {
    flex: 1 1 500px;
    animation: fadeIn 2s ease-out;
  }
  
  .hero-texto h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero-texto p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--color-secundario);
  }
  
  .hero-imagen {
    flex: 1 1 400px;
    text-align: center;
    animation: fadeIn 2s ease-out;
  }
  
  .hero-imagen img {
    max-width: 100%;
    height: auto;
  }
  
  /* Curvatura del fondo */
  .hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-color: #f9f9f9;
    border-top-left-radius: 100% 50px;
    border-top-right-radius: 100% 50px;
  }
  

  .cta-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
    display: inline-block;
    text-align: center;
  }
  
  .btn.primary {
    background-color: var(--color-primario);
    color: white;
  }
  
  .btn.primary:hover {
    background-color: var(--color-secundario);
    transform: scale(1.05);
  }
  
  .btn.whatsapp {
    background-color: #25d366;
    color: white;
  }
  
  .btn.whatsapp:hover {
    background-color: #1ebd5a;
    transform: scale(1.05);
  }
  
  .productos {
    padding: 2rem 2rem;
    background-color: #f9f9f9;
    animation: fadeIn 1.5s ease-out;
  }
  
  .productos .contenido-productos {
    text-align: left;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
  }
  
  .grid {
    display: grid;
    gap: 2rem;
    margin: 0 auto;
  }
  
  .grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 1200px;
  }
  
  .card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease-out;
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
  }
  
  .card img {
    width: 100%;
    height: auto;
  }
  
  .card h3 {
    padding: 1rem;
    color: var(--color-primario);
    text-align: center;
  }
  
  .cta-productos {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  footer {
    background-color: var(--color-primario);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
  }

  .banner-producto {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
  }
  
  .banner-producto img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .colorvu {
    font-weight: bold;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-clip: text; /* estándar */
    -webkit-background-clip: text; /* compatibilidad WebKit */
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: rainbow 5s linear infinite;
  }


  .titulo-alerta {
    display: flex;
    align-items: center;
    background-color: #e0f2fe;
    border-left: 4px solid #3b82f6;
    color: #1e3a8a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease-in-out;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .titulo-alerta:hover {
    background-color: #bfdbfe;
    transform: scale(1.02);
  }
  
  .icono-alerta {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    color: #2563eb;
  }
  
  .texto-alerta {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
  }

  .cta-productos-lista {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end; /* Alineación a la izquierda */
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
  }

  .banner-mobile {
    display: none;
  }
  
  @keyframes rainbow {
    0% {
      background-position: 0% 50%;
    }
    100% {
      background-position: 100% 50%;
    }
  }
  
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @media (max-width: 768px) {
    .hero-container {
      flex-direction: column;
      text-align: center;
    }
    
    .hero-texto, .hero-imagen {
      flex: 1 1 100%;
    }
    .hero {
      padding-bottom: 1rem;
    }

    .hero-texto h1 {
      line-height: 1.1; /* O incluso 1.1 si lo deseas más compacto */
    }
  }
  
  @media (max-width: 480px) {
    .grid.grid-5 {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }
   
    .grid.grid-5 > *:nth-child(5) {
      display: none;
    }

    .banner-desktop {
      display: none;
    }
  
    .banner-mobile {
      display: block;
      width: 100%;
      max-width: 390px;
      margin: 0 auto;
      border-radius: 10px;
    }

    .cta-productos-lista {
      justify-content: center;       /* Centra los botones */
      flex-wrap: nowrap;             /* No permite salto de línea */
      gap: 0.5rem;
      flex-direction: row;
      overflow-x: auto;              /* Scroll horizontal si no caben */
      padding: 0 1rem;
    }
  
    .cta-productos-lista .btn {
      white-space: nowrap;           /* Evita que el texto se divida */
      flex-shrink: 0;
      font-size: 0.85rem;       /* Tamaño de texto reducido */
      padding: 0.5rem 1rem;     /* Menos padding horizontal */
    }

    .hero-texto h1 {
      line-height: 1.1; /* O incluso 1.1 si lo deseas más compacto */
    }

    .hero {
      padding-bottom: 1rem;
    }
  }
  