/* =========================================================
   PADER · Partido Demócrata de Rojales
   Colores tomados del logotipo (anillo amarillo → turquesa)
   ========================================================= */
:root {
  --yellow: #F5D134;
  --yellow-soft: #FBEFB0;
  --green: #8FC27A;
  --teal: #18A6C6;
  --teal-dark: #0E7F99;
  --ink: #3F4347;        /* gris del logotipo */
  --ink-strong: #24282B;
  --muted: #6B7177;
  --line: #E4E7EA;
  --bg: #FFFFFF;
  --bg-tint: #F5F9FA;
  --dark: #17252B;
  --ring-grad: linear-gradient(180deg, #F5D134 0%, #EFD43E 38%, #8FC27A 68%, #18A6C6 100%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 37, 43, .08);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink-strong); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- Anillo del logotipo ---------- */
.ring {
  border-radius: 50%;
  background: var(--ring-grad);
  -webkit-mask: radial-gradient(circle closest-side, transparent 66%, #000 67%);
          mask: radial-gradient(circle closest-side, transparent 66%, #000 67%);
}
.grad-text {
  background: linear-gradient(90deg, #E2B900, var(--green) 55%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(24, 166, 198, .3); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { border-color: var(--ink-strong); color: var(--ink-strong); background: transparent; }
.btn-ghost:hover { background: var(--ink-strong); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink-strong); }
.brand img { width: 48px; height: 48px; object-fit: contain; mix-blend-mode: multiply; }
.about-logo { width: 170px; height: auto; margin: -1rem 0 .5rem -1.2rem; mix-blend-mode: multiply; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.brand-text small { font-size: .72rem; color: var(--muted); font-weight: 600; }

.main-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; border-radius: 3px;
  background: var(--ring-grad); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switch { display: flex; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; font: inherit; font-size: .8rem; font-weight: 700;
  color: var(--muted); padding: .35rem .6rem; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--teal); color: #fff; }

.social-icons { display: flex; gap: .4rem; }
.social-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; transition: transform .15s ease, filter .15s ease;
}
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.social-facebook { background: #1877F2; }
.social-instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2.5px; background: var(--ink-strong); margin: 5px 0; border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(245, 209, 52, .18), transparent 70%),
    radial-gradient(600px 400px at 70% 100%, rgba(24, 166, 198, .14), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 3rem; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); background: rgba(24,166,198,.1); padding: .35rem .8rem; border-radius: 999px; }
.slogan { font-size: clamp(2.8rem, 7.5vw, 5.2rem); text-transform: uppercase; letter-spacing: -.01em; line-height: 1; margin: .5rem 0 .35em; }
.hero-sub { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; color: var(--ink-strong); line-height: 1.3; margin-bottom: .8em; }
.footer-address { display: block; margin-top: .2rem; font-size: .8rem; color: #93A3A9; }
.footer-slogan { display: block; margin-top: .15rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; color: var(--yellow); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.ring-lg { position: absolute; inset: 0; animation: float 8s ease-in-out infinite; }
.ring-sm { position: absolute; width: 28%; aspect-ratio: 1; right: -4%; bottom: 2%; opacity: .55; animation: float 6s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .ring-lg, .ring-sm { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--dark); color: #C9D4D8; }
.section-dark h2 { color: #fff; }
.kicker { font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.kicker::before { content: ""; width: 26px; height: 4px; border-radius: 4px; background: var(--ring-grad); }
.kicker.light { color: var(--yellow); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head p:last-child { color: var(--muted); font-size: 1.05rem; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.about-text p { font-size: 1.05rem; }
.values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.values li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.values h3 { margin: .8rem 0 .3rem; }
.values p { margin: 0; color: var(--muted); font-size: .95rem; }
.value-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ring-grad); }
.value-icon svg { width: 24px; height: 24px; fill: #fff; }

/* Fotos integradas: círculo con el anillo del logo */
.photo-ring { border-radius: 50%; padding: 4.5%; background: var(--ring-grad); box-shadow: 0 30px 60px rgba(14,127,153,.22); }
.photo-ring img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 6px solid #fff; display: block; }
.hero-photo { position: absolute; inset: 0; margin: 0; animation: float 8s ease-in-out infinite; }
.hero-tag {
  position: absolute; left: -4%; bottom: 10%; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; color: var(--ink-strong); font-size: .8rem; font-weight: 700;
  padding: .5rem .9rem; border-radius: 999px; box-shadow: 0 10px 24px rgba(23,37,43,.15);
}
.hero-tag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ring-grad); }

/* Nuestro municipio */
.places-section { background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%); overflow: hidden; }
.places-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: center; }
.places-intro { color: var(--muted); font-size: 1.05rem; }
.place-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.place-list li { display: flex; align-items: center; gap: 1rem; }
.place-list strong { display: block; color: var(--ink-strong); font-size: 1.1rem; line-height: 1.2; }
.place-list li div > span { color: var(--muted); font-size: .95rem; }
.place-thumb { flex: none; width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: var(--ring-grad); }
.place-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff; display: block; }
.place-thumb.is-empty { padding: 13px; }
.place-thumb.is-empty span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }

.places-collage { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / .95; justify-self: center; }
.collage-a { position: absolute; right: 0; top: 0; width: 76%; aspect-ratio: 1; margin: 0; }
.collage-b {
  position: absolute; left: 0; bottom: 0; width: 46%; aspect-ratio: 1; margin: 0;
  border-radius: 50%; overflow: hidden; border: 8px solid #fff; box-shadow: 0 20px 40px rgba(23,37,43,.2);
}
.collage-b img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage-ring { position: absolute; left: 4%; top: 0; width: 28%; aspect-ratio: 1; opacity: .45; }
.collage-dot { position: absolute; right: 6%; bottom: 8%; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); box-shadow: 34px -22px 0 -4px var(--teal); }

/* Programa: 10 fichas */
.axis-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.axis-card {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.3rem 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .6rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.axis-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--yellow), var(--green), var(--teal)); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.axis-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(23,37,43,.12); border-color: transparent; }
.axis-card:hover::before { transform: scaleX(1); }
.axis-num { position: absolute; right: 1rem; top: .7rem; font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--bg-tint); }
.axis-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ring-grad); }
.axis-icon svg { width: 25px; height: 25px; fill: #fff; }
.axis-card h3 { margin: .4rem 0 0; font-size: 1.05rem; font-weight: 800; }
.axis-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.axis-cta { margin: 2rem 0 0; text-align: center; font-weight: 700; color: var(--teal-dark); }
.axis-cta a { color: var(--teal-dark); text-decoration: none; }
.axis-cta a:hover { text-decoration: underline; }

/* Botón flotante "Envía tu propuesta" */
.float-cta {
  /* A la izquierda: el sello "Powered by Netlify" ocupa la esquina inferior derecha */
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 60;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.4rem; border-radius: 999px; text-decoration: none;
  background: var(--teal); color: #fff; font-weight: 700;
  box-shadow: 0 12px 30px rgba(14, 127, 153, .35), 0 0 0 4px rgba(255,255,255,.9);
  opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .15s;
}
.float-cta.show { opacity: 1; transform: none; pointer-events: auto; }
.float-cta:hover { background: var(--teal-dark); }
.float-cta svg { width: 20px; height: 20px; fill: currentColor; }
.float-cta.show svg { animation: nudge 3s ease-in-out 1s infinite; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: rotate(-14deg); } 95% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .float-cta.show svg { animation: none; } }

/* Participa */
.participate { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
.participate-intro { position: sticky; top: calc(var(--header-h) + 24px); }
.participate-intro > p { font-size: 1.05rem; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; }
.steps span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ring-grad); }
.steps p { margin: .35rem 0 0; font-weight: 600; }

.proposal-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); display: grid; gap: 1.1rem; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: .9rem; color: var(--ink-strong); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink-strong); width: 100%;
  padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(24,166,198,.15); }
.field .invalid, .check.invalid { border-color: #D64545 !important; }
.check.invalid span { color: #B32D2D; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1D7A4B; background: #E7F6EE; padding: .8rem 1rem; border-radius: 10px; }
.form-status.err { color: #B32D2D; background: #FCECEC; padding: .8rem 1rem; border-radius: 10px; }
.form-note { margin: 0; font-size: .82rem; color: var(--muted); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact p { font-size: 1.05rem; }
.contact-links { display: grid; gap: .8rem; }
.contact-links a {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #fff; text-decoration: none; font-weight: 600; transition: background .15s;
}
.contact-links a:hover { background: rgba(255,255,255,.12); }
.contact-links svg { width: 22px; height: 22px; fill: var(--yellow); flex: none; }

/* Sede y mapa */
.hq {
  grid-column: 1 / -1; display: grid; grid-template-columns: 320px 1fr; margin-top: 1.5rem;
  border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
}
.hq-info { padding: 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.hq-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ring-grad); }
.hq-icon svg { width: 24px; height: 24px; fill: #fff; }
.hq-info h3 { color: #fff; margin: .3rem 0 0; font-size: 1.3rem; }
.hq-info address { font-style: normal; line-height: 1.6; color: #C9D4D8; margin-bottom: .6rem; }
.hq-map { min-height: 340px; background: #22343B; }
.hq-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* Pie */
.site-footer { background: #0F1A1E; color: #93A3A9; padding: 1.8rem 0; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand strong { color: #fff; margin-right: .4rem; }
.ring-xs { width: 30px; height: 30px; }
.site-footer a { color: #C9D4D8; }
.footer-legal { margin: 0; }
.photo-credits { flex-basis: 100%; margin: .2rem 0 0; font-size: .72rem; color: #6F8086; }
.photo-credits a { color: #93A3A9; }

/* Modal privacidad */
.modal { border: 0; border-radius: 18px; padding: 0; max-width: min(640px, 92vw); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(15, 26, 30, .6); }
.modal-body { padding: 2rem; max-height: 80vh; overflow: auto; }
.modal-body h2 { font-size: 1.5rem; }
.modal-body p { font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) and (min-width: 861px) {
  .header-social { display: none; }
}
@media (max-width: 860px) { .header-actions { margin-left: auto; } }
@media (max-width: 600px) { .header-social { display: none; } }
@media (max-width: 1180px) and (min-width: 961px) { .axis-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .hero-inner, .about, .participate, .contact { grid-template-columns: 1fr; }
  .axis-grid { grid-template-columns: repeat(2, 1fr); }
  .places-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .places-collage { max-width: 440px; }
  .hero-tag { left: 0; bottom: 4%; }
  .hq { grid-template-columns: 1fr; }
  .hq-map, .hq-map iframe { min-height: 300px; }
  .hero-visual { max-width: 260px; order: -1; }
  .participate-intro { position: static; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.06); display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
  .main-nav a::after { display: none; }
}
@media (max-width: 560px) {
  :root { --header-h: 68px; }
  .brand-text small { display: none; }
  .brand img { width: 40px; height: 40px; }
  .lang-switch button { padding: .3rem .45rem; font-size: .75rem; }
  .values, .form-row.two { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
  .axis-grid { grid-template-columns: 1fr; }
  /* En móvil, barra ancha por encima del sello de Netlify */
  .float-cta { left: 1rem; right: 1rem; bottom: 4.6rem; justify-content: center; }
  .site-footer { padding-bottom: 9rem; }
}
