:root {
  --ink: #24282c;
  --muted: #66707a;
  --paper: #f6f4ef;
  --white: #ffffff;
  --line: #ded8cf;
  --red: #b51f2a;
  --red-dark: #8f1620;
  --steel: #3f4a50;
  --safety: #d9a72f;
  --olive: #5d6f49;
  --shadow: 0 18px 45px rgba(26, 29, 31, .14);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 20;
  background: var(--white);
  color: var(--red-dark);
  padding: 10px 12px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(36, 40, 44, .1);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 96px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 94px;
  height: 46px;
  object-fit: contain;
}

.brand-text {
  white-space: nowrap;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

.main-nav a {
  text-decoration: none;
  padding: 10px 8px;
  border-radius: 6px;
  color: var(--steel);
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--red-dark);
  background: rgba(181, 31, 42, .08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 74px));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
}

.hero > .hero-bg {
  display: none;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  animation: heroFade 30s infinite;
  will-change: opacity, transform;
}

.hero-bg-1 {
  animation-delay: 0s;
}

.hero-bg-2 {
  animation-delay: 6s;
}

.hero-bg-3 {
  animation-delay: 12s;
}

.hero-bg-4 {
  animation-delay: 18s;
}

.hero-bg-5 {
  animation-delay: 24s;
}

@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }
  6%,
  20% {
    opacity: 1;
  }
  26%,
  100% {
    opacity: 0;
    transform: scale(1.11);
  }
}

.hero-shade {
  background: linear-gradient(90deg, rgba(20, 22, 24, .82), rgba(20, 22, 24, .48) 52%, rgba(20, 22, 24, .18)), linear-gradient(0deg, rgba(20, 22, 24, .52), rgba(20, 22, 24, 0) 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 120px 0 92px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0c45b;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.hero-lead {
  max-width: 780px;
  font-size: clamp(18px, 2vw, 24px);
  color: rgba(255, 255, 255, .92);
}

.hero-subtitle {
  margin-bottom: 14px;
  max-width: 780px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.16;
  font-weight: 800;
  color: #f2d277;
}

.hero-actions,
.focus-row,
.values-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--red);
  color: var(--white);
}

.btn.primary:hover,
.btn.primary:focus {
  background: var(--red-dark);
}

.btn.light {
  background: var(--white);
  color: var(--ink);
}

.btn.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, .55);
}

.btn.small {
  min-height: 36px;
  padding: 8px 12px;
}

.section {
  padding: 92px 0;
}

.intro-section {
  background: var(--white);
}

.tone-section {
  background: #ebe7df;
}

.split,
.two-col,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 54px;
  align-items: center;
}

.section-head {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-head.compact {
  margin-bottom: 20px;
}

.section-head p,
.split > div > p,
.two-col > div > p,
.contact-layout > div > p {
  color: var(--muted);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fact-card {
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 34px rgba(36, 40, 44, .08);
}

.fact-card img,
.contact-box img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 16px;
  border-radius: 6px;
}

.contact-box img {
  width: 54px;
  height: 54px;
}

.fact-card p,
.mission-grid p,
.note,
.form-note {
  color: var(--muted);
}

.media-band {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--ink);
}

.media-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .7;
}

.media-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(36, 40, 44, .7), rgba(36, 40, 44, .18));
}

.media-band-text {
  position: absolute;
  z-index: 1;
  left: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 38px;
  max-width: min(720px, calc(100% - 32px));
  color: var(--white);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 800;
}

.image-panel {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.image-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-panel.tall img {
  aspect-ratio: 3 / 4;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.mission-grid > div {
  padding: 20px;
  border-left: 4px solid var(--red);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.values-list {
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}

.values-list li,
.focus-row span,
.equipment-grid span {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 700;
}

.process-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: stretch;
}

.process-layout > img,
.project-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.process-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 14px;
  border-left: 4px solid var(--safety);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--white);
  font-weight: 800;
}

.process-list span {
  color: var(--red-dark);
  font-size: 12px;
}

.equipment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.project-split {
  align-items: stretch;
}

.focus-row {
  margin-top: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.gallery-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.location-list {
  margin: 24px 0;
  display: grid;
  gap: 8px;
}

.location-list div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.location-list dt {
  font-weight: 800;
}

.location-list dd {
  margin: 0;
  color: var(--muted);
}

.map-link {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  background: var(--ink);
}

.map-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}

.map-link span {
  display: none;
}

.map-link:hover img,
.map-link:focus img {
  transform: scale(1.025);
}

.map-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-section {
  background: var(--white);
}

.contact-box {
  display: flex;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.contact-box strong,
.contact-box a,
.contact-box span {
  display: block;
}

.contact-box a {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 12px;
}

.contact-form {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.contact-form label {
  display: block;
  margin-bottom: 14px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #c8c1b8;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(181, 31, 42, .18);
  border-color: var(--red);
}

.form-note {
  margin: 12px 0 0;
  font-size: 13px;
}

.site-footer {
  background: #24282c;
  color: rgba(255, 255, 255, .84);
  padding: 54px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-logo {
  width: 132px;
  height: auto;
  margin-bottom: 16px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a,
.footer-links button,
.footer-bottom a {
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
}

.footer-links button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover,
.footer-bottom a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 25;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner p {
  margin: 0;
}

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

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

.modal-panel {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

#modal-body p,
#modal-body li {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2n) {
  transition-delay: .06s;
}

.reveal:nth-child(3n) {
  transition-delay: .12s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-bg {
    animation: none;
  }

  .hero-bg-1 {
    opacity: 1;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    grid-template-columns: 1fr;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    padding: 12px;
  }

  .split,
  .two-col,
  .contact-layout,
  .process-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .reverse .image-panel {
    order: -1;
  }

  .hero-content {
    padding-top: 96px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .section {
    padding: 66px 0;
  }

  .hero {
    min-height: 680px;
  }

  .hero-shade {
    background: rgba(20, 22, 24, .72);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .fact-grid,
  .mission-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .media-band {
    height: 150px;
  }

  .process-layout > img,
  .project-img {
    min-height: 300px;
  }

  .location-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact-box,
  .cookie-banner,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-panel {
    padding: 28px 20px;
  }
}


/* ===== Selector compacto de idioma y modo claro/oscuro ===== */
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(35, 39, 44, .14);
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  height: 28px;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  border-radius: 999px;
  padding: 0 8px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.lang-btn:hover { transform: translateY(-1px); }

.lang-btn.is-active {
  background: var(--red);
  color: #fff;
}

.flag {
  width: 15px;
  height: 10px;
  display: inline-block;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
  overflow: hidden;
  flex: 0 0 auto;
}

.flag-cl {
  background: linear-gradient(to bottom, #fff 0 50%, #d52b1e 50% 100%);
  position: relative;
}

.flag-cl::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 6px;
  height: 5px;
  background: #0039a6;
}

.flag-gb {
  background:
    linear-gradient(45deg, transparent 42%, #fff 42% 48%, #c8102e 48% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 42%, #fff 42% 48%, #c8102e 48% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(to bottom, transparent 36%, #fff 36% 44%, #c8102e 44% 56%, #fff 56% 64%, transparent 64%),
    linear-gradient(to right, transparent 36%, #fff 36% 44%, #c8102e 44% 56%, #fff 56% 64%, transparent 64%),
    #012169;
}

.flag-fr {
  background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66% 100%);
}





.featured-photo-section { background: var(--paper); }























@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; }
  .header-tools {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    order: 4;
    padding: 6px 0 12px;
  }
}

@media (max-width: 640px) {
  .header-tools { gap: 6px; }
  .lang-btn {
    min-width: 38px;
    height: 26px;
    font-size: 10px;
    padding: 0 6px;
  }
  
}


/* Mapa Google integrado */
.google-map {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
  background: var(--paper);
}




/* Mapa Google integrado correctamente */
.google-map {
  width: 100%;
  min-height: 450px;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
  background: var(--paper);
}

.map-block {
  width: 100%;
}

.map-help {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-note {
  display: inline-block;
  margin-top: 14px;
  font-weight: 800;
  color: var(--red);
}







/* Ajuste final: sitio en modo claro solamente */
.header-tools {
  margin-left: auto;
}

.language-switcher {
  margin-left: 0;
}

@media (max-width: 1180px) {
  .header-tools {
    width: 100%;
    justify-content: center;
  }
}


/* Corrección final: idiomas fuera del menú y funcionales en móvil */
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 18px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(35, 39, 44, .14);
  background: rgba(255, 255, 255, .94);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
  pointer-events: auto;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  border-radius: 999px;
  padding: 0 8px;
  position: relative;
  z-index: 1002;
  pointer-events: auto;
  touch-action: manipulation;
}

.lang-btn.is-active {
  background: var(--red);
  color: #fff;
}

@media (max-width: 1180px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .brand {
    grid-column: 1;
  }

  .nav-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .header-tools {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-content: flex-end;
    margin-left: 0;
    padding: 0;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .brand img {
    max-width: 74px;
  }

  .language-switcher {
    padding: 2px;
    gap: 1px;
  }

  .lang-btn {
    min-width: 36px;
    height: 26px;
    font-size: 10px;
    padding: 0 6px;
    gap: 4px;
  }

  .flag {
    width: 13px;
    height: 9px;
  }
}

@media (max-width: 420px) {
  .lang-btn {
    min-width: 32px;
    font-size: 9px;
    padding: 0 5px;
  }

  .brand img {
    max-width: 66px;
  }
}


/* Ajuste sección Presencia Territorial: foto a la derecha e iconos debajo del texto */
.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 52px;
  align-items: center;
}

.intro-copy {
  max-width: 720px;
}

.intro-copy .fact-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.intro-photo-panel {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.intro-photo-panel img {
  display: block;
  width: 100%;
  height: min(560px, 72vh);
  object-fit: cover;
  object-position: center;
}

@media (max-width: 980px) {
  .intro-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .intro-photo-panel {
    order: 2;
  }

  .intro-copy {
    order: 1;
  }

  .intro-copy .fact-grid {
    grid-template-columns: 1fr;
  }

  .intro-photo-panel img {
    height: auto;
  }
}
