/* =====================================================================
   Primaria Timisoara — CKAN theme CSS  release="1.0.2"
   ===================================================================== */

:root {
  --pt-navy: #0c3b8c;
  --pt-navy-dark: #082a66;
  --pt-bg: #f1f2f4;
  --pt-white: #ffffff;
  --pt-text: #1c1c1c;
  --pt-text-muted: #8a8a8a;
  --pt-pill-bg: #1f55b0;
  --pt-pill-bg-hover: #2c63c4;
  --pt-card-border: #e3e4e7;
  --pt-radius-lg: 6px;
  --pt-radius-pill: 999px;
  --pt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--pt-bg);
  font-family: var(--pt-font);
  color: var(--pt-text);
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */

.masthead, .navbar, header.navbar {
  background-color: var(--pt-navy) !important;
  background-image: none !important;
  border: none;
  box-shadow: none;
  padding: 0 32px;
}

.primariatm-brand { display: flex; align-items: center; }

.primariatm-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--pt-white);
}

.primariatm-brand-crest { height: 48px; width: auto; }

.primariatm-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.primariatm-brand-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--pt-white);
}

.primariatm-brand-subtitle {
  font-weight: 400;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
}

.primariatm-nav { display: flex; align-items: center; }

.primariatm-nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primariatm-nav-list > li > a {
  color: var(--pt-white);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
}

.primariatm-nav-list > li > a:hover { color: rgba(255,255,255,0.8); }

/* Language selector in nav — make it small and inline */
.primariatm-nav-lang select {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--pt-white);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.primariatm-nav-lang select option { color: var(--pt-text); background: var(--pt-white); }

/* Hide default CKAN header search box */
.site-search,
.header-search,
.nav-pills.nav-lang { display: none !important; }

/* Hide default language selector if it renders outside our nav */
.ckan-footer-language-selector { display: none !important; }

/* ---------------------------------------------------------------------
   Homepage
   --------------------------------------------------------------------- */

.primariatm-home {
  max-width: 1180px;
  margin: 32px auto 56px;
  padding: 0 20px;
}

.primariatm-hero {
  background-color: var(--pt-navy);
  border-radius: var(--pt-radius-lg);
  overflow: hidden;
}

.primariatm-hero-inner { padding: 36px 40px 28px; }

.primariatm-hero-title {
  color: var(--pt-white);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.primariatm-hero-search { display: flex; align-items: stretch; }

.primariatm-hero-input {
  flex: 1;
  border: none;
  border-radius: var(--pt-radius-lg) 0 0 var(--pt-radius-lg);
  padding: 0 20px;
  height: 56px;
  font-size: 1.05rem;
  color: var(--pt-text);
}

.primariatm-hero-input::placeholder { color: var(--pt-text-muted); }

.primariatm-hero-submit {
  width: 64px;
  height: 56px;
  border: none;
  border-radius: 0 var(--pt-radius-lg) var(--pt-radius-lg) 0;
  background-color: var(--pt-white);
  color: var(--pt-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-left: 1px solid #eaeaea;
}

.primariatm-hero-submit:hover { background-color: #f5f5f5; }

/* Popular tags */
.primariatm-tags-row { background-color: var(--pt-navy-dark); padding: 14px 0; }

.primariatm-tags-row-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 40px;
}

.primariatm-tags-label { color: var(--pt-white); font-weight: 700; font-size: 0.95rem; }

.primariatm-tag-pill {
  display: inline-block;
  background-color: var(--pt-pill-bg);
  color: var(--pt-white);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 16px;
  border-radius: var(--pt-radius-pill);
  text-decoration: none;
}

.primariatm-tag-pill:hover { background-color: var(--pt-pill-bg-hover); color: var(--pt-white); text-decoration: none; }

/* ---------------------------------------------------------------------
   Card grid
   --------------------------------------------------------------------- */

.primariatm-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 28px;
}

@media (max-width: 992px) { .primariatm-card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .primariatm-card-grid { grid-template-columns: repeat(2, 1fr); } }

.primariatm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--pt-white);
  border: 1px solid var(--pt-card-border);
  border-radius: var(--pt-radius-lg);
  padding: 28px 16px 22px;
  text-decoration: none;
  color: var(--pt-text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 190px;
}

.primariatm-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  color: var(--pt-text);
  text-decoration: none;
}

.primariatm-card-icon {
  height: 64px;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.primariatm-card-icon img {
  max-height: 64px;
  max-width: 64px;
  filter: brightness(0) saturate(100%);
}

.primariatm-card-title { font-weight: 700; font-size: 1.05rem; color: var(--pt-text); margin-bottom: 6px; }
.primariatm-card-count { font-size: 0.9rem; color: var(--pt-text-muted); }

/* ---------------------------------------------------------------------
   Footer — înlocuiește tot footer-ul CKAN cu un bar subțire
   --------------------------------------------------------------------- */

footer.footer, .site-footer { display: none !important; }

.primariatm-footer {
  background-color: var(--pt-navy);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.primariatm-footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
}

.primariatm-footer-logo {
  height: 20px;
  width: auto;
  vertical-align: middle;
}

/* Add bottom padding to body so content doesn't hide behind fixed footer */
body { padding-bottom: 44px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
}
