/* ==========================================================================
   Alto Grande Desarrollos — hoja de estilos del sitio público
   Reconstrucción fiel del diseño original (Bridge + Elementor) sin dependencias.
   ========================================================================== */
:root {
  --navy: #021D49;          /* Principal (kit Elementor) */
  --navy-2: #000F3C;        /* "nuevo azul 2" */
  --navy-3: #001E61;
  --navy-ink: #000B22;      /* "negro azul" */
  --gold: #CCBE8F;
  --text: #686868;
  --gray: #B9B9B9;
  --gray-2: #7A7A7A;
  --line: #E5E5E5;
  --white: #fff;
  --ff-display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --ff-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --ff-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ff-menu: 'Barlow Condensed', 'Arial Narrow', 'Montserrat', sans-serif;
  --container: 1300px;
  --gutter: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--ff-sans); font-size: 14px; line-height: 1.6; font-weight: 400; color: var(--text); background: var(--white); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; color: var(--navy); font-weight: 400; }
h1 { font-family: var(--ff-serif); font-size: 42px; line-height: 50px; }
h2 { font-family: var(--ff-serif); font-size: 30px; line-height: 35px; letter-spacing: 2px; }
h3 { font-family: var(--ff-serif); font-size: 22px; line-height: 30px; }
h4 { font-family: var(--ff-sans); font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -.2px; }
h5 { font-family: var(--ff-serif); font-size: 18px; line-height: 20px; font-weight: 700; }
h6 { font-family: var(--ff-sans); font-size: 13px; line-height: 15px; text-transform: uppercase; font-weight: 300; }
ul, ol { padding-left: 1.2em; }
.ag-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ag-skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--gold); color: var(--navy); padding: 8px 14px; }
.ag-skip:focus { left: 8px; }
.ag-wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.ag-wrap--narrow { max-width: 900px; }
.ag-empty { text-align: center; color: var(--gray-2); padding: 30px 0; }

/* ---------------------------------------------------------------- Header */
.ag-header { position: relative; z-index: 1000; background: var(--navy); color: var(--white); }
.ag-header__brand { display: flex; align-items: center; justify-content: center; padding: 12px 20px 10px; position: relative; }
.ag-logo { display: block; width: clamp(150px, 14vw, 210px); }
.ag-logo img { width: 100%; height: auto; }
.ag-logo span { font-family: var(--ff-sans); letter-spacing: .45em; color: #fff; font-size: 18px; }
.ag-burger { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.ag-burger svg { width: 28px; height: 28px; }
.ag-nav { border-top: 1px solid rgba(255, 255, 255, .12); }
.ag-menu { list-style: none; margin: 0 auto; padding: 0 10px; display: flex; flex-wrap: wrap; justify-content: center; max-width: var(--container); }
.ag-menu__item { position: relative; display: flex; align-items: center; }
.ag-menu__link { display: flex; align-items: center; gap: 4px; padding: 7px 16px; font-family: var(--ff-menu); font-weight: 500; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray); background: none; border: 0; cursor: pointer; line-height: 1.4; }
.ag-menu__link:hover, .ag-menu__item:hover > .ag-menu__link, .ag-menu__item:focus-within > .ag-menu__link { color: #fff; }
.ag-menu__item.is-active > .ag-menu__link, .ag-menu__link[aria-current="page"] { color: #fff; background: var(--navy-3); }
.ag-caret { width: 12px; height: 12px; }
.ag-sub-toggle { display: none; }
.ag-sub { list-style: none; margin: 0; padding: 6px 0; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--navy); border-top: 1px solid rgba(221, 221, 221, .38); box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; }
.ag-menu__item:hover > .ag-sub, .ag-menu__item:focus-within > .ag-sub, .ag-menu__item.is-open > .ag-sub { opacity: 1; visibility: visible; transform: none; }
.ag-sub a { display: block; padding: 8px 18px; color: #fff; font-family: var(--ff-menu); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid rgba(221, 221, 221, .2); }
.ag-sub li:last-child a { border-bottom: 0; }
.ag-sub a:hover, .ag-sub a[aria-current="page"] { background: var(--navy-3); color: var(--gold); }

@media (max-width: 1024px) {
  .ag-burger { display: block; }
  .ag-nav { display: none; }
  .ag-header.is-open .ag-nav { display: block; animation: agDrop .25s var(--ease); }
  .ag-menu { flex-direction: column; padding: 6px 0 14px; }
  .ag-menu__item { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .ag-menu__link { padding: 12px 20px; font-size: 16px; flex: 1; }
  .ag-menu__link .ag-caret { display: none; }
  .ag-sub-toggle { display: block; background: none; border: 0; color: #fff; padding: 12px 18px; cursor: pointer; }
  .ag-sub-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
  .ag-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .ag-sub { position: static; flex-basis: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; background: var(--navy-2); padding: 0; }
  .ag-menu__item.is-open > .ag-sub { display: block; }
  .ag-menu__item:hover > .ag-sub { display: none; }
  .ag-menu__item.is-open:hover > .ag-sub { display: block; }
  .ag-sub a { padding: 11px 34px; }
}
@keyframes agDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Bloques (secciones Elementor) */
/* Las variables de bloque se reinician en cada nivel para que no se hereden a secciones/columnas internas.
   El estilo inline de cada elemento (generado desde la base) vuelve a definirlas solo donde corresponde. */
.ag-sec { --bgc: transparent; --bgi: none; --p: initial; --p-m: initial; --m: initial; --m-m: initial; --minh: initial; --minh-m: initial; --cw: initial; }
.ag-col { --bgc: transparent; --bgi: none; --p: initial; --p-m: initial; --m: initial; --m-m: initial; --w-m: initial; }
.ag-w { --p: initial; --p-m: initial; --m: initial; --m-m: initial; }
.ag-heading, .ag-text { --ff: initial; --fs: initial; --fs-m: initial; --lh: initial; --lh-m: initial; --ta-m: initial; }
.ag-img { --iw: initial; --iw-m: initial; --ih: initial; }
.ag-sec { position: relative; display: flex; flex-direction: column; justify-content: center; background-color: var(--bgc, transparent); background-image: var(--bgi, none);
  padding: var(--p, 0); margin: var(--m, 0); min-height: var(--minh, 0); }
.ag-sec--vh { min-height: 100vh; min-height: 100svh; }
.ag-sec__in { position: relative; z-index: 2; width: 100%; max-width: var(--cw, var(--container)); margin: 0 auto; }
.ag-sec--full > .ag-sec__in { max-width: none; }
.ag-sec--inner > .ag-sec__in { max-width: none; }
.ag-row { display: flex; flex-wrap: wrap; width: 100%; min-height: inherit; }
.ag-sec.ag-va-middle, .ag-sec.ag-va-center { justify-content: center; }
.ag-sec.ag-va-top { justify-content: flex-start; }
.ag-sec.ag-va-bottom, .ag-sec.ag-cp-bottom { justify-content: flex-end; }
.ag-col { position: relative; display: flex; width: var(--w, 100%); background-color: var(--bgc, transparent); background-image: var(--bgi, none); min-height: 1px; }
.ag-col__in { position: relative; z-index: 2; width: 100%; padding: var(--p, var(--gutter)); margin: var(--m, 0); display: flex; flex-direction: column; align-content: flex-start; }
.ag-col.ag-va-center > .ag-col__in, .ag-col.ag-va-middle > .ag-col__in { justify-content: center; }
.ag-col.ag-va-bottom > .ag-col__in { justify-content: flex-end; }
.ag-col.ag-va-space-evenly > .ag-col__in { justify-content: space-evenly; }
.ag-col.ag-va-space-between > .ag-col__in { justify-content: space-between; }
.ag-col.ag-ta-center { text-align: center; }
.ag-sec.ag-gap-no .ag-col__in { padding: var(--p, 0); }
.ag-sec.ag-gap-narrow .ag-col__in { padding: var(--p, 5px); }
.ag-sec.ag-gap-extended .ag-col__in { padding: var(--p, 15px); }
.ag-sec.ag-gap-wide .ag-col__in { padding: var(--p, 20px); }
.ag-sec.ag-gap-wider .ag-col__in { padding: var(--p, 30px); }
.ag-sec--inner .ag-row { min-height: var(--minh, 0); }
.ag-sec--inner .ag-col { min-height: var(--minh, 0); }
.ag-bg, .ag-ov, .ag-bg-video { position: absolute; inset: 0; z-index: 0; }
.ag-bg { background-size: cover; background-position: center; }
.ag-bg--resp { background-image: var(--bg); }
@media (max-width: 768px) { .ag-bg--resp { background-image: var(--bg-sm, var(--bg)); } }
.ag-bg--fixed { background-attachment: fixed; }
@media (hover: none), (max-width: 1024px) { .ag-bg--fixed { background-attachment: scroll; } }
.ag-ov { z-index: 1; pointer-events: none; }
.ag-bg-video { width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity .8s var(--ease); }
.ag-bg-video.is-playing { opacity: 1; }
.ag-w { position: relative; padding: var(--p, 0); margin: var(--m, 0); }
.ag-w:not(:last-child) { margin-bottom: var(--m-b, 20px); }
.ag-w[style*="--m:"] { margin: var(--m); }

/* Heading y texto (tipografía global del kit: Libre Caslon Display + azul principal) */
.ag-heading { font-family: var(--ff, var(--ff-display)); font-size: var(--fs, 32px); line-height: var(--lh, 1.2); color: #021D49; font-weight: 700; margin: 0; letter-spacing: normal; text-transform: none; }
.ag-heading a { color: inherit; }
.ag-heading--span, .ag-heading--p, .ag-heading--div { display: block; }
.ag-text { font-family: var(--ff, var(--ff-sans)); font-size: var(--fs, 14px); line-height: var(--lh, 1.7); color: var(--text); }
.ag-text > :last-child { margin-bottom: 0; }
.ag-text a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.ag-text img { height: auto; }
.ag-text iframe { max-width: 100%; aspect-ratio: 16/9; height: auto; width: 100%; border: 0; }
.ag-img { margin: 0; text-align: inherit; }
.ag-img img { width: var(--iw, auto); max-width: 100%; max-height: var(--ih, none); object-fit: contain; display: inline-block; }
.ag-img--center { text-align: center; } .ag-img--center img { margin: 0 auto; display: block; }
.ag-img--right img { margin-left: auto; display: block; }
.ag-spacer { height: var(--sp, 50px); }
.ag-divider { display: flex; padding: var(--dg, 15px) 0; }
.ag-divider::before { content: ""; display: block; width: var(--dw, 100%); border-top: var(--dh, 1px) solid var(--dc, var(--navy)); }
.ag-div--center { justify-content: center; } .ag-div--right { justify-content: flex-end; }
.ag-icon { display: inline-flex; color: #fff; }
.ag-icon svg { width: var(--is, 22px); height: var(--is, 22px); }
.ag-icon-link { display: inline-flex; justify-content: center; width: 100%; color: #fff; animation: agBounce 2.4s infinite var(--ease); }
.ag-icon-link:hover { color: var(--gold); }
@keyframes agBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.ag-anchor { display: block; position: relative; top: -20px; visibility: hidden; }

/* Botones */
.ag-btnwrap--center { text-align: center; } .ag-btnwrap--right { text-align: right; } .ag-btnwrap--justify .ag-btn { width: 100%; justify-content: center; }
.ag-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 28px; background: var(--btn-bg, var(--navy)); color: var(--btn-c, #fff); font-family: var(--ff-sans); font-weight: 500; font-size: 14px; line-height: 1.2; border: 1px solid var(--btn-bg, var(--navy)); border-radius: 3px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); text-decoration: none; }
.ag-btn:hover, .ag-btn:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--navy); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(2, 29, 73, .18); }
.ag-btn__icon svg { width: 18px; height: 18px; }
.ag-btn--text { background: none; border: 0; padding: 4px 0; color: var(--btn-c, #fff); border-bottom: 1px solid currentColor; border-radius: 0; font-size: 15px; }
.ag-btn--text:hover { background: none; color: var(--gold); box-shadow: none; }
.ag-btn--outline { background: transparent; color: var(--navy); }
.ag-btn--sm { padding: 6px 14px; font-size: 12px; }

/* Redes */
.ag-social { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-social--center { justify-content: center; } .ag-social--right { justify-content: flex-end; }
.ag-social__a { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; color: #fff; border-radius: 50%; transition: color .2s, transform .2s; }
.ag-social__a svg { width: 19px; height: 19px; }
.ag-social__a:hover { color: var(--gold); transform: translateY(-2px); }
.ag-share { display: flex; gap: 4px; }
.ag-share__a { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: transform .2s, filter .2s; }
.ag-share__a svg { width: 17px; height: 17px; }
.ag-share__a--whatsapp { background: #25D366; } .ag-share__a--facebook { background: #3b5998; } .ag-share__a--twitter { background: #1da1f2; } .ag-share__a--linkedin { background: #0077b5; }
.ag-share__a:hover { transform: translateY(-2px); filter: brightness(1.1); color: #fff; }

/* Listas de íconos, contadores, cajas */
.ag-iconlist { list-style: none; padding: 0; margin: 0; }
.ag-iconlist li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1.5px dotted var(--line); color: var(--navy); }
.ag-iconlist__i svg { width: 15px; height: 15px; color: var(--gold); }
.ag-counter { text-align: center; } .ag-counter__num { display: block; font-family: var(--ff-display); font-size: 48px; color: var(--navy); } .ag-counter__title { display: block; }
.ag-iconbox { text-align: center; } .ag-iconbox__icon svg, .ag-iconbox__icon img { width: 48px; height: 48px; margin: 0 auto 10px; color: var(--navy); }
.ag-iconbox__title { font-family: var(--ff-display); font-size: 20px; } .ag-member { text-align: center; }

/* Video YouTube liviano */
.ag-video video { width: 100%; height: auto; }
.ag-yt { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.ag-yt__btn { all: unset; cursor: pointer; display: block; position: absolute; inset: 0; }
.ag-yt__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.ag-yt__btn:hover img { transform: scale(1.03); opacity: .9; }
.ag-yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; }
.ag-yt__play svg { width: 72px; height: 72px; }
.ag-yt__btn:focus-visible { outline: 3px solid var(--gold); }
.ag-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- Carrusel / galería */
.ag-carousel { position: relative; }
.ag-carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ag-carousel__track::-webkit-scrollbar { display: none; }
.ag-carousel__slide { flex: 0 0 calc(100% / var(--pv, 1)); scroll-snap-align: start; margin: 0; padding: 0 5px; }
.ag-carousel[style*="--pv:1"] .ag-carousel__slide { padding: 0; }
@media (max-width: 767px) { .ag-carousel__slide { flex-basis: 100%; padding: 0; } }
.ag-carousel__slide a { display: block; }
.ag-carousel__slide img { width: 100%; height: auto; aspect-ratio: auto; object-fit: cover; }
.ag-carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color .2s, background .2s; z-index: 2; }
.ag-carousel__nav svg { width: 26px; height: 26px; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .8)); }
.ag-carousel__nav:hover { color: var(--gold); }
.ag-carousel__nav--prev { left: 6px; } .ag-carousel__nav--next { right: 6px; }
.ag-carousel__dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.ag-carousel__dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); transition: background .2s, transform .2s; }
.ag-carousel__dots span.is-on { background: var(--navy); transform: scale(1.25); }
.ag-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 11, 34, .94); display: flex; align-items: center; justify-content: center; padding: 30px; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.ag-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.ag-lightbox button { position: absolute; background: rgba(255, 255, 255, .08); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ag-lightbox button svg { width: 26px; height: 26px; }
.ag-lightbox [data-lb-close] { top: 16px; right: 16px; } .ag-lightbox [data-lb-prev] { left: 16px; top: 50%; } .ag-lightbox [data-lb-next] { right: 16px; top: 50%; }

/* ---------------------------------------------------------------- Timeline horizontal (home) */
.ag-tl { position: relative; padding: 0 44px; }
.ag-tl__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 18px; scrollbar-width: thin; scrollbar-color: var(--navy) rgba(204, 190, 143, .21); }
.ag-tl__viewport::-webkit-scrollbar { height: 7.5px; } .ag-tl__viewport::-webkit-scrollbar-track { background: rgba(204, 190, 143, .21); } .ag-tl__viewport::-webkit-scrollbar-thumb { background: var(--navy); }
.ag-tl__list { list-style: none; margin: 0; padding: 0; display: flex; }
.ag-tl__item { flex: 0 0 calc(100% / var(--cols, 5)); scroll-snap-align: start; padding: 0 10px; display: flex; flex-direction: column; position: relative; }
.ag-tl__card { background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, .12); padding: 14px; flex: 1; display: flex; flex-direction: column; position: relative; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.ag-tl__card::after { content: ""; position: absolute; bottom: -7px; left: 50%; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); box-shadow: 3px 3px 5px rgba(0, 0, 0, .06); }
.ag-tl__card:hover { box-shadow: 0 8px 26px rgba(2, 29, 73, .2); transform: translateY(-3px); }
.ag-tl__title { order: 0; font-family: var(--ff-sans); font-size: 12px; font-weight: 500; color: var(--navy); margin: 0 0 4px; letter-spacing: 0; text-transform: uppercase; }
.ag-tl__desc { order: 1; font-size: 10px; color: var(--gray-2); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.ag-tl__btn { order: 2; align-self: flex-start; background: #052C66; color: #fff; font-size: 11px; padding: 5px 12px; margin-bottom: 10px; border-radius: 2px; }
.ag-tl__btn:hover { background: var(--gold); color: var(--navy); }
.ag-tl__img { order: 3; margin-top: auto; }
.ag-tl__img img { width: 100%; height: 190px; object-fit: contain; object-position: bottom center; }
.ag-tl__point { position: relative; height: 60px; display: flex; align-items: center; justify-content: center; }
.ag-tl__point::before { content: ""; position: absolute; left: -10px; right: -10px; top: 50%; height: 3px; background: var(--navy); }
.ag-tl__point span { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--navy); color: var(--navy); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ag-tl__year { text-align: center; color: var(--navy); font-size: 12px; margin: 0; }
.ag-tl__nav { position: absolute; top: calc(50% - 40px); width: 33px; height: 33px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ag-tl__nav svg { width: 18px; height: 18px; }
.ag-tl__nav:hover { background: var(--gold); color: var(--navy); }
.ag-tl__nav--prev { left: 0; } .ag-tl__nav--next { right: 0; }
.ag-tl__play { position: absolute; right: 44px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; font-size: 10px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.ag-tl__play:hover { background: var(--navy); color: #fff; }
.ag-tl__play-play { display: none; }
.ag-tl.is-paused .ag-tl__play-play { display: inline; } .ag-tl.is-paused .ag-tl__play-pause { display: none; }
@media (max-width: 1024px) { .ag-tl__item { flex-basis: calc(100% / 3); } }
@media (max-width: 767px) { .ag-tl { padding: 0 34px; } .ag-tl__item { flex-basis: 78%; } }

/* ---------------------------------------------------------------- Grillas de desarrollos (Portfolio, estados, categorías) */
.ag-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 15px; }
.ag-card { position: relative; text-align: center; }
.ag-card__link { display: block; color: var(--navy); }
.ag-card__img { display: block; overflow: hidden; aspect-ratio: 3 / 4; background: #f2f2f2; }
.ag-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.ag-card__link:hover .ag-card__img img, .ag-card.is-hover .ag-card__img img { transform: scale(1.05); filter: brightness(.92); }
.ag-card__title { display: block; margin-top: 8px; font-family: var(--ff-sans); font-size: 11px; line-height: 1.35; font-weight: 500; text-transform: uppercase; letter-spacing: .3px; color: var(--navy); }
.ag-card__link:hover .ag-card__title { color: var(--gold); }
.ag-card__cats { margin: 2px 0 0; font-size: 9px; text-transform: uppercase; letter-spacing: .6px; color: var(--gray); }
.ag-card.is-hidden { display: none; }
.ag-card.is-hover { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 1024px) { .ag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* Portfolio: filtros + mapa */
.ag-pfilter { margin: 10px 0 0; }
.ag-pfilter__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ag-pfilter__select { font-family: var(--ff-sans); font-size: 13px; color: var(--navy); padding: 10px 36px 10px 14px; border: 1px solid #d5d5d5; border-radius: 2px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%23021D49' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; appearance: none; min-width: 220px; cursor: pointer; }
.ag-pfilter__count { text-align: center; font-size: 12px; color: var(--gray-2); margin: 8px 0 0; min-height: 1.2em; }
.ag-map { position: relative; }
/* Portfolio: el mapa queda fijo a la derecha (alto de pantalla) mientras la grilla de la izquierda se desplaza */
.tpl-portfolio .ag-w--map { position: sticky; top: 0; margin: 0; }
.tpl-portfolio .ag-w--map .ag-map__canvas { height: 100vh; height: 100svh; min-height: 420px; }
.ag-map__close, .ag-mapbtn { display: none; }
.ag-map__canvas { width: 100%; height: min(78vh, 760px); min-height: 420px; background: #e9e9e9; }
.ag-map__loading { margin: 0; padding: 20px; text-align: center; color: var(--gray-2); }
.ag-map--gray .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.ag-pin { background: none; border: 0; }
.ag-pin svg { width: 30px; height: 30px; color: #B08D2E; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); transition: transform .2s; }
.ag-pin.is-active svg { color: var(--navy); transform: scale(1.35); }
.leaflet-popup-content { margin: 10px 12px; font-family: var(--ff-sans); }
.ag-mpop { display: flex; gap: 10px; align-items: center; min-width: 210px; }
.ag-mpop img { width: 64px; height: 80px; object-fit: cover; }
.ag-mpop strong { display: block; color: var(--navy); font-size: 12px; text-transform: uppercase; }
.ag-mpop span { display: block; font-size: 11px; color: var(--gray-2); margin: 2px 0 6px; }
.ag-mpop a { font-size: 11px; font-weight: 600; }
@media (max-width: 767px) {
  .ag-map__canvas { height: 60vh; min-height: 340px; }
  /* Móvil: el mapa se abre a pantalla completa desde un botón flotante */
  .tpl-portfolio .ag-w--map { position: static; }
  .tpl-portfolio .ag-map:not(.is-open) { display: none; }
  .ag-map.is-open { position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; background: #fff; animation: agFade .25s var(--ease); }
  .ag-map.is-open .ag-map__canvas { flex: 1; height: auto; min-height: 0; }
  .ag-map__close { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 18px 14px; background: var(--navy); color: #fff; border: 0; font: 600 13px/1 var(--ff-sans); letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
  .ag-map__close svg { width: 20px; height: 20px; }
  .ag-mapbtn { display: inline-flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 900; transform: translate(-50%, 140%); opacity: 0; padding: 13px 22px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 600 13px/1 var(--ff-sans); letter-spacing: .8px; text-transform: uppercase; box-shadow: 0 8px 24px rgba(2, 29, 73, .35); cursor: pointer; transition: transform .35s var(--ease), opacity .35s var(--ease); }
  .ag-mapbtn.is-shown { transform: translate(-50%, 0); opacity: 1; }
  .ag-mapbtn[hidden] { display: none; }
  .ag-mapbtn svg { width: 18px; height: 18px; color: var(--gold); }
  html.ag-noscroll, html.ag-noscroll body { overflow: hidden; }
}
@keyframes agFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- Contacto */
.ag-ct { background: #f4f5f8; padding-bottom: 90px; }
.ag-ct__hero { position: relative; min-height: 460px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background: var(--navy-ink); overflow: hidden; padding: 90px 20px 150px; }
.ag-ct__bg { position: absolute; inset: 0; }
.ag-ct__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; transform: scale(1.04); }
.ag-ct__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 11, 34, .30) 0%, rgba(2, 29, 73, .80) 100%); }
.ag-ct__hero-in { position: relative; z-index: 1; max-width: 720px; animation: agRise .9s var(--ease) both; }
@keyframes agRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ag-ct__kicker { font: 600 12px/1 var(--ff-sans); letter-spacing: .35em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; }
.ag-ct__title { font-family: var(--ff-display); font-size: clamp(46px, 7vw, 86px); line-height: 1; color: #fff; margin: 0 0 18px; letter-spacing: .5px; }
.ag-ct__intro { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .86); margin: 0 auto; max-width: 560px; }
.ag-ct__info, .ag-ct__areas, .ag-ct__main { width: min(1160px, calc(100% - 40px)); margin: 70px auto 0; }
.ag-ct__info { position: relative; z-index: 2; margin-top: -92px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ag-ct__card { background: #fff; padding: 34px 30px 30px; box-shadow: 0 18px 40px rgba(2, 29, 73, .10); border-top: 3px solid var(--gold); }
.ag-ct__ico { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(204, 190, 143, .22); color: var(--navy); margin-bottom: 18px; }
.ag-ct__ico svg { width: 22px; height: 22px; }
.ag-ct__label { font: 600 11px/1.2 var(--ff-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gray-2); margin: 0 0 10px; }
.ag-ct__big { font-family: var(--ff-serif); font-size: 21px; line-height: 1.35; color: var(--navy); margin: 0 0 4px; }
.ag-ct__big a { color: inherit; }
.ag-ct__big a:hover { color: var(--gold); }
.ag-ct__small { font-size: 13px; color: var(--text); margin: 0 0 14px; }
.ag-ct__link { display: inline-flex; gap: 6px; font: 600 12px/1 var(--ff-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--gold); padding-bottom: 5px; margin-top: 6px; }
.ag-ct__link span { transition: transform .25s var(--ease); }
.ag-ct__link:hover span { transform: translateX(4px); }
.ag-ct__status { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 13px; border-radius: 999px; background: #f0f0f2; font-size: 12px; font-weight: 500; color: #666; }
.ag-ct__status[hidden] { display: none; }
.ag-ct__dot { width: 8px; height: 8px; border-radius: 50%; background: #b5b5b5; flex: none; }
.ag-ct__status.is-open { background: #e6f4ec; color: #1f6b3a; }
.ag-ct__status.is-open .ag-ct__dot { background: #2e9b57; animation: agPulse 2s infinite; }
@keyframes agPulse { 0% { box-shadow: 0 0 0 0 rgba(46, 155, 87, .45); } 70% { box-shadow: 0 0 0 8px rgba(46, 155, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 155, 87, 0); } }
.ag-ct__h2 { font-family: var(--ff-display); font-size: 30px; line-height: 1.2; letter-spacing: 1px; text-align: center; color: var(--navy); margin: 0 0 30px; }
.ag-ct__h2::after { content: ""; display: block; width: 60px; height: 2px; background: var(--gold); margin: 16px auto 0; }
.ag-ct__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ag-ct__area { background: var(--navy); color: #fff; padding: 28px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 176px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .8s var(--ease); }
.ag-ct__grid .ag-ct__area:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(2, 29, 73, .25); }
.ag-ct__aname { font-family: var(--ff-serif); font-size: 17px; line-height: 1.3; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin: 0; font-weight: 700; }
.ag-ct__abtn { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: 44px; padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; color: #fff; font-size: 14px; font-weight: 500; transition: background .25s, border-color .25s, color .25s; }
.ag-ct__abtn svg { width: 18px; height: 18px; flex: none; }
.ag-ct__abtn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.ag-ct__abtn.is-wa svg { color: #25D366; }
.ag-ct__abtn.is-wa:hover svg { color: var(--navy); }
.ag-ct__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); box-shadow: 0 18px 40px rgba(2, 29, 73, .12); scroll-margin-top: 20px; }
.ag-ct__main.no-map { grid-template-columns: 1fr; width: min(760px, calc(100% - 40px)); }
.ag-ct__panel { background: var(--navy) linear-gradient(160deg, var(--navy) 0%, var(--navy-ink) 100%); color: #fff; padding: 50px 48px 42px; }
.ag-ct__ftitle { font-family: var(--ff-display); font-size: 38px; line-height: 1.1; color: var(--gold); margin: 0 0 10px; }
.ag-ct__fintro { color: rgba(255, 255, 255, .78); margin: 0 0 22px; }
.ag-ct .ag-form--contacto .ag-field { width: 100%; }
.ag-ct .ag-form--contacto .ag-field--submit { text-align: left; }
.ag-ct .ag-form--contacto .ag-form__msg { text-align: left; }
.ag-ct__social { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13px; color: rgba(255, 255, 255, .8); }
.ag-ct__social div { display: flex; gap: 8px; }
.ag-ct__social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); color: #fff; transition: background .25s, border-color .25s, color .25s; }
.ag-ct__social a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.ag-ct__social svg { width: 16px; height: 16px; }
.ag-ct__map { position: relative; min-height: 480px; background: #e6e6e6; }
.ag-ct__canvas { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ag-ct__maplink { display: inline-flex; gap: 8px; align-items: center; color: var(--navy); font-weight: 600; }
.ag-ct__maplink svg { width: 20px; height: 20px; color: #B08D2E; }
.ag-ctpop strong { display: block; color: var(--navy); font-size: 13px; }
.ag-ctpop span { display: block; font-size: 11px; color: var(--gray-2); margin: 2px 0 6px; }
.ag-ctpop a { font-size: 11px; font-weight: 600; }
@media (max-width: 1024px) { .ag-ct__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ag-ct__info { grid-template-columns: 1fr; gap: 14px; }
  .ag-ct__main { grid-template-columns: 1fr; }
  .ag-ct__map { min-height: 340px; }
  /* Tarjetas de datos compactas: ícono a la izquierda */
  .ag-ct__card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 24px 22px; }
  .ag-ct__card > :not(.ag-ct__ico) { grid-column: 2; justify-self: start; }
  .ag-ct__ico { grid-row: 1 / span 6; width: 44px; height: 44px; margin: 0; }
}
@media (max-width: 560px) {
  .ag-ct { padding-bottom: 60px; }
  .ag-ct__hero { min-height: 0; padding: 64px 22px 118px; }
  .ag-ct__intro { font-size: 15px; }
  .ag-ct__info, .ag-ct__areas, .ag-ct__main { width: calc(100% - 28px); }
  .ag-ct__info { margin-top: -84px; }
  .ag-ct__areas, .ag-ct__main { margin-top: 50px; }
  .ag-ct__big { font-size: 19px; }
  .ag-ct__h2 { font-size: 26px; margin-bottom: 22px; }
  .ag-ct__grid { grid-template-columns: 1fr; gap: 10px; }
  .ag-ct__area { min-height: 0; padding: 20px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
  .ag-ct__aname { font-size: 15px; flex: 1 1 100%; }
  .ag-ct__panel { padding: 34px 22px 30px; }
  .ag-ct__ftitle { font-size: 32px; }
}

/* ---------------------------------------------------------------- Ficha de desarrollo */
.ag-dev { padding: 60px 20px 40px; }
.ag-dev__in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 49fr 51fr; gap: 50px; align-items: center; }
.ag-dev__cats { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 30px; color: var(--gray-2); }
.ag-dev__cats a { color: var(--gray-2); } .ag-dev__cats a:hover { color: var(--navy); }
.ag-dev__title { font-family: var(--ff-display); font-size: 26px; line-height: 1.15; font-weight: 700; margin: 0 0 6px; color: var(--navy); }
.ag-dev__address { font-size: 13px; color: var(--gray-2); margin: 0 0 14px; }
.ag-dev__facts { list-style: none; margin: 0 0 18px; padding: 0; }
.ag-dev__facts li { display: flex; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1.5px dotted #e2e2e2; color: var(--navy); font-size: 13px; }
.ag-dev__ico svg { width: 16px; height: 16px; color: var(--gold); }
.ag-dev__text { margin-bottom: 18px; }
.ag-dev__text h2, .ag-dev__text h3 { font-family: var(--ff-serif); color: var(--navy); }
.ag-dev__text h2 { font-size: 28px; letter-spacing: 0; line-height: 1.2; }
.ag-dev__buttons { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 22px; }
.ag-dev__buttons .ag-btn { min-width: 104px; }
.ag-dev__share-title { font-size: 10px; text-transform: uppercase; color: var(--navy); margin: 6px 0 6px; }
.ag-dev__docs { list-style: none; padding: 0; margin: 0 0 16px; }
.ag-dev__docs a { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; } .ag-dev__docs svg { width: 16px; height: 16px; }
.ag-dev__gallery { box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.ag-dev__gallery .ag-carousel__slide img { aspect-ratio: 3 / 4; }
.ag-dev__desc { max-width: 1100px; margin: 50px auto 0; padding-top: 34px; border-top: 1px solid var(--line); columns: 2 340px; column-gap: 50px; }
.ag-dev__desc h2, .ag-dev__desc h3 { font-family: var(--ff-serif); color: var(--navy); break-after: avoid; letter-spacing: 0; }
.ag-dev__desc h2 { font-size: 24px; line-height: 1.25; }
.ag-dev__map { max-width: 1100px; margin: 50px auto 0; }
.ag-dev__map-title { font-family: var(--ff-display); font-size: 22px; letter-spacing: 0; }
.ag-dev__map .ag-map { position: relative; } .ag-dev__map .ag-map__canvas { height: 380px; min-height: 0; }
@media (max-width: 900px) { .ag-dev { padding-top: 30px; } .ag-dev__in { grid-template-columns: 1fr; gap: 26px; } .ag-dev__gallery { order: -1; } }

/* Modal +Info */
.ag-modal { border: 0; padding: 0; width: min(560px, 94vw); max-height: 92vh; background: #fff; box-shadow: 0 25px 60px rgba(0, 0, 0, .35); }
.ag-modal::backdrop { background: rgba(0, 11, 34, .72); backdrop-filter: blur(2px); }
.ag-modal[open] { animation: agPop .3s var(--ease); }
@keyframes agPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ag-modal__box { position: relative; padding: 30px 30px 24px; }
.ag-modal__close { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--navy); cursor: pointer; padding: 6px; }
.ag-modal__close svg { width: 22px; height: 22px; }
.ag-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.ag-modal__head img { width: 90px; height: auto; }
.ag-modal__title { font-family: var(--ff-display); font-size: 26px; color: var(--navy); margin: 0; letter-spacing: 0; }
.ag-modal__dev { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.ag-modal__note { margin: 10px 0 0; font-size: 13px; }

/* ---------------------------------------------------------------- Formularios */
.ag-form__grid { display: flex; flex-wrap: wrap; margin: 0 -5px; align-items: flex-end; }
.ag-field { width: var(--fw, 100%); padding: 0 5px 10px; position: relative; }
.ag-field__label { display: block; font-size: 13px; color: var(--navy); margin-bottom: 5px; font-weight: 500; }
.ag-field input, .ag-field textarea, .ag-field select { width: 100%; font: inherit; font-size: 14px; color: #333; background: #fff; border: 1px solid #d1d1d1; border-radius: 2px; padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
.ag-field textarea { resize: vertical; min-height: 96px; }
.ag-field input:focus, .ag-field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(2, 29, 73, .12); outline: none; }
.ag-field input[type=file] { padding: 8px; background: #fafafa; }
.ag-field__help { display: block; font-size: 11px; color: var(--gray-2); margin-top: 4px; }
.ag-field__err { display: block; color: #b3261e; font-size: 12px; min-height: 0; }
.ag-field.has-error input, .ag-field.has-error textarea { border-color: #b3261e; }
.ag-field--submit { width: auto; flex: 1 0 auto; min-width: 120px; }
.ag-submit { width: 100%; font-family: var(--ff-sans); font-weight: 500; font-size: 14px; padding: 11px 22px; border: 0; border-radius: 2px; background: var(--gold); color: #fff; cursor: pointer; text-transform: none; transition: background .25s, color .25s, transform .2s; }
.ag-submit:hover { background: var(--navy); color: #fff; }
.ag-submit[disabled] { opacity: .6; cursor: progress; }
.ag-form__msg { margin: 8px 0 0; font-size: 13px; min-height: 1.2em; color: var(--navy); }
.ag-form__msg.is-error { color: #b3261e; }
.ag-form__msg.is-ok { color: #1f6b3a; font-weight: 500; }
.ag-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Newsletter de páginas: tres columnas en línea (NOMBRE Y APELLIDO | EMAIL | Regístrese) */
.ag-form--newsletter .ag-field { width: 33.333%; }
.ag-form--newsletter .ag-field--submit { width: 33.333%; flex: 0 0 auto; }
.ag-form--newsletter input { border: 1px solid #e0e0e0; font-size: 11px; letter-spacing: .5px; padding: 11px 12px; }
.ag-form--newsletter .ag-submit { background: var(--gold); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 11px; }
/* Contacto (Hablemos) sobre fondo oscuro: campos con línea inferior */
.ag-form--contacto input, .ag-form--contacto textarea { background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .45); color: #fff; border-radius: 0; padding: 10px 12px; }
.ag-form--contacto input::placeholder, .ag-form--contacto textarea::placeholder { color: rgba(255, 255, 255, .7); }
.ag-form--contacto input:focus, .ag-form--contacto textarea:focus { border-bottom-color: var(--gold); box-shadow: none; }
.ag-form--contacto .ag-field--submit { width: 100%; text-align: center; padding-top: 14px; }
.ag-form--contacto .ag-submit { width: auto; padding: 13px 36px; text-transform: uppercase; font-weight: 600; letter-spacing: .5px; border-radius: 3px; }
.ag-form--contacto .ag-form__msg { color: #fff; text-align: center; }
/* Footer */
.ag-form--newsletter_footer .ag-field { width: 100%; padding-bottom: 10px; }
.ag-form--newsletter_footer input { border-radius: 2px; }
.ag-form--newsletter_footer .ag-field--submit { width: auto; flex: 0 0 auto; }
.ag-form--newsletter_footer .ag-submit { background: var(--gray); color: var(--navy); font-size: 11px; text-transform: uppercase; padding: 9px 18px; }
.ag-form--newsletter_footer .ag-submit:hover { background: var(--gold); }
.ag-form--newsletter_footer .ag-form__msg { color: #fff; }
.ag-form--info .ag-field--submit { width: 100%; } .ag-form--info .ag-submit { background: var(--navy); }
.ag-form--info .ag-submit:hover { background: var(--gold); color: var(--navy); }
.ag-form--carrera .ag-submit { background: var(--navy); }
@media (max-width: 767px) {
  .ag-field, .ag-form--newsletter .ag-field, .ag-form--newsletter .ag-field--submit { width: 100%; }
}

/* ---------------------------------------------------------------- Novedades / prensa */
.ag-news { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 24px; }
.ag-news__img { display: block; overflow: hidden; aspect-ratio: 1 / 1.24; background: #eee; }
.ag-news__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ag-news__card:hover .ag-news__img img { transform: scale(1.05); }
.ag-news__title { font-family: var(--ff-serif); font-size: 15px; line-height: 1.35; margin: 10px 0 4px; letter-spacing: 0; }
.ag-news__title a { color: var(--navy); }
.ag-news__more { font-size: 11px; color: var(--gray-2); }
@media (max-width: 1024px) { .ag-news { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ag-news { grid-template-columns: 1fr; } }
.ag-post { padding: 50px 20px; }
.ag-post__in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.ag-post__cat { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.ag-post__title { font-family: var(--ff-display); font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.ag-post__date { font-size: 12px; color: var(--gray-2); }
.ag-post__media img { width: 100%; height: auto; position: sticky; top: 20px; }
@media (max-width: 900px) { .ag-post__in { grid-template-columns: 1fr; } .ag-post__media { order: -1; } }

/* Archivo (categorías / etapas / búsqueda / 404) */
.ag-archive { padding: 50px 0 40px; }
.ag-archive__title { font-family: var(--ff-display); font-size: 32px; text-align: center; text-transform: uppercase; font-weight: 700; letter-spacing: 0; color: var(--navy); margin: 0 0 18px; }
.ag-archive__lead { text-align: center; }
.ag-archive-desc { text-align: center; max-width: 820px; margin: 0 auto 26px; }
.ag-pager { display: flex; justify-content: center; gap: 6px; margin: 40px 0 0; }
.ag-pager a, .ag-pager span { display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--text); }
.ag-pager span[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.ag-newsband { padding: 10px 0 50px; }
.ag-newsband__title { text-align: center; font-family: var(--ff-serif); font-size: 20px; color: var(--navy); margin: 10px 0 14px; }
.ag-search { display: flex; gap: 10px; margin: 0 0 20px; }
.ag-search input { flex: 1; padding: 12px; border: 1px solid #ccc; font: inherit; }
.ag-search__list { list-style: none; padding: 0; } .ag-search__list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ag-search__type { font-size: 10px; text-transform: uppercase; background: var(--navy); color: #fff; padding: 2px 6px; margin-right: 6px; }
.ag-404 { text-align: center; padding: 90px 0; } .ag-404__code { font-family: var(--ff-display); font-size: 90px; color: var(--gold); margin: 0; line-height: 1; }
.ag-404__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Footer */
.ag-footer { background: var(--navy-2); color: #fff; padding: 80px 20px 60px; }
.ag-footer__in { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 28fr 33.5fr 38.5fr; gap: 20px; align-items: start; }
.ag-footer__logo { width: 76px; height: auto; margin-bottom: 30px; }
.ag-footer__col:first-child .ag-footer__logo { width: 90px; }
.ag-footer__text { font-size: 12px; line-height: 1.5; color: #fff; }
.ag-footer__text strong { font-weight: 700; }
.ag-footer__rule { display: block; width: 104px; border-top: 3px solid #fff; margin: 15px 0 14px; }
.ag-footer__col--news { border-left: 1px solid rgba(255, 255, 255, .45); padding-left: 28px; }
.ag-footer__title { font-family: var(--ff-sans); font-size: 20px; color: #fff; margin: 0 0 14px; font-weight: 500; }
.ag-footer__menu { list-style: none; padding: 0; margin: 8px 0 0; }
.ag-footer__menu > li > a, .ag-footer__menu > li > span { display: block; padding: 4px 0; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; color: var(--gray); }
.ag-footer__menu a:hover, .ag-footer__menu a[aria-current="page"] { color: var(--gold); }
.ag-footer__menu ul { list-style: none; padding: 0 0 4px 12px; margin: 0; display: none; }
.ag-footer__menu li.has-sub:hover ul, .ag-footer__menu li.has-sub:focus-within ul { display: block; }
.ag-footer__menu ul a { display: block; font-size: 10px; padding: 3px 0; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 900px) { .ag-footer { padding: 50px 20px; } .ag-footer__in { grid-template-columns: 1fr 1fr; } .ag-footer__col--news { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .3); padding: 24px 0 0; } }
@media (max-width: 560px) { .ag-footer__in { grid-template-columns: 1fr; gap: 34px; } }

/* ---------------------------------------------------------------- Ajustes por página (fidelidad con el original) */
/* Home: hero con video y logo */
.tpl-home .ag-main > .ag-page > .ag-sec:first-child { min-height: 100vh; min-height: 100svh; }
.tpl-home .ag-main > .ag-page > .ag-sec:first-child .ag-img img { width: 300px; }
/* Títulos de sección del home en mayúsculas como en el sitio original */
.tpl-home .ag-heading--h3, .tpl-home .ag-heading--h6 { text-transform: uppercase; }
/* Contacto: tarjetas de áreas y fondo oscuro */
.tpl-contact .ag-heading--h6 { font-family: var(--ff-serif); font-size: 18px; text-transform: uppercase; color: #fff; font-weight: 400; line-height: 1.35; }
.tpl-contact .ag-heading--span { color: #fff; font-size: 12px; font-family: var(--ff-sans); font-weight: 400; }
.tpl-contact .ag-col .ag-col { border-right: 1px solid rgba(255, 255, 255, .25); }
.tpl-contact .ag-col .ag-col:last-child { border-right: 0; }
/* Minería: texto blanco sobre fondo oscuro */
.tpl-mining .ag-text { color: #fff; }
.tpl-mining .ag-heading { color: #fff; }

/* Efectos de desplazamiento del Home (assets/js/home-fx.js; inactivos con «reducir movimiento») */
.ag-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); z-index: 1100; pointer-events: none; }
.ag-fx-on .tpl-home .ag-sec:first-child > .ag-bg, .ag-fx-on .tpl-home .ag-sec:first-child > .ag-bg-video { will-change: transform; }
.ag-fx-on .tpl-home .ag-sec:first-child > .ag-sec__in { will-change: opacity, transform; }
.ag-fx-on .tpl-home .ag-sec, .ag-fx-on .tpl-home .ag-col.ag-has-bg { overflow: hidden; }
.ag-fx-par { inset: -14% 0 !important; will-change: transform; }
.ag-fx { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.ag-fx.is-in { opacity: 1; transform: none; }
.ag-fx--right { transform: translate3d(60px, 0, 0); }
.ag-fx--zoom { transform: none; }
.ag-fx--zoom > .ag-bg { transform: scale(1.18); transition: transform 1.8s var(--ease); }
.ag-fx--zoom.is-in > .ag-bg { transform: scale(1); }
.ag-fx--zoom:hover > .ag-bg { transform: scale(1.06); transition-duration: 1.2s; }
.ag-fx--line .ag-divider::before { transform: scaleX(0); transition: transform 1.1s var(--ease) .2s; }
.ag-fx--line .ag-div--center::before { transform-origin: 50% 50%; }
.ag-fx--line .ag-divider:not(.ag-div--center)::before { transform-origin: 0 50%; }
.ag-fx--line.is-in .ag-divider::before { transform: scaleX(1); }
.tpl-home .ag-compact .ag-heading { font-variant-numeric: tabular-nums; }
@media print { .ag-progress { display: none; } }

/* Animaciones de aparición (respetan reducir movimiento) */
.ag-reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.ag-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ag-reveal { opacity: 1; transform: none; } .ag-icon-link { animation: none; } }

/* ---------------------------------------------------------------- Responsive de bloques */
@media (max-width: 1024px) {
  .ag-heading { font-size: min(var(--fs, 32px), 30px); }
}
@media (max-width: 767px) {
  .ag-row { flex-direction: column; }
  .ag-rev-m .ag-row { flex-direction: column-reverse; }
  .ag-col { width: var(--w-m, 100%); }
  .ag-sec { padding: var(--p-m, var(--p, 0)); margin: var(--m-m, var(--m, 0)); min-height: var(--minh-m, auto); }
  .ag-sec--vh { min-height: 100svh; }
  .ag-sec--inner .ag-row, .ag-sec--inner .ag-col { min-height: var(--minh-m, auto); }
  .ag-sec--inner .ag-col.ag-has-bg { min-height: var(--minh-m, 240px); }
  /* Cifras (250mil · 50 · 1991) en una fila también en móvil */
  .ag-compact > .ag-sec__in > .ag-row { flex-direction: row; flex-wrap: nowrap; }
  .ag-compact > .ag-sec__in > .ag-row > .ag-col { width: var(--w-m, auto); flex: 1 1 0; }
  .ag-compact .ag-heading { font-size: min(var(--fs-m, var(--fs, 28px)), 30px); overflow-wrap: anywhere; }
  .ag-compact .ag-heading--span, .ag-compact .ag-heading--h6, .ag-compact .ag-heading--p { font-size: 11px; line-height: 1.3; }
  .ag-compact .ag-col__in { padding: 4px; }
  /* Filas de fotos (Transparencia): dos por fila y alto contenido */
  .ag-photo-row > .ag-sec__in > .ag-row { flex-direction: row; flex-wrap: wrap; }
  .ag-photo-row > .ag-sec__in > .ag-row > .ag-col { width: 50%; min-height: 220px; }
  .ag-col__in { padding: var(--p-m, var(--gutter)); }
  .ag-w { padding: var(--p-m, var(--p, 0)); }
  .ag-heading { font-size: var(--fs-m, min(var(--fs, 28px), 26px)); line-height: var(--lh-m, var(--lh, 1.2)); text-align: var(--ta-m, inherit) !important; }
  .ag-text { font-size: var(--fs-m, var(--fs, 14px)); }
  .ag-text[style*="text-align:justify"] { text-align: left !important; }
  .ag-spacer { height: var(--sp-m, min(var(--sp, 50px), 60px)); }
  .ag-img img { width: var(--iw-m, var(--iw, auto)); }
  .ag-sec__in { padding: 0 6px; }
  .ag-sec--full > .ag-sec__in { padding: 0; }
  h1 { font-size: 32px; line-height: 38px; } h2 { font-size: 24px; line-height: 30px; }
  /* Márgenes y espaciados móviles propios (las clases de gap pisaban el --p-m de la columna) */
  .ag-w[style*="--m:"], .ag-w[style*="--m-m:"] { margin: var(--m-m, var(--m, 0)); }
  .ag-sec.ag-gap-no .ag-col__in { padding: var(--p-m, 0); }
  .ag-sec.ag-gap-narrow .ag-col__in { padding: var(--p-m, 5px); }
  .ag-sec.ag-gap-extended .ag-col__in { padding: var(--p-m, 15px); }
  .ag-sec.ag-gap-wide .ag-col__in { padding: var(--p-m, 20px); }
  .ag-sec.ag-gap-wider .ag-col__in { padding: var(--p-m, 20px); }
  /* Solo el primer bloque de pantalla completa ocupa todo el alto; el resto se ajusta a su contenido */
  .ag-page > .ag-sec--vh:not(:first-child) { min-height: auto; }
  /* Bandas con imagen de fondo: conservan presencia sin el alto de escritorio */
  .ag-sec.ag-has-bg:not(.ag-sec--inner):not(.ag-sec--vh) { min-height: var(--minh-m, min(var(--minh, 0px), 56svh)); }
  /* Tarjetas con foto (pilares): altas pero sin ocupar más de una pantalla */
  .ag-sec--inner .ag-col.ag-has-bg { min-height: min(var(--minh-m, 240px), 58svh); }
  .ag-sec--inner.ag-cols-3 > .ag-sec__in > .ag-row, .ag-sec--inner.ag-cols-3 { min-height: 0; }
  /* Cifras grandes (250mil · 50 · 1991) */
  .ag-compact .ag-heading--as-h1, .ag-compact .ag-heading--h1, .ag-compact .ag-heading--h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.5px; overflow-wrap: normal; white-space: nowrap; }
  .ag-text, .ag-heading--long { line-height: var(--lh-m, 1.65); }
  .ag-text { text-align: left; }
  .ag-btnwrap .ag-btn { min-height: 44px; }
}
.ag-heading--long { line-height: var(--lh, 1.65); font-weight: inherit; }

/* ---------------------------------------------------------------- iPhone / táctil */
/* Safari iOS hace zoom al enfocar campos con letra < 16px: en pantallas táctiles se usa 16px */
@media (hover: none) and (pointer: coarse), (max-width: 767px) {
  .ag-field input, .ag-field textarea, .ag-field select, .ag-pfilter__select, .ag-form--newsletter input, .ag-form--newsletter_footer input { font-size: 16px; }
  a, button { -webkit-tap-highlight-color: rgba(204, 190, 143, .25); }
}
@media (max-width: 1024px) {
  /* Cabecera fija al desplazar; el menú abierto se puede recorrer si es más alto que la pantalla */
  .ag-header { position: sticky; top: 0; }
  .ag-header.is-open .ag-nav { max-height: calc(100vh - 56px); max-height: calc(100svh - 56px); overflow-y: auto; overscroll-behavior: contain; }
  .ag-header__brand { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  html { scroll-padding-top: 60px; }
  .tpl-portfolio .ag-w--map { top: 56px; }
  .tpl-portfolio .ag-w--map .ag-map__canvas { height: calc(100svh - 56px); }
}
.ag-footer { padding-bottom: max(60px, calc(30px + env(safe-area-inset-bottom))); }
@media (max-width: 767px) {
  .ag-dev__buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
  .ag-dev__buttons .ag-btn { min-width: 0; padding: 12px 8px; }
}

/* ---------------------------------------------------------------- Compuerta de acceso (dev) */
.ag-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy) linear-gradient(160deg, var(--navy), var(--navy-ink)); color: #fff; padding: 20px; }
.ag-gate__box { width: min(420px, 100%); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); padding: 36px 30px; }
.ag-gate__brand { letter-spacing: .5em; font-size: 15px; margin: 0 0 20px; color: var(--gold); }
.ag-gate__title { color: #fff; font-family: var(--ff-display); font-size: 28px; }
.ag-gate__form label { display: block; margin: 16px 0 6px; font-size: 13px; }
.ag-gate__form input { width: 100%; padding: 12px; border: 0; border-radius: 2px; font: inherit; margin-bottom: 16px; }
.ag-gate__error { color: #ffb4ab; }

@media print { .ag-header, .ag-footer, .ag-carousel__nav, .ag-tl__nav, .ag-map { display: none !important; } }
