/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --brand: #0b4ea2;
  --brand-dark: #063a7c;
  --ink: #101828;
  --muted: #475467;
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: rgba(16,24,40,0.10);
  --shadow-sm: 0 8px 20px rgba(16,24,40,0.08);
  --shadow-md: 0 18px 45px rgba(16,24,40,0.12);
  --radius: 14px;
}

body{
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

/* =========================
   STICKY FOOTER FIX
========================= */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

img{
  display: block;
  width: 100%;
}

/* =========================
   CONTAINER
========================= */
.container {
  width: 100%;
  max-width: 1400px; /* antes 1160 */
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   HEADER + NAV
========================= */
.header{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  z-index: 1000;
}

.nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a{
  display: inline-flex;
  align-items: center;
}

.logo img{
  height: 40px;
  width: auto;
}

.nav-links{
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a{
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  transition: 0.3s ease;
}

/* Hover + active azul + negrita */
.nav-links a:hover,
.nav-links a.active{
  color: var(--brand);
  font-weight: 700;
}

/* =========================
   MOBILE NAV (HAMBURGER)
========================= */
.menu-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* =========================
   BUTTONS
========================= */
.btn{
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  border: none;
  box-shadow: 0 10px 22px rgba(11,78,162,0.18);
  transition: 0.3s ease;
}

.btn:hover{
  transform: translateY(-2px);
}

.btn-small{
  padding: 10px 18px;
  font-size: 14px;
}

/* =========================
   HOME HERO
========================= */
.hero{
  padding: 110px 0 90px;
}

.hero-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-text{
  flex: 1;
}

.hero-text h1{
  font-size: 54px;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-text p{
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 30px;
}

@media (max-width: 767px) {
  .hero {
    padding-top: 50px;
    padding-bottom: 40px;
  }
}

/* =========================
   CAROUSEL (shared: Home + Project Detail)
========================= */
.carousel{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  height: 480px;
}

.carousel-track{
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-track img{
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16,24,40,0.6);
  color: #fff;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 50%;
}

.carousel-btn.prev{ left: 10px; }
.carousel-btn.next{ right: 10px; }

/* =========================
   SECTIONS + GENERIC LAYOUTS
========================= */
.section{
  padding: 50px 0;
}

.section h2{
  margin-bottom: 40px;
  font-size: 34px;
}

.light-gray-bg{
  background: #ffffff;
}

.two-columns{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.box{
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Espacio texto -> botón en cards */
.box p{
  margin-bottom: 26px;
}

/* CTA centrada */
.section-cta{
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

/* =========================
   PROJECT CARDS (Home + Projects + Services-as-projects)
========================= */

.projects-portfolio{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project-item{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none; /* si es <a> */
}

/* Oscurecido suave base en toda la imagen */
.project-item::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.50);
  z-index: 1;
  transition: 0.35s ease;
}

.project-item img{
  height: 270px;
  object-fit: cover;
}

.project-meta{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  color: #fff;
  z-index: 2;
}

.project-meta h3{
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Hover overlay */
.project-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0, 30, 60, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.4s ease;
  z-index: 3;
}

.project-overlay-content{
  text-align: center;
  color: #fff;
  padding: 20px;
}

.project-overlay-content p{
  margin: 15px 0;
}



.project-item:hover .project-overlay{
  opacity: 1;
}

.project-item:hover .project-meta{
  opacity: 0;
  transform: translateY(8px);
}

.project-item:hover::before{
  opacity: 0;
}

/* helper: 3 columnas en desktop sin afectar al auto-fit */
.grid-3{
  grid-template-columns: repeat(3, 1fr);
}

/* =========================
   FOOTER
========================= */
.footer{
  background: #111;
  color: #fff;
  text-align: center;
  padding: 40px 0;
  margin-top: 60px;
}

/* =========================
   INTERNAL PAGES (uniform spacing)
========================= */
.page-hero{
  padding: 60px 0 30px; /* mismo espacio en todas las pestañas */
}

.page-hero-compact{
  padding: 60px 0 20px;
}

/* Unificación REAL de títulos (Who We Are + resto) */
.page-hero-text h1,
.split-text h1{
  font-size: 48px;
  line-height: 1.08;
  margin-bottom: 14px;
  font-weight: 700;
}

/* Texto intro consistente */
.intro-text{
  color: var(--muted);
  font-size: 18px;
  max-width: 70ch;
}

/* Split layout (Who We Are) */
.split-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.split-reverse{
  grid-template-columns: 0.9fr 1.1fr;
}

/* invertir orden visual */
.split-reverse .split-media{ order: 1; }
.split-reverse .split-text{ order: 2; }

.split-text h2{
  font-size: 34px;
  margin-bottom: 14px; /* mismo espacio que título->texto */
}

.split-text p{
  color: var(--muted);
}

.split-text p + p{
  margin-top: 10px;
}

/* espacio texto -> botón */
.split-cta{
  margin-top: 26px;
}

.split-media img{
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  height: 300px;
  object-fit: cover;
}

/* =========================
   CONTACT PAGE
========================= */
.contact-grid{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: start;
}

.contact-card{
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.contact-line{
  color: var(--muted);
  margin-bottom: 12px;
}

.contact-cta{
  margin-top: 26px; /* espacio texto->botón */
}

.map-card{
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: #fff;

  /* Fix franja blanca inferior */
  line-height: 0;
}

.map-card iframe{
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

/* =========================
   PROJECT DETAIL PAGE
========================= */
.project-detail-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: start;
}

.carousel.project-carousel{
  height: 520px;
}

.project-details-card{
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.project-details-card h2{
  font-size: 28px;
  margin-bottom: 14px;
}

.project-details-card p{
  color: var(--muted);
  margin-bottom: 12px;
}

.project-facts{
  margin-top: 22px;
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.fact{
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.fact-label{
  color: var(--muted);
  font-weight: 600;
}

.fact-value{
  color: var(--ink);
  text-align: right;
}

.project-cta{
  margin-top: 26px;
}

.project-body{
  margin-top: 60px;
}

.project-body h2{
  margin-bottom: 24px;
  font-size: 34px;
}

/* =========================
   MICRO ANIMATIONS
========================= */
.fade-in{
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible{
  opacity: 1;
  transform: translateY(0);
}

/* optional delays */
.delay-1{ transition-delay: 0.1s; }
.delay-2{ transition-delay: 0.2s; }
.delay-3{ transition-delay: 0.3s; }

/* Title animation across pages (Who We Are + others) */
.page-hero-text h1,
.split-text h1{
  animation: fadeUpTitle 0.9s ease both;
}

@keyframes fadeUpTitle{
  from{ opacity: 0; transform: translateY(20px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px){
  .grid-3{
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 900px){

  /* Header a móvil */
  .header{
    padding: 14px 0;
  }

  .logo img{
    height: 34px;
  }

  .menu-toggle{
    display: inline-grid;
    place-items: center;
  }

  .nav{
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links{
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-links.open{
    display: flex;
  }

  .nav-links a{
    padding: 10px 10px;
    border-radius: 10px;
  }

  .nav-links a:hover{
    background: rgba(11,78,162,0.08);
  }

  /* Home hero layout */
  .hero-content{
    flex-direction: column;
  }

  .hero-text h1{
    font-size: 40px;
  }

  .carousel{
    height: 340px;
  }

  /* internal titles */
  .page-hero-text h1,
  .split-text h1{
    font-size: 38px;
  }

  /* Who We Are split stacks */
  .split-grid,
  .split-reverse{
    grid-template-columns: 1fr;
  }

  .split-reverse .split-media,
  .split-reverse .split-text{
    order: initial;
  }

  .split-media img{
    height: 280px;
  }

  /* Contact stacks */
  .contact-grid{
    grid-template-columns: 1fr;
  }

  /* Project detail stacks */
  .project-detail-grid{
    grid-template-columns: 1fr;
  }

  .carousel.project-carousel{
    height: 360px;
  }

  .fact{
    flex-direction: column;
    align-items: flex-start;
  }

  .fact-value{
    text-align: left;
  }
}


/* =========================
   OVERLAY BUTTON HOVER EFFECT
========================= */

.project-overlay-content .btn{
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover visual premium */
.project-item:hover .project-overlay-content .btn{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 30, 60, 0.75);
}

/* Brillo sutil animado */
.project-overlay-content .btn::after{
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.35) 50%,
    rgba(255,255,255,0) 100%
  );
  transition: 0.6s ease;
}

.project-item:hover .project-overlay-content .btn::after{
  left: 100%;
}


/* Reduce espacio entre título y bloque de imagen en project pages */

.page-hero + .section {
  padding-top: 20px;
}


/* =========================
   EXTRA MAP


.map-card iframe {
  border-radius: 12px;
  filter: grayscale(100%) contrast(90%);
}

========================= */



/* =========================
   PROJECTS + MAP
========================= */

:root {
  --clfa-corporate: #215178;
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 32px;
  align-items: start;
}

/* LEFT COLUMN */
.projects-list,
.projects-portfolio.projects-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px;
  align-items: start;
}

/* RIGHT COLUMN */
.projects-map-panel {
  position: sticky;
  top: 120px;
}

#projectsMap {
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 620px;
  border-radius: 20px;
  overflow: hidden;
  background: #f2f2f2;
}

/* PROJECT CARD - EXACTLY LANDSCAPE STYLE */
.project-item {
  position: relative !important;
  display: block !important;
  width: 100%;
  height: 270px;
  overflow: hidden;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: #ddd;
}

.project-item img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-meta {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0));
}

.project-meta h3 {
  margin: 0;
  color: #fff;
}

/* HOVER OVERLAY */
.project-overlay {
  position: absolute !important;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 30, 60, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-overlay-content {
  width: 100%;
  padding: 20px;
  color: #fff;
}

.project-overlay-content h3 {
  margin: 0 0 8px;
}

.project-overlay-content p {
  margin: 0 0 14px;
}

.project-item:hover img,
.project-item:focus-visible img {
  transform: scale(1.04);
}

.project-item:hover .project-overlay,
.project-item:focus-visible .project-overlay {
  opacity: 1;
}

/* ACTIVE CARD */
.project-item.is-active {
  outline: 2px solid #111;
  outline-offset: 4px;
}

.project-overlay .btn.btn-small {
  pointer-events: none;
}

/* MAP MARKERS */
.project-marker-wrap {
  width: 24px;
  height: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.project-marker {
  width: 20px;
  height: 20px;
  position: relative;
  background: var(--clfa-corporate);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  transform-origin: center;
  box-sizing: border-box;
}

/* puntito blanco interior */
.project-marker::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  top: 7px;
  left: 7px;
  background: #fff;
  border-radius: 50%;
}

/* completed */
.project-marker.completed {
  background: var(--clfa-corporate);
  border: none;
}

/* in progress */
.project-marker.in-progress {
  background: #fff;
  border: 2px solid var(--clfa-corporate);
}

.project-marker.in-progress::after {
  content: "🕒";
  width: auto;
  height: auto;
  top: 2px;
  left: 3px;
  background: transparent;
  border-radius: 0;
  font-size: 10px;
  line-height: 1;
  transform: rotate(45deg);
}

/* hover */
.project-marker-wrap.is-hover {
  transform: scale(1.08);
}

.project-marker-wrap.is-hover .project-marker {
  background: #c0392b;
  border-color: #c0392b;
}

/* active */
.project-marker-wrap.is-active {
  transform: scale(1.18);
  position: relative;
}

.project-marker-wrap.is-active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.25);
  z-index: 0;
}

.project-marker-wrap.is-active .project-marker {
  position: relative;
  z-index: 1;
}

.project-marker-wrap.is-active .project-marker {
  background: #c0392b;
  border-color: #c0392b;
}

/* mantener puntito blanco en completed */
.project-marker-wrap.is-hover .project-marker.completed::after,
.project-marker-wrap.is-active .project-marker.completed::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  top: 7px;
  left: 7px;
  background: #fff;
  border-radius: 50%;
}

/* mantener reloj en in-progress */
.project-marker-wrap.is-hover .project-marker.in-progress::after,
.project-marker-wrap.is-active .project-marker.in-progress::after {
  content: "🕒";
  width: auto;
  height: auto;
  top: 2px;
  left: 3px;
  background: transparent;
  border-radius: 0;
  font-size: 10px;
  line-height: 1;
  transform: rotate(45deg);
}

.leaflet-div-icon {
  background: transparent;
  border: none;
}
/* RESPONSIVE */
@media (max-width: 1200px) {
  .projects-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
  }

  .project-item {
    height: 240px;
  }
}

@media (max-width: 980px) {
  .projects-layout {
    grid-template-columns: 1fr;
  }

  .projects-map-panel {
    position: relative;
    top: 0;
    order: -1;
    margin-bottom: 24px;
  }

  #projectsMap {
    height: 420px;
    min-height: auto;
  }

  .project-item {
    height: 260px;
  }
}

@media (max-width: 700px) {
  .projects-list,
  .projects-portfolio.projects-list {
    grid-template-columns: 1fr !important;
  }

  .project-item {
    height: 240px;
  }
}

/* hover = rojo */
.project-marker.is-hover {
  background: #c0392b;
  border-color: #c0392b;
     transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.2);
}


/* activo (click) = corporativo más grande */
.project-marker.is-active {
    background: #c0392b;
  border-color: #c0392b;
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.2);
}



.more-link {
  pointer-events: auto;
  z-index: 10;
}



.more-link {
  position: relative;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.more-link:hover,
.more-link:focus-visible {
  background: #fff;
  color: var(--clfa-corporate);
  border-color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.project-overlay .btn.btn-small {
  pointer-events: auto;
}



.project-overlay .more-link {
  position: relative;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff !important;
  border: 1px solid #fff !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-overlay .more-link:hover,
.project-overlay .more-link:focus-visible {
  background: #fff !important;
  color: rgba(0, 30, 60, 0.75) !important;
  border-color: #fff !important;
  transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 30, 60, 0.75);
}


/* ===== RECENT PROJECTS CAROUSEL (HOME ONLY) ===== */

.projects-carousel-wrap {
  position: relative;
}

.projects-carousel {
  overflow: hidden;
  width: 100%;
}

.projects-portfolio.carousel-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.projects-portfolio.carousel-track .project-item {
  flex: 0 0 calc((100% - 48px) / 3);
  width: calc((100% - 48px) / 3);
  min-width: calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  box-sizing: border-box;
}

.projects-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.80);
  color: #1e3a8a;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.25s ease;
}

.projects-arrow.prev {
  left: -22px;
}

.projects-arrow.next {
  right: -22px;
}

.projects-arrow:hover {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

@media (max-width: 1100px) {
  .projects-portfolio.carousel-track .project-item {
    flex: 0 0 calc((100% - 24px) / 2);
    width: calc((100% - 24px) / 2);
    min-width: calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 767px) {
  .projects-portfolio.carousel-track .project-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .projects-arrow.prev {
    left: 8px;
  }

  .projects-arrow.next {
    right: 8px;
  }
}

/* ===== PROJECT DETAIL: IMAGE AND TEXT SAME HEIGHT ===== */

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: stretch;
}

.project-detail-grid > .project-carousel-wrap,
.project-detail-grid > .project-details-card {
  min-width: 0;
}

.project-carousel-wrap {
  height: 100%;
}

.project-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 24px;
}

.project-detail-grid > .project-details-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

.project-carousel .carousel-track {
  display: flex;
  height: 100%;
}

.project-carousel .carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-carousel {
    min-height: 420px;
  }
}

/* ===== FOOTER LEGAL ===== */

.site-footer {
  padding: 40px 0 20px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-copy {
  font-size: 14px;
}

.footer-legal a {
  font-size: 12px;   /* 👈 más pequeño */
  opacity: 0.6;      /* 👈 más discreto */
  text-decoration: none;
}

.footer-legal a:hover {
  opacity: 1;
}

.footer-legal a {
  color: #ffffff;        /* blanco */
  text-decoration: none; /* quita el subrayado */
  font-weight: 400;      /* normal */
  opacity: 0.7;
  transition: all 0.2s ease;
}

.footer-legal a:hover {
  font-weight: 600;      /* negrita en hover */
  opacity: 1;
}


/* ===== COOKIES ===== */

.cookie-consent[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  justify-content: center;
}

.cookie-consent__box {
  width: 100%;
  max-width: 900px;
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  backdrop-filter: blur(10px);
}

.cookie-consent__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  max-width: 560px;
}

.cookie-consent__text a {
  color: #fff;
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  appearance: none;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.cookie-btn--solid {
  background: #fff;
  color: #111;
}

.cookie-btn--solid:hover {
  opacity: 0.88;
}

.cookie-btn--ghost:hover,
.cookie-btn--text:hover {
  background: #fff;
  color: #111;
}

.cookie-btn--text {
  border-color: rgba(255,255,255,0.55);
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.cookie-modal__panel {
  position: relative;
  width: min(92vw, 680px);
  margin: 8vh auto 0;
  background: #111;
  color: #fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 24px;
  z-index: 1;
}

.cookie-modal__header,
.cookie-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-modal__header {
  margin-bottom: 20px;
}

.cookie-modal__header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.cookie-modal__close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cookie-modal__content {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.cookie-category {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px;
}

.cookie-category__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.cookie-category h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
}

.cookie-category p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.8;
  max-width: 480px;
}

.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch__slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  transition: 0.2s ease;
}

.cookie-switch__slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: #fff;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
  transform: translateX(22px);
  background: #111;
}

.cookie-switch input:disabled + .cookie-switch__slider {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .cookie-consent {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .cookie-consent__box {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent__actions,
  .cookie-modal__footer {
    width: 100%;
  }

  .cookie-consent__actions .cookie-btn,
  .cookie-modal__footer .cookie-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .cookie-category__top {
    align-items: center;
  }
}