/* ==========================================================
   Community features — birthdays, events, videos, gallery,
   calendar, timeline, dialogs and dark mode.
   Loaded after style.css; reuses its brand variables.
   ========================================================== */
:root {
  --bg: #fff;
  --card: #fff;
  --card-2: #fffaf0;
  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .6);
}

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Header tools ---------- */
.header__tools { display: flex; align-items: center; gap: 8px; order: 3; }
.tool-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; transition: transform .2s, border-color .2s; }
.tool-btn:hover { transform: translateY(-2px); border-color: var(--saffron); }
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
@media (min-width: 901px) { .header__inner { display: grid; grid-template-columns: auto 1fr auto; } .nav { justify-self: end; } .nav__link, .brand__name, .brand__tag { white-space: nowrap; } }
@media (min-width: 901px) and (max-width: 1240px) {
  .nav { gap: 0; }
  .nav__link { padding: 7px 8px; font-size: .92rem; }
  .brand__icon { width: 40px; height: 40px; }
  .brand__name { font-size: 1.35rem; }
  .brand__tag { font-size: .78rem; }
  .header__tools .tool-btn { width: 38px; height: 38px; }
}

/* ---------- Notice strip ---------- */
.notice-strip { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: #fff; font-weight: 600; font-size: .95rem; }
.notice-strip.is-emergency { background: linear-gradient(90deg, #8b0000, var(--red)); }
.notice-strip__inner { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.notice-strip__tag { background: var(--yellow); color: var(--ink); border-radius: 99px; padding: 1px 10px; font-size: .8rem; font-weight: 800; flex-shrink: 0; }
.notice-strip__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.notice-strip button { background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 99px; padding: 3px 12px; cursor: pointer; font: inherit; font-size: .85rem; flex-shrink: 0; }

/* ---------- Hero additions ---------- */
.smart-cards { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.smart-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(160, 90, 0, .15); transition: transform .25s, box-shadow .25s; }
.smart-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(160, 90, 0, .25); }
.smart-card i { font-style: normal; font-size: 1.8rem; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--red), var(--saffron)); flex-shrink: 0; }
.smart-card b { display: block; font-family: var(--display); color: var(--red); line-height: 1.2; font-size: 1.05rem; }
.smart-card span { font-size: .85rem; color: var(--muted); }

/* ---------- Shared bits ---------- */
.sub-head { display: flex; align-items: center; justify-content: space-between; margin: 44px 0 16px; }
.sub-head h3 { margin: 0; font-size: 1.4rem; color: var(--blue); }
.section__sub--light { color: rgba(255,255,255,.8); }
.more { text-align: center; margin-top: 26px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 38px 20px; border: 2px dashed var(--line); border-radius: 22px; background: var(--card-2); color: var(--muted); }
.empty-state b { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--ink); margin: 6px 0 2px; }
.empty-state i { font-style: normal; font-size: 2.6rem; display: block; }
.section--dark .empty-state { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.75); }
.section--dark .empty-state b { color: #fff; }
.skeleton { border-radius: var(--radius); min-height: 180px; background: linear-gradient(90deg, var(--line) 25%, var(--card-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.tab { border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; padding: 7px 18px; border-radius: 99px; cursor: pointer; transition: all .2s; }
.tab:hover { border-color: var(--saffron); }
.tab.active { background: var(--red); border-color: var(--red); color: #fff; }
.tabs--light .tab { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.tabs--light .tab.active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.chip-select { border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; padding: 7px 14px; border-radius: 99px; cursor: pointer; }
.search--inline { text-align: center; margin: -8px 0 26px; }
.search--inline input { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.search--inline input::placeholder { color: rgba(255,255,255,.7); }

/* ---------- Birthday wall ---------- */
.section--party { position: relative; overflow: hidden; background: radial-gradient(circle at 10% 0%, rgba(255, 214, 10, .35), transparent 40%), radial-gradient(circle at 90% 100%, rgba(215, 38, 30, .16), transparent 45%), var(--cream); }
.confetti { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, var(--red) 2px, transparent 2.5px), radial-gradient(circle, var(--blue) 2px, transparent 2.5px), radial-gradient(circle, var(--saffron) 2.5px, transparent 3px), radial-gradient(circle, var(--green) 2px, transparent 2.5px); background-size: 140px 140px, 190px 190px, 230px 230px, 170px 170px; background-position: 0 0, 40px 70px, 120px 30px, 80px 120px; opacity: .35; animation: drift 40s linear infinite; }
@keyframes drift { to { background-position: 0 1400px, 40px 1970px, 120px 2330px, 80px 1820px; } }
.section--party .container { position: relative; }
.bday-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.bday-card { position: relative; border-radius: 26px; padding: 26px 22px 20px; color: #fff; overflow: hidden; box-shadow: 0 20px 44px rgba(120, 30, 0, .25); text-align: center; isolation: isolate; }
.bday-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.35), transparent 35%), radial-gradient(circle at 85% 80%, rgba(255,255,255,.2), transparent 40%); }
.bday-card--festive { background: linear-gradient(145deg, #d7261e, #ef7d0f 60%, #ffc61a); }
.bday-card--floral { background: linear-gradient(145deg, #b0306f, #e25d9c 55%, #ffb3d1); }
.bday-card--royal { background: linear-gradient(145deg, #1b1e6e, #2b2fa8 55%, #8e6cf0); }
.bday-card--sunrise { background: linear-gradient(145deg, #ff6a00, #ff9a3c 50%, #ffd60a); color: #3a1600; }
.bday-card--balloons { background: linear-gradient(145deg, #0e7a6e, #1faa59 55%, #9be15d); }
.bday-card__cake { font-size: 2rem; position: absolute; top: 14px; right: 16px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(6deg); } }
.bday-card__photo { width: 128px; height: 128px; margin: 4px auto 14px; border-radius: 50%; border: 5px solid rgba(255,255,255,.85); object-fit: cover; background: rgba(255,255,255,.25); display: grid; place-items: center; font: 800 2.6rem var(--display); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.bday-card h3 { font-size: 1.6rem; margin: 0; }
.bday-card__meta { opacity: .9; font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.bday-card__wish { font-size: 1.02rem; background: rgba(255,255,255,.16); border-radius: 16px; padding: 12px 14px; margin: 10px 0 14px; }
.bday-card__acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bday-card__acts .btn { padding: 9px 16px; font-size: .92rem; background: #fff; color: var(--red); }
.bday-card__acts .btn--ghost { background: rgba(255,255,255,.2); color: inherit; }
.bday-card__wishes { margin-top: 12px; text-align: left; display: grid; gap: 6px; max-height: 160px; overflow-y: auto; font-size: .9rem; }
.bday-card__wishes div { background: rgba(0,0,0,.15); border-radius: 12px; padding: 6px 10px; }
.bday-card__wishes b { display: block; font-size: .8rem; opacity: .85; }
.bday-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.mini-person { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 12px; text-align: center; transition: transform .2s; }
.mini-person:hover { transform: translateY(-4px); }
.mini-person img, .mini-person .ph { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--saffron), var(--red)); color: #fff; font: 800 1.5rem var(--display); }
.mini-person b { display: block; line-height: 1.2; }
.mini-person small { color: var(--muted); display: block; }
.mini-person .when { display: inline-block; margin-top: 6px; background: var(--cream); color: var(--red); font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 99px; }
.mem-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.mem-card { position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--line); border: 0; padding: 0; }
.mem-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mem-card:hover img { transform: scale(1.05); }
.mem-card span { position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; color: #fff; font-weight: 700; font-size: .9rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: left; }

/* ---------- Announcements ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 24px rgba(0,0,0,.05); transition: transform .25s, box-shadow .25s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--cream); color: var(--saffron); }
.tag--red { background: var(--red); color: #fff; }
.tag--blue { background: rgba(43,47,168,.1); color: var(--blue); }
.tag--pin { background: var(--yellow); color: var(--ink); }
.news-card h3 { margin: 0; font-size: 1.2rem; }
.news-card p { margin: 0; color: var(--muted); font-size: .95rem; white-space: pre-line; }
.news-card--emergency { border: 2px solid var(--red); }
.news-card__more { margin-top: auto; color: var(--red); font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 700; text-align: left; }

/* ---------- Events ---------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.event-card { background: var(--card); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(0,0,0,.06); display: flex; flex-direction: column; transition: transform .25s; }
.event-card:hover { transform: translateY(-5px); }
.event-card__banner { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--blue), var(--red)); display: grid; place-items: center; color: #fff; font-size: 3rem; overflow: hidden; }
.event-card__banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-card__date { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink); border-radius: 14px; padding: 6px 12px; text-align: center; line-height: 1.05; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.event-card__date b { display: block; font: 800 1.5rem var(--display); color: var(--red); }
.event-card__date span { font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.event-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card__body h3 { margin: 0; font-size: 1.25rem; }
.event-card__info { color: var(--muted); font-size: .93rem; display: grid; gap: 2px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.countdown div { background: var(--cream); border-radius: 12px; padding: 6px 4px; text-align: center; }
.countdown b { display: block; font: 800 1.35rem var(--display); color: var(--red); line-height: 1.1; }
.countdown span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 800; }
.live-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse-g 1.5s infinite; }
@keyframes pulse-g { 50% { box-shadow: 0 0 0 6px rgba(31,170,89,.2); } }
.event-card__acts { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.btn--sm { padding: 8px 16px; font-size: .9rem; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; overflow: hidden; cursor: pointer; text-align: left; color: #fff; padding: 0; font: inherit; transition: transform .25s, background .25s; display: flex; flex-direction: column; }
.video-card:hover { transform: translateY(-5px); background: rgba(255,255,255,.1); }
.video-card--featured { grid-column: span 2; grid-row: span 2; }
.video-card__thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .5s; }
.video-card:hover .video-card__thumb img { transform: scale(1.05); }
.video-card__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(215,38,30,.92); display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 0 0 10px rgba(215,38,30,.25); transition: transform .25s; }
.video-card:hover .video-card__play { transform: scale(1.1); }
.video-card__body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.video-card__body h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.video-card--featured .video-card__body h3 { font-size: 1.5rem; }
.video-card__body small { color: rgba(255,255,255,.65); }

/* ---------- Layout cards (dynamic extras) ---------- */
.layout-card__top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.layout-card__progress { height: 7px; background: var(--line); border-radius: 99px; overflow: hidden; }
.layout-card__progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--green)); border-radius: 99px; }
.layout-card__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.layout-card__chips span { font-size: .72rem; background: var(--cream); color: var(--muted); padding: 1px 8px; border-radius: 99px; }
.layout-card__links { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Progress ---------- */
.progress-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.progress-item { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 10px; }
.progress-item header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.progress-item h4 { margin: 0; color: var(--blue); font-size: 1.2rem; }
.progress-item b { font: 800 1.5rem var(--display); color: var(--green); }
.progress-bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--green)); border-radius: 99px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.progress-item p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Albums ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.album-card { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.3; cursor: pointer; border: 0; padding: 0; font: inherit; text-align: left; background: linear-gradient(135deg, var(--saffron), var(--red)); box-shadow: 0 10px 30px rgba(0,0,0,.1); transition: transform .3s; }
.album-card:hover { transform: translateY(-6px) rotate(-.4deg); }
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.album-card:hover img { transform: scale(1.06); }
.album-card__info { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.album-card__info h3 { margin: 0; font-size: 1.2rem; }
.album-card__info small { opacity: .85; }
.album-card__count { position: absolute; top: 12px; right: 12px; background: var(--glass); color: var(--ink); backdrop-filter: blur(8px); border-radius: 99px; padding: 3px 12px; font-weight: 700; font-size: .82rem; }
.album-card__lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; color: #fff; }
.album-card__feat { position: absolute; top: 12px; left: 12px; }

/* ---------- Calendar ---------- */
.cal-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h3 { margin: 0; color: var(--blue); font-size: 1.4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { text-align: center; font-weight: 700; font-size: .82rem; color: var(--muted); padding: 4px 0; }
.cal-day { min-height: 92px; border-radius: 12px; border: 1px solid var(--line); padding: 6px; font-size: .78rem; background: var(--card-2); overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cal-day.blank { background: transparent; border-style: dashed; opacity: .4; }
.cal-day.today { border: 2px solid var(--red); background: var(--cream); }
.cal-day > b { font-size: .85rem; color: var(--muted); }
.cal-day span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 6px; padding: 0 4px; }
.cal-day .c-b { background: rgba(215,38,30,.1); color: var(--red); }
.cal-day .c-a { background: rgba(176,48,111,.12); color: #b0306f; }
.cal-day .c-e { background: rgba(43,47,168,.1); color: var(--blue); }
.cal-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.contact-card { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.contact-card img, .contact-card .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--saffron)); color: #fff; font: 800 1.2rem var(--display); }
.contact-card b { display: block; line-height: 1.2; }
.contact-card small { color: var(--muted); display: block; }
.contact-card a { color: var(--red); font-weight: 700; font-size: .92rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--saffron), var(--red), var(--blue)); }
.timeline li { position: relative; padding: 0 0 18px 64px; }
.timeline__ico { position: absolute; left: 2px; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 3px solid var(--saffron); display: grid; place-items: center; font-size: 1.2rem; }
.timeline__card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; transition: border-color .2s, transform .2s; }
.timeline__card:hover { border-color: var(--saffron); transform: translateX(4px); }
.timeline__card b { display: block; }
.timeline__card small { color: var(--muted); white-space: nowrap; }

/* ---------- Footer extras ---------- */
.socials { display: flex; gap: 10px; margin: 10px 0; }
.socials a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid !important; place-items: center; margin: 0 !important; font-weight: 800; }
.socials a:hover { background: var(--red); color: #fff !important; }
.footer__visits { font-size: .9rem; opacity: .8; }
.footer__admin { display: inline !important; opacity: .5; }

/* ---------- Lightbox upgrades ---------- */
.lightbox figure { width: min(1100px, 100%); }
.lb-stage { display: grid; place-items: center; min-height: 40vh; }
.lb-stage img { max-height: 76vh; max-width: 100%; margin: 0 auto; border-radius: 10px; transition: transform .3s; cursor: zoom-in; }
.lb-stage img.zoomed { transform: scale(1.8); cursor: zoom-out; }
.lb-stage video, .lb-stage iframe { width: 100%; max-height: 76vh; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.lb-tools { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 10px; color: rgba(255,255,255,.75); flex-wrap: wrap; }
.lb-tool { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: .9rem; }
.lb-tool:hover { background: var(--red); }
.lightbox { overflow: hidden; }

/* ---------- Dialog ---------- */
.dlg { position: fixed; inset: 0; z-index: 210; background: rgba(10, 8, 20, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.dlg__box { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 24px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.dlg__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cream); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.dlg__box h3 { margin: 0 40px 14px 0; font-size: 1.5rem; color: var(--blue); }
.dlg__box img.banner { width: 100%; border-radius: 16px; margin-bottom: 14px; }
.dlg__box .field input, .dlg__box .field textarea { width: 100%; }
.dlg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.search-box input { width: 100%; padding: 14px 18px; font: inherit; font-size: 1.1rem; border-radius: 16px; border: 2px solid var(--saffron); background: var(--card-2); color: var(--ink); outline: none; }
.search-results { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.search-results button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; font: inherit; color: inherit; }
.search-results button:hover { border-color: var(--saffron); }
.search-results small { color: var(--muted); display: block; }

/* ==========================================================
   Dark mode (data-theme="dark" is set by main.js from the
   visitor's choice, or from the system setting)
   ========================================================== */
:root[data-theme="dark"] {
  --ink: #f1eee6;
  --muted: #b8b3c6;
  --line: #34314a;
  --cream: #2a2640;
  --bg: #14121f;
  --card: #1d1a2c;
  --card-2: #221f33;
  --glass: rgba(29, 26, 44, .72);
  --glass-line: rgba(255, 255, 255, .08);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .header { background: rgba(20, 18, 31, .92); border-color: var(--line); }
:root[data-theme="dark"] .nav__link { color: var(--ink); }
:root[data-theme="dark"] .nav__link:hover, :root[data-theme="dark"] .nav__link.active { background: var(--cream); color: #ffb08a; }
:root[data-theme="dark"] .brand__tag, :root[data-theme="dark"] .feature h4, :root[data-theme="dark"] .step h4,
:root[data-theme="dark"] .director h3, :root[data-theme="dark"] .contact__list b, :root[data-theme="dark"] .sub-head h3,
:root[data-theme="dark"] .cal-head h3, :root[data-theme="dark"] .progress-item h4, :root[data-theme="dark"] .dlg__box h3,
:root[data-theme="dark"] .t-blue { color: #a9adff; }
:root[data-theme="dark"] .hero { background: radial-gradient(circle at 25% 55%, #5a4300 0%, #3d2a00 45%, #241800 100%); }
:root[data-theme="dark"] .hero__title .t-red, :root[data-theme="dark"] .hero__title .t-blue { text-shadow: none; }
:root[data-theme="dark"] .hero__title .t-red { color: #ff6b5e; }
:root[data-theme="dark"] .hero__hindi { color: #ffb08a; }
:root[data-theme="dark"] .hero__stats li { background: rgba(29, 26, 44, .85); }
:root[data-theme="dark"] .btn--outline { background: transparent; color: #a9adff; border-color: #a9adff; }
:root[data-theme="dark"] .section--tint { background: linear-gradient(180deg, #1a1728, var(--bg)); }
:root[data-theme="dark"] .section--party { background: radial-gradient(circle at 10% 0%, rgba(255, 214, 10, .1), transparent 40%), #1a1728; }
:root[data-theme="dark"] .feature, :root[data-theme="dark"] .layout-card, :root[data-theme="dark"] .step,
:root[data-theme="dark"] .director, :root[data-theme="dark"] .enquiry, :root[data-theme="dark"] .emi__card,
:root[data-theme="dark"] .gallery__item { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .layout-card__body h3 { color: var(--ink); }
:root[data-theme="dark"] .about__media img { border-color: var(--card); }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .emi__card input[type=number], :root[data-theme="dark"] .search input { background: var(--card-2); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .footer { background: #0c0b14; }
:root[data-theme="dark"] .countdown div, :root[data-theme="dark"] .mini-person .when { background: var(--card-2); }
:root[data-theme="dark"] .event-card__date { background: var(--card); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
  .smart-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root[data-theme="dark"] .nav { background: var(--card); }
  .header__tools { margin-left: auto; }
  .video-card--featured { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 600px) {
  .tool-btn { width: 40px; height: 40px; }
  .smart-cards { gap: 10px; margin-top: 24px; }
  .smart-card { padding: 10px; gap: 8px; flex-direction: column; text-align: center; }
  .smart-card i { width: 42px; height: 42px; font-size: 1.4rem; }
  .video-grid, .event-grid, .news-grid, .progress-list { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .album-card { aspect-ratio: 3 / 3.6; }
  .album-card__info { padding: 30px 10px 10px; }
  .album-card__info h3 { font-size: 1rem; }
  .cal-day { min-height: 52px; font-size: .62rem; padding: 3px; }
  .cal-grid { gap: 3px; }
  .cal-card { padding: 12px; }
  .dlg__box { padding: 22px 18px; }
  .bday-wall { grid-template-columns: 1fr; }
}
