/* ==========================================================================
   THEME: PANIGYRI
   ==========================================================================
   main.css is the Minimal Mistakes look of alpos.xyz. This file layers the
   village-fete theme on top: a set of custom properties on
   <html data-theme="panigyri">, the shared rules that read them, and the
   bunting and coloured shadows on the home-page boxes at the end.
   ========================================================================== */

/* --- rules reading the theme variables ------------------------------------ */

:root[data-theme],
:root[data-theme] body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

:root[data-theme] :is(h1, h2, h3, h4, h5, h6, .page__title) {
  font-family: var(--font-head);
  color: var(--heading);
}

:root[data-theme] a { color: var(--link); }
:root[data-theme] a:hover { color: var(--link-hover); }

:root[data-theme] .masthead {
  background: var(--mast-bg);
  border-bottom: var(--mast-border);
}
:root[data-theme] .masthead__inner-wrap { font-family: var(--font-head); }
:root[data-theme] .greedy-nav { background: transparent; }
:root[data-theme] .greedy-nav a { color: var(--mast-link); }
:root[data-theme] .greedy-nav a:hover,
:root[data-theme] .greedy-nav a[aria-current] { color: var(--mast-link-hover); }
:root[data-theme] .greedy-nav .visible-links a:before { background: var(--accent-2); }
:root[data-theme] .greedy-nav a[aria-current]:before { transform: scaleX(1); }
:root[data-theme] .greedy-nav button { background: var(--accent); }
:root[data-theme] .greedy-nav .hidden-links {
  background: var(--card-bg);
  border-color: var(--border);
}
:root[data-theme] .greedy-nav .hidden-links a { color: var(--text); }
:root[data-theme] .greedy-nav .hidden-links a:hover { background: var(--bg); }
:root[data-theme] .greedy-nav .hidden-links:after { border-color: var(--card-bg) transparent; }

:root[data-theme] .page__footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border);
}

:root[data-theme] .folk-dances .feed-item {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
:root[data-theme] .folk-dances .feed-item:hover {
  border-color: var(--accent);
  transform: var(--card-lift);
}
:root[data-theme] .folk-dances .feed-item { border-left: 5px solid var(--accent); }
:root[data-theme] .folk-dances .feed-item--important { border-left-color: var(--alert); }
:root[data-theme] .folk-dances .feed-item__title {
  font-family: var(--font-head);
  color: var(--accent);
}

:root[data-theme] .folk-dances :is(
  .dance-group__title, .dance-region__el, .dance-list__el, .dance-list__region,
  .dance-list__sub-region, .zentroom__intro, .zentroom-entry__title,
  .dance-map__caption, .announcement__meta, .feed-item__label,
  .dance__othernames, .dance__facts dt, .dance__facts-el
) { color: var(--muted); }

:root[data-theme] .folk-dances :is(.dance-group__title, .zentroom-entry, .announcement) {
  border-color: var(--border);
}
:root[data-theme] .folk-dances .dance-group__title { font-family: var(--font-head); }

:root[data-theme] .folk-dances .announcement--important {
  background: var(--alert-bg);
  border-color: var(--alert);
  border-radius: var(--radius);
}
:root[data-theme] .folk-dances .announcement__badge {
  background: var(--alert);
  border-radius: var(--radius);
}


/* --- Panigyri: village-fete colours and bunting --------------------------- */

[data-theme="panigyri"] {
  --bg: #fffdf7;
  --text: #2b2b2b;
  --heading: #d62839;
  --muted: #6f6a60;
  --link: #0f7f8c;
  --link-hover: #d62839;
  --accent: #d62839;
  --accent-2: #ffb703;
  --on-accent: #fff;
  --border: #f1e6cc;
  --font-head: "M PLUS Rounded 1c", system-ui, sans-serif;
  --font-body: "M PLUS Rounded 1c", system-ui, sans-serif;
  --mast-bg: #d62839;
  --mast-border: 0;
  --mast-link: #fff3d6;
  --mast-link-hover: #fff;
  --footer-bg: #1b4965;
  --footer-text: #cfe3ef;
  --card-bg: #fff;
  --card-border: 2px solid #2b2b2b;
  --card-shadow: 5px 5px 0 #ffb703;
  --card-lift: translate(-2px, -2px) rotate(-1deg);
  --radius: 12px;
  --alert: #d62839;
  --alert-bg: #fff0e0;
  --map-land: #f4efe3;
  --map-fill: #ffd166;
  --map-fill-hover: #ef476f;
  --map-edge: #fffdf7;
  --map-edge-hover: #2b2b2b;
  --map-label: #2b2b2b;
}
/* a string of flags under the menu */
[data-theme="panigyri"] .masthead::after {
  content: "";
  display: block;
  height: 14px;
  background:
    linear-gradient(135deg, #ffb703 50%, transparent 50%) 0 0 / 28px 14px repeat-x,
    linear-gradient(225deg, #ffb703 50%, transparent 50%) 0 0 / 28px 14px repeat-x,
    linear-gradient(135deg, #06d6a0 50%, transparent 50%) 14px 0 / 28px 14px repeat-x,
    linear-gradient(225deg, #118ab2 50%, transparent 50%) 14px 0 / 28px 14px repeat-x;
  background-color: var(--bg);
}
[data-theme="panigyri"] .masthead__menu-item--lg a { font-weight: 800; letter-spacing: 0.5px; }
[data-theme="panigyri"] .page__title { font-weight: 800; }
[data-theme="panigyri"] .page__footer a { color: #ffd166; }
/* lessons and announcements in different colours, the important ones in red */
[data-theme="panigyri"] .folk-dances .feed-item--lesson { --card-shadow: 5px 5px 0 #06d6a0; border-left-color: #118ab2; }
[data-theme="panigyri"] .folk-dances .feed-item--important { --card-shadow: 5px 5px 0 #d62839; }
