/* ============================================================
   PYOCSA — hoja de estilos compartida
   Paleta: gris antracita + naranja acento, sobre blanco.
   Tipografía: Saira Condensed (titulares) + Saira (texto).
   ============================================================ */

:root {
  --orange: #f2851f;
  --orange-dark: #d9711a;
  --line-accent: #c9cad0;
  --ink: #2b2b2e;
  --ink-soft: #55565c;
  --footer: #3c3c40;
  --card-bg: #eceef2;
  --line: #e3e4e8;
  --white: #ffffff;
  --max-w: 1280px;
  --gutter: clamp(20px, 5vw, 96px);
  --radius: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Saira', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.accent { color: var(--orange); }

/* ---------- Header / navegación ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 28px;
  width: auto;
}

.main-nav {
  display: flex;
}

.main-nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}

.main-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: var(--orange);
  transition: width .25s var(--ease);
}

.main-nav a:hover::after { width: 100%; }

.main-nav li.active a::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

/* ---------- Botones / enlaces circulares ---------- */

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.play-link .circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s var(--ease);
}

.play-link .circle svg { width: 16px; height: 16px; fill: var(--orange); }

.play-link:hover .circle { background: var(--orange); }
.play-link:hover .circle svg { fill: var(--white); }

.play-link span.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Cabecera de sección (línea lateral naranja) ---------- */

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 5vw, 56px);
  align-items: start;
}

.section-intro .text-block {
  border-left: 3px solid var(--line-accent);
  padding-left: clamp(20px, 3vw, 40px);
}

.section-intro h1 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 20px;
}

.section-intro p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 46ch;
}

.section-intro .media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.section-intro .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Bloque de introducción simple (Sobre nosotros) ---------- */

.intro-block {
  border-left: 3px solid var(--line-accent);
  padding-left: clamp(20px, 3vw, 40px);
  max-width: 760px;
  margin-top: clamp(48px, 7vw, 96px);
  margin-bottom: clamp(32px, 4vw, 48px);
}

.intro-block h1 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 20px;
}

.intro-block p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.intro-block p:last-child { margin-bottom: 0; }

/* ---------- Hero (home) ---------- */

.hero {
  padding: clamp(48px, 8vw, 110px) 0 clamp(32px, 5vw, 56px);
}

.hero .text-block {
  border-left: 3px solid var(--line-accent);
  padding-left: clamp(20px, 3vw, 40px);
  max-width: 760px;
}

.hero h1 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 24px;
}

.hero .lead-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: center;
  margin-top: 32px;
}

.hero .lead-row p {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 42ch;
}

.split-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.split-panel {
  position: relative;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  color: var(--white);
}

.split-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
  z-index: 0;
}

.split-panel:hover img { transform: scale(1.05); }

.split-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(14,14,16,.92) 0%, rgba(14,14,16,.65) 38%, rgba(14,14,16,.2) 65%, rgba(14,14,16,0) 85%);
}

.split-panel .panel-copy {
  position: absolute;
  z-index: 2;
  left: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 4vw, 40px);
  right: clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 18px;
}

.split-panel .copy-text { flex: 1; min-width: 0; }

.split-panel h2 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}

.split-panel p {
  font-size: 14px;
  margin: 0;
  color: #ececec;
  max-width: 34ch;
  text-shadow: 0 1px 10px rgba(0,0,0,.6);
}

.split-panel .arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.split-panel .arrow svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }

.split-panel:hover .arrow svg { transform: translate(1px, -1px); }

/* ---------- Slider (Obras civiles / Constructora) ---------- */

.gallery-slider {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}

.gallery-slider .slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease);
  cursor: zoom-in;
}

.gallery-slider .slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(20,20,22,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.slider-arrow:hover {
  background: var(--orange);
  box-shadow: 0 4px 16px rgba(20,20,22,.22);
  transform: translateY(-50%) scale(1.06);
}
.slider-arrow:hover svg { stroke: var(--white); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-arrow svg { width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s var(--ease); }

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.55);
  padding: 0;
  cursor: pointer;
}

.slider-dots button.is-active { background: var(--white); width: 22px; border-radius: 5px; transition: width .25s var(--ease); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,20,22,.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { background: var(--orange); }
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { transform: translateY(-50%) scale(1.06); }

.lightbox .lb-close svg,
.lightbox .lb-prev svg,
.lightbox .lb-next svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-counter {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,.75);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ---------- Numbered list (¿Por qué Pyocsa?) ---------- */

.numbered-list {
  padding: clamp(8px, 2vw, 24px) 0 clamp(48px, 6vw, 80px);
}

.numbered-item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.numbered-item:last-child { border-bottom: 1px solid var(--line); }

.numbered-item h3 {
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 700;
}

.numbered-item h3 .num { color: var(--orange); margin-right: 8px; }

.numbered-item p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 15px;
  max-width: 78ch;
}

/* ---------- Cards (política, contacto) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.card h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 12px;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- Tres bloques (Sobre nosotros) ---------- */

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.trio a {
  position: relative;
  aspect-ratio: 4 / 3.2;
  overflow: hidden;
  display: block;
}

.trio img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.trio a:hover img { transform: scale(1.05); }

.trio a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,20,22,.7) 0%, rgba(20,20,22,.05) 60%);
}

.trio span {
  position: absolute;
  left: 28px;
  bottom: 24px;
  color: var(--white);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
}

/* ---------- Bloque de subsección con ancla ---------- */

.subsection {
  scroll-margin-top: 100px;
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 6vw, 72px);
}

.subsection .text-block {
  border-left: 3px solid var(--line-accent);
  padding-left: clamp(20px, 3vw, 40px);
  max-width: 720px;
  margin-bottom: 32px;
}

.subsection h2 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  margin: 0 0 18px;
}

.subsection p { color: var(--ink-soft); line-height: 1.7; margin: 0 0 12px; font-size: 15.5px; }

/* ---------- Contacto ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(56px, 7vw, 96px);
  align-items: start;
}

.contact-info {
  border-left: 3px solid var(--line-accent);
  padding-left: clamp(20px, 3vw, 40px);
}

.contact-info h2 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  margin: 0 0 24px;
}

.contact-line {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}

.contact-line:last-child { border-bottom: 1px solid var(--line); }

.contact-line svg { width: 20px; height: 20px; fill: none; stroke: var(--orange); stroke-width: 1.8; margin-top: 2px; flex-shrink: 0; }

.contact-line .label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 3px;
}

.contact-line .value {
  font-size: 15.5px;
  font-weight: 500;
}

.map-frame {
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Páginas legales ---------- */

.legal-content {
  max-width: 760px;
  padding-bottom: clamp(56px, 7vw, 96px);
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 14px;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.legal-content ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }

.legal-content strong { color: var(--ink); }

.legal-content a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 2px; }

.legal-content .placeholder {
  background: #fff4e8;
  border: 1px dashed var(--orange);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--orange-dark);
  font-weight: 600;
}

/* ---------- Mapa con consentimiento de cookies ---------- */

.map-frame {
  position: relative;
}

.map-consent {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 24px;
}

.map-consent p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 34ch;
}

.map-consent button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--orange);
  border: none;
  border-radius: var(--radius);
  padding: 12px 22px;
  cursor: pointer;
  transition: background .2s var(--ease);
}

.map-consent button:hover { background: var(--orange-dark); }

/* ---------- Banner de cookies ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--footer);
  color: #e4e5e9;
  padding: 18px var(--gutter);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -6px 24px rgba(0,0,0,.18);
}

.cookie-banner.is-visible { display: flex; }

.cookie-banner p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 640px;
  flex: 1 1 320px;
}

.cookie-banner a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }

.cookie-banner .cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner button {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 11px 18px;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.6);
  background: transparent;
  color: var(--white);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.cookie-banner button.accept {
  background: var(--orange);
  border-color: var(--orange);
}

.cookie-banner button.accept:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.cookie-banner button.reject:hover { border-color: var(--white); }

@media (max-width: 720px) {
  .cookie-banner { justify-content: flex-start; padding: 18px 20px; }
}

/* ---------- Página 404 ---------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px);
}

.error-page .error-illustration {
  width: min(360px, 80vw);
  height: auto;
  margin-bottom: 8px;
}

.error-page .error-code {
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 12px;
  color: var(--ink);
}

.error-page h1 {
  font-family: 'Saira Condensed', 'Saira', sans-serif;
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin: 0 0 14px;
}

.error-page p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 32px;
}

.error-page .btn-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: var(--radius);
  transition: background .2s var(--ease);
}

.error-page .btn-home:hover { background: var(--orange-dark); }

.error-page .btn-home svg { width: 16px; height: 16px; fill: none; stroke: var(--white); stroke-width: 2; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer);
  color: #d9dade;
  padding: 22px 0;
}

.site-footer .container {
  text-align: center;
  font-size: 13px;
  letter-spacing: .2px;
}

.site-footer a { text-decoration: underline; text-underline-offset: 2px; }

.footer-legal {
  margin: 10px 0 0;
  font-size: 12px;
  opacity: .75;
}

.footer-legal a { margin: 0 6px; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
  .section-intro,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-intro .media { order: -1; aspect-ratio: 16 / 10; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }

  .trio { grid-template-columns: 1fr; }

  .trio a { aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .site-header .container { height: 72px; }

  .logo img { height: 22px; }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 32px var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav ul { flex-direction: column; gap: 22px; }
  .main-nav a { font-size: 16px; }

  .nav-toggle { display: flex; }

  .split-panels { grid-template-columns: 1fr; }
  .split-panel { aspect-ratio: 4 / 3.2; }

  .card-grid { grid-template-columns: 1fr; }

  .hero .lead-row { flex-direction: column; align-items: flex-start; gap: 20px; }

  .gallery-slider { aspect-ratio: 4 / 3.6; }

  .slider-arrow { width: 40px; height: 40px; }

  .lightbox .lb-prev, .lightbox .lb-next { width: 40px; height: 40px; }
}

body.nav-open { overflow: hidden; }
