:root {
  --primary-color: #0f172a;
  --primary-hover: #1e293b;
  --bg-color: #ffffff;
  --text-color: #334155;
  --border-color: #e2e8f0;
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --success-color: #10b981;
}

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

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

/* Header Banner */
.banner-container {
  width: 100%;
  background-color: #f8fafc;
  display: flex;
  justify-content: center;
}

.header-banner {
  width: 100%;
  max-width: 1200px;
  height: auto;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Schedule Headers & Countdown */
.schedule-headers {
  width: 100%;
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.stage-subheading {
  font-size: 1.25rem;
  color: #64748b;
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.countdown-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px auto;
  width: 100%;
  max-width: 600px;
}

.countdown-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
  color: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
}

.cd-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.cd-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  font-weight: 500;
}

@media (max-width: 480px) {
  .countdown-box {
    min-width: 75px;
    padding: 16px 12px;
    border-radius: 12px;
  }
  .cd-num {
    font-size: 2rem;
  }
  .cd-label {
    font-size: 0.75rem;
  }
  .stage-heading {
    font-size: 2rem;
  }
  .countdown-container {
    gap: 12px;
  }
}

#voting-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Poll Grid Layout */
.poll-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
  width: 100%;
}

@media (min-width: 576px) {
  .poll-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .poll-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

/* Poll Cards */
.poll-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.poll-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.poll-image-container {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #f1f5f9;
}

.poll-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poll-card:hover .poll-image {
  transform: scale(1.03);
}

.poll-no-image {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

.poll-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

/* Voting Buttons */
.vote-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.vote-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #94a3b8;
}

/* Status & Thank You Cards */
.thank-you-card, .status-card {
  text-align: center;
  padding: 80px 20px;
  background: #f8fafc;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.success-icon {
  color: var(--success-color);
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.thank-you-card h2, .status-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.25rem;
  color: var(--primary-color);
  margin-bottom: 16px;
  font-weight: 700;
}

.thank-you-card p, .status-card p {
  font-size: 1.125rem;
  color: #64748b;
}

/* Error Messages */
.error-msg, .form-error-msg {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 16px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 32px;
  font-weight: 500;
  border: 1px solid #fecaca;
  width: 100%;
  max-width: 800px;
}

.form-error-msg {
  margin-bottom: 24px;
  padding: 12px 16px;
  font-size: 0.875rem;
}

/* Registration Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 550px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 auto;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #334155;
}

.modal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 8px;
  padding-right: 24px;
  text-align: center;
}

.selected-nominee-text {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 480px) {
  .form-row {
    flex-direction: row;
    gap: 16px;
  }
  .form-row .form-group {
    flex: 1;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  color: #475569;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-color);
  background: #fff;
  transition: all 0.2s;
}

.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.checkbox-group {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
  margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.875rem;
  color: #475569;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  cursor: pointer;
}

.submit-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Footer / Powered By */
#wbx-powered-by-slot {
  margin-top: auto;
  padding-top: 60px;
  display: flex;
  justify-content: center;
  width: 100%;
}


/* MOBILE: 2 PARTICIPANTES POR FILA */
@media screen and (max-width: 767px) {

  .poll-grid,
  .poll-options,
  .poll-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .poll-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    border-radius: 10px !important;
  }

  .poll-image-container {
    width: 100% !important;
    aspect-ratio: 3 / 4 !important;
    margin-bottom: 8px !important;
  }

  .poll-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}


/* CORRECCION DE LAYOUT DESKTOP */
@media screen and (min-width: 992px) {

  html, body {
    width: 100% !important;
    min-width: 0 !important;
  }

  body {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .banner-container {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .main-content {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
  }

  #voting-section {
    width: 100% !important;
    align-items: stretch !important;
  }

  .poll-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
  }

  .poll-card {
    min-width: 0 !important;
    width: 100% !important;
  }
}

