/* ============================================
   PALETA DE COLORES - REPÚBLICA DEL PARAGUAY
   Colores patrios: Rojo Patriotismo, Blanco Paz y Azul Libertad
   ============================================ */

:root {
  /* Rojo Patrio Paraguayo (Justicia y Patriotismo) */
  --paraguay-red: #CE1126;
  --paraguay-red-light: #EF4444;
  --paraguay-red-dark: #9B0E1D;

  /* Blanco Paz y Pureza */
  --paraguay-white: #FFFFFF;

  /* Azul Libertad e Institucional (Marina y Soberanía) */
  --paraguay-blue: #0038A8;
  --paraguay-blue-light: #2563EB;
  --paraguay-blue-dark: #002570;

  /* 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 PARAGUAY
   ============================================ */
.header-main {
  position: relative !important;
  z-index: 50 !important;
  background-color: var(--paraguay-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, 56, 168, 0.35) !important; /* Azul paraguayo al 35% */
  pointer-events: none;
  z-index: 1;
}

/* Footer institucional paraguayo */
.footer-bottom {
  background: linear-gradient(90deg, #CE1126 0%, #002570 50%, #0038A8 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(--paraguay-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(--paraguay-red);
}

.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(--paraguay-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, 56, 168, 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(--paraguay-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(--paraguay-blue);
}

.view-btn-new.active {
  background: var(--paraguay-blue);
  color: #FFFFFF;
  border-color: var(--paraguay-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(--paraguay-red) 0%, var(--paraguay-blue) 100%) !important;
  border: 1.5px solid #FFFFFF !important;
  box-shadow: 0 0 4px rgba(206, 17, 38, 0.4) !important;
}
.weekend-marker-bg {
  background: linear-gradient(135deg, #F87171 0%, var(--paraguay-red) 100%) !important;
  border: 1px solid var(--paraguay-red) !important;
}
.today-marker-bg { background-color: #27AE60; }
.bridge-marker-bg {
  background: linear-gradient(135deg, var(--paraguay-blue) 0%, var(--paraguay-red) 100%) !important;
  border: 1.5px dashed #FFFFFF !important;
}

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

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

/* Tarjetas de mes con borde superior azul patrio */
.month-card {
  border-top: 4px solid var(--paraguay-blue) !important;
  box-shadow: 0 4px 14px rgba(0, 56, 168, 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, 56, 168, 0.18) !important;
}

/* Encabezados de mes */
.month-header {
  color: var(--paraguay-blue-dark) !important;
  border-bottom: 2px solid var(--paraguay-red) !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 Rojo Patrio destacado y Sábado en Azul Libertad */
.day-header:nth-child(1) {
  color: var(--paraguay-red) !important;
  font-weight: 800 !important;
}

.day-header:nth-child(7) {
  color: var(--paraguay-blue) !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 PARAGUAYA
   ============================================ */

/* Sábados y fines de semana base: azul muy tenue y limpio */
.day-cell.weekend {
  background-color: #F8FAFC;
  color: #1E3A8A;
  border: 1px solid #E2E8F0;
  font-weight: 600;
}

.day-cell.weekend:hover:not(.holiday):not(.today) {
  background-color: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: var(--paraguay-blue) !important;
}

/* DOMINGO - ROJO PATRIO DISTINTIVO CON TEXTO DE ALTO CONTRASTE */
.day-cell.sunday,
.month-grid > .day-cell.weekend:nth-child(7n + 1) {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%) !important;
  color: #991B1B !important;
  font-weight: 700 !important;
  border: 1px solid #FCA5A5 !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, #FECACA 0%, #FCA5A5 100%) !important;
  border-color: var(--paraguay-red) !important;
  color: #7F1D1D !important;
  transform: scale(1.08);
}

/* ============================================
   DÍAS FESTIVOS - TRICOLOR PARAGUAYA (ROJO PATRIO Y AZUL LIBERTAD)
   ============================================ */
.day-cell.holiday {
  background: linear-gradient(135deg, var(--paraguay-red) 0%, var(--paraguay-blue) 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(206, 17, 38, 0.4) !important;
  position: relative;
}

.day-cell.holiday:hover {
  background: linear-gradient(135deg, #DC2626 0%, #1D4ED8 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 blanco estrella 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: #FFFFFF !important;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.95) !important;
}

/* Puente festivo / Feriado trasladado (Ley 7544 y Decretos de Fomento Turístico) */
.day-cell.bridge-day {
  background: linear-gradient(135deg, var(--paraguay-blue) 0%, var(--paraguay-red) 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border: 2px dashed #FFFFFF !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(--paraguay-blue-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: #60A5FA !important;
  border-bottom-color: rgba(96, 165, 250, 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: #450A0A !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(239, 68, 68, 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: #5A0E0E !important;
  border-color: #EF4444 !important;
  color: #FEE2E2 !important;
}

/* Festivos en modo oscuro */
body.dark-mode .day-cell.holiday {
  background: linear-gradient(135deg, #DC2626 0%, #1D4ED8 100%) !important;
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.5) !important;
}

body.dark-mode .day-cell.holiday::after {
  background-color: #FFFFFF !important;
  box-shadow: 0 0 6px #FFFFFF !important;
}

body.dark-mode .day-cell.bridge-day {
  background: linear-gradient(135deg, #1D4ED8 0%, #DC2626 100%) !important;
  border: 2px dashed #FFFFFF !important;
}

body.dark-mode .holiday-marker-bg {
  background: linear-gradient(135deg, #DC2626 0%, #1D4ED8 100%) !important;
  border: 1.5px solid #FFFFFF !important;
}

body.dark-mode .weekend-marker-bg {
  background: linear-gradient(135deg, #F87171 0%, #DC2626 100%) !important;
  border: 1px solid #F87171 !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);
}
