/* ===================================================
   PREMIOS SOBERANO — PUBLIC SITE STYLES
   =================================================== */

:root {
  --primary: #1a0a2e;
  --secondary: #16213e;
  --accent: #c9a84c;
  --accent-light: #e6c86e;
  --text: #ffffff;
  --bg: #0a0a1a;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  --transition: 0.3s ease;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-accent: 0 4px 20px rgba(201,168,76,0.3);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* ===== NAVBAR ===== */
.site-navbar {
  background: rgba(10, 10, 26, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent) !important;
  letter-spacing: 1px;
  font-weight: 700;
}

.site-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: color var(--transition);
  padding: 0.5rem 1rem !important;
}

.site-navbar .nav-link:hover { color: var(--accent) !important; }

/* ===== HERO ===== */
.hero-banner {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-banner--default {
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg) 50%, #2d1b4e 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,26,0.5) 0%, rgba(10,10,26,0.8) 100%);
}

.hero-content {
  padding: 4rem 0;
  z-index: 1;
}

.hero-stars {
  color: var(--accent);
  font-size: 1.5rem;
  letter-spacing: 8px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ===== BUTTONS ===== */
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #0a0a1a;
  border: none;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: all var(--transition);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
  color: #0a0a1a;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: all var(--transition);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: #0a0a1a;
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: white;
  margin-bottom: 0.5rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  margin: 1.5rem auto;
  border-radius: 2px;
}

/* ===== CATEGORIES TOOLBAR (search + view toggle) ===== */
.categories-search-wrap { max-width: 480px; }

.categories-toolbar { width: 100%; }

/* View-toggle buttons */
.btn-view-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-view-toggle:hover {
  background: rgba(201,168,76,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-view-toggle.active {
  background: rgba(201,168,76,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* List-view layout overrides */
#categoriesGrid.list-view { flex-direction: column; flex-wrap: nowrap; }

#categoriesGrid.list-view .category-grid-item {
  width: 100%;
  max-width: 100%;
}

#categoriesGrid.list-view .category-card {
  flex-direction: row;
  align-items: center;
}

#categoriesGrid.list-view .category-card__image {
  width: 120px;
  min-width: 120px;
  height: 90px;
  border-radius: var(--radius) 0 0 var(--radius);
  flex-shrink: 0;
}

#categoriesGrid.list-view .category-card .card-body {
  padding: 0.75rem 1rem;
  min-width: 0;
}

#categoriesGrid.list-view .category-card__name { margin-bottom: 0.25rem; }

/* In card view: show count, hide names list */
.category-nominees-list { display: none; }

/* In list view: hide count, show names list */
#categoriesGrid.list-view .category-nominees-count { display: none; }

#categoriesGrid.list-view .category-nominees-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 70%;
  gap: 0;
}

.nominee-name-chip {
  max-width: calc(100% / var(--n, 1));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 767.98px) {
  #categoriesGrid.list-view .category-nominees-count { display: inline; }
  #categoriesGrid.list-view .category-nominees-list { display: none; }
}

#categoriesGrid.list-view .vote-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.nominee-sep {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  flex-shrink: 0;
  padding: 0 0.3rem;
}

.categories-search-group .categories-search-icon {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-right: none;
  color: var(--accent);
  border-radius: 8px 0 0 8px;
}

.categories-search-input {
  border-left: none !important;
  border-radius: 0 8px 8px 0 !important;
}

.categories-search-input:focus {
  border-left: none !important;
}

.categories-search-group:focus-within .categories-search-icon {
  border-color: var(--accent);
  box-shadow: none;
}

/* ===== CATEGORY CARDS ===== */
.category-card {
  background: linear-gradient(135deg, rgba(26,10,46,0.9), rgba(22,33,62,0.9));
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  color: var(--text);
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), var(--shadow-accent);
  color: var(--text);
}

.category-card__image {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.category-card__image--placeholder {
  background: linear-gradient(135deg, var(--primary), #3d1a6e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 3rem;
}

.category-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.5rem;
}

.category-card__desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  margin-bottom: 0;
}

.category-nominees-count {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.vote-cta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== NOMINEE CARDS ===== */
.nominee-radio { display: none; }

.nominee-card-label { cursor: pointer; }

.nominee-card {
  background: rgba(26,10,46,0.6);
  border: 2px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.nominee-radio:checked + .nominee-card {
  border-color: var(--accent);
  background: rgba(201,168,76,0.1);
  box-shadow: var(--shadow-accent);
  transform: scale(1.03);
}

.nominee-card__photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem;
  border: 3px solid rgba(201,168,76,0.3);
  position: relative;
}

.nominee-radio:checked + .nominee-card .nominee-card__photo {
  border-color: var(--accent);
}

.nominee-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nominee-card__photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), #3d1a6e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2rem;
}

.nominee-card__check {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--accent);
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.nominee-radio:checked + .nominee-card .nominee-card__check { opacity: 1; }

.nominee-card__name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: white;
  font-weight: 600;
}

.nominee-card__desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.25rem;
}

/* ===== VOTER FORM ===== */
.voter-form-card {
  background: rgba(26,10,46,0.7);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.form-control, .form-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white !important;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all var(--transition);
}

.form-control:focus, .form-select:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
  color: white;
}

.form-control::placeholder { color: rgba(255,255,255,0.4); }

.form-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-text { color: rgba(255,255,255,0.5); font-size: 0.8rem; }

.form-select option { background: var(--primary); color: white; }

/* ===== COUNTRY DROPDOWN ===== */
.country-dropdown { position: relative; }

.country-toggle {
  cursor: pointer;
  user-select: none;
}

.country-toggle.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220,53,69,0.2);
}

.country-dropdown-menu {
  background: var(--primary, #1a0533);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.country-dropdown-menu .form-control {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: white;
}

.country-dropdown-menu .form-control::placeholder { color: rgba(255,255,255,0.4); }
.country-dropdown-menu .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.2);
}

.country-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.country-list::-webkit-scrollbar { width: 5px; }
.country-list::-webkit-scrollbar-track { background: transparent; }
.country-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.country-list .dropdown-item {
  color: rgba(255,255,255,0.85);
  background: transparent;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  border: none;
  width: 100%;
  text-align: left;
}

.country-list .dropdown-item:hover,
.country-list .dropdown-item:focus {
  background: rgba(255,255,255,0.1);
  color: white;
}

.country-list .dropdown-item.active {
  background: var(--accent, #c9a84c);
  color: #1a0533;
  font-weight: 600;
}

#countryNoResults { color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* ===== VALIDATION TOAST ===== */
.validation-toast {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc3545;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: min(90vw, 480px);
  white-space: nowrap;
}

.validation-toast.show { bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  .validation-toast { transition: none; }
}

@media (max-width: 576px) {
  .validation-toast { white-space: normal; text-align: center; max-width: 90vw; }
}

/* ===== INLINE VALIDATION FEEDBACK ===== */
/* Make Bootstrap's invalid-feedback readable on dark background */
.invalid-feedback { color: #ff8a8a; }

/* Highlight nominee section when no nominee selected */
.nominees-section.nominees-error {
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 10px;
  padding: 1rem;
}

.nominees-section.nominees-error .section-title { color: #ff8a8a; }

.nominees-section .invalid-feedback { font-size: 0.875em; }

/* ===== CONFIRMATION PAGES ===== */
.confirmation-section, .error-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.confirmation-card, .error-card {
  max-width: 560px;
  background: rgba(26,10,46,0.8);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow);
}

.confirmation-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2.5rem;
}

.confirmation-icon.success {
  background: rgba(40,167,69,0.2);
  border: 2px solid #28a745;
  color: #28a745;
}

.confirmation-icon.error {
  background: rgba(220,53,69,0.2);
  border: 2px solid #dc3545;
  color: #dc3545;
}

.confirmation-icon.warning {
  background: rgba(255,193,7,0.2);
  border: 2px solid #ffc107;
  color: #ffc107;
}

.confirmation-title {
  font-size: 2rem;
  color: white;
  margin-bottom: 1rem;
}

.confirmation-subtitle { color: rgba(255,255,255,0.75); font-size: 1rem; }

.email-display {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  display: inline-block;
  color: var(--accent);
  margin-top: 0.5rem;
}

.vote-details-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.vote-details-card__nominee-photo-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

.vote-details-card__nominee-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 16px rgba(201,168,76,0.35);
}

.vote-details-card__nominee-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a0a2e, #3d1a6e);
  border: 3px solid rgba(201,168,76,0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2rem;
}

.vote-details-card__title {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.vote-details-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vote-details-card__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 1rem;
}

.vote-details-card__item:last-child { border-bottom: none; }

.vote-details-card__label {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  white-space: nowrap;
}

.vote-details-card__value {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: right;
}

.step {
  display: flex;
  align-items: center;
  text-align: left;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a1a;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 1rem;
}

.step-text { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

/* ===== ERROR PAGE ===== */
.error-code {
  font-size: 7rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
}

.error-title { font-size: 2rem; color: white; margin: 0.5rem 0; }
.error-message { color: rgba(255,255,255,0.65); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-bottom: 1px solid rgba(201,168,76,0.3);
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: white;
  margin-bottom: 0.5rem;
}

.page-subtitle { color: rgba(255,255,255,0.7); font-size: 1.1rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(0,0,0,0.5);
  border-top: 1px solid rgba(201,168,76,0.2);
  color: rgba(255,255,255,0.6);
}

.footer-brand {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.2rem;
}

.footer-tagline { color: rgba(255,255,255,0.4); font-size: 0.85rem; font-style: italic; }
.footer-copy { font-size: 0.8rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeInUp 0.8s ease forwards; }
.animate-fade-in-delay { animation: fadeInUp 0.8s 0.2s ease both; }
.animate-fade-in-delay-2 { animation: fadeInUp 0.8s 0.4s ease both; }

/* ===== NO EDITION ===== */
.no-edition-message { color: rgba(255,255,255,0.7); }
.no-edition-icon { font-size: 4rem; color: var(--accent); opacity: 0.5; }
.empty-icon { font-size: 3rem; color: var(--accent); opacity: 0.4; display: block; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(26,10,46,0.8));
  border-top: 1px solid rgba(201,168,76,0.2);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.cta-title { font-size: clamp(1.5rem, 3vw, 2.5rem); color: white; }
.cta-subtitle { color: rgba(255,255,255,0.7); }

/* ===== TEXT COLOR ===== */
.text-accent { color: var(--accent) !important; }

/* ===== CONFETTI ===== */
.confetti-stars { font-size: 1.5rem; color: var(--accent); letter-spacing: 8px; }

/* ===== VOTING INTRO ===== */
.voting-intro .lead { color: rgba(255,255,255,0.8); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-banner { min-height: 60vh; background-attachment: scroll; }
  .voter-form-card { padding: 1.5rem; }
  .confirmation-card, .error-card { padding: 2rem 1.5rem; }
}
