/* AECID Theme 4.1.0 — production stylesheet.
   Presentation is ported 1:1 from the approved DC designs as inline styles in each template.
   This file only holds what inline styles cannot express: base reset, link colors, hover/focus
   states from the DC <helmet> blocks, and the responsive values the DC switched in JS
   (840px narrow, 899px header, 700px/1024px footer, 1100px Noticias tablet). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FAFAF7; color: #201F1D; font-family: 'Work Sans', sans-serif; }
img { max-width: 100%; }
a { color: #3E4F22; text-decoration: none; }
a:hover { color: #7CA33F; }
h1, h2, h3, h4, p { margin: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Header (Header.dc.html) ---------- */
.aecid-nav-link { position: relative; }
.aecid-nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: #F5C31B; transform: scaleX(0); transition: transform .25s ease; }
.aecid-nav-link:hover::after, .aecid-nav-link.is-active::after { transform: scaleX(1); }
.aecid-h-logo { width: clamp(108px, 13.6vw, 136px); }
.aecid-h-burger { display: none; }
.aecid-h-mobile:not([hidden]) { display: flex; }
@media (max-width: 899px) {
  .aecid-h-desktop { display: none !important; }
  .aecid-h-burger { display: flex; }
  .aecid-h-logo { width: 148px; }
}
@media (min-width: 900px) { .aecid-h-mobile, .aecid-h-scrim { display: none !important; } }
/* Header scrolls with the page (not sticky). The mobile panel/scrim are fixed and anchored to the
   header's bottom edge by main.js, so they stay aligned whether or not the WP admin bar is present. */

/* ---------- Footer (Footer.dc.html) ---------- */
a.aecid-footer-link { color: #E7EBDB; text-decoration: none; }
a.aecid-footer-link:hover { color: #F5C31B; }
.aecid-f-social-link:hover { background: rgba(255,255,255,0.16) !important; }
.aecid-f-grid { grid-template-columns: repeat(12, 1fr); gap: clamp(32px,5vw,40px); padding-top: clamp(40px,6vw,64px); }
.aecid-f-brand { grid-column: span 4; gap: 16px; }
.aecid-f-nav { grid-column: span 2; gap: 12px; }
.aecid-f-contact, .aecid-f-social { grid-column: span 3; gap: 12px; }
@media (max-width: 1024px) {
  .aecid-f-grid { grid-template-columns: repeat(6, 1fr); }
  .aecid-f-brand { grid-column: span 6; }
  .aecid-f-nav, .aecid-f-contact, .aecid-f-social { grid-column: span 2; }
}
@media (max-width: 700px) {
  .aecid-f-grid { grid-template-columns: 1fr; gap: 26px; padding-top: clamp(28px,6vw,40px); }
  .aecid-f-brand, .aecid-f-nav, .aecid-f-contact, .aecid-f-social { grid-column: auto; }
  .aecid-f-brand { gap: 12px; }
  .aecid-f-nav, .aecid-f-contact, .aecid-f-social { gap: 9px; }
}

/* ---------- Shared responsive grid/height tokens (DC isNarrow = 840px) ---------- */
.ae-g-6-6 { grid-template-columns: minmax(0,6fr) minmax(0,6fr); }
.ae-g-6-4 { grid-template-columns: minmax(0,6fr) minmax(0,4fr); }
.ae-g-5-7 { grid-template-columns: minmax(0,5fr) minmax(0,7fr); }
.ae-g-7-5 { grid-template-columns: minmax(0,7fr) minmax(0,5fr); }
.ae-g-half { grid-template-columns: minmax(0,0.5fr) minmax(0,0.5fr); }
.ae-g-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ae-g-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.ae-g-board { grid-template-columns: repeat(3,minmax(0,1fr)); }
.ae-g-news { grid-template-columns: repeat(3,minmax(0,1fr)); }
.ae-g-contact { grid-template-columns: minmax(0,1.1fr) minmax(0,0.9fr); }
.ae-info-card { margin-top: 26px; }
.ae-h-420-240 { height: 420px; }
.ae-h-420-260 { height: 420px; }
.ae-h-380-240 { height: 380px; }
.ae-h-360-220 { height: 360px; }
.ae-h-340-220 { height: 340px; }
.ae-mh-340-220 { min-height: 340px; }
.ae-hero-title { font-size: clamp(46px,6vw,78px); }
.ae-hero-compact { height: 340px; }
.ae-hero-inner { padding: 0 clamp(20px,5vw,48px); }
.ae-ch3 { padding-bottom: clamp(56px,7.5vw,80px); }
.ae-ch3-text { order: 1; }
.ae-ch3-img { order: 2; }

@media (max-width: 1100px) { .ae-g-news { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 840px) {
  .ae-g-6-6, .ae-g-6-4, .ae-g-5-7, .ae-g-7-5, .ae-g-half, .ae-g-2, .ae-g-3, .ae-g-news, .ae-g-contact { grid-template-columns: 1fr; }
  .ae-g-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ae-info-card { margin-top: 0; }
  .ae-h-420-240, .ae-h-380-240 { height: 240px; }
  .ae-h-420-260 { height: 260px; }
  .ae-h-360-220, .ae-h-340-220 { height: 220px; }
  .ae-mh-340-220 { min-height: 220px; }
  .ae-hero-title { font-size: clamp(32px,9vw,42px); }
  .ae-hero-compact { height: 260px; }
  .ae-hero-inner { padding: 0 clamp(24px,7vw,32px); }
  .ae-ch3 { padding-bottom: clamp(64px,10vw,88px); }
  .ae-ch3-text { order: 2; }
  .ae-ch3-img { order: 1; }
}

/* ---------- Home Noticias hover/focus (Home.dc.html helmet) ---------- */
a.aecid-plain { color: inherit; text-decoration: none; }
.aecid-news-featured { transition: background-color .2s ease; }
.aecid-news-featured:hover, .aecid-news-featured:focus-visible { background-color: rgba(124,163,63,0.06); }
.aecid-news-featured .aecid-news-featured-img { transition: transform .22s ease; }
.aecid-news-featured:hover .aecid-news-featured-img, .aecid-news-featured:focus-visible .aecid-news-featured-img { transform: scale(1.02); }
.aecid-news-featured .aecid-news-featured-title { transition: color .2s ease; }
.aecid-news-featured:hover .aecid-news-featured-title, .aecid-news-featured:focus-visible .aecid-news-featured-title { color: #3E4F22; }
.aecid-news-featured .aecid-news-featured-link { transition: transform .2s ease; display: inline-block; }
.aecid-news-featured:hover .aecid-news-featured-link, .aecid-news-featured:focus-visible .aecid-news-featured-link { transform: translateX(4px); }
.aecid-news-row { transition: padding-left .2s ease, background-color .2s ease; border-radius: 8px; }
.aecid-news-row:hover, .aecid-news-row:focus-visible { padding-left: 10px; background-color: rgba(124,163,63,0.06); }
.aecid-news-row .aecid-news-row-title { transition: color .2s ease; }
.aecid-news-row:hover .aecid-news-row-title, .aecid-news-row:focus-visible .aecid-news-row-title { color: #3E4F22; }
.aecid-news-featured:focus-visible, .aecid-news-row:focus-visible { outline: 2px solid #7CA33F; outline-offset: 2px; }

/* ---------- Noticias archive cards (Noticias.dc.html helmet) ---------- */
a.aecid-plain:focus-visible { outline: 2px solid #7CA33F; outline-offset: 3px; border-radius: 20px; }
.aecid-news-img-wrap { overflow: hidden; }
.aecid-news-img-wrap img { transition: transform .5s ease; }
.aecid-news-card:hover .aecid-news-img-wrap img, .aecid-news-card:focus-visible .aecid-news-img-wrap img { transform: scale(1.05); }
.aecid-news-card h2, .aecid-news-card h3 { transition: color .2s ease; }
.aecid-news-card:hover h2, .aecid-news-card:hover h3, .aecid-news-card:focus-visible h2, .aecid-news-card:focus-visible h3 { color: #3E4F22; }
.ae-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ae-pagination .page-numbers { font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 14px; color: #3E4F22; padding: 8px 14px; border-radius: 100px; border: 1px solid #E8E9E1; }
.ae-pagination .page-numbers.current { background: #3E4F22; color: #FFFFFF; border-color: #3E4F22; }
.ae-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Form fields (Afiliaciones/Contacto DC inline field style) ---------- */
.ae-field { min-width: 0; width: 100%; padding: 14px 16px; border: 1px solid #BFC1C4; border-radius: 10px; font-size: 15px; font-family: 'Work Sans', sans-serif; background: #FFFFFF; color: #201F1D; }
.ae-field.ae-file { padding: 12px; border-style: dashed; font-size: 14px; }
.ae-field:focus { outline: 2px solid #7CA33F; outline-offset: 1px; }
button[type="submit"]:focus-visible { outline: 2px solid #3E4F22; outline-offset: 2px; }

/* ---------- CTA buttons on mobile ---------- */
@media (max-width: 430px) { .ae-cta-btns > a { width: 100%; text-align: center; } }

/* ---------- Article body (WordPress content in single.php) ---------- */
.ae-article-body p, .ae-article-body ul, .ae-article-body ol, .ae-article-body blockquote, .ae-article-body figure { margin: 0; }
.ae-article-body h2, .ae-article-body h3 { font-family: 'Source Serif 4', serif; font-weight: 600; color: #1E241A; }
.ae-article-body img { height: auto; border-radius: 12px; }
.ae-article-body a { text-decoration: underline; }
