:root {
  --navy: #101b32;
  --navy-dark: #091326;
  --navy-light: #1b2d4b;
  --gold: #e6c16e;
  --gold-light: #f7df9d;
  --bg: #f5f7fb;
  --ink: #1c2638;
  --muted: #778195;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, sans-serif;
}

/* HEADER */

header {
  min-height: 72px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 max(calc((100% - 1120px) / 2), 20px);
  gap: 12px;
}

.logo {
  background: var(--gold);
  color: var(--navy);
  padding: 13px;
  border-radius: 10px;
  font-weight: bold;
}

.brand {
  flex: 1;
}

.brand b,
.brand small {
  display: block;
}

.brand small {
  font-size: 10px;
  color: #b9c3d3;
  letter-spacing: 1px;
  margin-top: 4px;
}

.outline {
  background: transparent;
  border: 1px solid #8995a8;
  color: inherit;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

/* BOTONES */

.goldbtn {
  display: inline-block;
  background: var(--gold);
  color: #172239;
  text-decoration: none;
  border: 0;
  border-radius: 9px;
  padding: 13px 18px;
  font-weight: bold;
  cursor: pointer;
  transition: .2s ease;
}

.goldbtn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* HERO - RIFA PRO */

.hero {
  max-width: 1120px;
  margin: 34px auto;
  background: linear-gradient(120deg, #101b32, #294366);
  border-radius: 22px;
  color: white;
  padding: 38px 5%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 25px;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  max-width: 560px;
  margin: 12px 0;
}

.hero p {
  color: #d5ddeb;
}

.gold {
  color: var(--gold);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* VIDEO Y FOTOGRAFÍA */

.hero-gallery {
  width: 100%;
  height: 260px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  min-width: 0;
}

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid white;
  border-radius: 15px;
  box-shadow: 0 18px 38px #0006;
  min-width: 0;
}

.hero-photo-main {
  width: 100%;
  height: 100%;
  right: auto;
  top: auto;
  z-index: 2;
}

.hero-photo-secondary {
  width: 100%;
  height: 100%;
  left: auto;
  bottom: auto;
  z-index: 1;
}

/* BARRA DE PROGRESO EN EL HERO */

.hero .progress-card {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

/* TARJETA DE INFORMACIÓN DEL SORTEO */

.draw-card {
  position: relative;
  max-width: 1120px;
  margin: 0 auto 42px;
  padding: 30px 34px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #c69d48;
  background:
    radial-gradient(circle at top right, #34496b 0, transparent 42%),
    linear-gradient(120deg, #101b32, #1b2d4b);
  color: white;
  box-shadow: 0 12px 30px #101b3220;
}

.draw-decoration {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2px solid #e6c16e35;
  transform: rotate(45deg);
  pointer-events: none;
}

.draw-decoration-left {
  left: -55px;
  top: 25px;
}

.draw-decoration-right {
  right: -55px;
  bottom: 25px;
}

.draw-label {
  position: relative;
  color: var(--gold);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
}

.draw-card h2 {
  position: relative;
  margin: 10px 0 24px;
  font-size: clamp(22px, 3vw, 30px);
}

.draw-details {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.draw-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e6c16e55;
  border-radius: 12px;
  background: #ffffff0b;
}

.draw-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  background: #e6c16e20;
  font-size: 22px;
}

.draw-item small,
.draw-item strong,
.draw-item em {
  display: block;
}

.draw-item small {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.draw-item strong {
  font-size: 14px;
  line-height: 1.4;
}

.draw-item em {
  color: #bdc8d9;
  font-size: 11px;
  font-style: normal;
  margin-top: 3px;
}

.draw-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: #e4eaf3;
  font-size: 13px;
}

.draw-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px #e6c16e;
}

/* SECCIONES GENERALES */

main > section:not(.hero) {
  max-width: 1120px;
  margin: 0 auto 42px;
}

/* TABLERO DE NÚMEROS */

#numbers {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid #b78c3d;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at top left, #263d60 0, transparent 42%),
    linear-gradient(135deg, #101b32, #091326);
  box-shadow: 0 14px 32px #101b3225;
  color: white;
}

.board-decoration {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px solid #e6c16e25;
  transform: rotate(45deg);
  pointer-events: none;
}

.board-decoration-left {
  top: 25px;
  left: -65px;
}

.board-decoration-right {
  bottom: 20px;
  right: -65px;
}

#numbers .heading {
  position: relative;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
  gap: 20px;
}

.heading h2,
.contact h2 {
  margin: 8px 0;
}

#numbers .heading h2 {
  color: white;
}

#numbers .heading p {
  color: #c4cede;
}

.heading p,
.contact p {
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  flex-wrap: wrap;
  color: #e6eaf1;
}

/* CUADRÍCULA */

.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.number {
  border: 1px solid #d6b66f;
  background: #f8fafc;
  border-radius: 9px;
  padding: 14px 2px;
  color: #21865f;
  font-weight: bold;
  cursor: pointer;
  transition: .18s ease;
}

.number:hover:not(:disabled) {
  background: #fff0c4;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #e6c16e55;
}

.number.reserved {
  background: #fff7e6;
  color: #9b6a12;
  border-color: #f0d79d;
  cursor: not-allowed;
}

.number.sold {
  background: #fff0f1;
  color: #b83d49;
  border-color: #f1c7cc;
  cursor: not-allowed;
}

.number:disabled {
  opacity: 1;
}

.number.selected {
  background: #dff5e8;
  color: #116b42;
  border: 2px solid #15945a;
  box-shadow: 0 0 0 2px #15945a55;
}

.selection-count {
  position: relative;
  font-weight: 800;
  margin: 16px 0 10px;
  color: white;
}

#continueReserve {
  position: relative;
  margin: 0 0 22px;
}

#continueReserve:disabled {
  opacity: .45;
  cursor: not-allowed;
}

#loading {
  color: #e6c16e;
}

/* CONTACTO */

.contact {
  background: white;
  border: 1px solid #e7ebf0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact a {
  display: inline-block;
  background: #e9f8ef;
  color: #176f43;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin: 3px;
}

/* FOOTER */

footer {
  text-align: center;
  color: #8992a1;
  padding: 20px;
  font-size: 12px;
}

/* MODALES */

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: #071020aa;
  z-index: 5;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.backdrop.show {
  display: flex;
}

.modal {
  position: relative;
  background: white;
  padding: 28px;
  border-radius: 16px;
  width: min(440px, 100%);
  max-height: 92vh;
  overflow: auto;
}

.modal.wide {
  width: min(900px, 100%);
}

.x {
  position: absolute;
  right: 14px;
  top: 8px;
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
  color: #758096;
}

.modal label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin: 13px 0;
}

.modal input,
.modal select {
  display: block;
  width: 100%;
  padding: 11px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  margin-top: 6px;
}

.modal form > .goldbtn {
  width: 100%;
  margin-top: 8px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
}

/* ADMINISTRACIÓN */

.adminhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 20px 0;
}

.stats div {
  background: #f3f5f9;
  padding: 13px;
  border-radius: 9px;
  font-size: 12px;
}

.stats strong {
  display: block;
  font-size: 23px;
  margin-top: 6px;
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.formgrid button {
  margin: 12px 0;
}

.tablewrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

td,
th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e8ebf0;
}

.act {
  border: 0;
  padding: 7px;
  border-radius: 6px;
  margin: 2px;
  cursor: pointer;
}

.paid {
  background: #e5f6ec;
  color: #176f43;
}

.del {
  background: #fff0f1;
  color: #b83d49;
}

.passform {
  display: flex;
  gap: 8px;
}

.passform input {
  flex: 1;
  min-width: 0;
}

/* NOTIFICACIONES */

#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #15243d;
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  opacity: 0;
  transition: .2s;
  z-index: 10;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* RESPONSIVE */

@media (max-width: 700px) {

 .hero {
  margin: 14px;
  padding: 25px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

  /* VIDEO Y FOTOGRAFÍA EN CELULARES */

.hero-gallery {
  width: 100%;
  height: 220px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
  min-width: 0;
}

.hero-photo-main,
.hero-photo-secondary {
  position: relative;
  width: 100%;
  height: 100%;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  object-fit: cover;
  border: 2px solid white;
  border-radius: 12px;
}

/* BARRA DE PROGRESO */

.hero .progress-card {
  grid-column: 1;
  width: 100%;
  margin: 0;
  padding: 17px;
}

  .hero > div:first-child {
    position: relative;
    z-index: 3;
  }

  .draw-card {
    margin: 0 14px 30px;
    padding: 24px 18px;
  }

  .draw-details {
    grid-template-columns: 1fr;
  }

  .draw-item {
    padding: 13px;
  }

  #numbers {
    margin-left: 14px !important;
    margin-right: 14px !important;
    padding: 22px 14px;
  }

  .heading,
  .contact {
    display: block;
    margin-left: 14px !important;
    margin-right: 14px !important;
  }

  #numbers .heading {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .legend {
    margin-top: 14px;
  }

  .grid {
    grid-template-columns: repeat(5, 1fr);
    margin: 0 4px;
  }

  .number {
    padding: 15px 2px;
  }

  .contact > div + div {
    margin-top: 16px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .formgrid {
    grid-template-columns: 1fr;
  }

  .passform {
    flex-direction: column;
  }
}
/* =========================================
   RIFA PRO - INFORMACIÓN DEL SORTEO PREMIUM
========================================= */

.draw-card {
    display: grid !important;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 28px;
    align-items: stretch;

    max-width: 1120px !important;
    margin: 25px auto 40px !important;
    padding: 25px !important;

    background: linear-gradient(
        135deg,
        #101b32,
        #263e61
    ) !important;

    border: 2px solid #e6c16e !important;
    border-radius: 20px !important;
    color: white !important;

    box-shadow: 0 12px 30px rgba(16,27,50,.20);
}

/* COLUMNA IZQUIERDA */

.draw-left {
    padding: 12px;
    min-width: 0;
}

.draw-label {
    color: #e6c16e !important;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
}

.draw-left h2 {
    color: white !important;
    font-size: 25px;
    margin: 12px 0 22px;
}

.draw-details {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}

.draw-item {
    display: flex !important;
    align-items: center;
    gap: 15px;

    min-height: 75px;
    padding: 15px !important;

    border-radius: 12px !important;
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(230,193,110,.45) !important;
}

.draw-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    background: rgba(230,193,110,.16);

    font-size: 23px;
}

.draw-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.draw-info small {
    color: #e6c16e;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.draw-info strong {
    color: white;
    font-size: 15px;
}

.draw-info span {
    color: #cbd5e1;
    font-size: 11px;
}

/* COLUMNA DERECHA */

.draw-right {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 25px 18px;
    min-width: 0;

    border-radius: 16px;
    border: 1px solid #e6c16e;

    background:
        radial-gradient(
            circle at top,
            #526384,
            transparent 65%
        ),
        linear-gradient(
            145deg,
            #172a49,
            #091326
        );
}

.ticket-decoration {
    position: absolute;
    right: 18px;
    top: 10px;

    font-size: 45px;
    color: #e6c16e;
    opacity: .25;
}

.ticket-icon {
    font-size: 43px;
    margin-bottom: 10px;
}

.ticket-label {
    color: #e6c16e;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.draw-right h3 {
    color: white;
    font-size: 25px;
    line-height: 1.15;
    margin: 12px 0 20px;
}

.ticket-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 13px 22px;

    border: 1px solid #e6c16e;
    border-radius: 12px;
    background: rgba(230,193,110,.12);
}

.ticket-date strong {
    color: #e6c16e;
    font-size: 48px;
    line-height: 1;
}

.ticket-date div {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 4px;
}

.ticket-date b {
    color: white;
    font-size: 13px;
}

.ticket-date span {
    color: #e6c16e;
    font-size: 12px;
}

.draw-right p {
    color: #dce4ef;
    font-size: 12px;
    margin: 18px 0;
}

.ticket-button {
    display: inline-block;

    background: #e6c16e;
    color: #101b32;

    text-decoration: none;
    padding: 12px 17px;
    border-radius: 8px;

    font-size: 11px;
    font-weight: bold;

    transition: .2s ease;
}

.ticket-button:hover {
    background: #f7df9d;
    transform: translateY(-2px);
}

/* RESPONSIVE - TABLET Y CELULAR */

@media (max-width: 750px) {

    .draw-card {
        grid-template-columns: 1fr;
        gap: 18px;

        margin: 20px 14px 30px !important;
        padding: 15px !important;
    }

    .draw-left {
        padding: 8px 3px;
    }

    .draw-left h2 {
        font-size: 21px;
    }

    .draw-item {
        min-height: 75px;
    }

    .draw-right {
        min-height: 300px;
    }

}
/* =====================================
   RIFA PRO - COLORES DEFINITIVOS
===================================== */

/* DISPONIBLES: BLANCO + NEGRO */
#numbers .number:not(.reserved):not(.sold):not(.selected) {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #D6B66F !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* APARTADOS: ROJO + NEGRO */
#numbers .number.reserved {
    background: #FF0000 !important;
    color: #000000 !important;
    border: 1px solid #B00000 !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* VENDIDOS: VERDE + NEGRO */
#numbers .number.sold {
    background: #00C853 !important;
    color: #000000 !important;
    border: 1px solid #008F3A !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* SELECCIONADO */
#numbers .number.selected {
    background: #00F078 !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* EVITAR TRANSPARENCIAS */
#numbers .number:disabled {
    opacity: 1 !important;
    filter: none !important;
}

/* ==========================================
   RIFA PRO - COLORES DEFINITIVOS DEL TABLERO
========================================== */

/* DISPONIBLES: FONDO BLANCO Y NÚMERO NEGRO */
#numbers .grid button.number:not(.reserved):not(.sold):not(.selected) {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 2px solid #D6B66F !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* APARTADOS: FONDO ROJO Y NÚMERO NEGRO */
#numbers .grid button.number.reserved {
    background: #FF0000 !important;
    color: #000000 !important;
    border: 2px solid #C90000 !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* VENDIDOS: FONDO VERDE Y NÚMERO NEGRO */
#numbers .grid button.number.sold {
    background: #00C853 !important;
    color: #000000 !important;
    border: 2px solid #008F3A !important;
    font-weight: 900 !important;
    opacity: 1 !important;
}

/* SELECCIONADOS: VERDE BRILLANTE Y NÚMERO NEGRO */
#numbers .grid button.number.selected {
    background: #00F078 !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
    font-weight: 900 !important;
    opacity: 1 !important;
    box-shadow: 0 0 0 2px #00F078 !important;
}

/* EVITAR CAMBIOS DE COLOR POR DESHABILITACIÓN */
#numbers .grid button.number:disabled {
    opacity: 1 !important;
    filter: none !important;
    cursor: not-allowed !important;
}
/* =================================
   BARRA DE PROGRESO RIFA PRO
================================= */

.progress-card {
  width: 100%;
  margin: 22px 0;
  padding: 22px;
  background: linear-gradient(145deg, #101b32, #091326);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  box-sizing: border-box;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.progress-header small {
  color: #d4af37;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.progress-header h3 {
  color: #fff;
  margin: 6px 0 0;
  font-size: 18px;
}

.progress-header strong {
  color: #e4bd54;
  font-size: 28px;
}

.progress-track {
  width: 100%;
  height: 13px;
  background: #26334a;
  border-radius: 30px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #b68a27, #ffe28a);
  border-radius: 30px;
  transition: width 1s ease;
}

.progress-details {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  color: #dce3ef;
  font-size: 13px;
}

.progress-details b {
  color: #e4bd54;
}

@media (max-width: 480px) {
  .progress-card {
    padding: 17px;
  }

  .progress-header h3 {
    font-size: 16px;
  }

  .progress-header strong {
    font-size: 24px;
  }

  .progress-details {
    font-size: 11px;
  }
}
/* =================================
   RIFA PRO - CORRECCIÓN HERO
================================= */

.hero {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 260px auto;
  align-items: stretch;
  gap: 25px;
  padding: 38px 5%;
  overflow: hidden;
}

.hero > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.hero-gallery {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 260px;
  min-width: 0;
}

.hero .progress-card {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin-top: 18px;
  margin-bottom: 0;
  position: relative;
  z-index: 3;
}

/* CELULARES */

@media (max-width: 700px) {

  .hero {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    padding: 25px 18px;
    margin: 14px;
  }

  .hero > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-gallery {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 220px;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-photo-main,
  .hero-photo-secondary {
    position: relative;
    width: 100%;
    height: 220px;
    inset: auto;
    object-fit: cover;
  }

  .hero .progress-card {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    margin: 0;
    padding: 17px;
  }
}
/* CORRECCIÓN DE SUPERPOSICIÓN - SOLO COMPUTADOR */
@media (min-width: 701px) {
  .hero {
    grid-template-rows: minmax(280px, auto) auto !important;
    row-gap: 30px !important;
  }

  .hero .progress-card {
    grid-row: 2 !important;
    grid-column: 1 / -1 !important;
    align-self: start !important;
    margin-top: 0 !important;
  }
}
