/* =============================================================
   STYLES.CSS — ANPA Santa Uxía · CEIP Plurilingüe O Grupo
   Ribeira, A Coruña
   ============================================================= */

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Palette — derived from CEIP blue + ANPA black/white identity */
  --blue:        #4578aa;   /* institutional blue, close to CEIP logo */
  --blue-dark:   #1d3a5e;   /* deep navy */
  --blue-pale:   #eaf0f7;   /* very light blue background */
  --cream:       #f8f6f1;   /* warm cream */
  --white:       #ffffff;
  --text:        #1a1a1a;   /* near black */
  --text-mid:    #4a4a4a;
  --text-light:  #767676;
  --border:      #d8d4cd;   /* warm hairline */
  --accent:      #b85c28;   /* warm terracotta — for alerts, dates */
  --green-wa:    #25D366;
  --green-wa-dk: #1aab53;

  /* Typography */
  --font: Arial, Helvetica, sans-serif;

  /* Spacing scale */
  --sp-xs:  8px;
  --sp-sm:  16px;
  --sp-md:  28px;
  --sp-lg:  52px;
  --sp-xl:  80px;

  /* Misc */
  --radius:    6px;
  --radius-md: 10px;
  --shadow:    0 2px 10px rgba(0,0,0,.09);
  --shadow-lg: 0 6px 28px rgba(0,0,0,.12);
  --trans:     0.18s ease;
}

/* ─── BASE ───────────────────────────────────────────────────── */
html   { font-size: 16px; scroll-behavior: smooth; }
body   {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul   { list-style: none; }

*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── SKIP LINK ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 9999;
  background: var(--blue-dark); color: #fff;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 700;
  transition: top var(--trans);
}
.skip-link:focus { top: 14px; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container {
  width: 100%; max-width: 1060px;
  margin: 0 auto; padding: 0 24px;
}
.section      { padding: var(--sp-xl) 0; }
.section--alt { background: var(--cream); }
.section--blue { background: var(--blue-dark); color: #fff; }

/* ─── SECTION HEADERS ────────────────────────────────────────── */
.s-label {
  display: block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue); margin-bottom: 10px;
}
.section--blue .s-label { color: rgba(255,255,255,.55); }

.s-title {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 900; color: var(--text);
  line-height: 1.15; margin-bottom: 12px;
}
.section--blue .s-title { color: #fff; }

.s-sub {
  font-size: 1rem; color: var(--text-mid);
  max-width: 580px; line-height: 1.65;
}
.section--blue .s-sub { color: rgba(255,255,255,.75); }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: .9rem; font-weight: 700;
  padding: 11px 22px; border-radius: 24px; border: none;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: none; }

.btn--blue {
  background: var(--blue); color: #fff;
  box-shadow: 0 3px 12px rgba(69,120,170,.28);
}
.btn--blue:hover { background: var(--blue-dark); }

.btn--dark {
  background: var(--text); color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
}
.btn--dark:hover { background: #333; }

.btn--wa {
  background: var(--green-wa); color: #fff;
  box-shadow: 0 3px 12px rgba(37,211,102,.28);
}
.btn--wa:hover { background: var(--green-wa-dk); }

.btn--outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
  box-shadow: none;
}
.btn--outline:hover { background: var(--blue-pale); }

.btn--outline-white {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
}
.btn--outline-white:hover { background: rgba(255,255,255,.1); }

.btn--sm { font-size: .82rem; padding: 8px 16px; }
.btn--lg { font-size: 1rem; padding: 13px 26px; }

/* WhatsApp icon inline */
.wa-icon {
  width: 18px; height: 18px; flex-shrink: 0;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}

.header-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}
.header-logo {
  height: 46px; width: auto;
  object-fit: contain;
  border-radius: 50%;
}
.header-brand-text { line-height: 1.2; }
.header-brand-text strong {
  display: block; font-size: .9rem; font-weight: 900;
  color: var(--text);
}
.header-brand-text span {
  display: block; font-size: .72rem; color: var(--text-light);
}

.site-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.site-nav a {
  font-size: .85rem; font-weight: 600; color: var(--text-mid);
  padding: 6px 10px; border-radius: var(--radius);
  transition: background var(--trans), color var(--trans);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--blue-pale); color: var(--blue); text-decoration: none; }
.site-nav a.active { color: var(--blue); }

.header-wa {
  display: flex; align-items: center; gap: 7px;
  background: var(--green-wa); color: #fff !important;
  font-size: .82rem; font-weight: 700;
  padding: 8px 14px; border-radius: 22px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37,211,102,.28);
  transition: background var(--trans);
  text-decoration: none !important;
}
.header-wa:hover { background: var(--green-wa-dk); }

.menu-btn {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; border-radius: var(--radius);
  color: var(--text); margin-left: auto;
}
.menu-btn:hover { background: var(--cream); }

@media (max-width: 860px) {
  .site-nav {
    display: none; position: fixed;
    inset: 64px 0 0 0;
    background: var(--white);
    flex-direction: column; align-items: stretch;
    padding: 20px 24px; gap: 6px;
    border-top: 1px solid var(--border);
    z-index: 999; overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1rem; padding: 12px 14px; }
  .header-wa-text { display: none; }
  .menu-btn { display: flex; align-items: center; }
  .header-brand-text span { display: none; }
}

/* ─── PORTADA ────────────────────────────────────────────────── */
.portada {
  background: var(--cream);
  padding: var(--sp-xl) 0;
  overflow: hidden;
}
.portada-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}
.portada-content {}
.portada-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
}
.portada-chip {
  font-size: .72rem; font-weight: 700;
  color: var(--text-mid); background: var(--white);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px;
  white-space: nowrap;
}
.portada-chip--accent {
  color: var(--accent); border-color: rgba(184,92,40,.30);
  background: rgba(184,92,40,.06);
}

.portada-title {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 900; color: var(--text);
  line-height: 1.12; margin-bottom: 18px;
  letter-spacing: -.01em;
}
.portada-sub {
  font-size: 1rem; color: var(--text-mid);
  line-height: 1.7; max-width: 480px;
  margin-bottom: 32px;
}
.portada-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
}

.portada-photo {
  position: relative;
}
.portada-photo-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--blue-pale);
}
.portada-photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
}
.portada-photo-badge {
  position: absolute; bottom: -14px; left: -14px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px;
}
.portada-photo-badge strong {
  font-size: 1.4rem; font-weight: 900; color: var(--blue-dark);
  line-height: 1;
}
.portada-photo-badge span {
  font-size: .72rem; color: var(--text-light);
}

@media (max-width: 800px) {
  .portada-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .portada-photo { order: -1; }
  .portada-photo-badge { display: none; }
  .portada-photo-frame { aspect-ratio: 16/9; max-height: 260px; }
}

/* ─── AVISO ──────────────────────────────────────────────────── */
.aviso-strip {
  background: var(--accent);
  padding: 11px 0;
}
.aviso-strip-inner {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.aviso-strip-label {
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.8); white-space: nowrap;
}
.aviso-strip p {
  font-size: .88rem; color: rgba(255,255,255,.95);
  flex: 1; min-width: 200px;
  margin: 0;
}

/* ─── ACTIVIDADES ────────────────────────────────────────────── */
.actividades-nota {
  display: inline-block;
  background: rgba(184,92,40,.08); border-left: 3px solid var(--accent);
  color: var(--accent); font-size: .82rem;
  padding: 8px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 32px;
}

.actividades-list {
  border-top: 2px solid var(--border);
  margin-bottom: 40px;
}
.actividad-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.actividad-row:hover { background: var(--cream); margin: 0 -12px; padding: 20px 12px; }

.actividad-main {}
.actividad-cat {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--blue); margin-bottom: 4px;
}
.actividad-nombre {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  margin-bottom: 4px;
}
.actividad-desc { font-size: .85rem; color: var(--text-light); }

.actividad-info {
  display: flex; flex-direction: column; gap: 3px;
  font-size: .82rem; color: var(--text-mid);
  white-space: nowrap;
}
.actividad-info span { display: flex; align-items: center; gap: 5px; }

.estado {
  font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 4px; white-space: nowrap;
}
.estado--aberta     { background: #e5f5ec; color: #1e7e45; }
.estado--completas  { background: #fce8e8; color: #b32020; }
.estado--proximamente { background: #fef5e0; color: #8a5c0a; }
.estado--confirmar  { background: #f0ede8; color: #6b5e4a; }
.estado--rematada   { background: #f0f0f0; color: #777; }

.actividad-btn { flex-shrink: 0; }

/* Mobile: stacked */
@media (max-width: 680px) {
  .actividad-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .actividad-row:hover { margin: 0; padding: 18px 0; }
  .actividad-info { flex-direction: row; flex-wrap: wrap; gap: 8px; }
}

.actividades-mas {
  text-align: center;
  padding: 16px 0 8px;
}
.actividades-mas p {
  font-size: .92rem; color: var(--text-mid);
  margin-bottom: 14px;
}

/* ─── EVENTO ─────────────────────────────────────────────────── */
.evento-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 52px;
  align-items: start;
}
.evento-poster {
  position: relative;
}
.evento-poster-frame {
  aspect-ratio: 2/3;
  background: var(--blue-pale);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.evento-poster-frame img {
  width: 100%; height: 100%; object-fit: contain;
}
.evento-poster-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 28px;
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: #fff; gap: 12px;
}
.evento-poster-placeholder svg { opacity: .5; }
.evento-poster-placeholder p {
  font-size: .8rem; opacity: .7; line-height: 1.5;
}

.evento-info {}
.evento-titulo {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900; color: var(--text);
  line-height: 1.15; margin-bottom: 22px;
}
.evento-meta {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 22px;
}
.evento-meta-item {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .9rem; color: var(--text-mid);
}
.evento-meta-item strong {
  min-width: 56px; color: var(--text); font-weight: 700;
}
.evento-desc {
  font-size: .9rem; color: var(--text-mid);
  line-height: 1.7; margin-bottom: 24px;
}
.evento-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 700px) {
  .evento-inner { grid-template-columns: 1fr; gap: 28px; }
  .evento-poster-frame { max-width: 200px; margin: 0 auto; }
}

/* ─── SERVIZOS ───────────────────────────────────────────────── */
.servizos-list {
  border-top: 2px solid rgba(255,255,255,.15);
}
.servizo-row {
  display: flex; align-items: center; gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
  flex-wrap: wrap;
}
.servizo-body { flex: 1; min-width: 200px; }
.servizo-titulo {
  font-size: 1rem; font-weight: 800;
  color: #fff; margin-bottom: 4px;
}
.servizo-desc {
  font-size: .88rem; color: rgba(255,255,255,.7);
}

/* ─── REDES SOCIAIS ──────────────────────────────────────────── */
.redes-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  margin-bottom: 36px;
}
.redes-foto {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--blue-pale);
}
.redes-foto img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.redes-foto--grande {
  grid-row: span 2;
  min-height: 340px;
}
.redes-foto--sm { min-height: 160px; }

.redes-cta { text-align: center; }
.redes-cta p { font-size: .95rem; color: var(--text-mid); margin-bottom: 16px; }
.redes-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.btn--instagram { background: #E1306C; color: #fff; }
.btn--instagram:hover { background: #C1145A; }
.btn--facebook { background: #1877F2; color: #fff; }
.btn--facebook:hover { background: #0F5EC2; }
.btn--twitter  { background: #000; color: #fff; }
.btn--twitter:hover { background: #333; }

@media (max-width: 600px) {
  .redes-grid { grid-template-columns: 1fr; }
  .redes-foto--grande { grid-row: span 1; min-height: 240px; }
}

/* ─── SOCIOS ─────────────────────────────────────────────────── */
.socios-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: start;
}
.socios-cota-block {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  text-align: center;
  flex-shrink: 0;
}
.socios-precio {
  font-size: 4.5rem; font-weight: 900; color: #fff;
  line-height: 1; letter-spacing: -.02em;
}
.socios-precio-det {
  font-size: .82rem; color: rgba(255,255,255,.6);
}
.socios-content {}
.socios-content h2 { margin-bottom: 14px; }
.socios-content p {
  font-size: .95rem; color: rgba(255,255,255,.8);
  margin-bottom: 22px; line-height: 1.7; max-width: 440px;
}
.socios-motivos {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 28px;
}
.socios-motivos li {
  font-size: .9rem; color: rgba(255,255,255,.85);
  display: flex; align-items: flex-start; gap: 10px;
}
.socios-motivos li::before {
  content: "→"; color: var(--green-wa);
  font-weight: 700; flex-shrink: 0;
}
.socios-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 700px) {
  .socios-inner { grid-template-columns: 1fr; gap: 28px; }
  .socios-cota-block { flex-direction: row; align-items: baseline; gap: 12px; padding: 20px 24px; }
  .socios-precio { font-size: 3rem; }
}

/* ─── CONTACTO ───────────────────────────────────────────────── */
.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contacto-wa-block {
  margin-bottom: 36px;
}
.contacto-wa-block .btn { margin-top: 16px; font-size: 1rem; padding: 14px 28px; }
.contacto-detalles { display: flex; flex-direction: column; gap: 18px; }
.contacto-item {
  display: flex; gap: 14px; align-items: flex-start;
}
.contacto-item-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--blue-pale); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contacto-item-text strong {
  display: block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-light); margin-bottom: 2px;
}
.contacto-item-text span, .contacto-item-text a {
  font-size: .92rem; color: var(--text); white-space: pre-line;
}
.contacto-item-text a:hover { color: var(--blue); }

.contacto-mapa {
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
}
.contacto-mapa-inner {
  text-align: center; padding: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.contacto-mapa-inner p {
  font-size: .9rem; color: var(--text-mid); line-height: 1.6;
}

@media (max-width: 720px) {
  .contacto-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-dark); color: rgba(255,255,255,.7);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 36px;
}
.footer-logos {
  display: flex; flex-direction: column; gap: 24px;
}
.footer-logo-anpa {
  height: 80px; width: auto; object-fit: contain;
  border-radius: 50%;
  opacity: 1;
}
.footer-logo-ceip {
  height: 36px; width: auto; object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .55;
}
.footer-nav h4 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 8px; }
.footer-nav ul a {
  font-size: .87rem; color: rgba(255,255,255,.65);
  transition: color var(--trans);
}
.footer-nav ul a:hover { color: #fff; text-decoration: none; }

.footer-social h4 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-social-links { display: flex; flex-direction: column; gap: 10px; }
.footer-social-links a {
  font-size: .87rem; color: rgba(255,255,255,.65);
  display: flex; align-items: center; gap: 8px;
  transition: color var(--trans);
}
.footer-social-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.footer-disclaimer {
  font-size: .77rem; color: rgba(255,255,255,.38);
  max-width: 600px; line-height: 1.55;
}
.footer-copy {
  font-size: .77rem; color: rgba(255,255,255,.3);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ─── FLOATING WA ────────────────────────────────────────────── */
.floating-wa {
  position: fixed; bottom: 22px; right: 22px; z-index: 1500;
  display: flex; align-items: center; gap: 9px;
  background: var(--green-wa); color: #fff;
  border-radius: 28px; padding: 11px 18px 11px 13px;
  box-shadow: 0 5px 20px rgba(37,211,102,.38);
  text-decoration: none; font-weight: 700; font-size: .87rem;
  transition: background var(--trans), transform var(--trans);
}
.floating-wa:hover {
  background: var(--green-wa-dk);
  transform: translateY(-2px);
  text-decoration: none; color: #fff;
}
.floating-wa svg { flex-shrink: 0; }

@media (max-width: 560px) {
  .floating-wa { border-radius: 50%; padding: 13px; }
  .floating-wa-label { display: none; }
  .floating-wa { bottom: 16px; right: 16px; }
}

/* ─── UTILITY ────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.text-center { text-align: center; }
