/* ============================================
   CALENDARIO LITURGICO
   ============================================ */

.calendario-page {
  background: transparent;
  min-height: 80vh;
  width: 100%;
  padding: 0;
}

.calendario-container {
  width: 85%;
  margin: 2rem auto;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #2a1d14 0%, #34241a 50%, #2a1d14 100%);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* --- Header do Calendario --- */
.calendario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-month-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #C5A572;
  letter-spacing: 2px;
  text-align: center;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(197, 165, 114, 0.15);
  color: #C5A572;
  text-decoration: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cal-nav-btn:hover {
  background: rgba(197, 165, 114, 0.3);
  color: #fff;
}

/* ============================================
   PWA PROMO SECTION
   ============================================ */

.pwa-promo-section {
  width: 100%;
  padding: 2.5rem 0 0;
}

.pwa-promo-card {
  position: relative;
  width: 85%;
  margin: 0 auto;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #2a1d14 0%, #34241a 50%, #2a1d14 100%);
  padding: 2.5rem 3rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(197, 165, 114, 0.12);
}

.pwa-promo-glow {
  position: absolute;
  top: -60%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 165, 114, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.pwa-promo-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 1;
}

.pwa-promo-icon-wrap {
  flex-shrink: 0;
}

.pwa-promo-icon {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  background: rgba(197, 165, 114, 0.1);
  border: 1px solid rgba(197, 165, 114, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pwa-promo-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.pwa-promo-text {
  flex: 1;
  min-width: 0;
}

.pwa-promo-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #C5A572;
  letter-spacing: 1px;
  margin: 0 0 0.35rem;
}

.pwa-promo-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin: 0;
}

.pwa-promo-actions {
  flex-shrink: 0;
}

/* Main install button */
.pwa-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.8rem;
  border: none;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: linear-gradient(135deg, #C5A572, #d4b887);
  color: #2a1d14;
  box-shadow: 0 4px 16px rgba(197, 165, 114, 0.3);
}

.pwa-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(197, 165, 114, 0.45);
}

.pwa-promo-btn:active {
  transform: translateY(0);
}

.pwa-promo-btn i {
  font-size: 1rem;
}

/* iOS variant */
.pwa-promo-btn-ios {
  background: linear-gradient(135deg, #C5A572, #d4b887);
  color: #2a1d14;
}

/* Installed state */
.pwa-promo-btn-installed {
  background: rgba(197, 165, 114, 0.12);
  color: rgba(197, 165, 114, 0.6);
  border: 1px solid rgba(197, 165, 114, 0.2);
  box-shadow: none;
  cursor: default;
}

.pwa-promo-btn-installed:hover {
  transform: none;
  box-shadow: none;
}

/* Android waiting state (before beforeinstallprompt fires) */
.pwa-promo-btn-waiting {
  opacity: 0.5;
  pointer-events: none;
}

/* Platform badges */
.pwa-promo-platforms {
  position: absolute;
  bottom: -0.5rem;
  right: 0;
  display: flex;
  gap: 0.75rem;
}

.pwa-platform {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease;
}

.pwa-platform i {
  font-size: 0.7rem;
}

.pwa-platform-active {
  color: #C5A572;
}

/* --- Julian mode overrides --- */
.pwa-promo-section.julian-mode .pwa-promo-card {
  background: linear-gradient(135deg, #f5e6c8 0%, #e8d5b0 50%, #f0dfc0 100%);
  border-color: rgba(92, 51, 16, 0.12);
  box-shadow: 0 4px 24px rgba(92, 51, 16, 0.12);
}

.pwa-promo-section.julian-mode .pwa-promo-glow {
  background: radial-gradient(circle, rgba(92, 51, 16, 0.08) 0%, transparent 70%);
}

.pwa-promo-section.julian-mode .pwa-promo-icon {
  background: rgba(92, 51, 16, 0.08);
  border-color: rgba(92, 51, 16, 0.15);
}

.pwa-promo-section.julian-mode .pwa-promo-title {
  color: #5C3310;
}

.pwa-promo-section.julian-mode .pwa-promo-subtitle {
  color: rgba(92, 51, 16, 0.55);
}

.pwa-promo-section.julian-mode .pwa-promo-btn {
  background: linear-gradient(135deg, #5C3310, #7a4a20);
  color: #f5e6c8;
  box-shadow: 0 4px 16px rgba(92, 51, 16, 0.2);
}

.pwa-promo-section.julian-mode .pwa-promo-btn:hover {
  box-shadow: 0 6px 24px rgba(92, 51, 16, 0.35);
}

.pwa-promo-section.julian-mode .pwa-promo-btn-installed {
  background: rgba(92, 51, 16, 0.08);
  color: rgba(92, 51, 16, 0.5);
  border: 1px solid rgba(92, 51, 16, 0.15);
  box-shadow: none;
}

.pwa-promo-section.julian-mode .pwa-platform {
  color: rgba(92, 51, 16, 0.25);
}

.pwa-promo-section.julian-mode .pwa-platform-active {
  color: #5C3310;
}

/* ============================================
   iOS BOTTOM SHEET
   ============================================ */

.pwa-ios-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.35s ease;
}

.pwa-ios-overlay.pwa-ios-visible {
  background: rgba(0, 0, 0, 0.5);
}

.pwa-ios-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #1a1a1a;
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.5rem 2rem 2rem;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.pwa-ios-overlay.pwa-ios-visible .pwa-ios-sheet {
  transform: translateY(0);
}

.pwa-ios-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 1.25rem;
}

.pwa-ios-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-ios-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.pwa-ios-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.pwa-ios-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #2a1d14;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.pwa-ios-app-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.pwa-ios-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #C5A572;
  margin: 0 0 0.3rem;
  letter-spacing: 0.5px;
}

.pwa-ios-header p {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* Steps */
.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pwa-ios-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C5A572, #d4b887);
  color: #2a1d14;
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-ios-step-content p {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin: 0;
}

.pwa-ios-step-content strong {
  color: #fff;
}

.pwa-ios-step-content i {
  color: #C5A572;
  font-size: 0.8rem;
}

/* Done button */
.pwa-ios-done-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #C5A572, #d4b887);
  color: #2a1d14;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pwa-ios-done-btn:hover {
  box-shadow: 0 4px 16px rgba(197, 165, 114, 0.35);
}

/* ============================================
   PWA PROMO RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .pwa-promo-card {
    width: 95%;
    padding: 1.75rem 1.5rem;
  }

  .pwa-promo-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .pwa-promo-text {
    order: 1;
  }

  .pwa-promo-icon-wrap {
    order: 0;
  }

  .pwa-promo-actions {
    order: 2;
  }

  .pwa-promo-platforms {
    position: static;
    justify-content: center;
    margin-top: 1rem;
    order: 3;
  }

  .pwa-promo-title {
    font-size: 1.05rem;
  }

  .pwa-promo-subtitle {
    font-size: 0.8rem;
  }

  .pwa-ios-sheet {
    padding: 1.25rem 1.5rem 1.75rem;
  }
}

/* --- Toggle Gregoriano/Juliano --- */
.cal-mode-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cal-current-mode {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(197, 165, 114, 0.7);
  letter-spacing: 1px;
}

.cal-current-mode i {
  margin-right: 0.3rem;
}

.cal-toggle-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(197, 165, 114, 0.1);
  color: rgba(197, 165, 114, 0.6);
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid rgba(197, 165, 114, 0.15);
}

.cal-toggle-btn:hover {
  background: #C5A572;
  color: #3D2B1F;
  border-color: #C5A572;
}

.cal-toggle-btn i {
  margin-right: 0.3rem;
}

/* --- Dias da Semana --- */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.5rem;
}

.cal-weekday {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: rgba(197, 165, 114, 0.6);
  padding: 0.3rem 0;
  letter-spacing: 1px;
}

/* --- Grid de Dias --- */
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 50%;
  aspect-ratio: 1;
  transition: all 0.3s ease;
}

.cal-day.empty {
  cursor: default;
}

.cal-day:not(.empty):hover {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
}

.cal-day.selected {
  outline: 2px solid #C5A572;
  outline-offset: 2px;
  border-radius: 50%;
}

.cal-day.today .cal-day-number {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.cal-day-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: 'Lato', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  transition: all 0.3s ease;
}

.cal-feast-dot {
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #333;
}
.cal-feast-dot.great-feast-dot {
  background: #c0392b;
}

/* --- Legenda --- */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.cal-legend-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

/* --- Painel de Informacao --- */
.calendario-info-panel {
  background: rgba(197, 165, 114, 0.08);
  border-radius: 1.25rem;
  padding: 2rem;
  min-height: 400px;
  border: 1px solid rgba(197, 165, 114, 0.2);
}

.info-panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: rgba(197, 165, 114, 0.4);
  text-align: center;
}

.info-panel-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.info-panel-placeholder p {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
}

.info-fasting-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  float: right;
}

.info-date-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.6rem;
  color: #C5A572;
  margin: 0.5rem 0;
  line-height: 1.3;
}

.info-date-corresponding {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.2rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-date-corresponding i {
  font-size: 0.8rem;
  color: rgba(197, 165, 114, 0.6);
}

.info-divider {
  border: none;
  border-top: 1px solid rgba(197, 165, 114, 0.2);
  margin: 1rem 0;
}

/* Festas */
.info-feast-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(197, 165, 114, 0.1);
}

.info-feast-type {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #C5A572;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.info-feast-type.great {
  color: #e6c877;
}

.info-feast-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0.3rem 0;
}

.info-feast-julian {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.info-feast-desc {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.3rem;
}

/* Box de Jejum */
.info-fasting-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1.2rem;
  margin-top: 1rem;
  border: 1px solid rgba(197, 165, 114, 0.1);
}

.info-fasting-icon {
  font-size: 1.2rem;
  color: #C5A572;
}

.info-fasting-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #C5A572;
  letter-spacing: 1px;
  margin-left: 0.5rem;
}

.info-fasting-box h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: #fff;
  margin: 0.5rem 0 0.3rem;
}

.info-fasting-description {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* ============================================
   TEMA ANTIGO (Velho Calendario / Juliano)
   ============================================ */

.julian-mode .calendario-container {
  background: linear-gradient(135deg, #f5e6c8 0%, #e8d5b0 50%, #f0dfc0 100%);
  box-shadow: 0 4px 20px rgba(92, 51, 16, 0.15);
}

.julian-mode .cal-month-title {
  color: #5C3310;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(92, 51, 16, 0.1);
}

.julian-mode .cal-nav-btn {
  background: rgba(92, 51, 16, 0.1);
  color: #5C3310;
}

.julian-mode .cal-nav-btn:hover {
  background: rgba(92, 51, 16, 0.2);
  color: #3D2B1F;
}

.julian-mode .cal-current-mode {
  color: rgba(92, 51, 16, 0.7);
}

.julian-mode .cal-toggle-btn {
  background: rgba(92, 51, 16, 0.08);
  color: rgba(92, 51, 16, 0.5);
  border-color: rgba(92, 51, 16, 0.15);
}

.julian-mode .cal-toggle-btn:hover {
  background: #5C3310;
  color: #f5e6c8;
  border-color: #5C3310;
}

.julian-mode .cal-weekday {
  color: rgba(92, 51, 16, 0.5);
}

.julian-mode .cal-day:not(.empty):hover {
  background: rgba(92, 51, 16, 0.05);
}

.julian-mode .cal-day.selected {
  outline-color: #5C3310;
}

.julian-mode .cal-day.today .cal-day-number {
  outline-color: rgba(92, 51, 16, 0.5);
}

.julian-mode .cal-feast-dot {
  background: #333;
}
.julian-mode .cal-feast-dot.great-feast-dot {
  background: #c0392b;
}

.julian-mode .cal-legend-label {
  color: rgba(92, 51, 16, 0.6);
}

.julian-mode .calendario-info-panel {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(92, 51, 16, 0.15);
  box-shadow: 0 4px 20px rgba(92, 51, 16, 0.1);
}

.julian-mode .info-panel-placeholder {
  color: rgba(92, 51, 16, 0.4);
}

.julian-mode .info-date-title {
  color: #5C3310;
}

.julian-mode .info-date-corresponding {
  color: rgba(92, 51, 16, 0.55);
}

.julian-mode .info-date-corresponding i {
  color: rgba(92, 51, 16, 0.45);
}

.julian-mode .info-divider {
  border-top-color: rgba(92, 51, 16, 0.2);
}

.julian-mode .info-feast-item {
  background: rgba(92, 51, 16, 0.05);
  border-color: rgba(92, 51, 16, 0.1);
}

.julian-mode .info-feast-type {
  color: #8B5E3C;
}

.julian-mode .info-feast-type.great {
  color: #5C3310;
}

.julian-mode .info-feast-title {
  color: #3D2B1F;
}

.julian-mode .info-feast-julian {
  color: rgba(92, 51, 16, 0.5);
}

.julian-mode .info-feast-desc {
  color: rgba(92, 51, 16, 0.7);
}

.julian-mode .info-fasting-box {
  background: rgba(92, 51, 16, 0.05);
  border-color: rgba(92, 51, 16, 0.1);
}

.julian-mode .info-fasting-icon {
  color: #8B5E3C;
}

.julian-mode .info-fasting-label {
  color: #8B5E3C;
}

.julian-mode .info-fasting-box h3 {
  color: #3D2B1F;
}

.julian-mode .info-fasting-description {
  color: rgba(92, 51, 16, 0.6);
}

/* Ornamentos no tema antigo */
.julian-mode .calendario-grid-wrapper {
  position: relative;
  padding: 1.5rem;
  padding-top: 2rem;
  margin-top: 0.75rem;
  border: 2px solid rgba(92, 51, 16, 0.15);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  max-width: 100%;
}

.julian-mode .calendario-grid-wrapper::before {
  content: '☦\fe0e';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #8B5E3C;
  background: #f0dfc0;
  padding: 0 0.5rem;
  font-family: 'Noto Sans Symbols 2', 'Segoe UI Symbol', 'DejaVu Sans', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-text-stroke: 0;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
  .calendario-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 95%;
    padding: 1.5rem;
  }

  .calendario-page {
    padding: 1.5rem 0;
  }

  .julian-mode .calendario-grid-wrapper {
    padding: 0.5rem;
    margin: 0;
    border-width: 1px;
  }

  .julian-mode .calendario-container {
    padding: 1rem;
  }

  .cal-month-title {
    font-size: 1.1rem;
  }

  .cal-day-number {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .calendario-info-panel {
    min-height: auto;
    padding: 1.5rem;
  }

  .info-date-title {
    font-size: 1.3rem;
  }

  .cal-legend {
    gap: 0.6rem;
  }

  .cal-legend-label {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .cal-day-number {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .cal-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .cal-month-title {
    font-size: 0.95rem;
  }
}

/* ============================================
   MODAL CONVITE INSTALAR APP
   ============================================ */
.pwa-invite-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.35s ease;
}

.pwa-invite-overlay.pwa-invite-visible {
  background: rgba(0, 0, 0, 0.55);
}

.pwa-invite-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #1e1510 0%, #1a1a1a 100%);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.5rem 2rem 2.5rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  text-align: center;
}

.pwa-invite-overlay.pwa-invite-visible .pwa-invite-sheet {
  transform: translateY(0);
}

.pwa-invite-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 1.25rem;
}

.pwa-invite-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-invite-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.pwa-invite-icon-wrap {
  margin-bottom: 1.25rem;
}

.pwa-invite-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #2a1d14;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(197, 165, 114, 0.15);
}

.pwa-invite-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pwa-invite-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #C5A572;
  margin: 0 0 0.5rem;
  letter-spacing: 0.5px;
}

.pwa-invite-desc {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.pwa-invite-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.pwa-invite-btn-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 280px;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  background: linear-gradient(135deg, #C5A572, #d4b887);
  color: #2a1d14;
  box-shadow: 0 4px 16px rgba(197, 165, 114, 0.3);
  transition: all 0.3s ease;
}

.pwa-invite-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(197, 165, 114, 0.45);
}

.pwa-invite-btn-accept:active {
  transform: translateY(0);
}

.pwa-invite-btn-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
}

.pwa-invite-btn-dismiss:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Julian mode overrides */
.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-sheet {
  background: linear-gradient(180deg, #f5e6c8 0%, #ede0cc 100%);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-handle {
  background: rgba(92, 51, 16, 0.2);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-close {
  background: rgba(92, 51, 16, 0.1);
  color: rgba(92, 51, 16, 0.5);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-close:hover {
  background: rgba(92, 51, 16, 0.2);
  color: #5C3310;
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-icon {
  background: #5C3310;
  box-shadow: 0 4px 20px rgba(92, 51, 16, 0.3), 0 0 0 1px rgba(92, 51, 16, 0.15);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-title {
  color: #5C3310;
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-desc {
  color: rgba(92, 51, 16, 0.5);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-btn-accept {
  background: linear-gradient(135deg, #5C3310, #7a4a20);
  color: #f5e6c8;
  box-shadow: 0 4px 16px rgba(92, 51, 16, 0.2);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-btn-accept:hover {
  box-shadow: 0 6px 24px rgba(92, 51, 16, 0.35);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-btn-dismiss {
  color: rgba(92, 51, 16, 0.35);
}

.calendario-page.julian-mode ~ .pwa-invite-overlay .pwa-invite-btn-dismiss:hover {
  color: rgba(92, 51, 16, 0.6);
}

/* ============================================
   OVERLAY ANIMAÇÃO DE INSTALAÇÃO
   ============================================ */
.pwa-installing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.pwa-installing-overlay.pwa-installing-visible {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.pwa-installing-overlay.pwa-installing-fade-out {
  opacity: 0;
  visibility: hidden;
}

.pwa-installing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Ring wrapper */
.pwa-installing-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
}

.pwa-installing-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pwa-ring-bg {
  fill: none;
  stroke: rgba(197, 165, 114, 0.12);
  stroke-width: 4;
}

.pwa-ring-progress {
  fill: none;
  stroke: #C5A572;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.6s ease;
}

/* Spinning animation while installing (slow, ~10s feel) */
.pwa-installing-visible .pwa-installing-ring {
  animation: pwaRingSpin 3.5s linear infinite;
}

.pwa-installing-visible .pwa-ring-progress {
  stroke-dashoffset: 169.646;
  animation: pwaRingPulse 5s ease-in-out infinite;
}

@keyframes pwaRingSpin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

@keyframes pwaRingPulse {
  0%, 100% { stroke-dashoffset: 280; }
  50% { stroke-dashoffset: 80; }
}

/* Success state: ring full, no spin */
.pwa-installing-overlay.pwa-installing-success .pwa-installing-ring {
  animation: none;
  transform: rotate(-90deg);
}

.pwa-installing-overlay.pwa-installing-success .pwa-ring-progress {
  animation: none;
  stroke-dashoffset: 0;
  stroke: #C5A572;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Icon inside ring */
.pwa-installing-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #2a1d14;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pwa-installing-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pwa-installing-visible .pwa-installing-icon {
  animation: pwaIconPulse 3s ease-in-out infinite;
}

.pwa-installing-overlay.pwa-installing-success .pwa-installing-icon {
  animation: none;
  transform: translate(-50%, -50%) scale(1.08);
}

@keyframes pwaIconPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Checkmark */
.pwa-installing-check {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C5A572, #d4b887);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a1d14;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(197, 165, 114, 0.4);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.pwa-installing-overlay.pwa-installing-success .pwa-installing-check {
  transform: scale(1);
  opacity: 1;
}

/* Text */
.pwa-installing-text {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  margin: 0;
  transition: color 0.4s ease;
}

.pwa-installing-visible .pwa-installing-text {
  animation: pwaTextPulse 3s ease-in-out infinite;
}

.pwa-installing-overlay.pwa-installing-success .pwa-installing-text {
  animation: none;
  color: #C5A572;
}

@keyframes pwaTextPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Hint text (shown on success) */
.pwa-installing-hint {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.pwa-installing-overlay.pwa-installing-success .pwa-installing-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PWA SPLASH SCREEN (standalone only)
   ============================================ */
.pwa-splash {
  display: none;
}

@media (display-mode: standalone) {
  .pwa-splash {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #2a1d14;
    align-items: center;
    justify-content: center;
    animation: pwaSplashFadeOut 0.6s ease 3.5s forwards;
  }

  .pwa-splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .pwa-splash-logo-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(197, 165, 114, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    animation: pwaSplashLogoIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
    box-shadow: 0 0 40px rgba(197, 165, 114, 0.08), inset 0 0 20px rgba(197, 165, 114, 0.05);
  }

  .pwa-splash-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pwa-splash-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
  }

  .pwa-splash-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(197, 165, 114, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    animation: pwaSplashTextIn 0.8s ease 1s forwards;
  }

  .pwa-splash-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #C5A572;
    letter-spacing: 1px;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    animation: pwaSplashTextIn 0.8s ease 1.4s forwards;
  }
}

@keyframes pwaSplashLogoIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pwaSplashTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pwaSplashFadeOut {
  0% {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* ============================================
   PWA STANDALONE MODE
   Esconde menu, footer e seção de instalação
   quando o app é aberto como PWA instalado
   ============================================ */
@media (display-mode: standalone) {
  .bottomHeader,
  .siteFooter,
  .pwa-promo-section {
    display: none !important;
  }

  .calendario-page {
    padding-top: 1rem;
  }

  .calendario-container {
    margin-top: 1rem;
  }
}

/* ============================================
   SYNAXARION - Botão "Ver mais" e Modal
   ============================================ */

/* Botão "Ver mais" */
.synaxarion-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  border: none;
  border-radius: 0.35rem;
  background: #8B1A1A;
  color: #fff;
  font-size: 0.78rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.synaxarion-btn:hover {
  background: #a52a2a;
  transform: translateY(-1px);
}
.synaxarion-btn:active {
  transform: translateY(0);
}
.synaxarion-btn i {
  font-size: 0.7rem;
}


/* Modal Overlay */
.synaxarion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: synFadeIn 0.25s ease;
}

@keyframes synFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Conteúdo do Modal */
.synaxarion-content {
  background: #faf9f7;
  border-radius: 1rem;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: synSlideUp 0.3s ease;
}

@keyframes synSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Botão Fechar */
.synaxarion-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #8B1A1A;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.synaxarion-close:hover {
  color: #a52a2a;
  transform: scale(1.15);
}

/* Título */
.synaxarion-title {
  font-family: 'Cinzel', serif;
  color: #8B1A1A;
  font-size: 1.3rem;
  margin: 0 0 1.2rem 0;
  padding-right: 2rem;
  border-bottom: 2px solid #C5A572;
  padding-bottom: 0.8rem;
}

/* Texto do Synaxarion */
.synaxarion-text {
  font-family: 'Lato', sans-serif;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.75;
}
.synaxarion-text p { margin-bottom: 0.8rem; }
.synaxarion-text h2, .synaxarion-text h3 {
  font-family: 'Cinzel', serif;
  color: #4a3728;
  margin: 1rem 0 0.5rem;
}
.synaxarion-text blockquote {
  border-left: 3px solid #C5A572;
  padding-left: 1rem;
  margin: 0.8rem 0;
  font-style: italic;
  color: #555;
}

/* Responsividade */
@media (max-width: 768px) {
  .synaxarion-overlay { padding: 0.75rem; }
  .synaxarion-content { padding: 1.5rem 1.2rem; max-height: 85vh; }
  .synaxarion-title { font-size: 1.1rem; }
  .synaxarion-text { font-size: 0.9rem; }
}
