/* PAI La Nucía–Polop · fondoseuropeos.lanucia.es */
:root {
  --navy: #0b2468;
  --navy-2: #12338c;
  --eu: #003399;
  --gold: #ffcc00;
  --ink: #15203b;
  --muted: #5a6479;
  --line: #dfe4ee;
  --tint: #f2f5fb;
  --white: #fff;
  --c-movilidad: #129a6b;
  --c-edificios: #e07a1f;
  --c-smartcity: #1e7fd6;
  --c-agua: #0e8a9c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 36, 104, .10);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.65; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--eu); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.35rem); font-weight: 700; color: var(--navy); max-width: 26ch; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.nowrap { white-space: nowrap; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── Topbar ── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand__mark { background: var(--navy); color: var(--gold); font-weight: 800; border-radius: 10px; padding: 6px 9px; font-size: .95rem; letter-spacing: .04em; }
.brand__text { font-weight: 700; font-size: 1.05rem; line-height: 1.1; display: flex; flex-wrap: wrap; align-items: baseline; }
.brand__text small { display: block; width: 100%; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.brand__dash { color: var(--gold); padding: 0 1px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--tint); color: var(--eu); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

.ue-lockup { display: flex; align-items: center; gap: 10px; font-size: .74rem; line-height: 1.2; font-weight: 600; color: var(--eu); }
.ue-flag { width: 48px; height: 32px; flex: none; }
.ue-lockup--footer { color: var(--white); font-size: .9rem; }
.ue-lockup--footer .ue-flag { width: 72px; height: 48px; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--ghost { color: var(--white); border: 1.5px solid rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
/* Icono de flecha (SVG como máscara, toma el color del texto) */
.link-arrow, .news__more { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow::after, .news__more::after { content: ""; width: 1.05em; height: 1.05em; background: currentColor; transition: transform .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.link-arrow:hover::after, .news__item a:hover .news__more::after { transform: translateX(4px); }

/* ── Hero ── */
.hero { position: relative; color: var(--white); padding: clamp(64px, 9vw, 120px) 0 0; overflow: hidden; isolation: isolate; background: var(--navy); }
.hero__bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,204,0,.22), transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(30,127,214,.45), transparent 45%),
    linear-gradient(120deg, rgba(11,36,104,.96) 30%, rgba(0,51,153,.78)),
    url("/img/hero.jpg") center / cover no-repeat;
}
.hero__stars { position: absolute; right: max(-140px, calc((100vw - 1200px) / 2 - 140px)); top: 40px; width: min(560px, 60vw); opacity: .4; pointer-events: none; }
.hero__stars .ue-flag { width: 100%; height: auto; }
.hero__stars .ue-flag rect { fill: transparent; }
.hero__inner { max-width: 1200px; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold); border: 1px solid rgba(255,204,0,.45); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2rem, 1.1rem + 4vw, 4rem); font-weight: 800; max-width: 18ch; text-transform: uppercase; letter-spacing: -.015em; }
.hero__accent { color: var(--gold); }
.hero__sub { font-size: clamp(1rem, .9rem + .5vw, 1.25rem); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; max-width: 46ch; opacity: .95; }
.hero__lead { font-size: 1.08rem; max-width: 52ch; opacity: .85; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding-bottom: 130px; }

/* Cifras: tarjeta flotante a caballo entre el banner y la sección siguiente */
.stats-wrap { position: relative; z-index: 2; margin-top: -78px; }
.stats { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 10px; background: var(--white); border-radius: 20px; box-shadow: 0 24px 60px rgba(11, 36, 104, .18); }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 26px 18px; border-radius: 14px; background: var(--tint); transition: transform .2s; }
.stat:hover { transform: translateY(-3px); }
.stat__icon { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--eu); box-shadow: 0 4px 12px rgba(0, 51, 153, .12); margin-bottom: 4px; }
.stat__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat__value { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.7rem); line-height: 1.05; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.stat__label small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8rem; margin-top: 2px; }
.stat--big { background: linear-gradient(135deg, var(--eu), var(--navy)); position: relative; overflow: hidden; }
.stat--big::after { content: ""; position: absolute; right: -70px; bottom: -90px; width: 170px; height: 170px; border-radius: 50%; border: 2px dashed rgba(255, 204, 0, .35); }
.stat--big .stat__icon { background: var(--gold); color: var(--navy); box-shadow: none; }
.stat--big .stat__value { color: var(--gold); font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.4rem); }
.stat--big .stat__label { color: rgba(255, 255, 255, .85); }
#plan { padding-top: clamp(48px, 6vw, 80px); }

/* ── Secciones ── */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark h2 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,.88); }
.section--dark .kicker { color: var(--gold); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--eu); margin-bottom: .6em; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--gold); border-radius: 2px; }
.kicker--light { color: var(--gold); }
.prose { max-width: 75ch; color: var(--muted); font-size: 1.04rem; }
.prose--light { color: rgba(255,255,255,.85); }
.empty { color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); margin-bottom: 40px; }
.two-col--center { align-items: center; margin-bottom: 0; }
.two-col p { color: var(--muted); }

.edil-banner { display: flex; align-items: center; gap: 20px; text-decoration: none; color: var(--white); background: linear-gradient(100deg, var(--eu), var(--navy-2)); border-radius: var(--radius); padding: 18px 24px; margin-bottom: 56px; box-shadow: var(--shadow); transition: transform .15s; }
.edil-banner:hover { transform: translateY(-2px); }
.edil-banner__flag .ue-flag { width: 60px; height: 40px; border: 1px solid rgba(255,255,255,.4); }
.edil-banner__text { display: flex; flex-direction: column; }
.edil-banner__text strong { font-size: 1.25rem; }
.edil-banner__text span { opacity: .85; font-size: .92rem; }
.edil-banner__go { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 10px; background: var(--gold); color: var(--navy); font-weight: 600; font-size: .92rem; padding: 11px 18px; border-radius: 999px; transition: gap .15s; }
.edil-banner__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.edil-banner:hover .edil-banner__go { gap: 14px; }

.callout { background: var(--tint); border-left: 5px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 28px 30px; }
.callout h3 { color: var(--navy); font-size: 1.35rem; margin-bottom: .25em; }
.callout__sub { font-weight: 600; color: var(--eu) !important; font-size: .95rem; }

/* ── Tarjetas de proyecto ── */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.pcard { --c: var(--eu); position: relative; display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); padding: 26px 24px; text-decoration: none; color: var(--ink); box-shadow: 0 2px 0 var(--line); border-top: 5px solid var(--c); transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard h3 { color: var(--navy); }
.pcard p { color: var(--muted); font-size: .93rem; flex: 1; }
.pcard__icon, .act__icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); margin-bottom: 16px; flex: none; }
.pcard__icon svg, .act__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pcard__num { position: absolute; right: 20px; top: 18px; font-size: 2.2rem; font-weight: 800; color: color-mix(in srgb, var(--c) 18%, white); }
.pcard__amount { font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; }
.pcard--movilidad, .act--movilidad, .seg--movilidad { --c: var(--c-movilidad); }
.pcard--edificios, .act--edificios, .seg--edificios { --c: var(--c-edificios); }
.pcard--smartcity, .act--smartcity, .seg--smartcity { --c: var(--c-smartcity); }
.pcard--agua, .act--agua, .seg--agua { --c: var(--c-agua); }

.split { margin-top: 36px; background: var(--white); border-radius: var(--radius); padding: 22px 24px; }
.split__head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 12px; flex-wrap: wrap; }
.split__head strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.split__bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line); }
.split__seg { background: var(--c); }
.split__legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--muted); }
.split__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); margin-right: 8px; vertical-align: -1px; }
.split__legend b { color: var(--ink); margin-left: 4px; }

/* ── Actuaciones ── */
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.act { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.act__head { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.act__head h3 { color: var(--navy); margin-bottom: .3em; }
.act__head p { color: var(--muted); font-size: .92rem; margin: 0; }
.act__n { color: var(--c); }
.act__icon { margin: 0; }
.act__budget { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; background: color-mix(in srgb, var(--c) 9%, white); border-radius: 10px; padding: 10px 14px; }
.act__budget span { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); }
.act__budget strong { color: var(--c); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.act__table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.act__table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 24px 8px; font-weight: 600; }
.act__table td { padding: 12px 24px; border-top: 1px solid var(--line); vertical-align: top; }
.act__table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar { display: block; height: 4px; background: var(--tint); border-radius: 2px; margin-top: 8px; }
.bar span { display: block; height: 100%; background: var(--c); border-radius: 2px; }
.total { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 22px 28px; font-weight: 600; }
.total strong { color: var(--gold); font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-variant-numeric: tabular-nums; }

/* ── Noticias ── */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.news__item a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.news__item a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news__img { aspect-ratio: 16 / 10; background: var(--tint) linear-gradient(135deg, var(--tint), #e3e9f5); overflow: hidden; }
.news__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news__item a:hover .news__img img { transform: scale(1.04); }
.news__body { display: flex; flex-direction: column; padding: 18px 20px 20px; flex: 1; }
.news__body time { font-size: .8rem; color: var(--eu); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.news__body h3 { font-size: 1.05rem; margin: 6px 0 8px; color: var(--navy); }
.news__body p { font-size: .9rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news__more { font-size: .88rem; color: var(--eu); }

/* ── Galería ── */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; margin-top: 28px; }
.gallery__item { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--line); }
.gallery__item--wide { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__cap { position: absolute; inset: auto 0 0 0; padding: 28px 14px 12px; color: var(--white); font: 500 .85rem/1.3 var(--font); text-align: left; background: linear-gradient(transparent, rgba(11,36,104,.85)); opacity: 0; transition: opacity .2s; }
.gallery__item:hover .gallery__cap, .gallery__item:focus-visible .gallery__cap { opacity: 1; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); }
.lightbox::backdrop { background: rgba(8, 18, 50, .88); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox__cap { color: var(--white); text-align: center; margin-top: 12px; }
.lightbox__close { position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 1.6rem; cursor: pointer; }

/* ── Documentación ── */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1.5px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; background: var(--white); transition: border-color .15s, background .15s, transform .15s; }
a.doc:hover { border-color: var(--eu); background: var(--tint); transform: translateY(-2px); }
.doc__type { flex: none; font-size: .7rem; letter-spacing: .06em; background: var(--eu); color: var(--white); border-radius: 6px; padding: 5px 7px; }
.doc__title { flex: 1; line-height: 1.35; }
.doc__go { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; }
.doc__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.doc--off { color: var(--muted); background: var(--tint); cursor: not-allowed; }
.doc--off .doc__type { background: #9aa3b5; }
.doc__soon { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* ── Footer ── */
.footer { background: #08184a; color: rgba(255,255,255,.8); padding: 48px 0 28px; font-size: .92rem; }
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 22px 26px; background: var(--white); border-radius: var(--radius); margin-bottom: 40px; }
.footer__logos .ue-lockup--footer { color: var(--eu); }
.footer__logo { height: 56px; width: auto; object-fit: contain; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer__title { color: var(--white); font-weight: 700; margin-bottom: .4em; }
.footer__social, .footer__legal { display: flex; flex-direction: column; gap: 2px; }
.footer__copy { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .82rem; color: rgba(255,255,255,.65); }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .cards4 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; order: 3; margin-left: 0; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .ue-lockup--top { margin-left: auto; }
}
@media (max-width: 900px) {
  .two-col, .acts { grid-template-columns: 1fr; }
  .news, .docs { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat--big { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stars { opacity: .35; }
}
@media (max-width: 600px) {
  .cards4, .news, .docs { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; padding: 8px; gap: 8px; }
  .stat { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; row-gap: 2px; text-align: left; padding: 16px 18px; }
  .stat__icon { grid-row: span 2; margin: 0; }
  .stat__value { font-size: 1.7rem; }
  .stat--big .stat__value { font-size: 1.55rem; }
  .stats-wrap { margin-top: -64px; }
  .edil-banner { padding: 18px; gap: 14px; flex-wrap: wrap; }
  .edil-banner__go { margin-left: 0; }
  .edil-banner__flag { display: none; }
  .act__table th, .act__table td { padding-inline: 16px; }
  .act__head { padding: 20px 16px 16px; }
  .brand__text small { display: none; }
  .brand__text { white-space: nowrap; flex-wrap: nowrap; }
  .ue-lockup--top span { display: none; }
  .topbar__inner { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
