/* =====================================================================
   assets/css/base.css – the parts shared by ALL pages (navigation pages AND gallery pages):
   colors, header, breadcrumb, project intro box, footer.
   Same visual style as infoticedu.ro (the "hub" repository).

   On the gallery pages this file is loaded AFTER assets/css/gallery.css, so it must NOT
   change the gallery cards, the lightbox (zoom) or the download buttons:
     - no rules for .card, .gallery, .lightbox, .btn
     - the variable names do not overlap with assets/css/gallery.css (that is why the shadow is --hub-shadow)
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #5b6785;
  --accent: #3d68e8;
  --accent-dark: #2b4bb5;
  --highlight: #ffd166;
  --hub-shadow: 0 6px 18px rgba(31, 42, 68, 0.12);
  --radius: 18px;
}

/* ---------- School themes: the class "theme-N" is added automatically (N = position of the school) ---------- */
.theme-1 { --accent: #087f63; --accent-dark: #065c48; }  /* green     */
.theme-2 { --accent: #3d68e8; --accent-dark: #2b4bb5; }  /* blue      */
.theme-3 { --accent: #c24a22; --accent-dark: #963816; }  /* orange    */
.theme-4 { --accent: #8147d0; --accent-dark: #5f2fa8; }  /* purple    */
.theme-5 { --accent: #b3264f; --accent-dark: #861c3b; }  /* raspberry */
.theme-6 { --accent: #0f7c9a; --accent-dark: #0a5a71; }  /* teal      */
.theme-7 { --accent: #8a6a00; --accent-dark: #664f00; }  /* gold      */
.theme-8 { --accent: #4a5d23; --accent-dark: #364519; }  /* olive     */

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(255, 209, 102, 0.25) 0, transparent 35%),
    radial-gradient(circle at 90% 20%, rgba(6, 214, 160, 0.18) 0, transparent 35%);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a:focus-visible { outline: 4px solid #ffb703; outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 18px 20px 14px;
  box-shadow: var(--hub-shadow);
}
.header-inner { max-width: 1000px; margin: 0 auto; }
.header-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.header-home { display: block; flex-shrink: 0; border-radius: 14px; transition: transform 0.15s; }
.header-home:hover { transform: scale(1.06); }
.header-logo {
  display: block;
  width: 56px; height: 56px;
  background: #fff; border-radius: 14px; padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.header-titles { flex: 1; min-width: 220px; }
.header-title { margin: 0; font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.header-meta { margin: 2px 0 0; font-size: 1rem; font-weight: 700; }
.header-meta span:empty { display: none; }
.header-meta span + span::before { content: "•"; margin: 0 8px; opacity: 0.7; }

/* pill links with all the schools, under the title */
.school-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.school-nav:empty { display: none; }
.school-nav a {
  color: #fff; text-decoration: none; font-weight: 800;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.school-nav a:hover { background: rgba(255, 255, 255, 0.35); }
.school-nav a[aria-current="page"] { background: #fff; color: var(--accent-dark); }

/* ---------- Breadcrumb (Acasă › Școala ... › Proiect › Clasa) ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; }
.breadcrumb a { color: var(--accent-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--muted); }

/* ---------- Project intro box (project page and gallery pages) ---------- */
.hero {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); box-shadow: var(--hub-shadow);
  padding: 22px 24px; margin: 6px 0 22px;
  border-left: 8px solid var(--accent);
}
.hero-icon { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.hero-emoji { font-size: 3rem; line-height: 1; flex-shrink: 0; }
.hero-body { flex: 1; min-width: 0; }
.hero-kicker {
  display: inline-block; margin: 0 0 6px; padding: 2px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.9rem; font-weight: 800;
}
.hero-title { margin: 0; font-size: 1.8rem; font-weight: 800; line-height: 1.2; outline: none; }
.hero-desc { margin: 8px 0 0; color: var(--muted); font-weight: 600; }
.hero-coordinators { margin: 10px 0 0; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.hero-label { font-weight: 800; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: var(--muted); font-weight: 600; font-size: 0.9rem; padding: 16px; }

/* ---------- Gallery pages (body class "page-gallery") ----------
   The cards inherit the text color from <body>: keep the original color of assets/css/gallery.css,
   so the cards look exactly as before. Only the header, the intro box and the footer change. */
.page-gallery { color: var(--ink, #1d2f6f); }
.page-gallery main { flex: 1; width: 100%; }
.page-gallery .site-header, .page-gallery .page-intro, .page-gallery .site-footer { font-size: 1rem; }  /* assets/css/gallery.css makes the body text bigger */
.page-gallery .page-intro { max-width: 1000px; margin: 0 auto; padding: 24px 20px 0; }   /* same width as the header */
/* image protection (together with protectImages() in assets/js/site.js):
   no "Save image" menu on a long press on iPhone/iPad, no dragging, no blue selection over the images.
   The appearance of the cards and of the zoom viewer does not change. */
.page-gallery .gallery img,
.page-gallery .lightbox__img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
.page-gallery .page-intro + .gallery { padding-top: 2.5rem; }       /* room for the "tape" on top of the cards */

/* ---------- Responsive, motion, print ---------- */
@media (max-width: 560px) {
  .header-title { font-size: 1.35rem; }
  .hero { padding: 18px 16px; gap: 12px; }
  .hero-icon { width: 48px; height: 48px; }
  .hero-emoji { font-size: 2.3rem; }
  .hero-title { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .school-nav, .breadcrumb { display: none; }
  body { background: #fff; }
  .site-header, .hero { box-shadow: none; }
}
