/* CivicPulse — formal government / public institution */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }

.cv-container { max-width: 1280px; margin: 0 auto; padding: 0 28px; position: relative; }

/* Accessibility high-contrast toggle */
body.cv-hc {
  --color-background: #ffffff;
  --color-text: #000000;
  --color-border: #000000;
}
body.cv-hc .cv-news-card, body.cv-hc .cv-service, body.cv-hc .cv-doc, body.cv-hc .cv-testi-card { border-width: 2px; }

/* ── Top bar ─────────────────────────────────────── */
.cv-topbar {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.92);
  padding: 8px 0;
  font-size: 0.82rem;
}
.cv-topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cv-topbar-left { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 215, 0, 0.95); font-weight: 600; }
.cv-crest { color: var(--color-accent2); }
.cv-topbar-right { display: inline-flex; align-items: center; gap: 12px; }
.cv-sep { opacity: 0.5; }
.cv-a11y { display: inline-flex; gap: 6px; }
.cv-a11y button {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.cv-a11y button:hover { background: rgba(255,255,255,0.22); }

/* ── Header ──────────────────────────────────────── */
.cv-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 3px solid var(--color-primary);
  padding: 16px 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.cv-header.scrolled { padding: 12px 0; box-shadow: 0 4px 16px -8px rgba(0,48,135,0.15); }
.cv-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cv-logo { display: inline-flex; align-items: center; gap: 14px; color: var(--color-primary); }
.cv-logo img { height: 42px; width: auto; }
.cv-logo-mark { color: var(--color-primary); display: inline-flex; }
.cv-logo-mark-light { color: var(--color-accent2); }
.cv-logo-block { display: flex; flex-direction: column; line-height: 1.2; }
.cv-logo-block strong { font-family: var(--font-title); font-size: 1.15rem; color: var(--color-primary); font-weight: 700; }
.cv-logo-block span { font-size: 0.78rem; color: var(--color-text-soft); margin-top: 2px; }

.cv-nav { display: flex; gap: 26px; }
.cv-nav a {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 4px 0;
  position: relative;
}
.cv-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2.5px;
  background: var(--color-accent);
  transition: width 0.25s;
}
.cv-nav a:hover { color: var(--color-primary); }
.cv-nav a:hover::after { width: 100%; }

.cv-hamburger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.cv-hamburger span { display: block; width: 24px; height: 2px; background: var(--color-primary); margin: 5px 0; }

/* ── Buttons ─────────────────────────────────────── */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}
.cv-btn-primary { background: var(--color-primary); color: #fff; }
.cv-btn-primary:hover { background: var(--color-secondary); transform: translateY(-1px); color: #fff; }
.cv-btn-light { background: #fff; color: var(--color-primary); }
.cv-btn-light:hover { background: var(--color-accent2); color: var(--color-secondary); }
.cv-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }
.cv-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Tricolor stripe ─────────────────────────────── */
.cv-tricolor { display: flex; height: 4px; }
.cv-tricolor span { flex: 1; }
.cv-tri-b { background: var(--color-primary); }
.cv-tri-y { background: var(--color-accent2); }
.cv-tri-r { background: var(--color-accent); }

/* ── Hero ────────────────────────────────────────── */
.cv-hero {
  position: relative;
  padding: 80px 0 140px;
  background: var(--color-primary);
  color: #fff;
  overflow: hidden;
}
.cv-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.08), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(206, 17, 38, 0.06), transparent 50%),
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  pointer-events: none;
}
.cv-hero .cv-tricolor {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1;
}
.cv-hero-inner { position: relative; z-index: 2; }
.cv-hero-text { max-width: 760px; }
.cv-hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--color-accent2);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 26px;
}
.cv-hero-text h1 {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 0 0 22px;
  line-height: 1.1;
  letter-spacing: -0.8px;
  color: #fff;
  font-weight: 700;
}
.cv-hero-sub { color: rgba(255,255,255,0.92); font-size: 1.1rem; margin: 0 0 32px; max-width: 620px; }
.cv-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Quick services (overlap below hero) */
.cv-quick {
  position: absolute;
  left: 0; right: 0;
  bottom: -50px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  z-index: 3;
}
.cv-quick-card {
  background: #fff;
  border-left: 4px solid var(--color-primary);
  padding: 20px 22px;
  border-radius: 4px;
  box-shadow: 0 20px 40px -20px rgba(0, 48, 135, 0.25);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cv-quick-card:hover {
  border-left-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -20px rgba(0, 48, 135, 0.35);
}
.cv-quick-icon { font-size: 1.5rem; margin-bottom: 4px; }
.cv-quick-card strong {
  font-family: var(--font-title);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
}
.cv-quick-desc { color: var(--color-text-soft); font-size: 0.82rem; }

/* ── Sections ────────────────────────────────────── */
.cv-section { padding: 100px 0 80px; }
.cv-section:first-of-type { padding-top: 130px; }
.cv-section-alt { background: #fff; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.cv-section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.cv-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 3.5px;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: rgba(0, 48, 135, 0.08);
  border-radius: 3px;
}
.cv-section-head h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.cv-section-head p { color: var(--color-text-soft); margin: 0; font-size: 1.02rem; }

/* ── News ────────────────────────────────────────── */
.cv-news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cv-news-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: 4px;
  padding: 24px 22px;
  transition: all 0.25s ease;
}
.cv-news-card:hover {
  border-top-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -16px rgba(0, 48, 135, 0.2);
}
.cv-news-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.cv-news-cat {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.cv-cat-anunt { background: rgba(0, 48, 135, 0.12); color: var(--color-primary); }
.cv-cat-licit { background: rgba(206, 17, 38, 0.12); color: var(--color-accent); }
.cv-cat-concurs { background: rgba(255, 215, 0, 0.18); color: #8b6914; }
.cv-cat-info { background: rgba(74, 85, 104, 0.12); color: var(--color-text-soft); }
.cv-news-date { color: var(--color-text-soft); font-size: 0.82rem; font-weight: 500; }
.cv-news-card h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.4;
}
.cv-news-card p { color: var(--color-text-soft); font-size: 0.92rem; margin: 0 0 14px; }
.cv-news-more { color: var(--color-primary); font-size: 0.88rem; font-weight: 600; }
.cv-news-more:hover { color: var(--color-accent); }

/* ── Services ────────────────────────────────────── */
.cv-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cv-service {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 26px 24px;
  transition: all 0.25s ease;
}
.cv-service:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -16px rgba(0, 48, 135, 0.25);
}
.cv-service-icon {
  width: 48px; height: 48px;
  background: rgba(0, 48, 135, 0.08);
  color: var(--color-primary);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.cv-service-icon svg { width: 24px; height: 24px; }
.cv-service h3 {
  font-family: var(--font-title);
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 700;
}
.cv-service p { color: var(--color-text-soft); margin: 0 0 14px; font-size: 0.92rem; }
.cv-service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--color-text-soft);
  margin-bottom: 14px;
}
.cv-service-link { color: var(--color-primary); font-size: 0.88rem; font-weight: 600; }
.cv-service-link:hover { color: var(--color-accent); }

/* ── About ───────────────────────────────────────── */
.cv-about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: center; }
.cv-about-text .cv-section-head { text-align: left; margin-bottom: 24px; margin-left: 0; }
.cv-about-text .cv-eyebrow { margin-left: 0; }
.cv-about-text p { color: var(--color-text-soft); margin: 0 0 16px; line-height: 1.75; }
.cv-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid var(--color-primary);
}
.cv-stat strong {
  display: block;
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--color-primary);
  line-height: 1;
  font-weight: 700;
}
.cv-stat span { color: var(--color-text-soft); font-size: 0.82rem; margin-top: 6px; display: inline-block; font-weight: 500; }
.cv-about-image {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

/* ── Team ────────────────────────────────────────── */
.cv-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cv-member {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: 4px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.25s ease;
}
.cv-member:hover { border-top-color: var(--color-accent); }
.cv-member-photo {
  width: 130px; height: 130px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-primary);
}
.cv-member-photo img, .cv-member-ph { width: 100%; height: 100%; object-fit: cover; }
.cv-member-ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 3rem;
}
.cv-member h3 {
  font-family: var(--font-title);
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 700;
}
.cv-member-role { color: var(--color-primary); font-size: 0.82rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.cv-member p { color: var(--color-text-soft); margin: 12px 0; font-size: 0.92rem; }
.cv-member-contact {
  display: inline-block;
  margin-top: 6px;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
}
.cv-member-contact:hover { color: var(--color-accent); }

/* ── Transparency / Docs ─────────────────────────── */
.cv-docs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cv-doc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
  transition: all 0.25s ease;
}
.cv-doc:hover {
  border-left-color: var(--color-accent);
  background: var(--color-background);
  transform: translateX(4px);
}
.cv-doc-icon { font-size: 1.8rem; flex-shrink: 0; }
.cv-doc-body { flex: 1; min-width: 0; }
.cv-doc-body strong {
  display: block;
  font-family: var(--font-title);
  color: var(--color-text);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.cv-doc-meta { color: var(--color-text-soft); font-size: 0.78rem; }
.cv-doc-dl {
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
}

/* ── Testimonials ────────────────────────────────── */
.cv-testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cv-testi-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 4px;
  padding: 24px 22px;
}
.cv-testi-stars { color: var(--color-accent2); font-size: 1rem; letter-spacing: 3px; margin-bottom: 12px; }
.cv-testi-card p { color: var(--color-text); margin: 0 0 16px; font-size: 0.95rem; line-height: 1.65; }
.cv-testi-author strong { display: block; font-family: var(--font-title); color: var(--color-text); font-weight: 700; }
.cv-testi-author span { color: var(--color-primary); font-size: 0.82rem; font-weight: 600; }

/* ── FAQ ─────────────────────────────────────────── */
.cv-faq-wrap { max-width: 820px; }
.cv-faq-list { display: flex; flex-direction: column; gap: 10px; }
.cv-faq {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 4px;
  overflow: hidden;
}
.cv-faq[open] { border-left-color: var(--color-accent); }
.cv-faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-title);
  font-size: 1.02rem;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  font-weight: 700;
}
.cv-faq summary::-webkit-details-marker { display: none; }
.cv-faq summary::after {
  content: "+";
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: 400;
}
.cv-faq[open] summary::after { content: "−"; color: var(--color-accent); }
.cv-faq p { margin: 0 22px 18px; color: var(--color-text-soft); line-height: 1.7; }

/* ── Contact ─────────────────────────────────────── */
.cv-contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
.cv-ci {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 4px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cv-ci-row { padding-bottom: 16px; border-bottom: 1px dashed var(--color-border); }
.cv-ci-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.cv-ci-row strong {
  display: block;
  font-family: var(--font-title);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cv-ci-row a, .cv-ci-row span { color: var(--color-text); font-size: 1rem; font-weight: 500; }
.cv-ci-row a:hover { color: var(--color-primary); }
.cv-social { display: flex; gap: 8px; padding-top: 6px; }
.cv-social a {
  width: 38px; height: 38px;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.25s;
}
.cv-social a:hover { background: var(--color-primary); color: #fff; }
.cv-maps {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  min-height: 400px;
  background: var(--color-background);
}
.cv-maps-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  height: 400px;
  color: var(--color-primary);
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
}
.cv-maps-pin { font-size: 3rem; }

/* ── Footer ──────────────────────────────────────── */
.cv-footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.88);
  position: relative;
  padding-top: 50px;
}
.cv-tricolor-footer { position: absolute; top: 0; left: 0; right: 0; }
.cv-footer-inner {
  padding-bottom: 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px 40px;
  align-items: center;
  flex-wrap: wrap;
}
.cv-footer-brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.cv-footer-brand strong { display: block; font-family: var(--font-title); font-size: 1.15rem; color: #fff; font-weight: 700; }
.cv-footer-brand span { display: block; color: rgba(255,255,255,0.7); font-size: 0.82rem; }
.cv-footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.cv-footer-nav a { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
.cv-footer-nav a:hover { color: var(--color-accent2); }
.cv-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.cv-footer-legal a { color: rgba(255,255,255,0.7); font-size: 0.82rem; }
.cv-footer-legal a:hover { color: var(--color-accent2); }
.cv-footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .cv-quick { grid-template-columns: repeat(2, 1fr); position: relative; bottom: auto; margin-top: 40px; }
  .cv-hero { padding-bottom: 40px; }
  .cv-section:first-of-type { padding-top: 80px; }
  .cv-news, .cv-services, .cv-team, .cv-testi, .cv-docs { grid-template-columns: repeat(2, 1fr); }
  .cv-about, .cv-contact { grid-template-columns: 1fr; }
  .cv-footer-inner { grid-template-columns: 1fr; text-align: center; }
  .cv-footer-brand { justify-content: center; }
}
@media (max-width: 768px) {
  .cv-hamburger { display: block; }
  .cv-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .cv-nav.open { display: flex; }
  .cv-header .cv-btn { display: none; }
  .cv-topbar { font-size: 0.76rem; }
  .cv-topbar-inner { flex-direction: column; gap: 6px; text-align: center; }
  .cv-hero { padding: 60px 0 40px; }
  .cv-section { padding: 60px 0; }
  .cv-section-head { margin-bottom: 40px; }
  .cv-news, .cv-services, .cv-team, .cv-testi, .cv-docs, .cv-quick { grid-template-columns: 1fr; }
  .cv-stats { grid-template-columns: 1fr; gap: 16px; }
}
