/* *********************************** */
@import url(normalize.min.css);
@import url(reset.css);

/* *********************************** */
/* *** ESTILOS GENERALES - REPA (HUMANO Y CERCANO) *** */
/* *********************************** */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ******************************** */
:root {
  /* Paleta de colores cálida, humana y de confianza */
  --bg-primary: #fbfbfb;      /* Blanco roto muy suave, cálido */
  --bg-secondary: #f4f6f8;    /* Gris azulado muy suave y limpio */
  --bg-card: #ffffff;
  --bg-accent-soft: #eff6ff;  /* Azul suave de fondo */
  
  --text-primary: #1e293b;    /* Slate oscuro muy legible y agradable */
  --text-secondary: #475569;  /* Slate medio para descripciones */
  --text-muted: #64748b;     /* Slate aclarado para detalles secundarios */

  /* Colores de acento: Azul de confianza con toque verde esmeralda amigable */
  --accent-color: #2563eb;    /* Azul real de seguridad y confianza */
  --accent-hover: #1d4ed8;
  --accent-secondary: #0d9488;/* Verde esmeralda (salud, seguridad, protección) */
  --accent-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
  --accent-gradient-hover: linear-gradient(135deg, #1d4ed8, #2563eb);
  
  --border-subtle: #e2e8f0;   /* Bordes muy discretos y suaves */
  --border-focus: #cbd5e1;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.08);

  /* Tipografía y radios redondos y amigables */
  --font-display: "Outfit", "Inter", sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", sans-serif;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
}

/* ******************************** */
html {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
}

body {
  max-width: var(--ancho-max);
  width: 100vw;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

/* ======================================= */
/* ENCABEZADO (HEADER) */
/* ======================================= */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(251, 251, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 999;
  transition: all 0.3s ease;
}

.header__container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.header__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.header__logo-fallback {
  font-size: 24px;
  display: none;
}

.header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  max-width: 250px;
  line-height: 1.2;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 24px;

  a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;

    &:hover {
      color: var(--accent-color);
    }
  }

  .header__nav-cta {
    padding: 8px 18px;
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background-color 0.2s ease;

    &:hover {
      background-color: var(--accent-hover);
      color: #ffffff;
    }
  }
}

/* Contenedor principal */
main {
  width: 1080px;
  margin: 0 auto;
  padding: 40px 20px;

  /* ======================================= */
  /* HERO — Banner Principal */
  /* ======================================= */

  .banner__principal {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
    animation: slideUp 0.6s ease-out;

    .banner__principal__info {
      display: flex;
      flex-direction: column;
      gap: 20px;

      .badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 14px;
        background-color: var(--bg-accent-soft);
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-radius: 99px;
        font-size: 13px;
        font-weight: 600;
        color: var(--accent-color);
        width: fit-content;

        .badge__dot {
          width: 8px;
          height: 8px;
          border-radius: 50%;
          background-color: var(--accent-color);
        }
      }

      h1 {
        font-family: var(--font-display);
        color: var(--text-primary);
        font-size: 48px;
        font-weight: 800;
        line-height: 1.15;
        letter-spacing: -1px;
      }

      h2 {
        color: var(--text-secondary);
        font-size: 18px;
        font-weight: 400;
        line-height: 1.6;
      }

      .banner__principal__btn {
        display: flex;
        flex-direction: row;
        gap: 16px;
        padding-top: 10px;

        a {
          padding: 12px 28px;
          font-size: 15px;
          font-weight: 600;
          text-decoration: none;
          border-radius: var(--radius-sm);
          transition: all 0.2s ease;
        }

        .banner__principal__btn--principal {
          background-color: var(--accent-color);
          color: #ffffff;
          box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);

          &:hover {
            background-color: var(--accent-hover);
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
          }
        }

        .banner__principal__btn--secundario {
          background-color: transparent;
          color: var(--text-secondary);
          border: 1px solid var(--border-subtle);

          &:hover {
            border-color: var(--accent-color);
            color: var(--accent-color);
            background-color: rgba(37, 99, 235, 0.02);
          }
        }
      }
    }

    .banner__principal__imagen {
      display: flex;
      justify-content: center;
      align-items: center;

      .hero__image-wrapper {
        width: 100%;
        max-width: 380px;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
        border: 4px solid #ffffff;

        img {
          width: 100%;
          height: auto;
          display: block;
          border-radius: 0 !important;
        }
      }
    }
  }

  /* ======================================= */
  /* BENEFICIOS (CARDS) */
  /* ======================================= */

  .beneficios {
    margin: 40px 0;
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

    .beneficios__carta {
      background-color: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius);
      padding: 32px;
      box-shadow: var(--shadow-sm);
      transition: all 0.3s ease;

      &:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: rgba(37, 99, 235, 0.2);
      }

      :where(figure) {
        display: flex;
        flex-direction: column;
        gap: 16px;

        > h4 {
          display: flex;
          align-items: center;
          gap: 10px;
          font-family: var(--font-display);
          font-size: 18px;
          font-weight: 700;
          color: var(--text-primary);

          .beneficios__emoji {
            font-size: 24px;
          }
        }

        figcaption p {
          color: var(--text-secondary);
          font-size: 15px;
          line-height: 1.6;
        }
      }
    }
  }

  /* ======================================= */
  /* CARACTERÍSTICAS / FEATURES */
  /* ======================================= */

  .caracteristicas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 60px 0;

    .caracteristicas__info {
      display: flex;
      flex-direction: column;
      gap: 18px;
      color: var(--text-primary);

      .section__label {
        font-family: var(--font-display);
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--accent-secondary);
      }

      .section__title {
        font-family: var(--font-display);
        font-size: 32px;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -0.5px;
      }

      .section__text {
        font-size: 16px;
        color: var(--text-secondary);
        line-height: 1.65;
      }

      ul {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 10px;
      }

      ul li {
        list-style: none;
        position: relative;
        padding-left: 28px;
        font-size: 15px;
        color: var(--text-secondary);
        font-weight: 500;

        &::before {
          content: '✓';
          position: absolute;
          left: 0;
          top: 2px;
          width: 18px;
          height: 18px;
          background-color: var(--bg-accent-soft);
          color: var(--accent-color);
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 11px;
          font-weight: bold;
        }
      }
    }

    .caracteristicas__imagen {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
    }
  }

  .caracteristicas--reverse {
    direction: rtl;

    > * {
      direction: ltr;
    }
  }

  /* Visuales amigables de tecnología */
  .feature__visual {
    width: 100%;
    padding: 36px 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);

    .dns__diagram {
      display: flex;
      align-items: center;
      justify-content: space-around;
      gap: 10px;

      .dns__step {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;

        .dns__icon {
          width: 60px;
          height: 60px;
          border-radius: 14px;
          background-color: #ffffff;
          border: 1px solid var(--border-subtle);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 26px;
          box-shadow: var(--shadow-sm);
        }

        .dns__icon--shield {
          background-color: var(--bg-accent-soft);
          border-color: rgba(37, 99, 235, 0.15);
        }

        .dns__icon--check {
          background-color: #f0fdf4;
          border-color: rgba(16, 185, 129, 0.15);
        }

        span {
          font-size: 13px;
          font-weight: 600;
          color: var(--text-secondary);
        }
      }

      .dns__arrow {
        font-size: 20px;
        color: var(--text-muted);
        font-weight: bold;
      }
    }
  }

  .feature__visual--community {
    .community__grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;

      .community__card {
        padding: 20px;
        background-color: #ffffff;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);

        .community__card__icon {
          font-size: 26px;
          margin-bottom: 8px;
        }

        span {
          display: block;
          font-family: var(--font-display);
          font-size: 14px;
          font-weight: 700;
          color: var(--text-primary);
          margin-bottom: 4px;
        }

        p {
          font-size: 13px;
          color: var(--text-secondary);
          line-height: 1.5;
        }
      }
    }
  }

  /* ======================================= */
  /* CTA BANNERS (MÁS CÁLIDOS) */
  /* ======================================= */

  .banner__atencion,
  .banner__atencion-footer {
    max-width: 1080px;
    width: 100%;
    padding: 60px 40px;
    margin: 40px 0;
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    text-align: center;

    h3 {
      font-family: var(--font-display);
      color: var(--accent-secondary);
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.5px;
    }

    h2 {
      font-family: var(--font-display);
      color: var(--text-primary);
      font-size: 32px;
      font-weight: 800;
      line-height: 1.25;
      letter-spacing: -0.5px;
      max-width: 600px;
    }

    .banner__atencion__desc {
      color: var(--text-secondary);
      font-size: 16px;
      line-height: 1.6;
      max-width: 620px;
    }

    a {
      margin-top: 10px;
      padding: 12px 32px;
      background-color: var(--accent-color);
      color: #ffffff;
      font-size: 15px;
      font-weight: 600;
      text-decoration: none;
      border-radius: var(--radius-sm);
      transition: all 0.2s ease;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);

      &:hover {
        background-color: var(--accent-hover);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
      }
    }
  }

  /* ======================================= */
  /* FAQ (ACORDEÓN MÁS CERCANO) */
  /* ======================================= */

  .preguntas_frecuentes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 720px;
    padding: 60px 0;

    h2 {
      font-family: var(--font-display);
      font-size: 36px;
      font-weight: 800;
      color: var(--text-primary);
      text-align: center;
    }

    h4 {
      font-size: 16px;
      color: var(--text-secondary);
      text-align: center;
      line-height: 1.5;
      padding: 12px 0 24px;
    }

    .acordion {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 12px;

      .acordion__pregunta {
        color: var(--text-primary);
        cursor: pointer;
        padding: 20px 24px;
        width: 100%;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius);
        text-align: left;
        outline: none;
        font-family: var(--font-body);
        font-size: 16px;
        font-weight: 600;
        background-color: #ffffff;
        transition: all 0.2s ease;
        display: flex;
        justify-content: space-between;
        align-items: center;

        &:hover {
          background-color: var(--bg-secondary);
          border-color: var(--border-focus);
        }
      }

      .active {
        border-color: rgba(37, 99, 235, 0.3);
        background-color: var(--bg-secondary);
      }

      .acordion__pregunta:after {
        content: '\002B';
        color: var(--text-muted);
        font-weight: bold;
        font-size: 18px;
        transition: transform 0.2s ease;
      }

      .active:after {
        content: "\2212";
      }

      .acordion__respuesta {
        padding: 0 24px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease-out;

        & p {
          margin: 12px 0 20px;
          color: var(--text-secondary);
          font-size: 15px;
          line-height: 1.65;
        }
      }
    }
  }

  .banner__atencion-footer {
    background-color: var(--bg-accent-soft);
    border-color: rgba(37, 99, 235, 0.1);
  }
}

/* ======================================= */
/* PIE DE PÁGINA (FOOTER) */
/* ======================================= */
.footer {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  background-color: #ffffff;
  padding: 30px 20px;
  text-align: center;
}

.footer__container {
  max-width: 1080px;
  margin: 0 auto;
  
  p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
  }

  .footer__sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
  }
}

/* ======================================= */
/* BOTÓN VOLVER ARRIBA */
/* ======================================= */
#btnArriba {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  background-color: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
  z-index: 1000;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;

  svg {
    width: 22px;
    height: 22px;
  }

  &:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
  }
}

.show {
  display: flex !important;
  animation: fadeIn 0.4s ease;
}

/* ======================================= */
/* RESPONSIVE */
/* ======================================= */

@media (max-width: 1100px) {
  main {
    width: 100%;
    padding: 20px;

    .banner__principal {
      grid-template-columns: 1fr;
      gap: 40px;
      text-align: center;
      padding: 30px 0;

      .banner__principal__info {
        align-items: center;

        h1 { font-size: 38px; }
        h2 { font-size: 16px; }

        .banner__principal__btn {
          justify-content: center;
        }
      }

      .banner__principal__imagen {
        .hero__image-wrapper {
          max-width: 320px;
        }
      }
    }

    .beneficios {
      grid-template-columns: 1fr;
      gap: 20px;
    }

    .caracteristicas {
      grid-template-columns: 1fr;
      gap: 40px;
      padding: 30px 0;
    }

    .caracteristicas--reverse {
      direction: ltr;
    }

    .preguntas_frecuentes {
      width: 100%;
      padding: 30px 0;
    }

    .banner__atencion,
    .banner__atencion-footer {
      padding: 40px 20px;

      h2 { font-size: 26px; }
    }
  }

  .header__container {
    padding: 16px 20px;
  }

  .header__nav {
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .header__name {
    display: none; /* Oculta el texto largo del logo en móviles */
  }

  .header__nav {
    a:not(.header__nav-cta) {
      display: none; /* Oculta enlaces secundarios en móvil para simplificar */
    }
  }

  main {
    .banner__principal .banner__principal__info {
      h1 { font-size: 30px; }
    }

    .feature__visual .dns__diagram {
      flex-direction: column;
      gap: 14px;

      .dns__arrow {
        transform: rotate(90deg);
      }
    }

    .feature__visual--community .community__grid {
      grid-template-columns: 1fr;
    }

    .preguntas_frecuentes h2 {
      font-size: 28px;
    }

    .banner__atencion h2,
    .banner__atencion-footer h2 {
      font-size: 22px;
    }
  }
}