/* ============================================================
   ASGA MX — Design System v2 · Refined & Proportionate
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --ink:        #141414;
  --forest:     #1e4620;
  --green:      #2d5a27;
  --green-soft: #e8f2e5;
  --cream:      #f8f7f4;
  --warm:       #f2f0eb;
  --line:       #e6e3dc;
  --muted:      #717171;
  --white:      #ffffff;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --t:     0.25s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── NAV ─────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  z-index: 900;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.site-nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.nav-logo { height: 34px; border-radius: 8px; }

.nav-link {
  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
  opacity: 0.72;
  padding: 0 11px !important;
  transition: opacity var(--t) !important;
}
.nav-link:hover { opacity: 1 !important; }

.nav-link-ia {
  color: var(--green) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

.nav-btn {
  display: inline-block;
  background: var(--green);
  color: white !important;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 999px;
  opacity: 1 !important;
  transition: background var(--t), transform var(--t);
}
.nav-btn:hover { background: var(--forest); transform: scale(1.03); }

.dropdown-menu {
  border: none !important;
  border-radius: 14px !important;
  background: white !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.05) !important;
  padding: 6px !important;
  margin-top: 8px !important;
}
.dropdown-item {
  font-size: 13px;
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--ink);
  transition: background var(--t);
}
.dropdown-item:hover { background: var(--warm); color: var(--green); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero { padding: 56px 0 64px; background: var(--white); }

.hero-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

/* TIPOGRAFÍA CONSISTENTE CON EL RESTO DEL SITIO (sans-serif bold) */
.hero-h1 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-h1 em {
  font-style: normal;
  color: var(--green);
}

.hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.hero-img-wrap {
  border-radius: 20px;
  overflow: hidden;
  height: clamp(260px, 42vw, 460px);
}
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s var(--ease); }
.hero-img-wrap:hover img { transform: scale(1.03); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
}
.btn-green:hover { background: var(--forest); color: white; transform: scale(1.03); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(45,90,39,0.3);
  transition: all var(--t);
}
.btn-ghost:hover { background: var(--green-soft); border-color: var(--green); color: var(--green); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  transition: gap var(--t);
}
.link-arrow:hover { gap: 9px; }

/* ── SECTION LABELS ─────────────────────────────────────── */
.sec-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}

/* CONSISTENTE CON OTRAS PÁGINAS (sans-serif bold) */
.sec-title {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}
.sec-title em {
  font-style: normal;
  color: var(--green);
}

.divider { border: none; border-top: 1px solid var(--line); }

/* ── TOOL CARDS ─────────────────────────────────────────── */
.tool-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 26px;
  height: 100%;
  border: 1px solid transparent;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,0.08); border-color: var(--line); }

.tc-dark { background: var(--forest); }
.tc-dark .tc-title { color: white; }
.tc-dark .tc-body  { color: rgba(255,255,255,0.55); }
.tc-dark .link-arrow { color: rgba(255,255,255,0.65); }
.tc-dark .link-arrow:hover { color: white; }

.tc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 16px;
}
.tc-icon-g { background: rgba(45,90,39,0.12); color: var(--green); }
.tc-icon-w { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); }

/* SANS-SERIF BOLD CONSISTENTE */
.tc-title {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 7px;
  color: var(--ink);
}
.tc-body { font-size: 13px; line-height: 1.6; color: var(--muted); font-weight: 300; margin-bottom: 16px; }

/* ── IA BAND ──────────────────────────────────────────────── */
.ia-band { background: var(--forest); padding: 44px 0; }

/* CONSISTENTE CON OTRAS PÁGINAS */
.ia-title {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: white;
  letter-spacing: -0.03em;
}
.ia-title em { font-style: normal; color: #a8d5a2; }
.ia-sub { font-size: 13.5px; color: rgba(255,255,255,0.5); font-weight: 300; margin-top: 5px; }

.btn-ia {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--forest);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all var(--t);
}
.btn-ia:hover { background: var(--cream); transform: scale(1.03); color: var(--forest); }

/* ── NEWS CARDS ──────────────────────────────────────────── */
.news-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  height: 100%;
  transition: transform var(--t), box-shadow var(--t);
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,0.08); }

.nc-img { overflow: hidden; height: 170px; }
.nc-img img { width:100%; height:100%; object-fit:cover; transition: transform 0.5s var(--ease); }
.news-card:hover .nc-img img { transform: scale(1.05); }

.nc-body { padding: 18px; }
.nc-tag { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }

/* CONSISTENTE: bold sans-serif */
.nc-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  color: var(--ink);
}
.nc-excerpt { font-size: 12.5px; color: var(--muted); line-height: 1.6; font-weight: 300; margin-bottom: 12px; }

/* ── PARTNERS ─────────────────────────────────────────────── */
.partners { background: var(--cream); padding: 26px 0; border-top: 1px solid var(--line); }
.p-name {
  font-size: 10px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: #c5c0b8; transition: color var(--t);
}
.p-name:hover { color: var(--muted); }

/* ── FOOTER ─────────────────────────────────────────────────  */
.site-footer { background: var(--ink); padding: 52px 0 28px; }
.f-brand { font-family: var(--sans); font-size: 1.25rem; font-weight: 700; color: white; letter-spacing: -0.02em; }
.f-brand em { font-style: normal; color: #7db876; }
.f-tagline { font-size: 12.5px; color: rgba(255,255,255,0.32); font-weight: 300; line-height: 1.6; margin-top: 7px; max-width: 220px; }

.f-col-title { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.28); margin-bottom: 12px; }
.f-links { list-style: none; padding: 0; margin: 0; }
.f-links li { margin-bottom: 8px; }
.f-links a { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 300; transition: color var(--t); }
.f-links a:hover { color: white; }

.f-social a { color: rgba(255,255,255,0.38); font-size: 15px; transition: color var(--t), transform var(--t); display: inline-block; }
.f-social a:hover { color: white; transform: translateY(-2px); }

.f-hr { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 32px 0 20px; }
.f-legal { font-size: 11px; color: rgba(255,255,255,0.22); font-weight: 300; }

/* ── REVEAL ────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.07s; }
.d2 { transition-delay: 0.14s; }
.d3 { transition-delay: 0.21s; }

/* ── PAGE HEADERS ─────────────────────────────────────────── */
.page-header {
  padding: 48px 0 40px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.page-header-title {
  font-family: var(--sans);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.page-header-title em { font-style: normal; color: var(--green); }

/* ── CONTENT SECTIONS ─────────────────────────────────────── */
.content-section { padding: 56px 0; }
.content-section-sm { padding: 40px 0; }

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb {
  font-size: 12.5px;
  font-weight: 400;
  margin-bottom: 0;
  background: transparent;
  padding: 0;
}
.breadcrumb-item a { color: var(--green); }
.breadcrumb-item.active { color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

/* ── MISSION / VALUES CARDS ─────────────────────────────── */
.value-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 28px 24px;
  height: 100%;
  text-align: center;
  border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.value-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.07); }
.value-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 18px; }
.value-title { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.02em; }
.value-body { font-size: 13px; color: var(--muted); line-height: 1.65; font-weight: 300; }

/* ── COMITES CARDS ─────────────────────────────────────── */
.comite-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  height: 100%;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.comite-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,0.08); }
.comite-card-img { overflow: hidden; height: 180px; }
.comite-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.comite-card:hover .comite-card-img img { transform: scale(1.05); }
.comite-card-body { padding: 20px; }
.comite-city { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.02em; }
.comite-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── CONTACT FORM ──────────────────────────────────────── */
.contact-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--line);
}
.form-label { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.form-control, .form-select {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-control:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,90,39,0.1);
  background: white;
  outline: none;
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── ARTICLE / NOTICIA DETAIL ─────────────────────────── */
.article-hero-img { border-radius: 16px; overflow: hidden; max-height: 420px; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 15px; line-height: 1.8; color: var(--ink); font-weight: 300; }
.article-body p { margin-bottom: 1.2em; }
.article-body h2, .article-body h3 { font-family: var(--sans); font-weight: 700; margin: 1.8em 0 0.6em; letter-spacing: -0.02em; }

/* ── 404 ──────────────────────────────────────────────────── */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 64px 0; }
.error-code { font-family: var(--sans); font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--line); line-height: 1; letter-spacing: -0.04em; }
.error-msg { font-family: var(--sans); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 16px 0 12px; }
.error-sub { font-size: 14px; color: var(--muted); font-weight: 300; }

/* ── DEV MODULE ───────────────────────────────────────────── */
.dev-page { min-height: 55vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 64px 0; }
.dev-icon { width: 60px; height: 60px; border-radius: 16px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 20px; }
.dev-title { font-family: var(--sans); font-size: 1.6rem; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; margin-bottom: 8px; }
.dev-sub { font-size: 14px; color: var(--muted); font-weight: 300; }

/* ── CAROUSEL OVERRIDE ──────────────────────────────────── */
.carousel-rounded { border-radius: 20px; overflow: hidden; }
.carousel-item img { object-fit: cover; max-height: 480px; width: 100%; }

/* ╔══════════════════════════════════════════════════════════╗
   ║  MOBILE-FIRST RESPONSIVE                                ║
   ╚══════════════════════════════════════════════════════════╝ */

/* Phones ≤ 575px */
@media (max-width: 575px) {
  body { padding-top: 56px; font-size: 14px; }
  .site-nav { height: 56px; }

  .hero { padding: 36px 0 44px; }
  .hero-img-wrap { height: 220px; border-radius: 14px; }
  .hero-sub { font-size: 14px; }

  .contact-card { padding: 24px 18px; }

  .page-header { padding: 32px 0 28px; }

  section[style*="padding: 64px"] { padding: 40px 0 !important; }

  .ia-band { padding: 32px 0; }
  .ia-band .d-flex { flex-direction: column; gap: 16px; }

  .tool-card { padding: 20px; }
  .nc-body { padding: 14px; }
  .comite-card-body { padding: 16px; }
  .value-card { padding: 22px 16px; }

  .site-footer { padding: 40px 0 22px; }
  .f-tagline { max-width: 100%; }

  /* Stack hero buttons */
  .hero .d-flex { flex-direction: column; align-items: flex-start; gap: 10px !important; }

  /* Article */
  .article-hero-img { border-radius: 12px; }
  .carousel-item img { max-height: 260px; }
  .carousel-rounded { border-radius: 14px; }
}

/* Tablets 576–767px */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-img-wrap { height: 300px; }
  .ia-band .col-md-4 { text-align: left !important; }
}

/* Up to 991px: stack hero */
@media (max-width: 991px) {
  .hero { padding: 40px 0 52px; }
  /* Image comes after copy on mobile */
  .hero .col-lg-5 { order: 1; }
  .hero .col-lg-7 { order: 2; }

  .site-footer .offset-lg-1 { margin-left: 0 !important; }
}

/* Navbar mobile collapse */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(18px);
    border-radius: 0 0 16px 16px;
    padding: 12px 8px 16px;
    border-top: 1px solid var(--line);
    margin: 0 -12px;
  }
  .nav-link { padding: 10px 14px !important; opacity: 1; }
  .nav-btn { display: block; margin: 8px 14px 0; text-align: center; }
  .dropdown-menu { box-shadow: none !important; background: var(--cream) !important; border: 1px solid var(--line) !important; }
}