/* ═══════════════════════════════════════════
   WINCONTALLL PHP - ESTILOS BASADOS EN MAQUETA
   ═══════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --text: #0b1020;
  --blue-900: #0a1b4d;
  --blue-800: #0d2b7a;
  --blue-700: #103090;
  --blue-600: #165dff;
  --blue-500: #3b82f6;
  --blue-200: rgba(22, 93, 255, 0.10);
  --blue-100: rgba(22, 93, 255, 0.05);
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --container: 1200px;
  --header-h: 72px;
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* ─── Encabezado ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(10, 27, 77, 0.06);
  transition: box-shadow var(--transition-smooth), background var(--transition-smooth);
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 1px 0 rgba(10, 27, 77, 0.04),
    0 4px 24px rgba(11, 16, 32, 0.06);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

/* ─── Logo ─── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  z-index: 2;
  position: relative;
  text-decoration: none;
}

.logo__img {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  border-radius: 8px;
}

.logo:hover .logo__img {
  transform: scale(1.05);
  opacity: 0.9;
}

.logo__text {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--gray-600);
}

.logo__text strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue-900);
  line-height: 1.1;
}

.logo__text em {
  display: block;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: 0.02em;
  margin-top: 3px;
  line-height: 1.1;
}

/* ─── Navegación ─── */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--gray-600);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav__link::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2.5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition-smooth);
}

.nav__link:hover {
  color: var(--blue-800);
}

.nav__link:hover::before {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--blue-800);
  font-weight: 600;
}

.nav__link.is-active::before {
  transform: scaleX(1);
  height: 3px;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-600));
}

/* ─── Overlay del menú móvil ─── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(11, 16, 32, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Botón hamburguesa ─── */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(10, 27, 77, 0.08);
  background: rgba(10, 27, 77, 0.02);
  border-radius: 10px;
  padding: 10px 9px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-toggle:hover {
  background: rgba(22, 93, 255, 0.06);
  border-color: rgba(22, 93, 255, 0.18);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-900);
  transition: transform var(--transition-smooth), opacity var(--transition-fast);
  transform-origin: center;
}

.nav-toggle span:nth-child(2) {
  margin: 5px 0;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Main ─── */
.main-content {
  min-height: calc(100vh - var(--header-h) - 300px);
  padding: 40px 0;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

/* ─── Hero pequeño ─── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(16, 48, 144, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, #07132f 0%, #0a1b4d 25%, #0d2b7a 55%, #0b1f5c 100%);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 65%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 40px 0;
  text-align: center;
}

.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  margin-bottom: 12px;
}

.page-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.page-hero__title strong {
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-hero__subtitle {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 500px;
}

/* ─── Sección de contenido ─── */
.section {
  padding: 40px 0;
}

.section__heading {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-900);
  position: relative;
  padding-bottom: 20px;
}

.section__heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
}

.section__intro {
  margin: 16px auto 32px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--gray-600);
  max-width: 620px;
}

/* ─── Card ─── */
.card {
  background: #ffffff;
  border: 1px solid rgba(22, 93, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(11, 16, 32, 0.04),
    0 8px 32px rgba(11, 16, 32, 0.06);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.card__header {
  padding: 20px 28px;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  border-bottom: 1px solid rgba(22, 93, 255, 0.08);
  text-align: center;
}

.card__header-logo {
  height: 60px;
  width: auto;
  margin-bottom: 12px;
  border-radius: 8px;
}

.card__header-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -0.01em;
}

.card__body {
  padding: 28px;
}

/* ─── Tabla ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table thead th {
  padding: 14px 16px;
  background: var(--blue-900);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.data-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.data-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(22, 93, 255, 0.06);
  color: var(--gray-600);
  text-align: center;
}

.data-table tbody tr {
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: rgba(22, 93, 255, 0.04);
  color: var(--blue-800);
}

.data-table tbody tr:hover td {
  color: var(--blue-800);
}

/* ─── Formulario ─── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-900);
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(22, 93, 255, 0.15);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-control::placeholder {
  color: var(--gray-400);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ─── Botones ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 6px 20px rgba(22, 93, 255, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(22, 93, 255, 0.4);
}

.btn--secondary {
  color: var(--blue-700);
  background: rgba(22, 93, 255, 0.06);
  border: 1px solid rgba(22, 93, 255, 0.14);
}

.btn--secondary:hover {
  background: rgba(22, 93, 255, 0.1);
  border-color: rgba(22, 93, 255, 0.25);
  transform: translateY(-1px);
}

.btn--outline {
  color: var(--blue-700);
  background: transparent;
  border: 1.5px solid rgba(22, 93, 255, 0.2);
}

.btn--outline:hover {
  background: rgba(22, 93, 255, 0.05);
  border-color: rgba(22, 93, 255, 0.35);
  transform: translateY(-1px);
}

.btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn--danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.4);
}

.btn--success {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn--success:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Alertas ─── */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.alert--success {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert--error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert--info {
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.alert__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* ─── Footer ─── */
.footer {
  background: #070e24;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding: 60px 0 48px;
}

.footer__col-title {
  margin: 0 0 20px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer__logo {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer__logo-img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer__logo-text {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}

.footer__logo-text strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.1;
}

.footer__logo-text em {
  display: block;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
  margin-top: 3px;
  line-height: 1.1;
}

.footer__tagline {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 260px;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer__links a:hover {
  color: #93c5fd;
}

.footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__contact-list li svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.footer__contact-name {
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  padding-left: 0;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
}

.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.footer__copy {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__motto {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}

/* ─── Descarga ─── */
.download-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid rgba(22, 93, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(11, 16, 32, 0.03);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  margin-bottom: 12px;
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 93, 255, 0.1);
}

.download-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.08), rgba(22, 93, 255, 0.04));
  color: var(--blue-600);
}

.download-card__info {
  flex: 1;
}

.download-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue-900);
  word-break: break-all;
}

/* ─── Captcha ─── */
.captcha-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-wrapper img {
  border-radius: 8px;
  border: 1px solid rgba(22, 93, 255, 0.12);
}

/* ─── Responsive ─── */
@media (max-width: 940px) {
  .nav-overlay {
    display: block;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: fixed;
    right: 16px;
    top: calc(var(--header-h) + 10px);
    width: min(320px, calc(100vw - 32px));
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(10, 27, 77, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
      0 4px 8px rgba(11, 16, 32, 0.04),
      0 16px 48px rgba(11, 16, 32, 0.12);

    flex-direction: column;
    align-items: stretch;
    gap: 2px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transition:
      opacity var(--transition-smooth),
      transform var(--transition-smooth),
      visibility var(--transition-smooth);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .nav__link {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 500;
  }

  .nav__link::before {
    left: 18px;
    right: auto;
    bottom: 8px;
    width: 24px;
    transform: scaleX(0);
  }

  .nav__link.is-active::before,
  .nav__link:hover::before {
    transform: scaleX(1);
  }
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    padding: 48px 0 36px;
  }

  .footer__col--brand {
    grid-column: 1 / -1;
  }

  .footer__tagline {
    max-width: 100%;
  }

  .card__body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 32px);
  }

  .logo__img {
    height: 38px;
  }

  .logo__text {
    font-size: 10px;
  }

  .logo__text strong {
    font-size: 13px;
  }

  .nav {
    right: 8px;
    width: calc(100vw - 16px);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0 32px;
  }

  .footer__col--brand {
    grid-column: auto;
  }

  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .data-table {
    font-size: 0.78rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px 12px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .footer__grid {
    padding: 32px 0 28px;
    gap: 24px;
  }

  .footer__logo-img {
    width: 34px;
    height: 34px;
  }

  .footer__logo-text strong {
    font-size: 0.82rem;
  }

  .footer__col-title {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }

  .footer__links a {
    font-size: 0.82rem;
  }

  .footer__contact-list li {
    font-size: 0.82rem;
  }

  .footer__copy,
  .footer__motto {
    font-size: 0.72rem;
  }
}

/* Utilidades */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}