/* Alberto Gambetta – one page. Prefijo ag- para no chocar con Bootstrap 3 del bundle. */
:root {
    --green: #58a31c; --green-d: #3f7a10; --bg: #f5f6f3; --surface: #fff; --ink: #2b2d2a;
    --muted: #5e5e5e; --line: #dfe2dc; --soft: #eaf3df; --red: #b30000; --red-d: #860000;
    --hd: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    --bd: 'Figtree', system-ui, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #171a15; --surface: #20241d; --ink: #eef0ea; --muted: #b4b9ad; --line: #343a2e; --soft: #26331b; --green: #79c23a; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; font-size: 17px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--bd); }
img { max-width: 100%; }
a, a:hover, a:focus { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
/* El home no usa el contenedor de contenido del layout del bundle */
.ag-home .container-boxed { display: none; }

.ag-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #e3e5df; }
.ag-bar { max-width: 1160px; margin: auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ag-bar img { height: 48px; width: auto; display: block; }
.ag-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.ag-menu-toggle, .ag-menu-btn { display: none; }
.ag-nav a { color: #5e5e5e; font-weight: 500; font-size: 15px; padding: 8px 11px; border-radius: 6px; }
.ag-nav a:hover { background: #eaf3df; color: #3f7a10; }
.ag-nav a.ag-cta, .ag-nav a.ag-cta:focus { background: #58a31c; color: #fff; }
.ag-nav a.ag-cta:hover { background: #3f7a10; color: #fff; }

.ag-hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end; background: #222; overflow: hidden; }
.ag-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,22,10,.25) 0%, rgba(15,22,10,.78) 100%); }
.ag-in { position: relative; z-index: 1; max-width: 1160px; width: 100%; margin: auto; padding: 0 24px 56px; color: #fff; }
.ag-hero h1 { font: 700 clamp(44px, 8vw, 96px)/.95 var(--hd); margin: 0 0 16px; letter-spacing: -.01em; max-width: 11ch; color: #fff; }
.ag-hero p { font-size: clamp(18px, 2.2vw, 22px); max-width: 34em; margin: 0 0 28px; color: #eef3e8; }

.ag-btn, .ag-btn:focus { display: inline-block; background: var(--green); color: #fff; padding: 13px 24px; border-radius: 8px; border: 0; font: 600 16px var(--bd); cursor: pointer; }
.ag-btn:hover { background: var(--green-d); color: #fff; }
.ag-btn.ag-ghost { background: transparent; border: 2px solid #fff; margin-left: 8px; padding: 11px 22px; }
.ag-btn.ag-ghost:hover { background: rgba(255,255,255,.15); }

.ag-home section { padding: 84px 24px; }
.ag-w { max-width: 1160px; margin: auto; }
.ag-home h2 { font: 700 clamp(34px, 5vw, 54px)/1 var(--hd); margin: 0 0 20px; color: var(--ink); }
.ag-home h2::after { content: ""; display: block; width: 56px; height: 5px; background: var(--green); margin-top: 14px; border-radius: 3px; }
.ag-home h3 { font: 600 26px/1.1 var(--hd); margin: 0 0 8px; }
.ag-lead { font-size: 20px; max-width: 46em; color: var(--muted); }
.ag-two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.ag-alt { background: var(--surface); border-block: 1px solid var(--line); }
.ag-who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.ag-who div { background: var(--soft); border-radius: 10px; padding: 18px 20px; font: 600 24px var(--hd); }
.ag-tick { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ag-tick li { padding-left: 34px; position: relative; }
.ag-tick li::before { content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 11px; border-left: 4px solid var(--green); border-bottom: 4px solid var(--green); transform: rotate(-45deg) scale(.8); }
.ag-svc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ag-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.ag-box ul { margin: 16px 0 20px; }

/* KW Land: siempre claro, con el rojo de la marca */
.ag-home .ag-kw { background: #fff; color: #2b2d2a; border-block: 6px solid var(--red); padding: 52px 24px; }
.ag-kw h2 { color: #2b2d2a; font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.ag-home .ag-kw h2::after { display: none; }
.ag-kw p { color: #4d4f4e; }
.ag-kw .ag-btn { background: var(--red); }
.ag-kw .ag-btn:hover { background: var(--red-d); }
.ag-kwh { display: flex; align-items: center; gap: 32px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid #e6e6e6; }
.ag-kwh img { width: 240px; max-width: 40%; flex: none; }
.ag-kwh p { margin: 0; font-size: 18px; max-width: 44em; }
.ag-kwg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ag-kwg > div { display: grid; gap: 4px; align-content: start; }
.ag-kwg i { width: 42px; height: 42px; border-radius: 11px; background: var(--red); color: #fff; display: grid; place-items: center; }
.ag-home .ag-kwg h3 { font-size: 20px; margin: 6px 0 0; color: #2b2d2a; }
.ag-kwg p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.ag-kwg svg, .ag-kwf svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ag-kwf { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #e6e6e6; }
.ag-kwf span { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.ag-kwf svg { width: 20px; height: 20px; color: var(--red); }
.ag-kwf span a { color: var(--red); }
.ag-kwf .ag-btn { margin: 0 0 0 auto; }

details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 24px var(--hd); display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--green); font-size: 28px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 20px; color: var(--muted); max-width: 52em; }

.ag-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ag-data table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ag-data caption { text-align: left; font: 600 24px var(--hd); padding: 0 0 10px; color: var(--ink); }
.ag-data td, .ag-data th { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; }
.ag-data td:last-child, .ag-data th:last-child { text-align: right; }
.ag-data small { color: var(--muted); }

.ag-ig-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.ag-ig-top { display: flex; align-items: center; gap: 16px; }
.ag-home .ag-ig-top h2 { margin: 0; }
.ag-home .ag-ig-top h2::after { display: none; }
.ag-ig-top p { margin: 2px 0 0; color: var(--muted); }
.ag-avatar { width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(from 200deg, #f9a03f, #e1306c, #8a3ab9, #f9a03f); display: grid; place-items: center; flex: none; }
.ag-avatar span { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #58a31c; display: grid; place-items: center; font: 700 22px var(--hd); }

/* Formulario de contacto de la API (viene con markup de Bootstrap 3) */
.ag-api-form .container { width: auto; padding: 0; }
.ag-api-form .heading, .ag-api-form > div > p { display: none; }
.ag-api-form .form-horizontal .form-group { margin: 0 0 14px; }
.ag-api-form .form-horizontal [class*='col-'] { float: none; width: 100%; margin-left: 0; padding: 0; text-align: left; }
.ag-api-form .form-horizontal .control-label { margin-bottom: 6px; padding-top: 0; text-align: left; font-weight: 600; font-size: 15px; }
.ag-api-form .form-control { height: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; box-shadow: none; }
.ag-api-form textarea.form-control { min-height: 130px; }
.ag-api-form .btn, .ag-api-form .btn:focus { background: var(--green); border: 0; border-radius: 8px; color: #fff; padding: 13px 24px; font: 600 16px var(--bd); }
.ag-api-form .btn:hover { background: var(--green-d); color: #fff; }

.ag-footer { background: #3b3d3a; color: #e6e8e2; padding: 56px 24px 40px; }
.ag-footer .ag-w { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.ag-footer img { height: 54px; width: auto; background: #fff; padding: 8px 12px; border-radius: 8px; margin-bottom: 16px; }
.ag-footer p { margin: 0 0 10px; font-size: 15px; }
.ag-footer a, .ag-footer a:hover, .ag-footer a:focus { color: #b8e08a; }
.ag-footer a:hover { text-decoration: underline; }
.ag-copy { max-width: 1160px; margin: 32px auto 0; font-size: 14px; color: #b9bdb4; border-top: 1px solid #555; padding-top: 18px; }

@media (max-width: 860px) {
    .ag-two, .ag-svc, .ag-data, .ag-footer .ag-w, .ag-who { grid-template-columns: 1fr; }
    .ag-bar { position: relative; padding: 10px 20px; }
    .ag-bar img { height: 40px; }
    .ag-menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; border-radius: 8px; color: #3f7a10; font-size: 26px; cursor: pointer; }
    .ag-menu-btn:hover { background: #eaf3df; }
    .ag-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 8px 12px 16px; background: #fff; border-bottom: 1px solid #e3e5df; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
    .ag-nav a { padding: 12px; font-size: 17px; }
    .ag-nav a.ag-cta { margin-top: 6px; text-align: center; }
    .ag-menu-toggle:checked ~ .ag-nav { display: flex; }
    .ag-home section { padding: 60px 20px; }
    .ag-btn.ag-ghost { margin: 10px 0 0; }
    .ag-kwg,     .ag-kwh { flex-direction: column; align-items: flex-start; gap: 16px; }
    .ag-kwh img { max-width: 240px; }
    .ag-kwf .ag-btn { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    }

/* Fotos del sitio anterior */
.ag-foto { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }
#uruguay .ag-foto { aspect-ratio: 1; margin: 0; }
.ag-home .ag-cards-titulo { margin: 40px 0 16px; }
.ag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.ag-card { position: relative; padding: 16px; display: grid; gap: 4px; align-content: start; }
.ag-card .ag-foto { margin-bottom: 8px; }
.ag-card small { color: var(--muted); }
.ag-card:hover { border-color: var(--green); }
.ag-badge { position: absolute; top: 24px; left: 24px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

/* Fondo del hero: imágenes de los avisos de la API, con fundido */
.ag-hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.ag-hero-slides img.is-active { opacity: 1; }
.ag-ver-todos { margin: 28px 0 0; text-align: center; }
