body {
 min-height: 100%;
 padding: 0;
 margin: 0;
 font-family: Verdana, Arial, Helvetica, sans-serif;
 background-color: #efece5; /* off-white shown as side padding on desktop */
}

/* Page wrapper: floats over the body's off-white. Sections inside paint
   their own white background; gaps between sections (.section_separator)
   show the off-white through, like a stack of cards. */
.site_wrap {
  background-color: transparent;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site_wrap > main { flex: 1 0 auto; display: flex; flex-direction: column; }

.page_section {
  background-color: #ffffff;
  padding: 28px 0;  /* vertical breathing inside each white card */
}
.section_separator {
  height: 14px;
  /* Transparent — body's off-white shows through. */
}

/* --- Site header (top nav bar) --- */
.site_header {
  background-color: #30CB9A;
  padding: 10px 12px;
  /* Stick to top of viewport while scrolling. Plain `sticky` + `top: 0` on a
     flex-column child works in Chrome/Firefox/Safari as long as no ancestor
     has a constrained `overflow`, which is the case for our layout. */
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}
.site_nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.site_nav_item {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 18px;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: normal;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0);
  transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.site_nav_item:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
}
.site_nav_item.active {
  background-color: #ffffff;
  color: #1c2b5e;
  font-weight: bold;
  border-color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.site_nav_item.active:hover { background-color: #ffffff; }

/* --- Site footer --- */
.site_footer {
  background-color: #30CB9A;
  color: #ffffff;
  padding: 18px 16px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 14px;
}
.site_footer a { color: #ffffff; text-decoration: underline; }

#screen_centered {
 width: 100%;
 padding: 30px 20px 40px 20px;
 text-align: center;
 box-sizing: border-box;
}


/* Page title styling: dark/black for prominence (was faded green). */
.title {
  margin: auto;
  font-family: Georgia, serif;
  text-align: center;
  color: #1a1a1a;
}

.main_title { font-size: 32px; font-weight: bold; }
.sub_title  { font-size: 22px; font-weight: normal; }

#footer_time {
  bottom: 0;
  width: 100%;
  height: 60px;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 30px;
}

#footer_holiday {
  bottom: 0;
  width: 100%;
  height: 60px;
  text-align: center;
}


.footer_text{
  font-family:Georgia;
  font-size:14px;
  font-family:Georgia;
  padding-left:20px;
  color:#30CB9A;
}

#time_footer_space{ height: 30px; width: 100%; }

#ruler { width: 30%; }

.holidays_table { margin: 0 auto; table-layout: fixed; }
td, th { text-align: left; padding: 8px; }
tr:nth-child(even) { background-color: #f2f2ef; }
td { padding: 10px; width: 50%; }
.holiday_e{ font-size: 130%; color: #1c2b5e; }
.holiday_f{ font-size: 80%; color: #19471c; }
.holiday_padding { padding-top:50px; }
.centered_div { text-align: center; }
.holiday_title_e { font-size: 150%; }
.holiday_title_f { font-size: 120%; }
.amhrc{ color: #1c2b5e; }
.engl{ color: #898c89; }
.upcoming_date_e { font-size: 400%;  }
.upcoming_date_f { font-size: 300%;  }
.upcoming_name_e { font-size: 180%; padding-top: 20px; }
.upcoming_name_f { font-size: 120%; padding-top: 20px; }

/* Gap between the Amharic group and the English group inside .upcoming_block */
.upcoming_block { margin-top: 16px; }
.upcoming_block_en { margin-top: 32px; }
.top_separator{ width :50%; margin-top:50px; margin-bottom:50px;}
.bottom_separator{ width :50%; margin-top:50px; margin-bottom:20px;}


/* Clock display: every text element shares the same navy so the day-of-week,
   month name and period-of-day match the day/year/hour numbers visually. */
.time_day_big { font-size: 400%; color: #1c2b5e;}
.time_day_sml { font-size: 300%; color: #1c2b5e;}
.time_hour_big { font-size: 400%; color: #1c2b5e;}
.time_hour_sml { font-size: 300%; color: #1c2b5e;}
.time_hour_vsml { font-size: 150%; color: #1c2b5e;}
.time_hour_sml_ampm { font-size: 250%; color: #30CB9A;}
.time_hour_vsml_ampm { font-size: 120%; color: #30CB9A;}

/* H1 styling: bold Georgia, matching the section titles (.section_title). */
h1.main_title, h1.title { font-weight: bold; margin: 0 auto; }

/* SEO content: text-style class, max-width centered inside a .page_section */
.seo_section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: left;
  font-size: 16px;
  line-height: 1.65;
  color: #364536;
}
/* Drop redundant top/bottom margin on the first/last child of .seo_section
   since .page_section now provides the vertical card padding. */
.seo_section > :first-child { margin-top: 0; }
.seo_section > :last-child { margin-bottom: 0; }
.seo_section h2,
.section_title {
  font-family: Georgia, serif;
  color: #1a1a1a;
  font-size: 26px;
  font-weight: bold;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 16px;
}
.seo_section h3 {
  font-family: Georgia, serif;
  color: #1a1a1a;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 12px;
}
.seo_section p { margin: 0 0 14px 0; }
.seo_section a { color: #1c2b5e; }
.seo_section ol.seo_months,
.seo_section ul.seo_links { padding-left: 24px; margin: 8px 0 16px 0; }
.seo_section dl.seo_faq dt {
  font-weight: bold;
  color: #1c2b5e;
  margin-top: 12px;
}
.seo_section dl.seo_faq dd {
  margin: 4px 0 12px 0;
  padding-left: 0;
}

/* --- Holiday table links + per-holiday pages --- */

/* Holiday names in the holidays_table become clickable links to /holidays/<slug>/ */
.holiday_link {
  color: inherit;            /* inherit the navy or muted-green of the surrounding span */
  text-decoration: none;
  border-bottom: 1px dotted #c8d8d0;
}
.holiday_link:hover,
.holiday_link:focus {
  color: #30CB9A;
  border-bottom-color: #30CB9A;
}

/* Info icon next to each holiday name in the holidays_table.
   Floats right of the cell so users see a clear "click for details" affordance. */
.holiday_info {
  float: right;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  border-radius: 50%;
  color: #30CB9A;
  text-decoration: none;
  border: none;
  flex-shrink: 0;
  transition: background-color 120ms ease-out, color 120ms ease-out, transform 120ms ease-out;
}
.holiday_info svg {
  width: 22px;
  height: 22px;
  display: block;
}
.holiday_info:hover,
.holiday_info:focus {
  background-color: #30CB9A;
  color: #ffffff;
  outline: none;
  transform: scale(1.06);
}

/* Per-holiday page (/holidays/<slug>/) */
.holiday_breadcrumb {
  max-width: 760px;
  margin: 0 auto 12px auto;
  padding: 0 20px;
  font-size: 13px;
  color: #6a7a6a;
}
.holiday_breadcrumb a { color: #6a7a6a; text-decoration: none; }
.holiday_breadcrumb a:hover { color: #30CB9A; }

.holiday_h1 {
  margin: 0 auto 8px auto;
  padding: 0 20px;
  font-size: 30px;
  line-height: 1.25;
}
.holiday_h1_amharic {
  display: block;
  font-family: "Noto Sans Ethiopic", "Nyala", Verdana, sans-serif;
  font-size: 22px;
  font-weight: normal;
  margin-top: 6px;
}

.holiday_intro { padding-top: 16px; }
.holiday_intro p:first-of-type { font-size: 17px; }

.holiday_hero_figure {
  margin: 20px auto 8px auto;
  text-align: center;
}
.holiday_hero {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.holiday_hero_caption {
  font-size: 14px;
  color: #6a7a6a;
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
  font-style: italic;
}
.holiday_hero_attribution {
  display: block;
  font-style: normal;
  font-size: 12px;
  margin-top: 4px;
  color: #8a9a8a;
}
.holiday_hero_caption a,
.holiday_hero_attribution a {
  color: #6a7a6a;
}

.holiday_meta_table {
  margin: 8px auto 16px auto;
  border-collapse: collapse;
  font-size: 15px;
  width: auto;
  table-layout: auto;
}
.holiday_meta_table th,
.holiday_meta_table td {
  text-align: left;
  padding: 8px 16px;
  border-bottom: 1px solid #e5e5e0;
  width: auto;
}
.holiday_meta_table th {
  color: #6a7a6a;
  font-weight: normal;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.holiday_meta_table tr:nth-child(even) { background-color: transparent; }

.holiday_date_rule {
  font-size: 14px;
  color: #364536;
  background: #f7f5ee;
  padding: 12px 16px;
  border-left: 3px solid #30CB9A;
  border-radius: 4px;
}

.holiday_footer_links {
  text-align: center;
  font-size: 14px;
}

@media (max-width: 600px) {
  .holiday_h1 { font-size: 24px; }
  .holiday_h1_amharic { font-size: 18px; }
  .holiday_intro p:first-of-type { font-size: 16px; }
  .holiday_meta_table th, .holiday_meta_table td { padding: 6px 10px; }
}

/* --- Calendar converter (shared between home widget and /convert/) --- */

/* Soft flash animation when a date display updates */
@keyframes converterDateFlash {
  0%   { background-color: #d4f4e7; }
  60%  { background-color: #d4f4e7; }
  100% { background-color: transparent; }
}

/* --- Dedicated /convert/ page --- */
.converter_page {
  padding-top: 40px !important;
  text-align: center;
}
.converter_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 760px;       /* aligns with .seo_section */
  margin: 24px auto 16px auto;
  padding: 0 20px;
  text-align: left;
  box-sizing: border-box;
}
.converter_panel {
  background: #ffffff;
  border: 1px solid #d8e8e0;
  border-radius: 8px;
  padding: 14px;
  min-width: 0;           /* let grid items shrink below intrinsic width */
}
.converter_display {
  border-radius: 6px;
  padding: 10px 12px;
  margin: -2px -2px 12px -2px;
  text-align: center;
}
.converter_display.flash {
  animation: converterDateFlash 1200ms ease-out;
}
.converter_display_main {
  font-family: Georgia, "Noto Sans Ethiopic", "Nyala", serif;
  font-size: 18px;        /* sized so worst-case "Wednesday September 30, 2026" fits on one line */
  font-weight: bold;
  color: #1c2b5e;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.converter_inputs {
  display: grid;
  /* Day narrow (2 digits), month flexes for the longest name, year medium. */
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: 6px;
}
.converter_input {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #6a7a6a;
  gap: 4px;
}
.converter_input_label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.converter_inputs select {
  font: inherit;
  padding: 8px;
  border: 1px solid #c8d8d0;
  border-radius: 4px;
  background: #fff;
  color: #1c2b5e;
  min-width: 0;
  width: 100%;
}
.converter_today_button_wrap {
  text-align: center;
  margin: 4px 0 32px 0;
}
.converter_today_button {
  display: inline-block;
  font: inherit;
  font-weight: bold;
  font-size: 15px;
  padding: 10px 22px;
  border: 0;
  border-radius: 6px;
  background: #30CB9A;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease-out;
}
.converter_today_button:hover { background: #28b487; }

@media (max-width: 700px) {
  /* Mobile: stack panels and trim padding so "Wednesday September 30, 2026"
     still fits on a single line at 360px viewport without wrapping. */
  .converter_grid { grid-template-columns: 1fr; padding: 0 8px; gap: 10px; margin-top: 16px; }
  .converter_panel { padding: 10px; }
  .converter_display { padding: 8px 10px; margin: -2px -2px 10px -2px; }
  .converter_display_main { font-size: 17px; }
  .converter_inputs { gap: 5px; }
  #screen_centered { padding: 24px 10px 32px 10px; }
}

/* --- "Time of day in Ethiopia" reference table --- */
.tod_table {
  width: 100%;
  max-width: 560px;
  margin: 16px auto;
  border-collapse: collapse;
  font-size: 16px;
}
.tod_table th, .tod_table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e8e5;
  text-align: left;
}
.tod_table th {
  background-color: #f7faf8;
  color: #1c2b5e;
  font-weight: bold;
}
.tod_table .tod_am {
  font-size: 18px;
  color: #1c2b5e;
  font-weight: bold;
}
.tod_examples_caption {
  max-width: 560px;
  margin: 24px auto 8px auto;
  padding: 0 12px;     /* match .tod_table cell padding so text starts in the same column */
  text-align: left;
}
.tod_examples {
  list-style: none;
  padding: 0;
  margin: 0 auto 16px auto;
  max-width: 560px;
}
.tod_examples li {
  padding: 10px 12px;  /* match .tod_table cell padding */
  border-bottom: 1px solid #e5e8e5;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.tod_examples li:nth-child(even) { background-color: #f2f2ef; }
.tod_examples li:last-child { border-bottom: 0; }
.tod_examples .tod_west { color: #364536; }
.tod_examples .tod_eth { color: #1c2b5e; font-weight: bold; }

/* Two-column layout for religious holidays (Christian | Islamic) */
.religious_holidays_columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}
.religious_holidays_col {
  flex: 1 1 280px;
  min-width: 0;
}
.religious_holidays_col h3 { margin-top: 0; }
@media (max-width: 600px) {
  .religious_holidays_columns { gap: 0; }
}

/* --- Full Ethiopian month calendar (/calendar/) --- */

/* Controls row: holiday selector */
.cal_controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 16px auto 6px auto;
  padding: 0 12px;
}
.cal_control_field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 240px;
  min-width: 0;
}
.cal_control_label {
  font-size: 14px;
  color: #1c2b5e;
  font-weight: bold;
}
.cal_holiday_select {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid #c8d8d0;
  border-radius: 6px;
  background: #fff;
  color: #1c2b5e;
  width: 100%;
}

/* Month + Year selectors row — kept on a single line; selects only as wide as their content. */
.cal_month_nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px auto 8px auto;
  max-width: 760px;
  padding: 0 12px;
  flex-wrap: nowrap;
}
.cal_my_select {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid #c8d8d0;
  border-radius: 6px;
  background: #fff;
  color: #1c2b5e;
  font-weight: bold;
  flex: 0 1 auto;
  min-width: 0;
}
.cal_nav_btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1.5px solid #c8d8d0;
  background: #fff;
  color: #1c2b5e;
  font-family: Georgia, serif;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
  height: 41px;
  box-sizing: border-box;
}
.cal_nav_btn:hover {
  background: #f3faf6;
  border-color: #30CB9A;
}
.cal_nav_today {
  background: #30CB9A;
  border-color: #30CB9A;
  color: #fff;
  font-weight: bold;
}
.cal_nav_today:hover { background: #28b487; border-color: #28b487; color: #fff; }

/* Caption directly above the grid: "ሚያዝያ 2018 (April 9 – May 8, 2026)". */
.cal_month_caption {
  max-width: 760px;
  margin: 14px auto 8px auto;
  padding: 0 12px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  color: #1c2b5e;
}

.cal_grid_wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 12px;
  overflow-x: auto;
}

/* Prev/next month buttons sit in the caption row, flanking the month label.
   Each button is one weekday-column wide (the row matches the grid's width and
   border-spacing) and is labelled with the month it navigates to. */
.cal_month_caption_row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  max-width: 980px;          /* match .cal_grid_wrap */
  margin: 14px auto 8px auto;
  padding: 0 12px;           /* match .cal_grid_wrap */
}
.cal_month_caption_row .cal_month_caption {
  flex: 1 1 auto;
  max-width: none;
  margin: 0;
  padding: 0;
  align-self: center;
  text-align: center;
}
.cal_month_btn {
  flex: 0 0 calc((100% - 32px) / 7);  /* one of 7 columns; 32px = 8 x 4px border-spacing */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px;
  border-radius: 9px;
  background: linear-gradient(135deg, #30CB9A 0%, #1ea173 100%);
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 1px 3px rgba(28,43,94,0.2);
  transition: filter 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}
.cal_month_btn_chev { font-size: 20px; flex: 0 0 auto; }
.cal_month_btn_name { overflow: hidden; text-overflow: ellipsis; }
.cal_month_btn:hover { filter: brightness(1.06); box-shadow: 0 2px 7px rgba(28,43,94,0.28); }
.cal_month_btn:active { transform: translateY(1px); }
.cal_month_btn:focus { outline: 2px solid #1c2b5e; outline-offset: 2px; }
.cal_grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}
.cal_grid th.cal_dow {
  background: #1c2b5e;
  color: #fff;
  padding: 8px 4px;
  font-family: Georgia, serif;
  font-weight: bold;
  border-radius: 4px;
  text-align: center;
  width: calc(100% / 7);
}
.cal_dow_am { display: block; font-size: 13px; }
.cal_dow_en { display: block; font-size: 11px; opacity: 0.8; margin-top: 2px; font-weight: normal; }

.cal_blank {
  background: transparent;
  border: 0;
}
.cal_cell {
  background: #ffffff;
  border: 1px solid #e0e8e3;
  border-radius: 4px;
  vertical-align: top;
  padding: 0;
  height: 88px;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}
.cal_cell:hover { border-color: #30CB9A; }
.cal_cell:focus { outline: 2px solid #30CB9A; outline-offset: 1px; }

.cal_cell_inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 6px 6px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  box-sizing: border-box;
  line-height: 1.15;
}
.cal_eth_day {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: bold;
  color: #1c2b5e;
  line-height: 1;
}
.cal_cell_top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.cal_greg_day {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.1;
  color: #6a7a6a;
  text-align: right;
}
.cal_ww_flags {
  margin-top: auto;       /* pin to the bottom of the flex-column cell */
  padding-top: 4px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-start;
  line-height: 1;
}
.cal_ww_flag {
  font-size: 13px;
  line-height: 1;
}
.cal_holiday_name {
  margin-top: 6px;
  display: block;
  overflow: hidden;
}
.cal_holiday_en {
  display: block;
  font-size: 11px;
  color: #b32d2e;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal_holiday_am {
  display: block;
  font-size: 11px;
  color: #b32d2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TODAY: solid green fill, white text — strongly distinct from any other state. */
.cal_today {
  background: #30CB9A;
  border-color: #1ea173;
}
.cal_today .cal_eth_day { color: #ffffff; }
.cal_today .cal_greg_day { color: rgba(255,255,255,0.92); }
.cal_today .cal_holiday_en,
.cal_today .cal_holiday_am { color: #ffffff; }

/* HOLIDAY: warm cream-pink fill with red accent text — clearly distinct from green. */
.cal_holiday {
  background: #ffe4e4;
  border-color: #e8a8a8;
}
.cal_holiday .cal_eth_day { color: #b32d2e; }

/* Today + holiday: today wins the background, holiday name stays red on a yellow-tinted bg
   so it's still recognizable as a holiday. */
.cal_today.cal_holiday {
  background: #30CB9A;
  border-color: #1ea173;
}
.cal_today.cal_holiday .cal_holiday_en,
.cal_today.cal_holiday .cal_holiday_am { color: #fff7e0; font-weight: bold; }

/* SELECTED: thick inset ring in the brand navy — composes over today/holiday. */
.cal_selected {
  box-shadow: inset 0 0 0 3px #1c2b5e;
  border-color: #1c2b5e;
}

.cal_legend {
  max-width: 760px;
  margin: 14px auto 0 auto;
  padding: 0 12px;
  text-align: center;
  font-size: 13px;
  color: #6a7a6a;
}
.cal_legend_item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px;
}
.cal_legend_swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #d0d8d3;
  vertical-align: middle;
}
.cal_legend_today_swatch    { background: #30CB9A; border-color: #1ea173; }
.cal_legend_holiday_swatch  { background: #ffe4e4; border-color: #e8a8a8; }
.cal_legend_selected_swatch { background: #1c2b5e; border-color: #1c2b5e; }
.cal_legend_fasting_swatch  { background: #ece7f6; border-color: #c9b8e8; }

/* FASTING TOGGLE — a labelled on/off switch above the grid. */
.cal_fasting_bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 2px auto 12px auto;
}
.cal_fasting_toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: #1c2b5e;
  cursor: pointer;
  transition: color 120ms ease-out;
}
.cal_fasting_toggle:hover { color: #5b3c97; }
.cal_ramadan_toggle:hover { color: #0c6e5d; }
.cal_fasting_txt { line-height: 1; }
.cal_fasting_switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cfd8d2;
  transition: background-color 140ms ease-out;
}
.cal_fasting_knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 140ms ease-out;
}
.cal_fasting_toggle.is_on { color: #5b3c97; }
.cal_fasting_toggle.is_on .cal_fasting_switch { background: #5b3c97; }
.cal_fasting_toggle.is_on .cal_fasting_knob { transform: translateX(22px); }

/* FASTING DAYS — muted violet, shown only when the grid has .show_fasting.
   The fasting fill outranks holiday (more classes) so it wins on overlap;
   today still outranks fasting so the current day stays green. */
.cal_fasting_name { display: none; margin-top: 4px; overflow: hidden; }
.cal_fasting_en, .cal_fasting_am {
  display: block;
  font-size: 11px;
  color: #5b3c97;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal_grid.show_fasting .cal_fasting_name { display: block; }
.cal_grid.show_fasting .has_fasting { background: #ece7f6; border-color: #c9b8e8; }
.cal_grid.show_fasting .has_fasting .cal_eth_day { color: #5b3c97; }
.cal_grid.show_fasting .cal_today.has_fasting { background: #30CB9A; border-color: #1ea173; }
.cal_grid.show_fasting .cal_today.has_fasting .cal_eth_day { color: #ffffff; }
.cal_grid.show_fasting .cal_today.has_fasting .cal_fasting_en,
.cal_grid.show_fasting .cal_today.has_fasting .cal_fasting_am { color: #fff7e0; }

.cal_sel_fasting { margin-top: 4px; color: #5b3c97; font-weight: 600; }

/* RAMADAN (Islamic fasting) — teal, its own toggle/layer, shown only when the
   Ramadan toggle is on. Declared after the Orthodox rules so that on a day that
   is both (both layers on) teal wins; today still wins over both. */
.cal_ramadan_toggle.is_on { color: #0c6e5d; }
.cal_ramadan_toggle.is_on .cal_fasting_switch { background: #0c6e5d; }
.cal_ramadan_name { display: none; margin-top: 4px; overflow: hidden; }
.cal_ramadan_en, .cal_ramadan_am {
  display: block;
  font-size: 11px;
  color: #0c6e5d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal_grid.show_ramadan .cal_ramadan_name { display: block; }
.cal_grid.show_ramadan .has_ramadan { background: #d3ece7; border-color: #a9d6cc; }
.cal_grid.show_ramadan .has_ramadan .cal_eth_day { color: #0c6e5d; }
.cal_grid.show_ramadan .cal_today.has_ramadan { background: #30CB9A; border-color: #1ea173; }
.cal_grid.show_ramadan .cal_today.has_ramadan .cal_eth_day { color: #ffffff; }
.cal_grid.show_ramadan .cal_today.has_ramadan .cal_ramadan_en,
.cal_grid.show_ramadan .cal_today.has_ramadan .cal_ramadan_am { color: #fff7e0; }
.cal_legend_ramadan_swatch { background: #d3ece7; border-color: #a9d6cc; }
.cal_sel_ramadan { margin-top: 4px; color: #0c6e5d; font-weight: 600; }

/* Tighter spacing around the calendar's heading so it sits close to the grid
   (overrides the larger default .section_title gap on the homepage). */
.cal_section_heading { margin-top: 10px; margin-bottom: 6px; }

/* Screen-reader-only live region: announces the new month after an AJAX swap. */
.cal_sr_only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Crowded cells: show at most one text label. When a fasting layer is on, its
   label takes the cell over the holiday label (the full list is in the popover). */
.cal_grid.show_fasting .has_fasting .cal_holiday_name,
.cal_grid.show_ramadan .has_ramadan .cal_holiday_name { display: none; }

/* "More" affordance: a filled +N count badge at the bottom-right of a crowded
   cell. Prominent (navy pill, white text), clearly clickable, shows the count. */
.cal_more {
  position: absolute;
  right: 4px;
  bottom: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 17px;
  padding: 0 5px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(135deg, #30CB9A 0%, #1ea173 100%);
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.cal_more:hover { filter: brightness(1.06); }

/* Day-detail popover: a larger card resembling a calendar cell, listing every
   event for the day. */
.cal_pop_backdrop { position: fixed; inset: 0; z-index: 90; background: transparent; }
.cal_popover {
  position: fixed;
  z-index: 100;
  min-width: 210px;
  max-width: 290px;
  background: #ffffff;
  border: 1px solid #c9d4cd;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(28,43,94,0.22);
  padding: 12px 14px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  text-align: left;
}
.cal_pop_head { border-bottom: 1px solid #eef2f0; padding-bottom: 8px; margin-bottom: 8px; }
.cal_pop_day { font-family: Georgia, serif; font-size: 26px; font-weight: bold; color: #1c2b5e; }
.cal_pop_eth { font-size: 14px; color: #1c2b5e; margin-top: 2px; }
.cal_pop_greg { font-size: 13px; color: #6a7a6a; }
.cal_pop_items { display: flex; flex-direction: column; gap: 7px; }
.cal_pop_item { font-size: 13px; line-height: 1.3; }
.cal_pop_holiday { color: #b32d2e; font-weight: bold; }
.cal_pop_fasting { color: #5b3c97; font-weight: 600; }
.cal_pop_ramadan { color: #0c6e5d; font-weight: 600; }
.cal_pop_ww { color: #364536; }

/* Selected date panel (bottom of page) */
.cal_selected_panel {
  max-width: 760px;
  margin: 22px auto 0 auto;
  padding: 18px 22px;
  background: #f7faf8;
  border: 1px solid #d8e8e0;
  border-left: 4px solid #1c2b5e;
  border-radius: 8px;
  text-align: center;
}
.cal_sel_label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6a7a6a;
  margin-bottom: 8px;
}
.cal_sel_eth {
  font-family: Georgia, "Noto Sans Ethiopic", "Nyala", serif;
  font-size: 26px;
  font-weight: bold;
  color: #1c2b5e;
  line-height: 1.2;
}
.cal_sel_greg {
  font-family: Georgia, serif;
  font-size: 18px;
  color: #364536;
  margin-top: 6px;
}
.cal_sel_holiday {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 12px;
  background: #ffe4e4;
  color: #b32d2e;
  border-radius: 999px;
  font-weight: bold;
  font-size: 14px;
}
.cal_sel_holiday[hidden] { display: none; }

.cal_sel_worldwide {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cal_sel_worldwide[hidden] { display: none; }
.cal_sel_ww_item {
  font-size: 14px;
  color: #364536;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal_flag {
  font-size: 16px;
  line-height: 1;
}

/* Calendar mobile tuning */
@media (max-width: 768px) {
  .cal_grid_wrap { padding: 0 6px; }
  .cal_month_caption_row { gap: 6px; padding: 0 8px; }
  .cal_month_caption { font-size: 16px; }
  .cal_month_btn { flex: 0 0 auto; font-size: 13px; padding: 9px 11px; }
  .cal_month_btn_chev { font-size: 17px; }
  .cal_fasting_en, .cal_fasting_am,
  .cal_ramadan_en, .cal_ramadan_am { font-size: 9.5px; }
  .cal_grid { border-spacing: 2px; }
  .cal_cell { height: 78px; }
  .cal_cell_inner { padding: 4px; }
  .cal_eth_day { font-size: 20px; }
  .cal_greg_day { font-size: 10px; }
  .cal_holiday_en, .cal_holiday_am { font-size: 9.5px; }
  .cal_dow_am { font-size: 12px; }
  .cal_dow_en { font-size: 10px; }
  .cal_grid th.cal_dow { padding: 6px 2px; }
  .cal_sel_eth { font-size: 22px; }
  .cal_sel_greg { font-size: 16px; }
}

/* Narrow screens: below ~560px the cells are too tight for the date to sit in
   the top-right without hitting the bold day number, so stack it under the
   number with the month and day on separate lines. */
@media (max-width: 560px) {
  /* Stack the month over the day so the date block is narrow enough to sit to
     the right of the day number in tight cells. */
  .cal_greg_mon, .cal_greg_dnum { display: block; line-height: 1.05; }
  .cal_greg_day { font-size: 10px; }
}

@media (max-width: 480px) {
  .cal_cell { height: 64px; }
  .cal_eth_day { font-size: 16px; }
  .cal_greg_day { font-size: 9px; }
  .cal_holiday_en, .cal_holiday_am { font-size: 9px; }
  .cal_dow_en { display: none; }
  .cal_nav_btn { padding: 9px 14px; font-size: 13px; height: auto; }
  .cal_controls { gap: 8px; }
  .cal_my_select { padding: 9px 8px; }
  .cal_selected_panel { padding: 14px 16px; }
  .cal_sel_eth { font-size: 19px; }
  .cal_sel_greg { font-size: 14px; }
}

/* --- Mobile-friendliness --- */
*, *::before, *::after { box-sizing: border-box; }
body { overflow-x: hidden; }
img, ins.adsbygoogle { max-width: 100%; height: auto; }

/* Tablet and below */
@media (max-width: 768px) {
  #screen_centered { padding-top: 40px; padding-left: 8px; padding-right: 8px; width: 100%; }
  .main_title { font-size: 22px; }
  .sub_title  { font-size: 17px; }

  .time_day_big       { font-size: 240%; }
  .time_day_sml       { font-size: 200%; }
  .time_hour_big      { font-size: 240%; }
  .time_hour_sml      { font-size: 200%; }
  .time_hour_vsml     { font-size: 110%; }
  .time_hour_sml_ampm { font-size: 150%; }
  .time_hour_vsml_ampm{ font-size: 100%; }

  .holiday_padding { padding-top: 24px; }
  .upcoming_date_e { font-size: 220%; }
  .upcoming_date_f { font-size: 170%; }
  .upcoming_name_e { font-size: 130%; padding-top: 10px; }
  .upcoming_name_f { font-size: 105%; padding-top: 10px; }
  .holiday_title_e { font-size: 120%; }
  .holiday_title_f { font-size: 100%; }
  .top_separator, .bottom_separator { width: 80%; margin-top: 24px; margin-bottom: 24px; }

  .holidays_table { width: 100%; table-layout: auto; }
  td, th { padding: 6px; }
  .holiday_e { font-size: 110%; }
  .holiday_f { font-size: 90%; }

  .seo_section { margin: 0 auto; padding: 0 16px; font-size: 15px; line-height: 1.55; }
  .seo_section h2 { font-size: 22px; margin-top: 24px; }
  .seo_section h3 { font-size: 18px; }
  .page_section { padding: 22px 0; }
  .section_separator { height: 12px; }

  #ruler { width: 60%; }
  .footer_text { display: inline-block; padding: 4px 8px; font-size: 13px; }
}

/* Small-screen header — keep tap targets ~40px+ tall */
@media (max-width: 480px) {
  .site_header { padding: 8px 6px; }
  .site_nav { gap: 6px; }
  .site_nav_item { padding: 9px 12px; font-size: 13px; letter-spacing: 0; }
}

/* Phone */
@media (max-width: 480px) {
  #screen_centered { padding-top: 24px; }
  .main_title { font-size: 19px; }
  .sub_title  { font-size: 15px; }

  .time_day_big       { font-size: 180%; }
  .time_day_sml       { font-size: 150%; }
  .time_hour_big      { font-size: 180%; }
  .time_hour_sml      { font-size: 150%; }
  .time_hour_sml_ampm { font-size: 120%; }

  .upcoming_date_e { font-size: 170%; }
  .upcoming_date_f { font-size: 130%; }
  .upcoming_name_e { font-size: 115%; }
  .upcoming_name_f { font-size: 95%; }

  td { padding: 8px 6px; }
  .holiday_e { font-size: 100%; }
  .holiday_f { font-size: 85%; }
}
