/* ==========================================================================
   TecNM Campus Comitán — 10 Acciones contra el Cambio Climático
   Paleta Oficial Manual de Identidad Gráfica del TecNM:
   - Azul Institucional (Pantone 294 C): #1B396A
   - Gris Institucional (Pantone Cool Gray 10 C): #807E82
   - Plata Institucional (Pantone 877 C): #A5A8AB
   - Blanco: #FFFFFF
   ========================================================================== */

:root {
  --tecnm-navy: #1B396A;
  --tecnm-navy-deep: #13294B;
  --tecnm-navy-mid: #284F8C;
  --tecnm-navy-soft: #EBF0F7;
  --tecnm-gray: #807E82;
  --tecnm-gray-dark: #4E4D51;
  --tecnm-silver: #A5A8AB;
  --ink: #172030;
  --ink-muted: #525357;
  --ink-soft: #807E82;
  --surface: #FFFFFF;
  --canvas: #F4F6FA;
  --border: rgba(27, 57, 106, 0.12);
  --shadow-sm: 0 2px 8px rgba(27, 57, 106, 0.06);
  --shadow-md: 0 10px 28px rgba(27, 57, 106, 0.1);
  --shadow-lg: 0 20px 48px rgba(19, 41, 75, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ---------- Franja superior institucional TecNM ---------- */
.tecnm-ribbon {
  height: 5px;
  background: linear-gradient(90deg, var(--tecnm-navy-deep) 0%, var(--tecnm-navy) 65%, var(--tecnm-gray) 100%);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(27, 57, 106, 0.05);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

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

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--tecnm-navy);
  letter-spacing: -0.01em;
}

.brand-text small {
  font-size: 0.77rem;
  color: var(--tecnm-gray);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tecnm-gray-dark);
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--tecnm-navy);
}

.pledge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.52rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(27, 57, 106, 0.28);
  background: var(--tecnm-navy-soft);
  color: var(--tecnm-navy);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.pledge-pill:hover {
  background: var(--tecnm-navy);
  color: #fff;
  border-color: var(--tecnm-navy);
}

.pledge-pill:hover .pledge-dot {
  background: #fff;
}

.pledge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tecnm-navy);
  transition: background 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 2.75rem 0 3.5rem;
  background:
    radial-gradient(circle at 12% 6%, rgba(27, 57, 106, 0.09), transparent 44%),
    radial-gradient(circle at 88% 10%, rgba(128, 126, 130, 0.11), transparent 40%),
    linear-gradient(180deg, #FFFFFF 0%, var(--canvas) 100%);
}

.hero-header {
  max-width: 860px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.13;
  letter-spacing: -0.025em;
  color: var(--tecnm-navy-deep);
}

.hero h1 span {
  color: var(--tecnm-navy);
  position: relative;
  display: inline-block;
  border-bottom: 4px solid rgba(128, 126, 130, 0.35);
  padding-bottom: 0.08em;
}

.hero-copy {
  display: grid;
  gap: 0.9rem;
  font-size: 1.04rem;
  color: var(--ink-muted);
  max-width: 780px;
  margin: 0 auto 1.85rem;
}

.hero-copy p {
  margin: 0;
}

.hero-copy strong {
  color: var(--tecnm-navy-deep);
}

.hero-question {
  color: var(--ink);
  font-size: 1.07rem;
  background: var(--tecnm-navy-soft);
  border-left: 4px solid var(--tecnm-navy);
  padding: 0.9rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--tecnm-navy);
  color: #fff;
  box-shadow: 0 8px 20px rgba(27, 57, 106, 0.26);
}

.btn-primary:hover {
  background: var(--tecnm-navy-deep);
}

.btn-secondary {
  background: #fff;
  color: var(--tecnm-navy);
  border-color: rgba(27, 57, 106, 0.28);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--tecnm-navy-soft);
  border-color: var(--tecnm-navy);
}

.btn-ghost {
  background: transparent;
  color: var(--tecnm-gray-dark);
  border-color: rgba(128, 126, 130, 0.32);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--tecnm-navy);
  border-color: var(--tecnm-navy);
}

/* ---------- Mosaic Showcase ---------- */
.mosaic-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mosaic-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: #F8FAFD;
}

.mosaic-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dot-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--tecnm-navy);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

.mosaic-hint {
  font-size: 0.85rem;
  color: var(--tecnm-gray);
  font-weight: 500;
}

.mosaic-dl-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--tecnm-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mosaic-wrapper {
  position: relative;
  width: 100%;
  background: var(--tecnm-navy-deep);
}

.mosaic-wrapper img {
  width: 100%;
  height: auto;
}

.mosaic-hotspots {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.hotspot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.45rem;
  border: 2px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.hotspot span {
  opacity: 0;
  transform: translateY(4px);
  background: rgba(19, 41, 75, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.9);
  outline: none;
}

.hotspot:hover span,
.hotspot:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.onu-quote {
  margin: 0;
  padding: 1.4rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(90deg, #F8FAFD, #FFFFFF);
  border-top: 1px solid var(--border);
}

.onu-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--tecnm-navy);
}

.onu-quote p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ---------- Controls & Progress ---------- */
.controls-section {
  padding: 3.5rem 0 4.25rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--tecnm-navy);
  margin-bottom: 0.45rem;
}

.section-heading h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--tecnm-navy-deep);
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 620px;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tecnm-navy);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
  color: var(--tecnm-gray-dark);
  margin-bottom: 0.55rem;
}

.progress-top strong {
  color: var(--tecnm-navy);
}

.progress-track {
  height: 10px;
  background: #E4E8F0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tecnm-navy-deep), var(--tecnm-navy-mid));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.btn-link-share {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--tecnm-navy);
}

.btn-link-share:hover {
  text-decoration: underline;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 57, 106, 0.18);
  background: var(--surface);
  color: var(--tecnm-gray-dark);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--tecnm-navy);
  color: var(--tecnm-navy);
}

.filter-btn.active {
  background: var(--tecnm-navy);
  color: #fff;
  border-color: var(--tecnm-navy);
}

/* ---------- 10 Action Cards ---------- */
.actions-list {
  display: grid;
  gap: 1.75rem;
}

.action-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: 96px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
  box-shadow: var(--shadow-md);
}

.action-card.is-committed {
  border-color: var(--tecnm-navy);
  box-shadow: 0 10px 28px rgba(27, 57, 106, 0.16);
}

.action-banner-wrap {
  background: var(--accent, var(--tecnm-navy));
  position: relative;
}

.banner-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.banner-zoom img {
  width: 100%;
  transition: filter 0.22s ease;
}

.banner-zoom:hover img {
  filter: brightness(1.03);
}

.action-body {
  padding: 1.65rem 1.85rem 1.75rem;
}

.action-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.action-num {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--tecnm-navy);
  padding: 0.24rem 0.65rem;
  border-radius: 6px;
}

.action-cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tecnm-gray);
}

.action-body h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: var(--tecnm-navy-deep);
  letter-spacing: -0.015em;
}

.action-lead {
  margin: 0 0 0.8rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--tecnm-navy);
  padding-left: 0.85rem;
  border-left: 3.5px solid var(--tecnm-navy);
}

.action-desc {
  margin: 0 0 1.35rem;
  color: var(--ink-muted);
  font-size: 0.97rem;
}

.action-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-commit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.64rem 1.15rem;
  border-radius: 10px;
  border: 2px solid var(--tecnm-navy);
  background: #fff;
  color: var(--tecnm-navy);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-commit svg {
  width: 17px;
  height: 17px;
}

.btn-commit:hover {
  background: var(--tecnm-navy);
  color: #fff;
}

.btn-commit[aria-pressed="true"] {
  background: var(--tecnm-navy);
  border-color: var(--tecnm-navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 57, 106, 0.28);
}

.action-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.56rem 0.9rem;
  border-radius: 9px;
  border: 1px solid rgba(128, 126, 130, 0.28);
  background: #F8F9FB;
  color: var(--tecnm-gray-dark);
  font-size: 0.83rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.tool-btn svg {
  width: 15px;
  height: 15px;
}

.tool-btn:hover {
  background: var(--tecnm-navy-soft);
  color: var(--tecnm-navy);
  border-color: var(--tecnm-navy);
}

.tool-story {
  background: var(--tecnm-navy-soft);
  color: var(--tecnm-navy);
  border-color: rgba(27, 57, 106, 0.25);
}

.tool-story:hover {
  background: var(--tecnm-navy);
  color: #fff;
  border-color: var(--tecnm-navy);
}

.btn-wa {
  background: #F4F5F7;
  color: var(--tecnm-navy);
  border-color: rgba(27, 57, 106, 0.22);
}

.btn-wa:hover {
  background: var(--tecnm-navy-deep);
  color: #fff;
  border-color: var(--tecnm-navy-deep);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(27, 57, 106, 0.28);
}

.empty-state p {
  margin: 0 0 1rem;
  color: var(--tecnm-gray-dark);
  font-weight: 600;
}

/* ---------- Footer Institucional TecNM ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--tecnm-navy) 0%, var(--tecnm-navy-deep) 100%);
  color: rgba(255, 255, 255, 0.82);
  padding: 2.5rem 0;
  border-top: 4px solid var(--tecnm-silver);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.footer-logo-badge {
  background: #FFFFFF;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.footer-logo-badge img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.footer-inner strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.86rem;
  max-width: 580px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-tags span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(165, 168, 171, 0.35);
  color: #FFFFFF;
}

/* ---------- Modal & Lightbox ---------- */
.modal-backdrop,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(19, 41, 75, 0.74);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop[hidden],
.lightbox[hidden] {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border-top: 4px solid var(--tecnm-navy);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--tecnm-navy-deep);
}

.modal-close {
  border: none;
  background: var(--tecnm-navy-soft);
  color: var(--tecnm-navy);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-body {
  padding: 1.35rem 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.summary-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.summary-list li {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: var(--tecnm-navy-soft);
  border-left: 3.5px solid var(--tecnm-navy);
  color: var(--tecnm-navy-deep);
  font-weight: 600;
  font-size: 0.92rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  color: var(--tecnm-navy-deep);
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-figure {
  margin: 0;
  width: min(1040px, 92vw);
  max-width: 92vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  margin-inline: auto;
}

.lightbox-figure figcaption {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.94rem;
}

.lightbox-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.lightbox-download-btn {
  background: #FFFFFF;
  color: var(--tecnm-navy-deep);
  border-color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.lightbox-download-btn:hover {
  background: var(--tecnm-navy-soft);
  color: var(--tecnm-navy-deep);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--tecnm-navy-deep);
  color: #fff;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    min-height: 66px;
  }

  .brand-logo {
    height: 42px;
  }

  .brand-text small {
    display: none;
  }

  .pledge-pill span {
    font-size: 0.78rem;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .action-body {
    padding: 1.25rem 1.2rem 1.35rem;
  }

  .action-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-commit {
    justify-content: center;
  }

  .action-tools {
    justify-content: space-between;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .hotspot span {
    display: none;
  }
}
