

/* ------- VARIABLES CSS PARA EL FESTIVAL VALLENATO -------*/

:root {
  /* ==========================================
     PALETA DE COLORES - FESTIVAL VALLENATO
     ========================================== */
  --bg-primary: #0d0f12;       /* Fondo principal oscuro ultra profundo */
  --bg-secondary: #161a22;     /* Fondo secundario para tarjetas y contenedores */
  --bg-glass: rgba(22, 26, 34, 0.75); /* Efecto vidrio translúcido */
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-gold: #d4af37;      /* Dorado principal elegante */
  --accent-gold-light: #f3e5ab;/* Dorado claro para brillos y hovers */
  --accent-gold-dark: #997a15; /* Dorado oscuro para sombras o contrastes */
  --accent-ochre: #c28e38;     /* Ocre cálido de acento */
  --accent-red: #c92a2a;       /* Rojo vibrante para alertas o botones de acción */
  
  --text-main: #f8f9fa;        /* Texto principal (blanco suave) */
  --text-muted: #9ba1a6;       /* Texto secundario (gris atenuado) */
  
  --border-color: rgba(212, 175, 55, 0.25); /* Bordes sutiles con destello dorado */
  
  /* ==========================================
     TIPOGRAFÍA
     ========================================== */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* ==========================================
     BORDES Y RADIOS (BORDER RADIUS)
     ========================================== */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  
  /* ==========================================
     SOMBRAS Y EFECTOS GLOW
     ========================================== */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-gold-glow: 0 0 20px rgba(212, 175, 55, 0.25);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ==========================================
     LAYOUT Y TOKENS DE ESCALADO
     ========================================== */
  --content-max: 1200px;      /* Ancho maximo del shell de contenido */
  --content-narrow: 720px;    /* Bloques de lectura (hero, forms)   */
  --gutter: 20px;             /* Padding lateral minimo (movil)    */

  /* ==========================================
     BREAKPOINTS
     Las custom properties NO son usables dentro
     de @media, asi que se declaran aqui solo como
     documentacion y se usan en crudo mas abajo:
       768px  -> tablet vertical
       1024px -> tablet apaisado
       1100px -> escritorio (grid de 4 columnas)
     ========================================== */
}

/* ----------- Variables CSS END -------------*/

/* ==========================================
   RESET DE ESTILOS Y BOX-SIZING
   ========================================== */


*, *::before, *::after {
  box-sizing: border-box;
}

body, article, section, header, footer, nav, main {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

body{
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   COMPONENTE: BOTONES
   ========================================== */

.btn,
.voting-button a,
.login-fields input[type="submit"],
.register-fields input[type="submit"] {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 44px;
   padding: 10px 24px;
   background-color: var(--accent-gold);
   color: var(--bg-primary);
   border: 1px solid transparent;
   border-radius: var(--radius-pill);
   font-family: inherit;
   font-size: 1rem;
   font-weight: 600;
   line-height: 1.2;
   text-align: center;
   text-decoration: none;
   white-space: nowrap;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--accent-ochre);
      color: var(--bg-primary);
      transform: translateY(-1px);
   }

   &:active {
      transform: translateY(0);
   }

   &:focus-visible {
      outline: 2px solid var(--accent-gold-light);
      outline-offset: 3px;
   }
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */

.container {
  margin: 0 auto;
  max-width: var(--content-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ==========================================
   ESTILOS DEL HEADER VAR
   ========================================== */

.header-var {

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-primary);
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-gold);
    padding-inline: max(var(--gutter), (100% - var(--content-max)) / 2);
}

.header-title h2 {
    font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo img {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.login-button {
   flex-shrink: 0;

   a {
      background-color: var(--bg-secondary);
      color: var(--accent-gold-light);
      border: 1px solid var(--border-color);
      padding: 10px 20px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: var(--transition-smooth);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;

      &:hover {
         background-color: var(--accent-ochre);
         color: var(--bg-primary);
      }

      &:focus-visible {
         outline: 2px solid var(--accent-gold-light);
         outline-offset: 3px;
      }
   }
}


/*----------- ESTILOS DEL MAIN CONTENT -------------*/

.main-content {
    width: 100%;
    max-width: var(--content-max);
    margin: clamp(24px, 4vw, 48px) auto;
    padding-inline: var(--gutter);
    flex: 1;
}

/* ==========================================
   ESTILOS DE LA SECCIÓN DE VOTACIONES
   ========================================== */

.voting-section {

   background-color: var(--bg-secondary);
   padding: clamp(24px, 5vw, 56px) clamp(20px, 4vw, 64px);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-gold-glow);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   margin: 0px auto;
   width: 100%;


   h1 {
        color: var(--accent-gold-light);
        font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
        line-height: 1.1;
        margin-bottom: 0;
   }

   h2 {
        color: var(--accent-gold);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 5px 12px;
        background-color: var(--bg-glass);
        text-shadow: 0 0 10px var(--accent-gold-dark);
        font-size: 1rem;
        line-height: 1.4;
        width: fit-content;
        max-width: 100%;
   }

   > p {
        max-width: 65ch;
        color: var(--text-muted);
        line-height: 1.65;
        margin: 0;
   }

   .voting-button {
      margin-top: clamp(20px, 3vw, 32px);
   }

}

/* ==========================================
   ESTILOS DE LA SECCIÓN DE CATEGORÍAS
   ========================================== */

   .categories-section {
      margin-top: clamp(40px, 6vw, 72px);
      padding: 0px;
   }

   .categories-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      margin-bottom: clamp(20px, 3vw, 32px);
      color: var(--accent-gold);
      flex-wrap: wrap;

      h2 {
         font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
         line-height: 1.2;
      }

      a{
         color: var(--accent-gold-light);
         text-decoration: none;
         transition: var(--transition-smooth);
         font-weight: 500;
         white-space: nowrap;

         &:hover {
            color: var(--accent-ochre);
            text-decoration: underline;
         }

         &:focus-visible {
            outline: 2px solid var(--accent-gold-light);
            outline-offset: 3px;
         }
      }
   }

  
   .categories-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: clamp(16px, 4vw, 20px);
      max-width: none;
      width: 100%;
   }

   .category-card {
      background-color: var(--bg-secondary);
      padding: 15px;
      border-radius: var(--radius-md);
      border: 1px solid transparent;
      box-shadow: var(--shadow-card);
      transition: var(--transition-smooth);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      text-align: center;

      &:hover {
         box-shadow: var(--shadow-gold-glow);
         border-color: var(--border-color);
         transform: translateY(-5px);
      }

      img {
         width: 100%;
         height: auto;
         aspect-ratio: 16 / 9;
         object-fit: cover;
         border-radius: var(--radius-md);
         margin-bottom: 15px;
      }

      h3 {
         color: var(--accent-gold-light);
         margin-bottom: 10px;
         font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
         line-height: 1.3;
      }

      p {
         color: var(--text-muted);
         margin: 0;
      }

      .category-footer {
         margin-top: auto;
         padding-top: 15px;
         width: 100%;

         .btn {
            width: 100%;
         }
      }
   }

   
/*----------- MAIN CONTENT END -------------*/

/* ---------- ESTILOS DEL FOOTER NAVBAR -------------*/

.footer-var {
   background-color: var(--bg-primary);
   color: var(--accent-gold);
}

.footer-nav {
   position: fixed;
   bottom: 0;
   left: 0;
   right: 0;
   width: 100%;
   z-index: 1000;
   background-color: var(--bg-secondary);
   border-top: 1px solid var(--border-color);
   color: var(--accent-gold-light);
   padding: 15px 0;
}

.footer-menu {
   list-style: none;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-wrap: wrap;
   gap: 10px;
   margin: 0;
   padding: 0 1rem;
}

.footer-item a {
   color: var(--accent-gold-light);
   text-decoration: none;
   transition: var(--transition-smooth);
   font-size: 0.9rem;
   font-weight: 500;
   display: inline-flex;
   align-items: center;
   min-height: 30px;

   &:hover {
      color: var(--accent-ochre);
      text-decoration: underline;
   }

   &:focus-visible {
      outline: 2px solid var(--accent-gold-light);
      outline-offset: 3px;
   }
}


body {
    padding-bottom: 60px;
}


/* ---------- END FOOTER VAR -------------*/




/*--------- Login Page Styles --------*/

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: clamp(24px, 5vw, 50px);
}

.login-form {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 400px;
}
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-muted);
}


.login-fields {
   display: flex;
   flex-direction: column;
   gap: 15px;
}

.form-control {
   padding: 10px;
   min-height: 44px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   background-color: var(--bg-primary);
   color: var(--text-main);
   font-family: inherit;
   font-size: 1rem;
   transition: var(--transition-smooth);

   &:focus-visible {
      outline: 2px solid var(--accent-gold-light);
      outline-offset: 1px;
      border-color: var(--accent-gold);
   }
}

.login-footer {
   text-align: center;
   margin-top: 20px;
}

.login-footer a,
.register-footer a {
   color: var(--accent-gold-light);
   min-height: 44px;
   display: inline-flex;
   align-items: center;

   &:hover {
      color: var(--accent-ochre);
   }
}

/*--------- Login Page END --------*/

/* -------- Register Page Styles --------*/

.register-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: clamp(24px, 5vw, 50px);
}

.register-form {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 400px;
}

.register-header {
    text-align: center;
    margin-bottom: 20px;
}

.register-header h1 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.register-header p {
    color: var(--text-muted);
}

.register-fields {
   display: flex;
   flex-direction: column;
   gap: 15px;
}

.register-footer {
    text-align: center;
    margin-top: 20px;
}

/* -------- Register Page END --------*/

/*-------- Categorias Page Styles --------*/

.categorias-container {
    flex: 1;
    padding: 0px;
    margin: 0px;
}

.categorias-wrapper {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   align-items: stretch;
   justify-content: center;
   width: 100%;
   max-width: var(--content-max);
   margin-inline: auto;
   padding: var(--gutter);
   gap: clamp(14px, 2vw, 20px);
}

.categorias-header{
   text-align: center;
   padding: 5px 20px;

   h1{
      color: var(--accent-ochre);
      font-size: 1.5rem;
   }

   p{
      color:var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.5;
   }

}

.tarjeta-categoria{
   display: flex;
   flex-direction: column;
   flex: 1 1 320px;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   text-align: center;
   color: var(--accent-gold);
   background-color: var(--bg-secondary);
   border: 1px solid transparent;
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-card);
   cursor: pointer;
   padding: clamp(18px, 3vw, 26px);
   margin: 4px;
   transition: var(--transition-smooth);

   &:hover {
      box-shadow: var(--shadow-gold-glow);
      border-color: var(--border-color);
      transform: translateY(-3px);
   }

   &:focus-within {
      box-shadow: var(--shadow-gold-glow);
      border-color: var(--border-color);
   }
}

.tarjeta-categoria > div {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: clamp(72px, 18vw, 88px);
   height: clamp(72px, 18vw, 88px);
   flex-shrink: 0;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   background-color: var(--bg-glass);
   box-shadow: var(--shadow-gold-glow);
}

.card-header {
   display: flex;
   flex-direction: column;
   gap: 8px;
   flex: 1 1 auto;
}

.card-header h2 {
   color: var(--accent-gold);
   font-size: 1.3rem;
   margin: 0;
}

.card-header p {
   color: var(--text-muted);
   font-size: 0.9rem;
   line-height: 1.4;
   margin: 0;
}

.card-footer {
   width: 100%;
   margin-top: auto;
   padding-top: 8px;
}

.card-footer a {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   color: var(--accent-gold-light);
   background-color: transparent;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   text-decoration: none;
   min-height: 44px;
   padding: 10px 24px;
   transition: var(--transition-smooth);

   &:hover {
      color: var(--accent-ochre);
      border-color: var(--accent-ochre);
      background-color: var(--bg-glass);
   }

   &:focus-visible {
      outline: 2px solid var(--accent-gold-light);
      outline-offset: 3px;
   }
}


/* ==========================================
         media queries desktop + Tablet mode
   ========================================== */

/* ---------- TABLET (>= 768px) ---------- */
@media (min-width: 768px) {

   /* Grid de categorias: de 2 a 3 columnas */
   .categories-grid {
      grid-template-columns: repeat(3, 1fr);
   }

   .voting-section {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      text-align: left;
      column-gap: clamp(24px, 4vw, 64px);
      row-gap: 12px;
   }

   .voting-section h2,
   .voting-section h1,
   .voting-section > p {
      grid-column: 1;
   }

   .voting-section .voting-button {
      grid-column: 2;
      grid-row: 1 / span 3;
      margin-top: 0;
      justify-self: end;
   }


   .footer-nav {
      position: static;
      margin-top: auto;
      padding-block: 22px;
      padding-inline: max(var(--gutter), (100% - var(--content-max)) / 2);
   }

   .footer-menu {
      flex-wrap: nowrap;
      gap: clamp(20px, 4vw, 48px);
   }

   .footer-item a {
      font-size: 0.95rem;
   }


   body {
      padding-bottom: 0;
   }
}

/* ---------- TABLET (1024px) ---------- */
@media (min-width: 1024px) {
   .login-form,
   .register-form {
      padding: 40px;
   }
}

/* ---------- ESCRITORIO (1100px) ---------- */
@media (min-width: 1100px) {
   .categories-grid {
      grid-template-columns: repeat(4, 1fr);
      gap: clamp(20px, 2vw, 28px);
   }

   .category-card {
      padding: 20px;
   }
}

/* ---------- PANTALLAS MUY ANCHAS (1400px) ----------*/
@media (min-width: 1400px) {
   .voting-section {
      padding-block: clamp(48px, 5vw, 72px);
   }
}

/*----------------- Estilos de Sección de Votaciónes disponibles ------------*/

.votaciones-section {
   margin: 0px 20px;

   h1 {
      color: var(--accent-gold-light);
   }
}

.votaciones-header {
   text-align: center;
   margin-bottom: 20px;

   h1 {
      color: var(--accent-gold-light);
      margin-bottom: 10px;
   }
   
   p{
      color: var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.5;
      max-width: 420px;
      margin: 0px auto;
   }
}

/*==================================
 Lista y tarjetas de votaciones
=========================*/

.votaciones-lista{
   display: flex ;
   flex-direction: column;
   gap: 20px;
   max-width: 520px;
   margin: 0px auto;
}

.tarjeta-votaciones {
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-card);
   padding: 20px;
   display: flex;
   flex-direction: column;
   gap: 12px;
   text-align: left;
   transition: var(--transition-smooth);

   &:hover {
      box-shadow: var(--shadow-gold-glow);
      transform: translateY(-3px);
   }
}

.votacion-encabezado {
   display: flex;
   align-items: flex-start;
   flex-direction: column;
   gap: 8px;

   h2{
      color: var(--accent-gold);
      font-size: 1.15rem;
   }
}

.votacion-descripcion {
   color: var(--text-muted);
   font-size: 0.9rem;
   line-height: 1.5;
}

.votacion-meta {
   list-style: none;
   margin: 0px;
   padding: 0px;
   display: flex;
   flex-direction: column;
   gap: 6px;

   li {
      display: flex;
      flex-direction: row;
      gap: 8px;
      color: var(--text-muted);
      font-size: 0.8rem;
   }
}

.votacion-acciones {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   gap: 10px;
   margin-top: 5px;
}

@media (min-width: 640px) {
   .votaciones-lista{
      display: grid;
      grid-template-columns: 1fr 1fr;
      max-width: 900px;
   }
}

/*----------------- END Sección de Votaciónes disponibles ------------*/

/*--------- Botones de acción ---------*/

.btn-votar {
   background-color: var(--accent-gold);
   color: var(--bg-primary);
   border: none;
   padding: 10px 20px;
   border-radius: var(--radius-pill);
   font-weight: bold;
   font-size: 0.9rem;
   text-align: center;
   text-decoration: none;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--accent-ochre);
      color: var(--bg-primary);
   }
}

.btn-secundario {
   background-color: transparent;
   color: var(--accent-gold-light);
   border: 1px solid var(--border-color);
   padding: 10px 20px;
   border-radius: var(--radius-pill);
   font-weight: 500;
   font-size: 0.9rem;
   text-align: center;
   text-decoration: none;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--bg-glass);
      border-color: var(--accent-ochre);
      color: var(--accent-ochre);
   }
}

.btn-deshabilitado {
   opacity: 0.45;
   pointer-events: none;
}
/*--------- Botones de acción END ---------*/

/*--------- volver atrar ---------*/

.volver-atras {
   margin: 20px;

   a {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-muted);
      font-size: 0.85rem;
      text-decoration: none;
      transition: var(--transition-smooth);

      &:hover {
         color: var(--accent-gold-light);
      }
   }
}

/*--------- volver atrar END ---------*/

/*--------- TARJETA DETALLES DE VOTACIÓN ---------*/
.detalles-content {
   display: flex;
   flex-direction: column;
   align-items: center

}
.detalles-article {
   display: flex;
   flex-direction: column;
   justify-content: center;
   max-width: 640px;
   border: 1px solid var(--border-color);
   box-shadow: var(--shadow-card);
   border-radius: var(--radius-lg);
   padding: 20px;
   margin: auto 10px;
}

.detalles-header {
   h1{
      color: var(--accent-ochre);
      font-size: 1.5rem; 
   }

   p {
      color: var(--accent-gold-light);
      font-size: 0.9rem;
      line-height: 1.5;
   }
}


.detalles-description {
   color: var(--text-muted);
   font-size: 0.8rem;
   line-height: 1.5;
   text-wrap: wrap;
}

.detalle-info {
   display: flex;
   flex-direction: column;
   gap: 6px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 20px;
}

.detalle-dato {
   color: var(--text-main);
   font-size: 0.85rem;
   line-height: 1.4;
   border-bottom: 0.1px solid var(--border-color);
}

.detalle-reglas {
   display: flex;
   flex-direction: column;
   margin-bottom: 20px;
   
   h2 {
      color: var(--accent-gold);
      font-size: 1.3rem;
      padding: 0px;
      margin: auto 0px;
   }

   ul {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 10px;

      li {
         color: var(--text-muted);
         font-size: 1rem;
         line-height: 1;
      }
   }
}

/*--------- TARJETA DETALLES DE VOTACIÓN END---------*/

/*----------------- ESTILOS PAGINA DONDE SER ELIGE EL VOTO ------------*/

.votar-section {
   max-width: 640px;
   margin: 0px auto;
   display: flex;
   flex-direction: column;
   gap: 20px;
   padding: 12px;
}

.votar-header {

   h1 {
      color: var(--accent-gold-light);
      margin: 10px 0px 5px;
   }

   p {
      color: var(--text-muted);
      font-size: 0.9rem;
   }
}

.votar-form {
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-card);
   padding: 20px;
}

.opciones-lista {
   border: none;
   margin: 0px;
   padding: 0px;
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.opciones-legend {
   color: var(--accent-gold);
   font-size: 1rem;
   font-weight: bold;
   margin-bottom: 12px;
   padding: 0px;
}

.opcion-voto {
   position: relative;
   display: flex;
   flex-direction: row;
   align-items: center;
   gap: 12px;
   background-color: var(--bg-primary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 12px 14px;
   cursor: pointer;
   transition: var(--transition-smooth);

   input[type="radio"] {
      position: absolute;
      opacity: 0;
      width: 0px;
      height: 0px;
   }

   &:hover {
      border-color: var(--accent-ochre);
      transform: translateY(-2px);
   }

   &:has(input:checked) {
      border-color: var(--accent-gold);
      background-color: var(--bg-glass);
      box-shadow: var(--shadow-gold-glow);
   }
}

.opcion-radio {
   width: 20px;
   height: 20px;
   flex-shrink: 0;
   border: 2px solid var(--accent-gold);
   border-radius: var(--radius-pill);
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--transition-smooth);

   &::after {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: var(--radius-pill);
      background-color: var(--accent-gold);
      transform: scale(0);
      transition: var(--transition-smooth);
   }
}

.opcion-voto:has(input:checked) .opcion-radio::after {
   transform: scale(1);
}

.opcion-voto:has(input:focus-visible) {
   outline: 2px solid var(--accent-gold-light);
   outline-offset: 2px;
}

.opcion-foto {
   width: 48px;
   height: 48px;
   flex-shrink: 0;
   border-radius: var(--radius-sm);
   object-fit: cover;
   border: 1px solid var(--border-color);
}

.opcion-datos {
   display: flex;
   flex-direction: column;
   gap: 3px;
}

.opcion-nombre {
   color: var(--accent-gold-light);
   font-size: 0.95rem;
   font-weight: 500;
}

.opcion-genero {
   color: var(--text-muted);
   font-size: 0.78rem;
}

.votar-actions {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   gap: 12px;
   margin-top: 20px;
   padding-top: 20px;
   border-top: 1px solid var(--border-color);

   > * {
      flex: 1 1 180px;
   }
}

.votar-submit {
   background-color: var(--accent-gold);
   color: var(--bg-primary);
   border: none;
   padding: 12px 20px;
   border-radius: var(--radius-pill);
   font-weight: bold;
   font-size: 0.95rem;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--accent-ochre);
      color: var(--bg-primary);
   }
}

/*----------------- PAGINA DONDE SER ELIGE EL VOTO END ------------*/

/*--------- TARJETA CONFIRMACIÓN DE VOTACIÓN ---------*/

.confirmacion-section {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
}

.confirmacion-card {
   max-width: 640px;
   height: auto;
   border: 1px solid var(--border-color);
   box-shadow:var(--shadow-gold-glow);
   border-radius: var(--radius-lg);
   padding: 30px 20px;
   margin: 40px 20px;
}

.confirmacion-icono {
   text-align: center;
   color: var(--accent-gold-light); 
}

.confirmacion-header {
   h1{
      color: var(--accent-ochre);
      font-size: 1.5rem;
      line-height: 1.5;
   }

   p {
      color: var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.5;
      text-wrap: wrap;
   }
}


.confirmacion-resumen {
   display: flex;
   flex-direction:column;
   gap: 10px;

   h2 {
      padding: 0px;
      margin: 0px;
      color: var(--accent-gold-light);
   }
}

.resumen-lista {
   display: flex;
   flex-direction: column;
   gap: 10px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   padding: 20px;
   margin-bottom: 35px;
}

.resumen-fila {
   border-bottom: 1px solid var(--border-color);

   dt {
      color: var(--accent-gold-light);
   }
}

/*--------- TARJETA CONFIRMACIÓN DE VOTACIÓN END ---------*/


/*--------- TARJETA RESULTADOS PARCIALES ---------*/

.resultado-section {
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 0px;
   margin: 0px;
}

.resultado-card {
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-card);
   padding: 22px;
   margin: 0px 20px;
   max-width: 640;
   display: flex;
   flex-direction: column;
}

.resultado-header {
   display: flex;
   flex-direction: column;
   padding: 0px;
   margin: 30px 0;
   
   h1 {
      color: var(--accent-gold);
      font-size: 1.5rem;
      line-height: 1.5;
      margin: 10px 0px 0px 0px;
   }

   p {
      color: var(--text-muted);
      font-size: 0.9rem;
      margin: 0px;
   }

}

.resultado-lista {
   display: flex;
   flex-direction: column;
   gap: 8px;
   margin: 0px 0px;
   padding: 0px;
   list-style: none;
}

.resultado-item {
   display: flex;
   flex-direction: row;
   align-items: center;
   gap: 12px;
   background-color: var(--bg-primary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 12px 14px;
   transition: var(--transition-smooth);

   &:hover {
      border-color: var(--accent-ochre);
   }

   &.primero {
      border-color: var(--accent-gold);
      box-shadow: var(--shadow-gold-glow);
   }
}

.resultado-puesto {
   width: 28px;
   height: 28px;
   flex-shrink: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   color: var(--accent-gold);
   font-size: 0.85rem;
   font-weight: bold;
}

.resultado-item.primero .resultado-puesto {
   background-color: var(--accent-gold);
   color: var(--bg-primary);
   border-color: var(--accent-gold);
}

.resultado-datos {
   flex: 1 1 auto;
   min-width: 0px;
   display: flex;
   flex-direction: column;
   gap: 8px;
}

.resultado-nombre {
   color: var(--text-main);
   font-size: 0.92rem;
   font-weight: 500;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

.resultado-barra {
   width: 100%;
   height: 8px;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   overflow: hidden;
}

.resultado-barra-fill {
   height: 100%;
   width: 0%;
   background: linear-gradient(90deg, var(--accent-gold-dark), var(--accent-ochre));
   border-radius: var(--radius-pill);

   &.destacada {
      background: linear-gradient(90deg, var(--accent-ochre), var(--accent-gold-light));
      box-shadow: var(--shadow-gold-glow);
   }
}

.resultado-valor {
   display: flex;
   flex-direction: column;
   align-items: flex-end;
   gap: 2px;
   flex-shrink: 0;
   min-width: 78px;
   text-align: right;
}

.resultado-porcentaje {
   color: var(--accent-gold-light);
   font-size: 0.95rem;
   font-weight: bold;
}

.resultado-votos {
   color: var(--text-muted);
   font-size: 0.72rem;
}

.resultado-total {
   margin: 30px 0px;
   padding: 15px;
   display: flex;
   flex-direction: column;
   gap: 10px;
   background-color: var(--bg-glass);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
}

.resultado-dato {
   display: flex;
   flex-direction: row;
   justify-content: space-between;
   gap: 10px;

   dt {
      color: var(--accent-ochre);
      font-size: 0.72rem;
      font-weight: bold;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      align-self: center;
   }

   dd {
      margin: 0px;
      color: var(--text-main);
      font-size: 0.88rem;
      text-align: right;
   }
}

/* ==========================================================
   PANEL DE ADMINISTRADOR (templates/public/perfil.html)
   Estilos aditivos: no modifican reglas existentes.
   ========================================================== */

body.sin-scroll {
   overflow: hidden;
}

.admin-main {
   display: flex;
   flex-direction: column;
   gap: clamp(20px, 3vw, 32px);
}

/*--------- Encabezado del panel ---------*/

.admin-hero {
   display: flex;
   flex-direction: column;
   gap: 16px;
   align-items: flex-start;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   padding: clamp(20px, 4vw, 32px);
   box-shadow: var(--shadow-gold-glow);
}

.admin-hero-texto {
   display: flex;
   flex-direction: column;
   gap: 8px;

   h1 {
      color: var(--accent-gold-light);
      font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
      line-height: 1.15;
      margin: 0;
   }

   p {
      color: var(--text-muted);
      line-height: 1.6;
      margin: 0;
      max-width: 65ch;
   }
}

.admin-badge {
   display: inline-flex;
   align-items: center;
   width: fit-content;
   padding: 4px 12px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   background-color: var(--bg-glass);
   color: var(--accent-gold);
   font-size: 0.72rem;
   font-weight: 600;
   letter-spacing: 0.08em;
   text-transform: uppercase;
}

/*--------- Navegación por pestañas ---------*/

.admin-tabs {
   display: flex;
   flex-direction: row;
   gap: 8px;
   overflow-x: auto;
   padding-bottom: 6px;
   border-bottom: 1px solid var(--border-color);
   scrollbar-width: thin;
   -webkit-overflow-scrolling: touch;
}

.admin-tab {
   flex: 0 0 auto;
   padding: 10px 18px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   background-color: var(--bg-secondary);
   color: var(--accent-gold-light);
   font-family: inherit;
   font-size: 0.85rem;
   font-weight: 500;
   white-space: nowrap;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      border-color: var(--accent-ochre);
      color: var(--accent-ochre);
   }

   &:focus-visible {
      outline: 2px solid var(--accent-gold-light);
      outline-offset: 2px;
   }

   &.activo {
      background-color: var(--accent-gold);
      border-color: var(--accent-gold);
      color: var(--bg-primary);
      font-weight: 600;
   }
}

/*--------- Secciones / paneles ---------*/

.admin-panel-tab {
   display: none;
   animation: admin-fade 0.25s ease;
}

.admin-panel-tab.activo {
   display: block;
}

@keyframes admin-fade {
   from { opacity: 0; transform: translateY(6px); }
   to   { opacity: 1; transform: translateY(0); }
}

.admin-section-head {
   display: flex;
   flex-direction: column;
   gap: 12px;
   align-items: flex-start;
   margin-bottom: clamp(16px, 2vw, 24px);

   h2 {
      color: var(--accent-gold);
      font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
      line-height: 1.25;
      margin: 0;
   }

   p {
      color: var(--text-muted);
      font-size: 0.88rem;
      line-height: 1.5;
      margin: 4px 0 0;
   }
}

/*--------- Indicadores (KPIs) ---------*/

.admin-kpis {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 14px;
}

.admin-kpi {
   display: flex;
   flex-direction: column;
   gap: 6px;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 18px;
   box-shadow: var(--shadow-card);
   transition: var(--transition-smooth);

   &:hover {
      box-shadow: var(--shadow-gold-glow);
      transform: translateY(-3px);
   }
}

.admin-kpi-valor {
   color: var(--accent-gold-light);
   font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
   font-weight: 700;
   line-height: 1;
}

.admin-kpi-etiqueta {
   color: var(--text-muted);
   font-size: 0.78rem;
   line-height: 1.3;
}

/*--------- Bloque de resumen ---------*/

.admin-bloque {
   margin-top: clamp(20px, 3vw, 32px);
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   padding: clamp(18px, 3vw, 26px);
   box-shadow: var(--shadow-card);
}

.admin-resumen {
   list-style: none;
   margin: 0;
   padding: 0;
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.admin-resumen-fila {
   display: flex;
   flex-direction: column;
   gap: 6px;
   padding: 12px 14px;
   background-color: var(--bg-primary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
}

.admin-resumen-nombre {
   color: var(--text-main);
   font-size: 0.92rem;
   font-weight: 500;
}

.admin-resumen-dato {
   color: var(--text-muted);
   font-size: 0.78rem;
}

/*--------- Etiquetas de estado ---------*/

.admin-estado {
   display: inline-flex;
   align-items: center;
   width: fit-content;
   padding: 3px 10px;
   border-radius: var(--radius-pill);
   font-size: 0.68rem;
   font-weight: 700;
   letter-spacing: 0.05em;
   text-transform: uppercase;
}

.admin-estado-activa {
   background-color: rgba(212, 175, 55, 0.18);
   border: 1px solid var(--accent-gold);
   color: var(--accent-gold-light);
}

.admin-estado-programada {
   background-color: var(--bg-glass);
   border: 1px solid var(--border-color);
   color: var(--accent-ochre);
}

.admin-estado-cerrada {
   background-color: rgba(201, 42, 42, 0.15);
   border: 1px solid var(--accent-red);
   color: #e8908f;
}

/*--------- Listas de gestión ---------*/

.admin-lista {
   list-style: none;
   margin: 0;
   padding: 0;
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.admin-item {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 14px;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 16px;
   box-shadow: var(--shadow-card);
   transition: var(--transition-smooth);

   &:hover {
      box-shadow: var(--shadow-gold-glow);
      border-color: var(--border-color);
   }
}

.admin-item-info {
   flex: 1 1 220px;
   min-width: 0;
   display: flex;
   flex-direction: column;
   gap: 6px;

   h3 {
      color: var(--accent-gold-light);
      font-size: 1rem;
      line-height: 1.3;
      margin: 0;
   }

   p {
      color: var(--text-muted);
      font-size: 0.85rem;
      line-height: 1.45;
      margin: 0;
   }
}

.admin-item-titulo {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   align-items: center;
   gap: 8px;
}

.admin-item-foto {
   width: 52px;
   height: 52px;
   flex-shrink: 0;
   object-fit: cover;
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-color);
}

.admin-chip {
   display: inline-flex;
   width: fit-content;
   padding: 3px 10px;
   background-color: var(--bg-primary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   color: var(--text-muted);
   font-size: 0.72rem;
}

.admin-acciones {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   gap: 8px;
   width: 100%;
}

.admin-btn-sm {
   padding: 8px 14px;
   font-size: 0.8rem;
}

.admin-btn-peligro {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 8px 16px;
   background-color: transparent;
   border: 1px solid var(--accent-red);
   border-radius: var(--radius-pill);
   color: #e8908f;
   font-family: inherit;
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--accent-red);
      color: var(--text-main);
   }

   &:focus-visible {
      outline: 2px solid var(--accent-light, var(--accent-gold-light));
      outline-offset: 2px;
   }
}

/*--------- Selector de votación ---------*/

.admin-selector {
   display: flex;
   flex-direction: column;
   gap: 8px;
   margin-bottom: clamp(18px, 2.5vw, 26px);

   label {
      color: var(--accent-ochre);
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
   }
}

.admin-select {
   width: 100%;
}

/*--------- Estado vacío ---------*/

.admin-empty {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 14px;
   text-align: center;
   padding: clamp(28px, 5vw, 48px) 20px;
   border: 1px dashed var(--border-color);
   border-radius: var(--radius-lg);
   background-color: var(--bg-secondary);

   p {
      color: var(--text-muted);
      font-size: 0.9rem;
      margin: 0;
   }
}

.admin-empty[hidden] {
   display: none;
}

/*--------- Resultados (reutiliza tarjeta existente) ---------*/

.admin-resultado {
   margin: 0;
   width: 100%;
}

.admin-resultado .resultado-header h3 {
   color: var(--accent-gold);
   font-size: 1.25rem;
   line-height: 1.4;
   margin: 10px 0 0;
}

/*--------- Modales ---------*/

.admin-modal {
   position: fixed;
   inset: 0;
   z-index: 1100;
   display: none;
   align-items: center;
   justify-content: center;
   padding: var(--gutter);
}

.admin-modal.abierto {
   display: flex;
}

.admin-modal-backdrop {
   position: absolute;
   inset: 0;
   background-color: rgba(0, 0, 0, 0.65);
   backdrop-filter: blur(2px);
}

.admin-modal-card {
   position: relative;
   z-index: 1;
   width: min(560px, 100%);
   max-height: calc(100dvh - 2 * var(--gutter));
   overflow-y: auto;
   background-color: var(--bg-secondary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-gold-glow);
   padding: clamp(20px, 3vw, 28px);
   animation: admin-fade 0.2s ease;
}

.admin-modal-peligro {
   border-color: var(--accent-red);
   box-shadow: 0 0 24px rgba(201, 42, 42, 0.3);
}

.admin-modal-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   margin-bottom: 18px;

   h2 {
      color: var(--accent-gold);
      font-size: 1.25rem;
      margin: 0;
   }
}

.admin-modal-cerrar {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 36px;
   flex-shrink: 0;
   background-color: transparent;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-pill);
   color: var(--accent-gold-light);
   font-size: 1.4rem;
   line-height: 1;
   cursor: pointer;
   transition: var(--transition-smooth);

   &:hover {
      background-color: var(--bg-glass);
      color: var(--accent-ochre);
   }
}

.admin-fields {
   display: flex;
   flex-direction: column;
   gap: 8px;

   label {
      color: var(--text-muted);
      font-size: 0.82rem;
   }
}

textarea.form-control {
   min-height: 88px;
   resize: vertical;
}

.admin-modal-texto {
   color: var(--text-muted);
   font-size: 0.92rem;
   line-height: 1.55;
   margin: 0;
}

.admin-modal-actions {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
   justify-content: flex-end;
   gap: 10px;
   margin-top: 22px;
}

/*--------- Toast de confirmación ---------*/

.admin-toast {
   position: fixed;
   left: 50%;
   bottom: 80px;
   transform: translate(-50%, 20px);
   z-index: 1200;
   max-width: calc(100% - 2 * var(--gutter));
   padding: 12px 22px;
   background-color: var(--bg-secondary);
   border: 1px solid var(--accent-gold);
   border-radius: var(--radius-pill);
   box-shadow: var(--shadow-gold-glow);
   color: var(--accent-gold-light);
   font-size: 0.85rem;
   font-weight: 500;
   opacity: 0;
   pointer-events: none;
   transition: var(--transition-smooth);
}

.admin-toast.visible {
   opacity: 1;
   transform: translate(-50%, 0);
}

/*--------- Enlace activo del footer ---------*/

.footer-item-activo a {
   color: var(--accent-gold);
   font-weight: 700;
   text-decoration: underline;
}

/*--------- Panel admin: tablet (>= 768px) ---------*/

@media (min-width: 768px) {

   .admin-hero {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
   }

   .admin-kpis {
      grid-template-columns: repeat(4, 1fr);
   }

   .admin-section-head {
      flex-direction: row;
      align-items: flex-end;
      justify-content: space-between;
   }

   .admin-resumen-fila {
      flex-direction: row;
      align-items: center;
      gap: 14px;
   }

   .admin-resumen-nombre {
      flex: 1 1 auto;
   }

   .admin-resumen-dato {
      text-align: right;
   }

   .admin-item {
      flex-wrap: nowrap;
   }

   .admin-acciones {
      width: auto;
      flex: 0 0 auto;
      justify-content: flex-end;
   }

   .admin-selector {
      flex-direction: row;
      align-items: flex-end;
      gap: 14px;

      label {
         padding-bottom: 12px;
      }
   }

   .admin-select {
      width: auto;
      min-width: 260px;
   }

   .admin-toast {
      bottom: 30px;
   }
}

/*--------- Panel admin END ---------*/
