/*
Theme Name: Oliveirinha Freguesia
Theme URI: https://jfoliveirinha.pt
Author: Lalland
Author URI: https://lalland.pt
Description: Tema oficial da Junta de Freguesia de Oliveirinha. Design moderno, acessível e fácil de gerir.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oliveirinha
Tags: freguesia, municipal, governo, portugal, verde
*/

/* ============================================================
   CSS VARIABLES — Paleta Oliveirinha
   ============================================================ */
:root {
  --color-primary:       #374c3c;
  --color-primary-light: #567a51;
  --color-accent:        #af7a04;
  --color-beige:         #d8c9a1;
  --color-beige-light:   #f0ead8;

  --color-success:       #2e7d52;
  --color-warning:       #b45309;
  --color-danger:        #9b2335;

  --color-white:         #ffffff;
  --color-bg:            #f7f6f3;
  --color-surface:       #ffffff;
  --color-border:        #e2ddd5;
  --color-border-strong: #c8c2b8;

  --color-text:          #1c1f1d;
  --color-text-muted:    #6b7068;
  --color-text-light:    #9ba09a;

  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Poppins', system-ui, sans-serif;

  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);

  --transition:   0.18s ease;
  --container:    1100px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; font-family: var(--font-sans); font-weight: 600; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow { max-width: 760px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: var(--color-primary);
  padding: 7px 0;
  font-size: 11.5px;
  color: var(--color-beige);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar__contact {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: .85;
}

.topbar__contact a {
  color: var(--color-beige);
  transition: opacity var(--transition);
}
.topbar__contact a:hover { opacity: 1; }

.topbar__social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__social a {
  color: var(--color-beige);
  opacity: .7;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
}
.topbar__social a:hover { opacity: 1; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-branding__logo {
  height: 44px;
  width: auto;
}

.site-branding__text strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.site-branding__text span {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Main nav */
.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav__item { position: relative; }

.main-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.main-nav__link:hover,
.main-nav__link.active {
  color: var(--color-primary);
  background: rgba(55,76,60,0.06);
}

.main-nav__link.active {
  color: var(--color-primary-light);
  font-weight: 600;
}

/* Dropdown */
.main-nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 200;
}

.main-nav__item:hover .main-nav__dropdown,
.main-nav__item:focus-within .main-nav__dropdown { display: block; }

.main-nav__dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.main-nav__dropdown a:hover {
  color: var(--color-primary);
  background: rgba(55,76,60,0.06);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--color-text);
}

/* ============================================================
   ALERT STRIP
   ============================================================ */
.alert-strip {
  background: #fefce8;
  border-bottom: 1px solid #fde68a;
  padding: 9px 0;
}

.alert-strip__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-strip__badge {
  background: var(--color-accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.alert-strip__text {
  font-size: 12.5px;
  color: #78350f;
  flex: 1;
}

.alert-strip__link {
  font-size: 12px;
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.alert-strip__link:hover { opacity: .75; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--color-primary);
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(175,122,4,0.12);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; text-align: center; }

.hero__eyebrow {
  font-size: 11px;
  color: var(--color-beige);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 12px;
}

.hero__title {
  color: white;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 10px;
}

.hero__subtitle {
  color: var(--color-beige);
  font-size: 14px;
  opacity: .85;
  margin-bottom: 36px;
}

/* Quick access buttons in hero */
.hero__quicklinks {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
}

.quicklink {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  color: white;
  font-size: 12px;
  font-weight: 500;
  min-width: 100px;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.quicklink:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.quicklink svg { opacity: .9; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--font-serif);
  color: var(--color-text);
  margin-bottom: 6px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-link {
  font-size: 12.5px;
  color: var(--color-primary-light);
  font-weight: 600;
  transition: opacity var(--transition);
}
.section-link:hover { opacity: .7; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--color-bg);
}

.card__body { padding: 16px; }

.card__category {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.card__category--noticia   { background: #eef7ee; color: #2e6b3a; }
.card__category--aviso     { background: #fef3e2; color: #92400e; }
.card__category--comunidade{ background: #fde8ea; color: #9b2335; }
.card__category--institucional { background: #e8f0fe; color: #1a56db; }

.card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card__meta {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* News row card */
.news-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: box-shadow var(--transition);
}

.news-row:hover { box-shadow: var(--shadow-sm); }

.news-row__thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  object-fit: cover;
  background: var(--color-bg);
}

.news-row__thumb--default {
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-row__body { flex: 1; min-width: 0; }
.news-row__meta { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ============================================================
   EVENT CARD
   ============================================================ */
.event-card {
  display: flex;
  gap: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.event-card--featured { border: 2px solid var(--color-primary); }

.event-card__date {
  width: 72px;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  flex-shrink: 0;
  text-align: center;
}

.event-card--past .event-card__date {
  background: var(--color-bg);
}

.event-card__day {
  font-size: 26px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.event-card--past .event-card__day { color: var(--color-text-muted); }

.event-card__month {
  font-size: 11px;
  color: var(--color-beige);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.event-card--past .event-card__month { color: var(--color-text-light); }

.event-card__body {
  padding: 14px 16px;
  flex: 1;
}

.event-card__tags { display: flex; gap: 6px; margin-bottom: 7px; flex-wrap: wrap; }

.event-card__title { font-size: 14px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }

.event-card__info {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.event-card__info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.event-card__status {
  background: var(--color-bg);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 10.5px;
  color: var(--color-text-muted);
  font-weight: 500;
  align-self: center;
  flex-shrink: 0;
  margin-right: 14px;
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
}

.badge--green  { background: #eef7ee; color: #2e6b3a; }
.badge--amber  { background: #fef3e2; color: #92400e; }
.badge--blue   { background: #e8f0fe; color: #1a56db; }
.badge--purple { background: #f3f0ff; color: #5b21b6; }
.badge--red    { background: #fde8ea; color: #9b2335; }
.badge--gray   { background: var(--color-bg); color: var(--color-text-muted); }
.badge--dark   { background: var(--color-primary); color: white; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
}
.btn--primary:hover { background: #2a3c2e; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn--secondary {
  background: var(--color-primary-light);
  color: white;
}
.btn--secondary:hover { background: #456640; transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn--outline:hover { background: rgba(55,76,60,0.06); }

.btn--ghost {
  background: transparent;
  color: var(--color-primary-light);
  padding: 0;
  font-size: 12.5px;
}
.btn--ghost:hover { opacity: .7; }

.btn--lg { padding: 13px 28px; font-size: 15px; }
.btn--sm { padding: 7px 14px; font-size: 12px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(86,122,81,0.15);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-upload {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.form-upload:hover {
  border-color: var(--color-primary-light);
  background: rgba(86,122,81,0.03);
}

/* ============================================================
   NOTICE / ALERT BOX
   ============================================================ */
.notice {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.6;
}

.notice--warning {
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #78350f;
}

.notice--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.notice--success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.notice__icon { flex-shrink: 0; margin-top: 1px; }
.notice__title { font-weight: 600; margin-bottom: 3px; }

/* ============================================================
   SIDEBAR BOXES
   ============================================================ */
.sidebar-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}

.sidebar-box__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-box--dark {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.sidebar-box--dark .sidebar-box__title { color: var(--color-beige); border-color: rgba(255,255,255,0.1); }

/* ============================================================
   SCHEDULE TABLE (horário)
   ============================================================ */
.schedule { width: 100%; font-size: 13px; }
.schedule tr { border-bottom: 1px solid var(--color-border); }
.schedule tr:last-child { border-bottom: none; }
.schedule td { padding: 7px 0; }
.schedule td:first-child { color: var(--color-text-muted); }
.schedule td:last-child { text-align: right; font-weight: 600; }
.schedule .closed { color: var(--color-danger); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.breadcrumb__sep { opacity: .4; }

.breadcrumb__current {
  color: var(--color-primary-light);
  font-weight: 600;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  background: var(--color-white);
  padding: 32px 0 26px;
  border-bottom: 1px solid var(--color-border);
}

.page-header__eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.page-header__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 8px;
}

.page-header__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 580px;
  line-height: 1.7;
}

/* ============================================================
   FILTER PILLS
   ============================================================ */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  transition: all var(--transition);
  text-decoration: none;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ============================================================
   DOCUMENT LIST
   ============================================================ */
.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 8px;
  transition: box-shadow var(--transition);
}

.doc-row:hover { box-shadow: var(--shadow-sm); }

.doc-row__icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #fde8ea;
}

.doc-row__info { flex: 1; min-width: 0; }
.doc-row__title { font-size: 13.5px; font-weight: 600; }
.doc-row__meta  { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }

.doc-row__download {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--color-primary-light);
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.doc-row__download:hover { opacity: .7; }

/* ============================================================
   ELEITOS (member cards)
   ============================================================ */
.member-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.member-card--president { box-shadow: var(--shadow-sm); }

.member-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar--lg { width: 68px; height: 68px; font-size: 22px; }

.member-avatar img { width: 100%; height: 100%; object-fit: cover; }

.member-card__body { flex: 1; min-width: 0; }
.member-card__name { font-size: 15px; font-weight: 600; margin-top: 6px; }
.member-card__role { font-size: 12px; color: var(--color-text-muted); }

.member-card__contacts {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.member-card__contact {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--color-primary-light);
  transition: opacity var(--transition);
}
.member-card__contact:hover { opacity: .7; }

/* ============================================================
   CONTACTOS PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.contact-card__icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: #eef7ee;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}

.contact-card__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.contact-card__value { font-size: 13px; font-weight: 600; line-height: 1.5; }

.map-placeholder {
  height: 180px;
  background: #e5e2da;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   ALERTE CATEGORIES
   ============================================================ */
.alert-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.alert-type {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.alert-type:hover { border-color: var(--color-primary-light); background: rgba(86,122,81,0.04); }

.alert-type.selected {
  border-color: var(--color-primary);
  background: rgba(55,76,60,0.06);
}

.alert-type__icon { margin: 0 auto 8px; }
.alert-type__label { font-size: 12px; font-weight: 600; color: var(--color-text); }
.alert-type__sub   { font-size: 10.5px; color: var(--color-text-muted); margin-top: 2px; }

/* ============================================================
   QUICK ACCESS BAND
   ============================================================ */
.quick-access {
  background: var(--color-white);
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
}

.quick-access__label {
  font-size: 10.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.quick-access__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.quick-access__item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--transition);
  text-decoration: none;
}

.quick-access__item span { display: block; font-size: 10.5px; color: var(--color-text-muted); font-weight: 400; margin-top: 2px; }

.quick-access__item:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  background: rgba(86,122,81,0.04);
}

/* ============================================================
   SAÚDE — Emergency bar
   ============================================================ */
.emergency-bar {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.emergency-bar__item { text-align: center; }

.emergency-bar__item + .emergency-bar__item {
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 16px;
}

.emergency-bar__label { font-size: 10px; color: var(--color-beige); opacity: .8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.emergency-bar__number { font-size: 22px; font-weight: 700; color: white; }

/* ============================================================
   FARMÁCIA CARD
   ============================================================ */
.pharmacy-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.pharmacy-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
}

.pharmacy-card__name { font-size: 14px; font-weight: 600; }
.pharmacy-card__addr { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.pharmacy-card__body {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.pharmacy-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 4px 0;
}

.pharmacy-card__row span:first-child { color: var(--color-text-muted); }
.pharmacy-card__row span:last-child  { font-weight: 600; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
}

.pagination__item {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.pagination__item:hover,
.pagination__item.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ============================================================
   CONTACTOS ÚTEIS
   ============================================================ */
.contacts-section__header {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.contacts-section__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}

.contacts-section__row:last-child { border-bottom: none; }

.contacts-section__name { color: var(--color-text-muted); }
.contacts-section__val  { font-weight: 600; }
.contacts-section__link { color: var(--color-primary-light); font-weight: 600; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 22px;
}

.tab {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  text-decoration: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab:hover { color: var(--color-primary); }
.tab.active { color: var(--color-primary-light); border-bottom-color: var(--color-primary-light); font-weight: 600; }

/* ============================================================
   MAIN LAYOUT TEMPLATES
   ============================================================ */
.page-body {
  background: var(--color-bg);
  padding: 28px 0 48px;
}

.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 22px;
  align-items: start;
}

.layout-sidebar--left {
  grid-template-columns: 260px 1fr;
}

.layout-main { display: grid; gap: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary);
  color: var(--color-beige);
  padding: 40px 0 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
}

.site-footer__title {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 14px;
}

.site-footer__text {
  font-size: 12.5px;
  line-height: 2;
  opacity: .75;
}

.site-footer__nav a {
  display: block;
  font-size: 12.5px;
  color: var(--color-beige);
  opacity: .75;
  margin-bottom: 5px;
  transition: opacity var(--transition);
}
.site-footer__nav a:hover { opacity: 1; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  opacity: .6;
}

/* ============================================================
   SECTION — Homepage blocks
   ============================================================ */
.home-section {
  padding: 32px 0;
}

.home-section--alt { background: var(--color-white); }

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.events-sidebar { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   HOW IT WORKS STEPS
   ============================================================ */
.steps { display: flex; flex-direction: column; gap: 14px; }

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.step__text { font-size: 12.5px; line-height: 1.6; color: var(--color-text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .layout-sidebar,
  .layout-sidebar--left {
    grid-template-columns: 1fr;
  }

  .emergency-bar { grid-template-columns: repeat(2, 1fr); }

  .quick-access__grid { grid-template-columns: repeat(3, 1fr); }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }

  .alert-types { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .topbar { display: none; }

  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: white; z-index: 999; padding: 80px 24px 24px; gap: 4px; }

  .nav-toggle { display: flex; }

  .hero__quicklinks { flex-direction: column; align-items: center; }
  .quicklink { flex-direction: row; min-width: 200px; justify-content: flex-start; }

  .contact-grid { grid-template-columns: 1fr; }

  .site-footer__grid { grid-template-columns: 1fr; }

  .quick-access__grid { grid-template-columns: repeat(2, 1fr); }

  .alert-types { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   WORDPRESS SPECIFIC
   ============================================================ */
.alignwide  { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull  { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-post-image { width: 100%; height: auto; border-radius: var(--radius-lg); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-primary);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  z-index: 9999;
}
.skip-link:focus { top: 16px; }
