.heritage-calendar { --calendar-ease: cubic-bezier(.2,.75,.25,1); width: min(1440px, calc(100% - 48px)); margin: auto; font-family: "Vazirmatn", Tahoma, sans-serif; padding-bottom: 20px; }
.heritage-calendar[lang="en"] { font-family: "Manrope", Arial, sans-serif; }
.calendar-language-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.calendar-languages { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 99px; background: #faf8f1; box-shadow: 0 3px 12px #18181806; }
.calendar-languages a { padding: 9px 22px; border-radius: 99px; transition: background .2s, color .2s, box-shadow .2s; }
.calendar-languages a[lang="fa"] { font-family: "Vazirmatn", Tahoma, sans-serif; }
.calendar-languages a.active { background: var(--ink); color: var(--acid); box-shadow: 0 3px 8px #18181824; }
.calendar-languages a:not(.active):hover { background: #e6e2d8; }
.calendar-status:not(.is-error) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.calendar-status.is-error { background: #fff0e8; border: 1px solid var(--orange); border-radius: 12px; padding: 14px; font-size: .85rem; }
.heritage-calendar[aria-busy="true"] .calendar-workspace { opacity: .75; cursor: progress; }
.heritage-calendar[lang="en"] .calendar-intro h1 { line-height: 1.15; letter-spacing: -.05em; }
.heritage-calendar[lang="en"] .calendar-intro h1 em { font-family: "DM Serif Display", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.03em; }
.heritage-calendar h1, .heritage-calendar h2, .heritage-calendar h3 { letter-spacing: 0; }
.heritage-calendar em { font-family: inherit; font-style: normal; font-weight: 700; color: var(--orange); }
.heritage-calendar button, .heritage-calendar input, .heritage-calendar select { font: inherit; }
.heritage-calendar a:focus-visible, .heritage-calendar summary:focus-visible, .heritage-calendar button:focus-visible, .heritage-calendar input:focus-visible, .heritage-calendar select:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.calendar-hero { display: grid; grid-template-columns: 1.35fr .8fr; gap: 64px; align-items: center; padding: 80px 0 70px; }
.calendar-kicker { font-size: .78rem; font-weight: 700; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.calendar-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.calendar-intro .calendar-kicker > span { color: #69675f; font-family: "Manrope", Arial, sans-serif; font-size: .62rem; letter-spacing: .12em; border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
.calendar-intro h1 { font-size: clamp(2.5rem, 4.7vw, 4.7rem); line-height: 1.55; font-weight: 900; margin: 24px 0 18px; }
.calendar-intro > p { max-width: 570px; color: #57554e; font-size: 1.03rem; line-height: 2.1; }
.calendar-today { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 32px; font-size: .82rem; }
.calendar-today span { color: #66635a; }
.calendar-countdown { background: radial-gradient(ellipse at 95% 5%, #f1ffac 0, transparent 60%), var(--acid); border: 1px solid #c4ea74; border-radius: 28px; position: relative; isolation: isolate; overflow: hidden; padding: 34px; min-height: 330px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 16px 40px #91ad1c16, inset 0 1px 0 #ffffff90; }
.calendar-orbit { position: absolute; z-index: -1; width: 290px; height: 290px; border: 1px solid rgba(24,24,24,.18); border-radius: 50%; left: -95px; top: -80px; box-shadow: 0 0 0 46px rgba(255,255,255,.13), 0 0 0 92px rgba(255,255,255,.08); transition: transform .8s var(--calendar-ease); }
.calendar-countdown:hover .calendar-orbit { transform: translate(18px, 10px) scale(1.08); }
.countdown-number { font-size: 6rem; font-weight: 900; line-height: 1.3; display: flex; gap: 18px; align-items: baseline; margin: 15px 0 8px; }
.countdown-number span { font-size: .9rem; font-weight: 600; }
.countdown-title { font-size: 1.25rem; font-weight: 800; line-height: 1.8; display: flex; justify-content: space-between; gap: 12px; }
.countdown-title span { font-size: 1.5rem; transition: transform .25s var(--calendar-ease); }
.countdown-title:hover span { transform: translate(3px,-3px); }
.calendar-countdown p { margin: 9px 0 0; font-size: .8rem; line-height: 1.9; }
.countdown-empty { font-size: 1.65rem; font-weight: 800; margin: 36px 0 10px; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 28px 0 20px; scroll-margin-top: 24px; }
.calendar-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.calendar-filters a { font-size: .8rem; padding: 11px 17px; border: 1px solid var(--line); border-radius: 99px; transition: background .2s, box-shadow .2s, transform .2s; }
.calendar-filters a.active { background: var(--ink); color: var(--acid); border-color: var(--ink); box-shadow: 0 4px 12px #18181817; }
.calendar-filters a:not(.active):hover { background: #e6e2d8; }
.calendar-today-link { font-weight: 700; font-size: .8rem; white-space: nowrap; }
.calendar-controls { display: grid; grid-template-columns: .65fr .55fr 1.5fr 1.5fr auto; align-items: end; gap: 14px; margin-bottom: 26px; }
.calendar-controls label { font-size: .71rem; color: #615f58; display: grid; gap: 9px; }
.calendar-controls input, .calendar-controls select { border: 1px solid var(--line); border-radius: 12px; width: 100%; min-width: 0; background: #faf8f1; color: var(--ink); padding: 12px; font-size: .8rem; height: 47px; box-shadow: inset 0 1px 2px #18181803; transition: background .2s, border-color .2s, box-shadow .2s; }
.calendar-controls input:focus, .calendar-controls select:focus { background: #fffdf8; border-color: var(--ink); box-shadow: 0 0 0 4px #d1ff4b30; }
.calendar-controls button { border: 0; background: var(--ink); color: white; height: 47px; padding: 0 24px; border-radius: 99px; cursor: pointer; display: flex; gap: 18px; align-items: center; transition: transform .2s, box-shadow .2s; }
.calendar-controls button:hover { box-shadow: 0 7px 18px #18181820; transform: translateY(-2px); }
.calendar-controls button span { color: var(--acid); }
.calendar-workspace { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; align-items: stretch; transition: opacity .2s; }
.calendar-month-panel { --calendar-light-x: 75%; --calendar-light-y: 0%; background: radial-gradient(ellipse at var(--calendar-light-x) var(--calendar-light-y), #d1ff4b15, transparent 65%), linear-gradient(145deg, #252b28, #171c19); color: #f6f4ed; border: 1px solid #384239; border-radius: 28px; padding: 28px; min-width: 0; box-shadow: 0 18px 46px #18221b1c, inset 0 1px 0 #ffffff12; }
.calendar-month-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 27px; }
.calendar-month-heading h2 { font-size: 2rem; line-height: 1.7; margin: 6px 0 0; }
.calendar-month-heading .calendar-kicker { color: #c6cebf; font-size: .66rem; letter-spacing: .09em; }
.calendar-month-heading h2 span { font-weight: 400; font-size: 1.2rem; color: #b8c0b3; }
.calendar-month-nav { display: flex; gap: 8px; }
.calendar-month-nav a { width: 42px; height: 42px; background: #ffffff09; border: 1px solid #ffffff30; border-radius: 50%; display: grid; place-items: center; font: 500 1.3rem Arial; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.calendar-month-nav a:hover { background: var(--acid); color: var(--ink); transform: translateY(-2px); box-shadow: 0 4px 18px #d1ff4b24; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-weekdays { font-size: .72rem; text-align: center; color: #bec6b9; margin-bottom: 12px; }
.calendar-weekdays span:last-child { color: #ffad89; }
.calendar-days { animation: calendar-panel-reveal .32s var(--calendar-ease) both; }
.calendar-day { min-height: 104px; padding: 10px 9px; border: 1px solid #ffffff12; background: linear-gradient(145deg, #ffffff0d, #ffffff04); border-radius: 14px; position: relative; display: flex; flex-direction: column; align-items: start; gap: 3px; transition: background .22s, border-color .22s, box-shadow .22s, transform .22s var(--calendar-ease); }
.calendar-day.has-events { background: linear-gradient(145deg, #ffffff17, #ffffff08); border-color: #ffffff25; }
.calendar-day.has-image { isolation: isolate; overflow: hidden; }
.day-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; mask-image: linear-gradient(to bottom, #000 25%, #0002); z-index: -1; pointer-events: none; transition: opacity .22s; }
.is-selected .day-background { opacity: .16; }
@media (hover: hover) and (pointer: fine) { .calendar-day.has-image:not(.is-selected):hover .day-background { opacity: .42; } }
.calendar-day.is-today { border-color: var(--orange); box-shadow: inset 0 0 0 1px #ff683233; }
.calendar-day.is-selected { background: linear-gradient(145deg, #e5ff91, var(--acid)); color: #181c15; border-color: #eaffb2; box-shadow: 0 5px 20px #d1ff4b20, inset 0 1px 0 #ffffffb0; }
.calendar-day.is-selected::after { content: ""; position: absolute; top: 8px; inset-inline-end: 8px; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.calendar-day.is-selected.is-today { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange), 0 5px 20px #d1ff4b20; }
.calendar-day.is-friday:not(.is-selected) .day-number { color: #ffad89; }
.day-number { font-size: 1.1rem; font-weight: 800; line-height: 1.4; }
.day-today { margin-top: auto; font-size: .52rem; color: #ffb796; }
.is-selected .day-today { color: #713216; }
.day-event-dots { display: flex; gap: 4px; min-height: 6px; margin: 2px 0; }
.event-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; flex-shrink: 0; }
.event-dot--ancient { background: #aa421d; }
.event-dot--royal { background: #6652a6; }
.event-dot--memorial { background: #247256; }
.calendar-month-panel .event-dot--ancient { background: #ff936b; box-shadow: 0 0 7px #ff936b30; }
.calendar-month-panel .event-dot--royal { background: #b6a0f3; box-shadow: 0 0 7px #b6a0f330; }
.calendar-month-panel .event-dot--memorial { background: #a1e0bf; box-shadow: 0 0 7px #a1e0bf30; }
.is-selected .event-dot--ancient { background: #963616; box-shadow: none; }
.is-selected .event-dot--royal { background: #59428a; box-shadow: none; }
.is-selected .event-dot--memorial { background: #246241; box-shadow: none; }
.day-caption { font-size: .56rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-more { font-size: .55rem; color: #c2caba; }
.is-selected .day-more { color: #38452a; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 18px; border-top: 1px solid #ffffff12; margin-top: 22px; font-size: .64rem; color: #c2caba; }
.calendar-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-today { margin-inline-start: auto; }
.calendar-day-panel { border: 1px solid #dedbd0; border-radius: 28px; padding: 28px; min-width: 0; min-height: 400px; background: linear-gradient(145deg, #fffdf7e6, #f5f2e7); box-shadow: 0 12px 36px #18181808, inset 0 1px 0 #fff; scroll-margin-top: 24px; }
.calendar-day-panel > .calendar-event-detail { animation: calendar-panel-reveal .35s var(--calendar-ease) both; }
.calendar-day-panel h2 { margin: 14px 0 10px; font-size: 1.5rem; line-height: 1.8; }
.calendar-gregorian { display: block; text-align: start; font: .72rem/1.8 "Manrope", Arial, sans-serif; color: #66635b; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.calendar-event-detail { padding: 24px 0 4px; }
.calendar-event-detail + .calendar-event-detail { border-top: 1px solid var(--line); margin-top: 20px; }
.event-category { display: inline-block; font-size: .64rem; font-weight: 700; border-radius: 99px; background: #efe2d1; padding: 5px 11px; }
.event-category--royal { background: #e4ddf5; }
.event-category--memorial { background: #deebd8; }
.calendar-event-detail h3 { font-size: 1.12rem; line-height: 1.8; margin: 12px 0; }
.calendar-event-detail p { font-size: .83rem; line-height: 2.1; margin: 0 0 18px; color: #514e46; }
.calendar-event-detail dl { margin: 0; font-size: .72rem; line-height: 2; }
.calendar-event-detail dt { color: #737066; margin-top: 10px; }
.calendar-event-detail dd { margin: 0; text-align: start; }
.calendar-event-detail .event-date-note { border-inline-start: 2px solid var(--orange); background: #ebe6da; padding: 12px 14px; margin: 20px 0 14px; font-size: .71rem; }
.calendar-agenda { padding: 75px 0; scroll-margin-top: 24px; }
.calendar-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.calendar-section-heading h2, .calendar-year-results h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.8; margin: 8px 0 0; }
.calendar-result-count { border: 1px solid var(--line); border-radius: 99px; padding: 9px 15px; font-size: .74rem; white-space: nowrap; }
.calendar-agenda-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.calendar-agenda-card { border: 1px solid #dedbd0; border-radius: 22px; padding: 24px; min-width: 0; background: linear-gradient(145deg, #fffdf6, #f5f2e9); box-shadow: 0 5px 18px #18181805; transition: border-color .25s, box-shadow .25s, transform .25s var(--calendar-ease); }
.calendar-agenda-card[open] { border-color: #babdaf; box-shadow: 0 12px 28px #18181809; }
.calendar-agenda-card[open] .calendar-event-detail { animation: calendar-panel-reveal .25s var(--calendar-ease) both; }
.calendar-agenda-card summary { list-style: none; cursor: pointer; }
.calendar-agenda-card summary::-webkit-details-marker { display: none; }
.calendar-agenda-card summary strong { display: block; font-size: 1.15rem; line-height: 1.8; margin: 18px 0 7px; }
.calendar-agenda-card--royal .event-category { background: #e4ddf5; }
.calendar-agenda-card--memorial .event-category { background: #deebd8; }
.agenda-date { display: block; font-size: .72rem; line-height: 1.9; color: #69655c; }
.agenda-expand { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: .74rem; }
.agenda-expand b { font: 500 1.5rem Arial; transition: transform .22s var(--calendar-ease); }
.calendar-agenda-card[open] .agenda-expand b { transform: rotate(45deg); }
.calendar-agenda-card .calendar-event-detail h3, .calendar-agenda-card .calendar-event-detail > .event-category { display: none; }
.calendar-no-results { background: #eae6dc; padding: 24px; border-radius: 20px; font-size: .85rem; line-height: 2; }
.calendar-year-results { margin-bottom: 65px; }
.calendar-year-results > p { font-size: .85rem; color: #625e56; }
.calendar-year-results > a { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: .85rem; align-items: center; }
.calendar-year-results time { margin-inline-start: auto; font-size: .75rem; color: #625e56; }
.calendar-editorial { background: var(--ink); color: var(--paper); padding: 52px; border-radius: 28px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 70px; margin-bottom: 65px; }
.calendar-editorial .calendar-kicker { color: var(--acid); }
.calendar-editorial h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1.7; margin-top: 20px; }
.calendar-editorial h2 em { color: var(--acid); }
.calendar-editorial p { color: #d0cdc4; font-size: .84rem; line-height: 2.1; margin: 0 0 20px; }
.calendar-editorial details { border-top: 1px solid #555249; padding-top: 18px; font-size: .78rem; line-height: 1.9; }
.calendar-editorial summary { cursor: pointer; margin-bottom: 18px; }
.calendar-shop-link { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; font-size: .86rem; font-weight: 700; }
.calendar-shop-link span { color: var(--acid); font-size: 1.3rem; }
@keyframes calendar-panel-reveal { from { opacity: .4; } to { opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  .calendar-day:hover { background: #ffffff20; border-color: #d1ff4b80; box-shadow: 0 5px 18px #00000020; transform: translateY(-3px); z-index: 1; }
  .calendar-day.is-selected:hover { background: #e5ff91; border-color: #eaffb2; box-shadow: 0 7px 24px #d1ff4b30; }
  .calendar-agenda-card:hover { border-color: #c6cabc; box-shadow: 0 10px 26px #1818180a; transform: translateY(-3px); }
  .calendar-filters a:hover { transform: translateY(-2px); }
}
@media (max-width: 1100px) {
  .calendar-hero { gap: 30px; }
  .calendar-workspace { grid-template-columns: 1.4fr 1fr; gap: 16px; }
  .calendar-month-panel, .calendar-day-panel { padding: 22px; }
  .calendar-day { min-height: 86px; }
  .day-today { display: none; }
  .calendar-controls { grid-template-columns: .7fr .6fr 1.5fr; }
  .calendar-search { grid-column: span 2; }
  .calendar-editorial { gap: 35px; padding: 36px; }
}
@media (max-width: 800px) {
  .calendar-hero { grid-template-columns: 1fr; padding: 48px 0 38px; gap: 28px; }
  .calendar-intro h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
  .calendar-countdown { min-height: 260px; }
  .countdown-number { font-size: 5rem; }
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-day-panel { min-height: 230px; }
  .calendar-agenda-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calendar-editorial { grid-template-columns: 1fr; gap: 28px; }
  .calendar-toolbar { align-items: start; flex-direction: column; }
  .calendar-day { min-height: 92px; }
}
@media (max-width: 500px) {
  .calendar-language-bar { font-size: .74rem; padding: 18px 0; }
  .calendar-languages a { padding: 8px 16px; }
  .heritage-calendar { width: calc(100% - 28px); }
  .calendar-intro .calendar-kicker > span { display: none; }
  .calendar-intro h1 { font-size: 2.5rem; }
  .calendar-intro > p { font-size: .9rem; }
  .calendar-today { gap: 12px; font-size: .74rem; }
  .calendar-countdown { padding: 26px; }
  .calendar-filters { gap: 6px; }
  .calendar-filters a { font-size: .69rem; padding: 9px 12px; }
  .calendar-controls { grid-template-columns: 1fr 1fr; gap: 12px; }
  .calendar-convention, .calendar-search { grid-column: 1 / -1; }
  .calendar-controls button { grid-column: 1 / -1; justify-content: center; }
  .calendar-month-panel { padding: 17px 12px; border-radius: 22px; }
  .calendar-month-heading { padding: 0 5px; }
  .calendar-month-heading h2 { font-size: 1.6rem; }
  .calendar-weekdays { font-size: .56rem; }
  .calendar-days, .calendar-weekdays { gap: 4px; }
  .calendar-day { min-height: 68px; padding: 8px 5px; border-radius: 9px; }
  .day-caption { display: none; }
  .day-number { font-size: 1rem; }
  .calendar-legend { gap: 10px; font-size: .6rem; }
  .calendar-day-panel { padding: 23px; }
  .calendar-agenda { padding: 50px 0; }
  .calendar-agenda-grid { grid-template-columns: 1fr; }
  .calendar-editorial { padding: 28px; margin-bottom: 35px; }
  .calendar-year-results > a { flex-wrap: wrap; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .heritage-calendar *, .heritage-calendar *::before, .heritage-calendar *::after { animation: none !important; transition: none !important; }
  .heritage-calendar .calendar-day:hover, .heritage-calendar .calendar-agenda-card:hover, .heritage-calendar .calendar-filters a:hover, .heritage-calendar .calendar-controls button:hover, .heritage-calendar .calendar-month-nav a:hover { transform: none; }
  .calendar-countdown:hover .calendar-orbit, .countdown-title:hover span { transform: none; }
}
