/*
Theme Name: Veredinha 2026
Theme URI: https://novo.veredinha.mg.gov.br
Author: Prefeitura Municipal de Veredinha
Description: Tema institucional moderno para o portal da Prefeitura de Veredinha / MG.
Version: 0.2.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: veredinha-2026
*/

:root {
  --primary: #1E40AF;
  --primary-dark: #0F1E4D;
  --primary-light: #3B82F6;
  --primary-soft: #DBEAFE;
  --accent: #FBBF24;
  --accent-dark: #D97706;
  --green: #16A34A;
  --green-soft: #DCFCE7;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --purple: #7C3AED;
  --purple-soft: #EDE9FE;
  --orange: #EA580C;
  --orange-soft: #FFEDD5;
  --teal: #0D9488;
  --teal-soft: #CCFBF1;

  --bg: #ffffff;
  --bg-alt: #F8FAFC;
  --bg-dark: #0B1124;
  --text: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border: #E2E8F0;

  --radius: 12px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 30px 60px rgba(15,23,42,.18);

  --container: 1240px;
  --header-h: 88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.55;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { color: var(--text); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.65rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark h2 { color: #fff; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }
.section__title { margin: 0; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.section__eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--accent); display: inline-block; }
.section--dark .section__eyebrow { color: var(--accent); }
.section__sub { color: var(--text-muted); margin: 0; font-size: 1.05rem; max-width: 640px; }
.section--dark .section__sub { color: rgba(255,255,255,.7); }
.section__link { font-weight: 700; color: var(--primary); white-space: nowrap; font-size: .95rem; }
.section__link::after { content: ' →'; transition: transform .2s; display: inline-block; margin-left: 4px; }
.section__link:hover::after { transform: translateX(4px); }
.section--dark .section__link { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 0; cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); color: var(--bg-dark); }
.btn--accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); border: 1.5px solid rgba(255,255,255,.32); }
.btn--ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn--outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header__top {
  background: var(--primary-dark); color: rgba(255,255,255,.85);
  font-size: .82rem; padding: 8px 0;
}
.site-header__top-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-header__top a { color: #fff; }
.site-header__top a:hover { color: var(--accent); }
.site-header__top-left { display: flex; gap: 24px; flex-wrap: wrap; }
.site-header__top-left span { display: inline-flex; align-items: center; gap: 6px; }
.site-header__top-right { display: flex; gap: 16px; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.site-brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.site-brand img { height: 64px; width: auto; }
.site-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.site-brand__eyebrow { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.site-brand__name { font-size: 1.15rem; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.site-brand__tag { font-size: .72rem; color: var(--text-muted); font-style: italic; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: inline-block; padding: 10px 14px; color: var(--text);
  font-weight: 500; font-size: .92rem; border-radius: 8px;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.main-nav .nav-cta { background: var(--accent); color: var(--bg-dark); margin-left: 10px; padding: 10px 20px; font-weight: 700; border-radius: 999px; }
.main-nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  min-height: 720px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
}
.hero__bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(15,30,77,.94) 0%, rgba(30,64,175,.78) 45%, rgba(59,130,246,.45) 100%);
}
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero__inner { position: relative; z-index: 2; padding: 80px 0 120px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; backdrop-filter: blur(8px); margin-bottom: 28px;
}
.hero__eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(251,191,36,.25); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(251,191,36,.25); }
  50% { box-shadow: 0 0 0 10px rgba(251,191,36,.08); }
}
.hero__title {
  color: #fff; max-width: 880px;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 800; letter-spacing: -.025em;
  margin: 0 0 22px;
  text-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.hero__title span { color: var(--accent); }
.hero__sub { max-width: 640px; font-size: 1.18rem; color: rgba(255,255,255,.92); margin: 0 0 36px; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero__search {
  display: flex; gap: 0; max-width: 580px;
  background: #fff; border-radius: 999px; padding: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  margin-bottom: 48px;
}
.hero__search input {
  flex: 1; border: 0; outline: 0; padding: 14px 24px; border-radius: 999px;
  font-size: 1rem; color: var(--text); background: transparent;
}
.hero__search button {
  background: var(--primary); color: #fff; border: 0; padding: 14px 28px;
  border-radius: 999px; font-weight: 700; cursor: pointer; transition: background .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__search button:hover { background: var(--primary-dark); }

.hero__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; max-width: 820px;
}
.hero__stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 20px 22px; backdrop-filter: blur(12px);
  transition: all .2s;
}
.hero__stat:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); }
.hero__stat strong { display: block; font-size: 1.85rem; color: #fff; font-weight: 800; letter-spacing: -.02em; }
.hero__stat span { font-size: .82rem; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 6px; }

/* ============ QUICK SERVICES ============ */
.services { padding: 96px 0 64px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.service-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 28px 24px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text);
  transition: all .25s;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c, var(--primary)); transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--c, var(--primary-light)); }
.service-card__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--cs, var(--primary-soft)); color: var(--c, var(--primary));
  border-radius: 14px;
  transition: all .3s;
}
.service-card:hover .service-card__icon { background: var(--c, var(--primary)); color: #fff; transform: rotate(-6deg) scale(1.06); }
.service-card h3 { font-size: 1.02rem; margin: 0; color: inherit; }
.service-card p { font-size: .87rem; color: var(--text-muted); margin: 0; }
.service-card[data-c="blue"]    { --c: var(--primary);  --cs: var(--primary-soft); }
.service-card[data-c="green"]   { --c: var(--green);    --cs: var(--green-soft); }
.service-card[data-c="orange"]  { --c: var(--orange);   --cs: var(--orange-soft); }
.service-card[data-c="purple"]  { --c: var(--purple);   --cs: var(--purple-soft); }
.service-card[data-c="red"]     { --c: var(--red);      --cs: var(--red-soft); }
.service-card[data-c="teal"]    { --c: var(--teal);     --cs: var(--teal-soft); }

/* ============ FULL-WIDTH BANNER ============ */
.banner-full {
  position: relative; overflow: hidden;
  min-height: 460px; color: #fff;
  display: flex; align-items: center;
  margin: 32px 0;
}
.banner-full__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.banner-full__bg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(15,30,77,.92) 30%, rgba(15,30,77,.55) 70%, transparent 100%);
}
.banner-full__inner { position: relative; z-index: 2; max-width: 620px; padding: 64px 0; }
.banner-full h2 { color: #fff; margin: 16px 0; }
.banner-full p { color: rgba(255,255,255,.88); font-size: 1.1rem; max-width: 540px; }

/* ============ NEWS ============ */
.news-mosaic {
  display: grid; gap: 24px;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.news-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; background: #fff;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  color: var(--text); transition: all .25s;
  min-height: 280px;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.news-card--hero { grid-row: 1 / 3; min-height: 580px; color: #fff; border: 0; }
.news-card--hero .news-card__media { flex: 1; }
.news-card--hero .news-card__body { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px; background: linear-gradient(to top, rgba(11,17,36,.95) 0%, rgba(11,17,36,.7) 50%, transparent 100%); }
.news-card--hero .news-card__title { color: #fff; font-size: 1.6rem; }
.news-card--hero .news-card__excerpt { color: rgba(255,255,255,.85); }
.news-card--hero .news-card__date { color: rgba(255,255,255,.7); }
.news-card__media {
  aspect-ratio: 16/9;
  background:
    linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  background-size: cover; background-position: center;
  position: relative;
}
.news-card__cat {
  position: absolute; top: 14px; left: 14px;
  background: #fff; color: var(--primary);
  font-size: .7rem; font-weight: 800;
  padding: 6px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em;
  box-shadow: var(--shadow-sm);
}
.news-card__body { padding: 22px 24px 26px; }
.news-card__date { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.news-card__title { font-size: 1.1rem; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.news-card__excerpt { font-size: .9rem; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ SECRETARIAS ============ */
.dep-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.dep-card {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px;
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text); transition: all .25s; position: relative; overflow: hidden;
}
.dep-card::after {
  content: '→'; position: absolute; right: 22px; opacity: 0;
  color: var(--c, var(--primary)); font-weight: 700; transition: all .25s;
  transform: translateX(-8px);
}
.dep-card:hover { border-color: var(--c, var(--primary)); transform: translateY(-3px); color: var(--text); box-shadow: var(--shadow); padding-right: 40px; }
.dep-card:hover::after { opacity: 1; transform: translateX(0); }
.dep-card__icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; background: var(--cs, var(--primary-soft)); color: var(--c, var(--primary));
  transition: all .3s;
}
.dep-card:hover .dep-card__icon { background: var(--c, var(--primary)); color: #fff; transform: scale(1.06); }
.dep-card__name { font-size: 1rem; font-weight: 700; color: inherit; }
.dep-card[data-c="green"]   { --c: var(--green);   --cs: var(--green-soft); }
.dep-card[data-c="orange"]  { --c: var(--orange);  --cs: var(--orange-soft); }
.dep-card[data-c="purple"]  { --c: var(--purple);  --cs: var(--purple-soft); }
.dep-card[data-c="red"]     { --c: var(--red);     --cs: var(--red-soft); }
.dep-card[data-c="teal"]    { --c: var(--teal);    --cs: var(--teal-soft); }
.dep-card[data-c="blue"]    { --c: var(--primary); --cs: var(--primary-soft); }
.dep-card[data-c="accent"]  { --c: var(--accent-dark); --cs: #FEF3C7; }

/* ============ A CIDADE ============ */
.city-about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.city-about__media {
  position: relative;
  aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.city-about__media img { width: 100%; height: 100%; object-fit: cover; }
.city-about__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(220deg, transparent 60%, rgba(30,64,175,.25));
}
.city-about__media-tag {
  position: absolute; top: 20px; left: 20px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  padding: 8px 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--primary);
  letter-spacing: .04em;
}
.city-about__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0; }
.city-about__stat {
  background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 18px 20px; border-radius: 10px;
}
.city-about__stat strong { display: block; font-size: 1.65rem; color: var(--primary); font-weight: 800; }
.city-about__stat span { font-size: .85rem; color: var(--text-muted); }

/* ============ GALERIA MOSAIC ============ */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 280px 280px;
}
.gallery__item {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  cursor: pointer;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,17,36,.55), transparent 60%);
}
.gallery__caption {
  position: absolute; bottom: 20px; left: 22px; z-index: 2; color: #fff;
  font-weight: 700; font-size: 1rem;
}
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item--md { grid-column: span 1; }

/* ============ CTA banner ============ */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff; padding: 72px 0; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(251,191,36,.18), transparent 60%);
}
.cta-banner__inner {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  position: relative; z-index: 2;
}
.cta-banner h2 { color: #fff; margin: 0 0 14px; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-banner p { color: rgba(255,255,255,.88); font-size: 1.1rem; margin: 0; max-width: 540px; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,.78); padding: 72px 0 0;
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--green), var(--red), var(--purple));
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 20px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: .9rem; }
.site-footer a { color: rgba(255,255,255,.72); transition: color .2s; }
.site-footer a:hover { color: var(--accent); }
.footer-brand img { height: 70px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { font-size: .92rem; max-width: 340px; color: rgba(255,255,255,.65); margin: 0 0 16px; }
.footer-social { display: flex; gap: 10px; margin-top: 8px; }
.footer-social a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.footer-social a:hover { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px 0; font-size: .82rem; color: rgba(255,255,255,.5); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .news-mosaic { grid-template-columns: 1fr 1fr; }
  .news-card--hero { grid-column: 1 / 3; grid-row: auto; min-height: 380px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .gallery__item--lg { grid-column: span 2; grid-row: auto; aspect-ratio: 16/9; }
}
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 16px; border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all .2s;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .city-about { grid-template-columns: 1fr; gap: 40px; }
  .cta-banner__inner { grid-template-columns: 1fr; }
  .cta-banner__actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-header__top { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { min-height: 620px; }
  .hero__inner { padding: 56px 0 80px; }
  .news-mosaic { grid-template-columns: 1fr; }
  .news-card--hero { grid-column: auto; min-height: 320px; }
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-brand__text { display: none; }
  .site-brand img { height: 52px; }
}
