/* =================================================================
   DIÓCESIS DE CHICLAYO — CSS Global v3.0
   Paleta: verde #00783c · dorado #c8a84b · azul #1e5fa8
   Estética: minimalista, limpia, institucional
   ================================================================= */

/* ── 1. TOKENS ──────────────────────────────────────────────── */
:root {
  /* Paleta del escudo */
  --green:      #00783c;
  --green-dk:   #005a2c;
  --green-lt:   #e8f5ee;
  --gold:       #c8a84b;
  --gold-lt:    #fdf8ed;
  --blue:       #1e5fa8;
  --blue-lt:    #edf4ff;

  /* Neutros */
  --ink:        #1a1f2e;
  --ink-2:      #4a5568;
  --ink-3:      #718096;
  --bg:         #f8f9fb;
  --paper:      #ffffff;
  --border:     #e8ecf0;
  --border-2:   #d1d9e0;

  /* Layout */
  --topbar-h:   38px;
  --header-h:   74px;
  --offset:     calc(var(--topbar-h) + var(--header-h));
  --max-w:      1200px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(0,0,0,.06);
  --sh-sm: 0 2px 12px rgba(0,0,0,.07);
  --sh-md: 0 6px 24px rgba(0,0,0,.09);
  --sh-lg: 0 20px 60px rgba(0,0,0,.13);

  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Crimson Text", Georgia, serif;

  /* Transition */
  --ease: .17s ease;
}

/* ── 2. RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  padding-top: var(--offset);
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.2; }
img, video, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--blue); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--green-dk); text-decoration: underline; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul, ol { padding-left: 1.4rem; }

/* ── 3. UTILIDADES ───────────────────────────────────────────── */
.hide { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.page-title { margin-bottom: 32px; }
.page-title h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: .35rem;
  color: var(--ink);
}
.page-title p { color: var(--ink-2); font-size: .97rem; margin: 0; }

/* ── 4. TOPBAR ───────────────────────────────────────────────── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1040;
  height: var(--topbar-h);
  background: var(--green) !important;
  color: #fff !important;
  font-size: .8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}
#topbar .container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#topbar i { margin-right: 5px; font-size: .8rem; vertical-align: middle; opacity: .85; }

/* ── 5. HEADER ───────────────────────────────────────────────── */
#header {
  position: fixed !important;
  top: var(--topbar-h) !important;
  left: 0; right: 0;
  z-index: 1030;
  height: var(--header-h);
  background: #fff !important;
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
#header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.10); border-bottom-color: transparent; }

#header .container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Logo */
.logo { flex-shrink: 0; line-height: 0; display: block; }
.logo img {
  height: 50px !important;
  width: auto !important;
  max-width: 170px;
  object-fit: contain;
}

/* Nav desktop */
#mainNav {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-left: auto;
}
#mainNav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-2) !important;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background var(--ease), color var(--ease);
  letter-spacing: .01em;
}
#mainNav a:hover {
  background: var(--green-lt);
  color: var(--green-dk) !important;
  text-decoration: none;
}
#mainNav a[aria-current="page"] {
  background: var(--green-lt);
  color: var(--green) !important;
  font-weight: 600;
}
.appointment-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  background: #1877f2 !important;
  color: #fff !important;
  border-radius: var(--r-sm) !important;
  padding: 6px 14px !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  margin-left: 8px;
  text-decoration: none !important;
  transition: background var(--ease) !important;
}
.appointment-btn:hover { background: #1256b3 !important; color: #fff !important; }

/* Hamburguesa */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-left: auto;
  transition: background var(--ease);
}
.menu-toggle:hover { background: var(--green-lt); }

/* ── 6. MOBILE NAV ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .menu-toggle { display: inline-flex; }
  #mainNav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 8px;
    box-shadow: var(--sh-lg);
    border: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    z-index: 9999;
    margin-left: 0;
  }
  #mainNav.open { display: flex; }
  #mainNav a { padding: 11px 14px; border-radius: var(--r-sm); font-size: .9rem; }
  .appointment-btn { justify-content: center; margin-left: 0 !important; }
}

/* ── 7. HERO CARRUSEL ────────────────────────────────────────── */
/* Contenedor acotado — no full bleed */
.hero-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 0;
}
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  background: #111;
}
.hero-card .carousel-item { position: relative; overflow: hidden; }
.hero-card .hero-img {
  width: 100%;
  height: clamp(280px, 46vw, 580px);
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Gradiente sutil solo en el tercio inferior */
.hero-card .carousel-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
  pointer-events: none;
}

/* Caption */
.hero-card .caption-cta {
  position: absolute !important;
  bottom: 0 !important; left: 0 !important; right: 0 !important;
  top: auto !important;
  transform: none !important;
  text-align: left;
  padding: 0 28px 28px !important;
  background: none !important;
  z-index: 5;
}
.hero-card .caption-cta h3 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: #fff;
  margin: 0 0 10px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  max-width: 65ch;
  line-height: 1.3;
}
.hero-card .caption-cta .btn {
  pointer-events: auto;
  position: relative;
  z-index: 6;
}
/* Controles */
.hero-card .carousel-control-prev,
.hero-card .carousel-control-next { z-index: 6; width: 8%; }
.hero-card .carousel-control-prev-icon,
.hero-card .carousel-control-next-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  background-size: 50% 50%;
  border: 1px solid rgba(255,255,255,.25);
}
/* Indicadores como líneas finas */
.hero-card .carousel-indicators {
  bottom: 10px; z-index: 6; gap: 4px; margin: 0 0 0 28px;
  justify-content: flex-start;
}
.hero-card .carousel-indicators [data-bs-target] {
  width: 20px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.45); border: 0;
  transition: width var(--ease), background var(--ease);
}
.hero-card .carousel-indicators .active {
  background: #fff; width: 36px;
}

/* ── 8. TARJETAS ─────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

/* Tarjeta base */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-xs);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.card.soft { border: 0; box-shadow: var(--sh-sm); }
.card.soft:hover { box-shadow: var(--sh-md); }

/* Imagen superior de tarjeta */
.card-hero-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Thumb (ícono — sin imagen) */
.card .thumb {
  width: 100%;
  height: 120px;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-dk) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.9);
  font-size: 2rem;
  flex-shrink: 0;
}
.card .thumb i { filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }

/* Cuerpo */
.card .body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.3;
}
.card p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.card .responsable { color: var(--ink-3); font-size: .82rem; }

/* ── 9. BOTONES ──────────────────────────────────────────────── */
.btn, a.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
  border: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary, .btn.btn-primary {
  background: var(--blue);
  color: #fff !important;
}
.btn-primary:hover { background: #174d8a; box-shadow: 0 4px 12px rgba(30,95,168,.3); }

.btn-success, .btn.btn-success {
  background: var(--green);
  color: #fff !important;
}
.btn-success:hover { background: var(--green-dk); box-shadow: 0 4px 12px rgba(0,120,60,.3); }

/* Botón default de tarjetas */
.card .btn:not(.btn-primary):not(.btn-success):not(.btn-brand) {
  align-self: flex-start;
  margin-top: auto;
  background: var(--green);
  color: #fff !important;
}
.card .btn:not(.btn-primary):not(.btn-success):not(.btn-brand):hover {
  background: var(--green-dk);
}

.btn-sm { padding: 5px 13px; font-size: .78rem; }

/* ── 10. FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--ink-3);
  padding: 22px 24px;
  text-align: center;
  font-size: .88rem;
  margin-top: 40px;
}
footer a { color: var(--green); font-weight: 500; }
footer a:hover { text-decoration: underline; }

/* ── 11. COMPONENTES DE CONTENIDO ────────────────────────────── */

/* Prosa */
.prose {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: 28px 32px;
}
.prose h1, .prose h2, .prose h3 { color: var(--green-dk); margin-top: 1.4rem; margin-bottom: .4rem; }
.prose p { margin: 0 0 .9rem; color: var(--ink-2); line-height: 1.7; }
.prose img { border-radius: var(--r-md); box-shadow: var(--sh-sm); }

/* Figura (imagen + texto) */
.figure {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: 24px;
}
.figure img { width: 100%; height: auto; border-radius: var(--r-md); }
.figure h2 { color: var(--green-dk); font-size: 1.4rem; }
.figure p { color: var(--ink-2); line-height: 1.7; margin-bottom: .8rem; }
@media (min-width: 860px) { .figure { grid-template-columns: 380px 1fr; } }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--green-lt);
  color: var(--green-dk);
  letter-spacing: .01em;
}

/* ── 12. CURIA — COMISIONES ──────────────────────────────────── */

/* Sección header */
.curia-section-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.curia-section-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink);
  margin-bottom: .2rem;
}
#bc { color: var(--ink-3); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

/* Home grid comisiones */
#home {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

/* Ícono en tarjeta de comisión */
.icon-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-dk) 100%);
  color: rgba(255,255,255,.9);
  font-size: 2.2rem;
}
.icon-card i { filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }

/* Layout detalle */
#layout {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 20px;
  margin-top: 24px;
}

/* Sidebar */
.sidebar {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: 10px;
  align-self: start;
  position: sticky;
  top: calc(var(--offset) + 16px);
  max-height: calc(100vh - var(--offset) - 40px);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.side-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background var(--ease), border-color var(--ease);
}
.side-item:hover { background: var(--green-lt); border-color: var(--border); }
.side-item.active {
  background: var(--green-lt);
  border-color: var(--green);
}
.side-title { font-size: .8rem; line-height: 1.35; color: var(--ink-2); }
.side-item.active .side-title { color: var(--green-dk); font-weight: 600; }

.icon-side {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(145deg, var(--green), var(--green-dk));
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 1.05rem;
  flex-shrink: 0;
}

/* Panel detalle */
.detail {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
#hero { padding: 0; }
.hero-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 28px;
  color: #fff;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-dk) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Decoración geométrica sutil */
.hero-icon::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.hero-icon::after {
  content: '';
  position: absolute;
  left: -20px; bottom: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.hero-icon i {
  font-size: 3.2rem;
  margin-bottom: 10px;
  position: relative; z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.hero-icon h2 {
  margin: 0; font-size: 1.4rem; color: #fff;
  position: relative; z-index: 1;
}

.detail-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-title { font-size: 1.3rem; color: var(--ink); }
.detail-body { padding: 16px 20px; }

/* Área / subcomisión */
.area {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  background: #fff;
  align-items: flex-start;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.area:hover { border-color: var(--green); box-shadow: 0 2px 8px rgba(0,120,60,.08); }
.num {
  min-width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green-dk);
  border: 1px solid rgba(0,120,60,.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .75rem;
  flex-shrink: 0;
}
.area strong { font-size: .9rem; display: block; margin-bottom: 2px; color: var(--ink); }
.area small { font-size: .78rem; color: var(--ink-3); display: block; margin-top: 1px; }

/* Badge plan pastoral */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  color: var(--green-dk);
  font-weight: 600;
  margin-top: 2px;
}

/* Botón Ver Plan Pastoral */
.btn-plan-pastoral {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
  margin-top: 8px;
}
.btn-plan-pastoral:hover {
  background: var(--green-dk);
  box-shadow: 0 4px 14px rgba(0,120,60,.3);
  transform: translateY(-1px);
  color: #fff !important;
}

/* ── 13. MODAL PDF ───────────────────────────────────────────── */
#pp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#pp-modal.open { display: flex; }
.pp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,15,30,.7);
  backdrop-filter: blur(5px);
}
.pp-dialog {
  position: relative; z-index: 1;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: min(94vw, 960px);
  height: min(90vh, 860px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ppIn .2s ease;
}
@keyframes ppIn {
  from { opacity:0; transform:translateY(12px) scale(.97); }
  to   { opacity:1; transform:none; }
}
.pp-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--green);
  color: #fff; gap: 12px; flex-shrink: 0;
}
.pp-header-left {
  display: flex; align-items: center;
  gap: 8px; font-size: .9rem; font-weight: 600; overflow: hidden;
}
.pp-header-left i { font-size: 1rem; opacity: .85; flex-shrink: 0; }
#pp-modal-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px;
}
.pp-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pp-btn-download {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.15);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--r-sm);
  padding: 5px 12px; font-size: .8rem; font-weight: 600;
  text-decoration: none !important;
  transition: background var(--ease);
}
.pp-btn-download:hover { background: rgba(255,255,255,.28); color: #fff !important; }
.pp-btn-close {
  background: transparent; border: none; color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 0 2px; opacity: .8; transition: opacity var(--ease);
}
.pp-btn-close:hover { opacity: 1; }
.pp-body { flex: 1; position: relative; background: #e8e8e8; overflow: hidden; }
#pp-iframe { width: 100%; height: 100%; border: none; display: block; }
.pp-fallback {
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; position: absolute; inset: 0;
  background: #f7f9f7; text-align: center; padding: 32px;
}
.pp-fallback.show { display: flex; }
.pp-fallback i { font-size: 3rem; color: var(--green); }
.pp-fallback p { color: var(--ink-2); }
.pp-btn-fallback-dl {
  background: var(--green) !important; border-color: var(--green) !important;
  padding: 10px 22px !important; font-size: .88rem !important;
}
.pp-btn-fallback-dl:hover { background: var(--green-dk) !important; }

/* ── 14. PARROQUIAS ──────────────────────────────────────────── */
.pg-directory {
  background: #f4faf6; border-radius: var(--r-lg);
  --brand: #00783c; --brand-2: #2bbf6c;
}
.card-parroquia {
  border: 1px solid #e4ece7; border-radius: var(--r-lg);
  background: #fff; height: 100%;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card-parroquia:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.pg-directory .form-control:focus, .pg-directory .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 .2rem rgba(0,120,60,.15);
}

/* ── 15. ACCESIBILIDAD ───────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── 16. RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  #mainNav a { padding: 6px 8px; font-size: .79rem; }
}
@media (max-width: 900px) {
  .wrap { padding: 24px 16px 60px; }
  #layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow-y: visible; }
  .hero-icon h2 { font-size: 1.2rem; }
  .hero-icon i { font-size: 2.6rem; }
  .hero-section { padding: 16px 16px 0; }
}
@media (max-width: 640px) {
  :root { --topbar-h: 0px; }
  #topbar { display: none; }
  .hero-card .hero-img { height: clamp(200px, 58vw, 320px); }
  .grid, #home { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-hero-img { height: 120px; }
  .card .thumb { height: 100px; font-size: 1.7rem; }
  .card .body { padding: 12px 14px 14px; }
  .card h3 { font-size: 1rem; }
  .icon-card { height: 100px; font-size: 1.8rem; }
  .prose { padding: 18px 20px; }
  .figure { padding: 16px; }
  .hero-section { padding: 10px 10px 0; }
  .hero-card { border-radius: var(--r-md); }
  .hero-card .caption-cta { padding: 0 16px 18px !important; }
  #pp-modal-title { max-width: 150px; }
}
@media (max-width: 400px) {
  .grid, #home { grid-template-columns: 1fr; }
}

/* ── 17. PRINT ───────────────────────────────────────────────── */
@media print {
  #topbar, #header, .menu-toggle, #mainNav { display: none !important; }
  body { padding-top: 0; }
  .sidebar { display: none !important; }
  #layout { display: block; }
}
