*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0a2155;
  --red: #c8102e;
  --blue: #1a5cb0;
  --light-bg: #f4f6fa;
  --border: #dde2ec;
  --text: #1a1a2e;
  --muted: #5a6480;
  --white: #ffffff;
  --tag: #2e7d32;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ── TOP BANNER ─────────────────────────────────── */
/* Bilde parādās automātiski, tiklīdz fails ir images/assets mapē.
   Ja faila nav, <img> tiek noņemts un redzams vietturis. */

.site-banner {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── VIETTURIS (kopīgs banerim un footera logo) ───── */
.img-slot { position: relative; }

.img-slot-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--light-bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}

.img-slot-label small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

/* kad bilde ir ielādēta, vietturi paslēpj */
.img-slot:has(img) .img-slot-label { display: none; }

.site-banner .img-slot-label {
  height: 120px;
  max-width: 1365px;
  margin: 14px auto;
  width: calc(100% - 48px);
}

/* footerī — tumšs fons */
.footer-logo .img-slot-label {
  width: 220px;
  height: 60px;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
}

.footer-logo .img-slot-label small { font-size: 10px; }

.footer-logo img {
  height: 60px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* ── NAV ─────────────────────────────────────────── */

.nav-bar {
  background: var(--white);
  border-top: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 9000;
  box-shadow: 0 1px 2px rgba(2, 2, 2, 0.25), inset 0 1px 1px #ffffff26;
}

.nav-inner {
  max-width: 1365px;
  margin: 0 auto;
  padding: 0 24px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 1;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
  position: static;
  /* mega-menu anchors to .nav-bar, not here */
}

.nav-item>a {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: .2px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.nav-item>a:hover {
  color: var(--blue);
}

.nav-item>a .arrow {
  font-size: 9px;
  opacity: .5;
  display: inline-block;
  transition: transform .2s;
}

.nav-item:hover>a {
  color: var(--blue);
}

.nav-item:hover>a .arrow {
  transform: rotate(180deg);
}

/* Darbības jomas grid icon */

.nav-item.darbibas>a {
  font-weight: 600;
}

.nav-item.darbibas {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 4px;
}

.grid-icon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 14px;
  height: 14px;
  margin-right: 3px;
}

.grid-icon span {
  width: 6px;
  height: 6px;
  background: var(--navy);
  border-radius: 1px;
  display: block;
}

/* ── MEGA MENU ───────────────────────────────────────── */

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 3px solid var(--blue);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
  z-index: 8999;
  animation: megaFade .15s ease;
}

.nav-item:hover .mega-menu {
  display: block;
}

/* ── BASE mega-inner (Noderīgi + fallback) — must come FIRST ── */

.mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.mega-col {
  flex: 1;
  min-width: 90px;
  padding: 0 12px 0 0;
}

.mega-col:last-child {
  padding-right: 0;
}

.mega-col h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
  white-space: nowrap;
}

.mega-col a {
  display: block;
  font-size: 13px;
  color: var(--text);
  padding: 3px 0;
  line-height: 1.5;
  transition: color .15s;
  text-decoration: none;
}

.mega-col a:hover {
  color: var(--blue);
  text-decoration: none;
}

/* ── DARBĪBAS JOMAS — completely isolated ── */

.nav-item.darbibas .mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: grid;                                  /* 10 vienāda platuma kolonnas */
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0 16px;
}

.nav-item.darbibas .mega-col {
  min-width: 0;
  padding: 0;
}

.nav-item.darbibas .mega-col:last-child {
  padding-right: 0;
}

.nav-item.darbibas .mega-col h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
  white-space: normal;
  line-height: 1.35;
}

.nav-item.darbibas .mega-col a {
  display: block;
  font-size: 13px;
  color: var(--text);
  padding: 3px 0;
  line-height: 1.5;
  transition: color .15s;
  text-decoration: none;
}

.nav-item.darbibas .mega-col a:hover {
  color: var(--blue);
  text-decoration: none;
}

/* aktīvā sadaļa izvēlnē (pievieno klasi "current") */
.nav-item.current > a { color: var(--blue); }

/* no-dropdown: no arrow rotation on hover */

.nav-item.no-dropdown:hover>a .arrow {
  transform: none;
}

@keyframes megaFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-box {
  box-shadow: 0 1px 2px rgba(2, 2, 2, .1);
  display: flex;
  align-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  overflow: hidden;
  width: 320px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  padding: 6px 10px;
  width: 100%;
  flex: 1;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Phantom arrow gap for no-dropdown items so spacing matches items with ▾ */

.nav-item.no-dropdown>a::after {
  content: '';
  display: inline-block;
  width: 9px;
  /* same width as the arrow span */
  flex-shrink: 0;
}

/* ── FOOTER ──────────────────────────────────────── */

footer {
  background: var(--navy);
  background-image: url(assets/fons/footer.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: rgba(255, 255, 255, .85);
  padding: 48px 0 0;
}

.footer-inner {
  max-width: 1365px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 220px 1fr 1fr 220px;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}




.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--white);
  cursor: pointer;
  transition: background .18s;
}

.social-icon:hover {
  background: rgba(255, 255, 255, .15);
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: .3px;
}

.footer-col p,
.footer-col a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
  line-height: 2;
  display: block;
  transition: color .15s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-form h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.footer-email-row {
  display: flex;
  gap: 6px;
}

.footer-email-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  color: var(--white);
  font-size: 12.5px;
  padding: 8px 12px;
  outline: none;
}

.footer-email-row input::placeholder {
  color: rgba(255, 255, 255, .45);
}

.footer-email-row button {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .18s;
}

.footer-email-row button:hover {
  background: #0157a8;
}

.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 14px 24px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
}



/* ════════════════════════════════════════════════════
   KOPĪGĀS KOMPONENTES (apakšlapām)
   ════════════════════════════════════════════════════ */

/* ── LAPA AR SĀNJOSLU ────────────────────────────── */
.side-layout {
  max-width: 1365px;
  margin: 32px auto 56px;
  padding: 0 24px;
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

.side-main { flex: 1; min-width: 0; width: 100%; }

.side-nav {
  width: 220px;
  flex-shrink: 0;
  background: var(--blue);
  border-radius: 12px;
  padding: 8px 0 16px;
  position: sticky;
  top: 105px;
}

.side-nav-title {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  margin-bottom: 6px;
}

.side-nav-title svg { flex-shrink: 0; }

.side-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}

.side-nav-link:hover,
.side-nav-link.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-left-color: #fff;
}

.side-nav-link svg { flex-shrink: 0; opacity: .8; }
.side-nav-link.active svg { opacity: 1; }

/* ── LAPAS VIRSRAKSTS ────────────────────────────── */
.page-kicker {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-heading {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.page-underline {
  width: 40px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.page-lead {
  text-align: center;
  max-width: 640px;
  margin: -4px auto 36px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── POGAS ───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.btn-primary:hover { background: #1448a0; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s;
}

.btn-outline svg { color: var(--blue); flex-shrink: 0; }

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(26, 92, 176, .1);
}

/* ════════════════════════════════════════════════════
   RESPONSIVE (kopīgais)
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }

  /* sānjosla → horizontāla pogu josla */
  .side-layout { flex-direction: column; gap: 20px; margin-top: 16px; }

  .side-nav {
    width: 100%;
    top: 85px; /* zem lipīgās navigācijas */
    z-index: 50;
    display: flex;
    overflow-x: auto;
    padding: 6px;
    border-radius: 10px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav-title { display: none; }

  .side-nav-link {
    white-space: nowrap;
    border-left: none;
    border-radius: 7px;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .side-layout { padding: 0 16px; }
}
/* ── jomu krāsas birkām (tās pašas, kas notikumu katalogā) ── */
.j-uznemejiem     { --tag: #8a2f5a; }
.j-metalapstradei { --tag: #a8243f; }
.j-nva            { --tag: #b35c00; }
.j-pedagogiem     { --tag: #4a4a78; }
.j-jauniesiem     { --tag: #7a3a66; }
.j-vecakiem       { --tag: #5b4a78; }
.j-senioriem      { --tag: #6b3f6e; }
.j-ukrainiem      { --tag: #1f6fe0; }
.j-e-sabiedribai  { --tag: #0e7c86; }
.j-biblioteka     { --tag: #2e7d32; }

hr { border: 0; border-top: 1px solid #e3e7ef; margin: 24px 0; }