@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

/* =======================================================
   VARIABLES
======================================================= */

:root {
  --color-primary: #2563eb;
  --color-accent: #7c3aed;
  --color-primary-dark: #1e40af;

  --color-bg: #f8fafc;
  --color-white: #ffffff;
  --color-text: #0f172a;
  --color-text-light: #475569;
  --color-border: #e2e8f0;

  --radius: 14px;

  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =======================================================
   RESET
======================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =======================================================
   BASE
======================================================= */

body {
  font-family: "Inter", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: opacity 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
  opacity: 0.7;
}

/* =======================================================
   LAYOUT
======================================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 20px;
}

/* =======================================================
   TIPOGRAFÍA
======================================================= */

/* HEADINGS → Jakarta */

h1,
h2,
h3 {
  color: #334155;
  letter-spacing: -0.3px;
}

/* TAMAÑOS Y PESOS */

h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 16px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 18px;
}

h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* PÁRRAFOS → Inter */

p {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.8;
  letter-spacing: 0.1px;

  color: var(--color-text-light);
  margin-bottom: 14px;
}

.subtitle {
  font-size: 17px;
  color: var(--color-text-light);
  max-width: 650px;
  margin: 0 auto;
}

::selection {
  background: rgba(124, 58, 237, 0.2);
}

/* =======================================================
   HEADER
======================================================= */

.main-header {
  position: sticky;
  top: 0;

  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
  backdrop-filter: blur(6px);

  border-bottom: none;
  backdrop-filter: none;
  z-index: 1000;

  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */

.logo img {
  height: 100px;
  width: auto;
  display: block;
}

/* MENÚ */

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.dropbtn,
.nav-menu a {
  color: white;
}

.nav-menu a:hover,
.dropbtn:hover {
  opacity: 0.8;
}

/* =======================================================
   DROPDOWN ARREGLADO DEFINITIVO
======================================================= */

.dropdown {
  position: relative;
}

.dropbtn {
  cursor: pointer;
  font-weight: 600;
  color: white;
}

/* Quitamos el hueco que hacía que se cerrara */
.dropdown-content {
  position: absolute;
  top: 100%; /* pegado al botón */
  left: 0;
  margin-top: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-border);
  display: none;
  min-width: 220px;
  padding: 8px 0;
}

/* Zona invisible para que no haya corte */
.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

/* Mostrar menú cuando estamos en TODO el contenedor */
.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text);
}

.dropdown-content a:hover {
  background: #f1f5f9;
}

/* =======================================================
   SUBMENUS DEL DROPDOWN (CATEGORÍAS GENERADORES)
======================================================= */

.submenu {
  position: relative;
}

/* título de categoría */
.submenu-title {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

/* flecha lateral */
.submenu-title::after {
  content: "▸";
  opacity: 0.6;
}

/* hover categoría */
.submenu-title:hover {
  background: #f1f5f9;
}

/* submenú lateral */
.submenu-items {
  position: absolute;
  top: 0;
  left: 100%;

  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-border);

  display: none;

  min-width: 260px;
  padding: 8px 0;
}

/* mostrar submenu */
.submenu:hover .submenu-items {
  display: block;
}

.submenu-items a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text);
}

.submenu-items a:hover {
  background: #f1f5f9;
}

/* ===== BREADCRUMB LIMPIO Y ALINEADO ===== */

.breadcrumb-wrapper {
  width: 100%;
  background: transparent;
  border: none;
}

.breadcrumb {
  max-width: 1000px;
  margin: 20px auto 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 14px;
  color: #6b7280;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--color-primary);
}

.breadcrumb a:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* =======================================================
   HERO
======================================================= */

.hero {
  text-align: center;
  margin-bottom: 80px;
}

.hero h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;

  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =======================================================
   GENERADOR
======================================================= */

.generator-block {
  text-align: center;
  margin-bottom: 70px;
}

/* =======================================================
   RESULTADO QR
======================================================= */

#qr-result {
  margin-top: 30px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#qr-result img,
#qr-result canvas {
  padding: 16px;
  background: #ffffff;
  border-radius: 14px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

  transition: transform 0.2s ease;
}

#qr-result img:hover,
#qr-result canvas:hover {
  transform: scale(1.02);
}

#qr-result button {
  margin-top: 10px;
}

.tool-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.tool-box input {
  width: 100%;
  min-width: 0;
}

.tool-box button {
  white-space: nowrap;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 16px;
  color: #94a3b8;
  font-weight: 400;
}

input {
  flex: 1;
  padding: 14px 16px;

  border-radius: 12px;
  border: 1px solid var(--color-border);

  font-size: 16px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: var(--color-text);

  background: white;

  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

input:hover {
  transform: translateY(-1px);

  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
}

input:focus {
  outline: none;

  transform: translateY(-1px);

  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input::placeholder {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: #94a3b8;
}

button,
.primary-btn {
  padding: 13px 24px;
  border-radius: 12px;
  border: none;

  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );

  color: white;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0.2px;
  font-size: 16px;

  cursor: pointer;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

button:hover,
.primary-btn:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
}

/* =======================================================
   SECCIONES (ESPACIADO COHERENTE)
======================================================= */

section {
  margin-bottom: 90px;
}

.solutions-block,
.sector-block {
  margin-bottom: 80px;
}

.info {
  margin-top: 50px;
  width: 100%;
  max-width: 100%;
}

/* =======================================================
   CARDS
======================================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.card {
  background: var(--color-white);
  padding: 18px;
  border-radius: var(--radius);

  border: 1px solid var(--color-border);

  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;

  position: relative;
  overflow: hidden;
}

.card * {
  position: relative;
  z-index: 1;
}

.card:hover {
  cursor: pointer;
  transform: translateY(-6px);

  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    var(--color-primary),
    var(--color-accent)
  );

  opacity: 0;
  transition: opacity 0.3s ease;

  z-index: 0;
}

.card:hover::before {
  opacity: 0.08;
}

.card p {
  font-size: 14px;
  color: var(--color-text-light);
}

.card h3 {
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card:hover h3 {
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

/* =======================================================
   LISTAS
======================================================= */

.info ul,
.info ol {
  padding-left: 22px;
  margin-top: 14px;
}

.info li {
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--color-text-light);
}

/* =======================================================
   FOOTER
======================================================= */

.footer {
  margin-top: 90px;
  padding: 35px 20px;
  text-align: center;
  font-size: 17px;
  border-top: 1px solid var(--color-border);
  background: transparent;
}

.footer a {
  color: var(--color-text-light);
  margin: 0 10px;
}

.footer a:hover {
  color: var(--color-primary);
}

/* =======================================================
   PÁGINAS LEGALES (UNIFICADAS CON LA WEB)
======================================================= */

/* CONTENEDOR */

main.legal-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;

  font-size: 15px;
}

/* HERO */

main.legal-page .hero {
  margin-bottom: 40px;
}

/* SECCIONES */

main.legal-page section.info {
  margin-top: 20px;
}

main.legal-page section {
  margin-bottom: 40px;
}

/* TITULOS */

main.legal-page h1,
main.legal-page h2,
main.legal-page h3 {
  color: #334155;
  font-family: "Inter", sans-serif;
}

main.legal-page h2 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
}

main.legal-page h3 {
  font-size: 16px;
  margin-top: 14px;
  margin-bottom: 6px;
}

/* TEXTO */

main.legal-page p {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.75;
  margin-bottom: 10px;
}

/* LISTAS */

main.legal-page ul,
main.legal-page ol {
  padding-left: 20px;
  margin-top: 10px;
}

main.legal-page li {
  margin-bottom: 6px;
  color: var(--color-text-light);
}

/* =======================================================
   MENÚ MÓVIL
======================================================= */

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  background: transparent;
  border: none;
  padding: 6px 10px;
  line-height: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 86%;
  max-width: 360px;
  height: 100dvh;
  background: linear-gradient(
    180deg,
    var(--color-primary),
    var(--color-accent)
  );
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-panel {
  display: none;
  padding: 20px;
}

.mobile-panel.active {
  display: block;
}

.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.mobile-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;

  color: white;
  text-decoration: none;
  background: transparent;

  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

.mobile-link:focus,
.mobile-link:active,
.mobile-link:visited {
  color: white;
  background: transparent;
  outline: none;
}

.mobile-link,
.mobile-header,
.close-menu,
.back {
  color: white;
}

@media (hover: hover) {
  .mobile-link:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

button.mobile-link {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

button.mobile-link:hover {
  transform: none;
  box-shadow: none;
}

.has-next::after {
  content: "›";
  opacity: 0.7;
}

.close-menu,
.back {
  font-size: 22px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px 8px;
  width: auto;
  box-shadow: none;
}

.close-menu:hover,
.back:hover {
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .menu-toggle {
    display: block;
    font-size: 32px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }

  .container {
    padding: 40px 20px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
  }

  .logo img {
    height: 72px;
  }

  .tool-box {
    flex-direction: column;
  }

  .tool-box button,
  .tool-box .primary-btn {
    width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card {
    padding: 16px;
  }

  .card p {
    font-size: 14px;
  }
}
