/* Concreto Estrategia — editorial cream / green / coral */
:root {
  --cream: #faf7f2;
  --cream-dark: #f0ebe3;
  --green: #1a5c4a;
  --green-dark: #0d3d32;
  --green-light: #2d7a64;
  --coral: #e07a5f;
  --coral-dark: #c8654c;
  --ink: #1c1c1a;
  --ink-muted: #4a4845;
  --ink-light: #6b6864;
  --white: #ffffff;
  --sidebar-width: 280px;
  --radius: 4px;
  --shadow: 0 4px 24px rgba(26, 92, 74, 0.08);
  --focus-ring: 0 0 0 3px rgba(224, 122, 95, 0.45);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--coral); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
  box-shadow: var(--focus-ring);
}

/* Layout editorial con sidebar */
.layout-editorial {
  display: flex;
  min-height: 100vh;
}

.barra-lateral {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--green);
  color: var(--cream);
  overflow-y: auto;
  z-index: 100;
}

.barra-lateral-inner {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.marca {
  display: block;
  text-decoration: none;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.marca-principal {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.marca-secundaria {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.barra-tagline {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.9;
  margin: 0 0 2rem;
  border-left: 3px solid var(--coral);
  padding-left: 0.85rem;
}

.nav-lateral ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-lateral li { margin-bottom: 0.25rem; }

.nav-lateral a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--cream);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.nav-lateral a:hover,
.nav-lateral a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.nav-lateral a.nav-cta {
  background: var(--coral);
  color: var(--white);
  font-weight: 600;
  margin-top: 0.75rem;
}

.nav-lateral a.nav-cta:hover {
  background: var(--coral-dark);
}

.barra-contacto {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.barra-contacto a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.barra-contacto a:hover { color: var(--coral); }

.contenido-editorial {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: var(--green);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero overlay full-width */
.hero-overlay {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  background: var(--green-dark);
  overflow: hidden;
}

.hero-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 61, 50, 0.92) 0%, rgba(26, 92, 74, 0.4) 60%, transparent 100%);
}

.hero-contenido {
  position: relative;
  z-index: 1;
  padding: 4rem 3rem 3.5rem;
  max-width: 820px;
  color: var(--cream);
}

.hero-contenido h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-contenido .hero-lead {
  font-size: 1.2rem;
  line-height: 1.55;
  opacity: 0.95;
  margin: 0 0 1.75rem;
  max-width: 36em;
}

.hero-contenido .hero-meta {
  font-size: 0.875rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

/* Secciones */
.seccion {
  padding: 3.5rem 3rem;
}

.seccion-alterna { background: var(--cream-dark); }

.contenedor {
  max-width: 1100px;
  margin: 0 auto;
}

.seccion-encabezado {
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.seccion-encabezado h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: var(--green);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.seccion-encabezado p {
  color: var(--ink-muted);
  margin: 0;
  font-size: 1.05rem;
}

.etiqueta {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Masonry cards */
.masonry {
  columns: 3;
  column-gap: 1.5rem;
}

.masonry-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 92, 74, 0.08);
}

.masonry-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.masonry-card-body {
  padding: 1.35rem 1.5rem;
}

.masonry-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--green);
  margin: 0 0 0.5rem;
}

.masonry-card p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.55;
}

.masonry-card.destacada {
  border-top: 4px solid var(--coral);
}

/* Prosa editorial */
.prosa {
  max-width: 680px;
}

.prosa h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--green);
  margin: 2rem 0 0.75rem;
}

.prosa h3 {
  font-size: 1.15rem;
  color: var(--green-dark);
  margin: 1.5rem 0 0.5rem;
}

.prosa p { margin: 0 0 1rem; }

.prosa ul, .prosa ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prosa li { margin-bottom: 0.35rem; }

/* Botones */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primario {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.btn-primario:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: var(--white);
}

.btn-secundario {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.btn-secundario:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn-verde {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-verde:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Grid dos columnas */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.tarjeta {
  background: var(--white);
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
  overflow: hidden;
}

.tarjeta img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.tarjeta h3,
.tarjeta p {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.tarjeta h3 {
  padding-top: 1.25rem;
}

.tarjeta p:last-child {
  padding-bottom: 1.75rem;
}

.tarjeta h3 {
  font-family: var(--font-serif);
  color: var(--green);
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.tarjeta p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Página interior hero compacto */
.page-hero {
  background: var(--green);
  color: var(--cream);
  padding: 3rem 3rem 2.5rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.page-hero p {
  margin: 0;
  max-width: 540px;
  opacity: 0.92;
  font-size: 1.05rem;
}

/* Formulario contacto */
.formulario-contacto {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-grupo {
  margin-bottom: 1.25rem;
}

.form-grupo label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
  margin-bottom: 0.35rem;
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(26, 92, 74, 0.25);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}

.form-grupo textarea {
  min-height: 140px;
  resize: vertical;
}

.form-grupo input.campo-invalido,
.form-grupo textarea.campo-invalido {
  border-color: var(--green);
  outline: 2px solid rgba(26, 92, 74, 0.25);
}

.form-grupo input:invalid,
.form-grupo textarea:invalid,
.form-grupo select:invalid {
  box-shadow: none;
}

.alerta {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alerta-exito {
  background: rgba(26, 92, 74, 0.12);
  color: var(--green-dark);
  border-left: 4px solid var(--green);
}

.mapa-contenedor {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}

.mapa-contenedor iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* Legal pages */
.legal-content {
  max-width: 720px;
}

.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--green);
  margin: 2.25rem 0 0.75rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
  color: var(--ink-muted);
}

.legal-content ul {
  padding-left: 1.35rem;
  margin-bottom: 1rem;
}

/* Equipo */
.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.miembro {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.miembro img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.miembro-info {
  padding: 1.35rem;
}

.miembro-info h3 {
  font-family: var(--font-serif);
  color: var(--green);
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.miembro-info .cargo {
  font-size: 0.85rem;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.miembro-info p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
}

/* Recursos lista */
.lista-recursos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-recursos li {
  border-bottom: 1px solid rgba(26, 92, 74, 0.12);
  padding: 1.25rem 0;
}

.lista-recursos a {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.lista-recursos a:hover { text-decoration: underline; }

.lista-recursos p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* 404 */
.pagina-error {
  text-align: center;
  padding: 5rem 2rem;
}

.pagina-error h1 {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--green);
  margin: 0 0 0.5rem;
}

.pagina-error p {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* Footer */
.pie {
  background: var(--green-dark);
  color: var(--cream);
  padding: 3rem;
  margin-top: auto;
}

.pie-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  max-width: 1100px;
}

.pie-logo {
  margin: 0 0 0.75rem;
}

.pie-logo .marca-principal,
.pie-logo .marca-secundaria { color: var(--cream); }

.pie-tagline {
  font-size: 0.9rem;
  opacity: 0.88;
  margin: 0 0 1.25rem;
  max-width: 380px;
}

.pie-contacto {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.pie-contacto a {
  color: var(--cream);
  text-decoration: none;
}

.pie-contacto a:hover { color: var(--coral); }

.pie-copy {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0;
}

.pie-enlaces {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pie-enlaces a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
}

.pie-enlaces a:hover {
  color: var(--coral);
  opacity: 1;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-top: 3px solid var(--coral);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  padding: 1.25rem 1.5rem;
}

.cookie-banner[hidden] { display: none; }

.cookie-inner {
  max-width: 900px;
  margin: 0 auto;
}

.cookie-inner p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cookie-actions button {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid var(--green);
  background: var(--green);
  color: var(--white);
}

.cookie-actions button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

#cookie-reject {
  background: transparent;
  color: var(--green);
}

#cookie-reject:hover {
  background: rgba(26, 92, 74, 0.08);
}

.cookie-panel {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 92, 74, 0.15);
}

.cookie-panel.activo { display: block; }

.cookie-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--ink);
}

/* Responsive */
@media (max-width: 1024px) {
  .masonry { columns: 2; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .barra-lateral {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: min(320px, 88vw);
  }

  .barra-lateral.abierta { transform: translateX(0); }

  .contenido-editorial { margin-left: 0; }

  .menu-toggle { display: flex; }

  .hero-contenido,
  .seccion,
  .page-hero,
  .pie { padding-left: 1.5rem; padding-right: 1.5rem; }

  .masonry { columns: 1; }
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
