/* ============================================
   PALETA DE COLORES - REPÚBLICA ORIENTAL DEL URUGUAY
   Colores patrios: Celeste Charrúa, Azul Marino, Blanco y Sol de Mayo
   ============================================ */

:root {
  /* Celeste Charrúa (Bandera y Pabellón Nacional) */
  --uruguay-celeste: #0081C9;
  --uruguay-celeste-light: #38BDF8;
  --uruguay-celeste-dark: #006097;

  /* Azul Marino Institucional */
  --uruguay-blue: #0038A8;
  --uruguay-blue-light: #2563EB;
  --uruguay-blue-dark: #002266;

  /* Sol de Mayo (Dorado / Oro Patrio) */
  --uruguay-gold: #FCD116;
  --uruguay-gold-light: #FDE047;
  --uruguay-gold-dark: #D4AF37;

  /* Blanco Puro */
  --uruguay-white: #FFFFFF;

  /* Neutros y Fondos */
  --text-dark: #1E293B;
  --text-light: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --bridge-orange: #E67E22;
}

/* ============================================
   ESTILOS GENERALES Y LAYOUT
   ============================================ */
body {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* ============================================
   HEADER Y CONTROLES CON BANNER DE URUGUAY
   ============================================ */
.header-main {
  position: relative !important;
  z-index: 50 !important;
  background-color: var(--uruguay-blue) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  min-height: 200px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
}

.calendar-controls-new {
  position: relative;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.calendar-controls-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 129, 201, 0.35) !important; /* Celeste uruguayo al 35% */
  pointer-events: none;
  z-index: 1;
}

/* Footer institucional uruguayo */
.footer-bottom {
  background: linear-gradient(90deg, #002266 0%, #0038A8 50%, #0081C9 100%) !important;
  color: #FFFFFF !important;
}

/* Textos del footer en blanco puro de alto contraste */
.footer-bottom .donation-message,
.footer-bottom .footer-description,
.footer-bottom .footer-title,
.footer-bottom .crypto-title,
.footer-bottom .footer-nav a,
.footer-bottom .copyright,
.footer-bottom .footer-made {
  color: #FFFFFF !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.footer-bottom .footer-title {
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-bottom .footer-description {
  opacity: 0.95;
  line-height: 1.5;
}

.footer-bottom .donation-message {
  font-weight: 600;
}

.footer-bottom .crypto-title {
  font-weight: 600;
}

.footer-bottom .footer-nav a:hover {
  color: #FFFFFF !important;
  text-decoration: underline !important;
  opacity: 1 !important;
}

/* ============================================
   HEADER: RELOJ, TÍTULO Y SELECTOR DE IDIOMA
   ============================================ */
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 20;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--uruguay-blue-dark);
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.home-btn:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--uruguay-celeste-dark);
}

.clock-compact-new {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

.clock-item-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock-label-compact {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.clock-time-compact {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: monospace;
}

.clock-divider-compact {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 10px;
}

.header-center {
  text-align: center;
  color: #FFFFFF;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.header-center h1 {
  font-size: 2.2rem;
  margin: 0 0 5px 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-subtitle {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 400;
}

/* Selector de idioma con alto z-index */
.language-selector-wrapper {
  position: relative;
  z-index: 100;
}

.lang-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--uruguay-blue-dark);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  min-width: 150px;
  z-index: 99999 !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.lang-dropdown.show {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  color: #1E293B;
  transition: background 0.2s ease;
}

.lang-option:hover {
  background: rgba(0, 129, 201, 0.08);
}

.lang-option .lang-code {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748B;
}

/* ============================================
   CONTROLES UNIFICADOS
   ============================================ */
.unified-controls {
  padding: 12px 20px !important;
  margin-bottom: 25px;
}

.controls-single-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn, .year-select-new, .view-btn-new {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--uruguay-blue-dark);
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  font-size: 0.9rem;
}

.control-btn:hover, .year-select-new:hover, .view-btn-new:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: var(--uruguay-celeste);
}

.view-btn-new.active {
  background: var(--uruguay-blue);
  color: #FFFFFF;
  border-color: var(--uruguay-blue);
}

.control-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.5);
  margin: 0 4px;
}

/* Leyenda Rápida */
.legend-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.holiday-marker-bg {
  background: linear-gradient(135deg, var(--uruguay-celeste) 0%, var(--uruguay-blue) 100%) !important;
  border: 1.5px solid var(--uruguay-gold) !important;
  box-shadow: 0 0 4px rgba(0, 56, 168, 0.4) !important;
}
.weekend-marker-bg {
  background: linear-gradient(135deg, #7DD3FC 0%, var(--uruguay-celeste) 100%) !important;
  border: 1px solid var(--uruguay-blue) !important;
}
.today-marker-bg { background-color: #27AE60; }
.bridge-marker-bg {
  background: linear-gradient(135deg, var(--uruguay-celeste) 0%, var(--uruguay-blue-dark) 100%) !important;
  border: 1.5px dashed var(--uruguay-gold) !important;
}

/* Etiqueta de publicidad */
.ad-label {
  background: var(--uruguay-blue) !important;
  color: #FFFFFF !important;
}

/* ============================================
   DISEÑO DE CELDAS DEL CALENDARIO - ALTO CONTRASTE
   ============================================ */

/* Tarjetas de mes con borde superior celeste charrúa */
.month-card {
  border-top: 4px solid var(--uruguay-celeste) !important;
  box-shadow: 0 4px 14px rgba(0, 129, 201, 0.10) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.month-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 129, 201, 0.18) !important;
}

/* Encabezados de mes */
.month-header {
  color: var(--uruguay-blue-dark) !important;
  border-bottom: 2px solid var(--uruguay-gold) !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
}

/* Días de la semana */
.day-header {
  color: #475569 !important;
  font-weight: 700 !important;
}

/* Domingo en Azul Marino Patrio destacado y Sábado en Celeste Charrúa */
.day-header:nth-child(1) {
  color: var(--uruguay-blue) !important;
  font-weight: 800 !important;
}

.day-header:nth-child(7) {
  color: var(--uruguay-celeste) !important;
  font-weight: 700 !important;
}

/* Celdas de día */
.day-cell {
  border-radius: 6px;
  color: var(--text-dark);
}

.day-cell:hover:not(.empty) {
  transform: scale(1.08);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   DOMINGOS Y FINES DE SEMANA - PALETA URUGUAYA
   ============================================ */

/* Sábados y fines de semana base: celeste muy suave */
.day-cell.weekend {
  background-color: #F0F9FF;
  color: #0369A1;
  border: 1px solid #E0F2FE;
  font-weight: 600;
}

.day-cell.weekend:hover:not(.holiday):not(.today) {
  background-color: #E0F2FE !important;
  border-color: #7DD3FC !important;
  color: var(--uruguay-blue) !important;
}

/* DOMINGO - CELESTE CHARRÚA DISTINTIVO CON TEXTO AZUL MARINO PATRIO */
.day-cell.sunday,
.month-grid > .day-cell.weekend:nth-child(7n + 1) {
  background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%) !important;
  color: var(--uruguay-blue) !important;
  font-weight: 700 !important;
  border: 1px solid #7DD3FC !important;
}

.day-cell.sunday:hover:not(.holiday):not(.today),
.month-grid > .day-cell.weekend:nth-child(7n + 1):hover:not(.holiday):not(.today) {
  background: linear-gradient(135deg, #BAE6FD 0%, #7DD3FC 100%) !important;
  border-color: var(--uruguay-celeste) !important;
  color: var(--uruguay-blue-dark) !important;
  transform: scale(1.08);
}

/* ============================================
   DÍAS FESTIVOS - CELESTE CHARRÚA Y AZUL MARINO PATRIO CON BORDE SOL DE MAYO
   ============================================ */
.day-cell.holiday {
  background: linear-gradient(135deg, var(--uruguay-celeste) 0%, var(--uruguay-blue) 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border: 2px solid var(--uruguay-gold) !important;
  box-shadow: 0 3px 8px rgba(0, 56, 168, 0.4) !important;
  position: relative;
}

.day-cell.holiday:hover {
  background: linear-gradient(135deg, #0284C7 0%, #002570 100%) !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 6px 14px rgba(0, 56, 168, 0.5) !important;
  transform: scale(1.12) !important;
  z-index: 10 !important;
}

/* Punto Sol de Mayo radiante */
.day-cell.holiday::after {
  content: '' !important;
  position: absolute !important;
  bottom: 2px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background-color: var(--uruguay-gold) !important;
  box-shadow: 0 0 5px rgba(252, 209, 22, 0.95) !important;
}

/* Puente festivo / Feriado trasladado (Ley 16.805) */
.day-cell.bridge-day {
  background: linear-gradient(135deg, var(--uruguay-celeste) 0%, var(--uruguay-blue-dark) 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border: 2px dashed var(--uruguay-gold) !important;
  box-shadow: 0 3px 8px rgba(0, 56, 168, 0.3) !important;
}

.day-cell.bridge-day:hover {
  border-color: #FFFFFF !important;
  transform: scale(1.1) !important;
}

/* Día de hoy */
.day-cell.today {
  outline: 2px solid #27AE60;
  outline-offset: -2px;
  font-weight: 800;
}

.day-cell.today:not(.holiday) {
  background-color: #DCFCE7;
  color: #166534;
}

/* ============================================
   SECCIÓN DE DONACIONES Y FOOTER
   ============================================ */
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 30px;
  padding: 40px 30px;
  border-radius: 20px 20px 0 0;
  margin-top: 40px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }
  .header-main {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    min-height: auto !important;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

@media (max-width: 900px) {
  .footer-brand {
    align-items: center;
  }
}

.donation-section-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.donation-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}

.donation-btn.coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFDD00;
  color: #000000 !important;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-shadow: none !important;
}

.donation-btn.coffee-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.crypto-donations {
  width: 100%;
  max-width: 480px;
}

.crypto-addresses {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.crypto-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.crypto-item:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.crypto-icon {
  font-weight: 700;
  font-size: 1rem;
}

.crypto-name {
  font-weight: 600;
  font-size: 0.8rem;
}

.crypto-address {
  font-family: monospace;
  font-size: 0.75rem;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.copy-hint {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 8px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@media (max-width: 900px) {
  .footer-nav-col {
    align-items: center;
  }
}

.footer-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.9rem;
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.9;
}

.footer-made {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ============================================
   MODO OSCURO
   ============================================ */
body.dark-mode {
  --bg-light: #0F172A;
  --bg-card: #1E293B;
  --text-dark: #F1F5F9;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

body.dark-mode .month-card {
  border-top-color: var(--uruguay-celeste-light) !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .month-header {
  color: #38BDF8 !important;
  border-bottom-color: rgba(56, 189, 248, 0.2) !important;
}

/* Domingos y fines de semana en modo oscuro */
body.dark-mode .day-cell.weekend {
  background-color: #132238 !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .day-cell.sunday,
body.dark-mode .month-grid > .day-cell.weekend:nth-child(7n + 1) {
  background: #0C2B4E !important;
  color: #7DD3FC !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  font-weight: 700 !important;
}

body.dark-mode .day-cell.sunday:hover:not(.holiday):not(.today),
body.dark-mode .month-grid > .day-cell.weekend:nth-child(7n + 1):hover:not(.holiday):not(.today) {
  background: #154374 !important;
  border-color: #38BDF8 !important;
  color: #BAE6FD !important;
}

/* Festivos en modo oscuro */
body.dark-mode .day-cell.holiday {
  background: linear-gradient(135deg, #0284C7 0%, #0038A8 100%) !important;
  color: #FFFFFF !important;
  border: 2px solid var(--uruguay-gold) !important;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.5) !important;
}

body.dark-mode .day-cell.holiday::after {
  background-color: var(--uruguay-gold) !important;
  box-shadow: 0 0 6px var(--uruguay-gold) !important;
}

body.dark-mode .day-cell.bridge-day {
  background: linear-gradient(135deg, #0369A1 0%, #002266 100%) !important;
  border: 2px dashed var(--uruguay-gold) !important;
}

body.dark-mode .holiday-marker-bg {
  background: linear-gradient(135deg, #0284C7 0%, #0038A8 100%) !important;
  border: 1.5px solid var(--uruguay-gold) !important;
}

body.dark-mode .weekend-marker-bg {
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%) !important;
  border: 1px solid #38BDF8 !important;
}

body.dark-mode .legend-chips {
  background: rgba(30, 41, 59, 0.9);
  color: #F1F5F9;
}

body.dark-mode .legend-chip {
  color: #CBD5E1;
}

body.dark-mode .lang-dropdown {
  background: #1E293B;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .lang-option {
  color: #F1F5F9;
}

body.dark-mode .lang-option:hover {
  background: rgba(255, 255, 255, 0.05);
}
