*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

/* 🌙 THEME VARIABLES */

:root {
  --bg: #f2f2f2;
  --text: #111;
}

body {
  font-family:'Satoshi-Variable', serif;
  font-variation-settings: "wght" 500;
  background: var(--bg);
  color: var(--text);

  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🌙 Mejora: soporta también html[data-theme] (evita flash) */
html[data-theme="dark"],
body[data-theme="dark"] {
  --bg: #111;
  --text: #f2f2f2;
}


/* ---------------- */
/* 🔥 IMAGE INVERT (SOLO ESTA IMAGEN) */
/* ---------------- */

.invert-on-dark{
  transition: filter 0.3s ease;
}

body[data-theme="dark"] .invert-on-dark{
  filter: invert(1) brightness(1.2) contrast(1.05);
}


/* ---------------- */
/* HEADER */
/* ---------------- */

.project-header{
  padding:40px 60px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.project-contact{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
  width:100%;
}

.project-contact a{
  text-decoration:none;
  color:var(--text);
  margin-left:20px;
  transition: opacity .2s ease;
}

.project-contact a:hover{
  opacity:.7;
}


/* ---------------- */
/* CONTROLS */
/* ---------------- */

.controls{
  display:flex;
  gap:10px;
  align-items:center;
  margin-left:20px;
}


/* 🔘 LANGUAGE SWITCH */

.lang-switch{
  display:flex;
  gap:6px;
}

.lang-switch button{
  border:1px solid var(--text);
  background:transparent;
  color:var(--text);
  font-size:11px;
  padding:4px 6px;
  cursor:pointer;
  opacity:.5;
  transition:all .2s ease;
}

.lang-switch button:hover{
  opacity:1;
}

.lang-switch button.active{
  opacity:1;
  background:var(--text);
  color:var(--bg);
}


/* 🌙 THEME BUTTON */

#theme-toggle{
  border:1px solid var(--text);
  background:transparent;
  color:var(--text);
  font-size:12px;
  padding:4px 8px;
  cursor:pointer;
  transition:all .2s ease;
}

#theme-toggle:hover{
  opacity:.7;
}


/* 🌐 LANGUAGE FADE */

[data-es], [data-en] {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}


/* ---------------- */
/* CONTENEDOR */
/* ---------------- */

.project-container{
  max-width:1100px;
  margin:auto;
  padding:40px 60px;
}


/* ---------------- */
/* INTRO */
/* ---------------- */

.project-intro{
  max-width:600px;
  margin-bottom:80px;
}

.project-intro h1{
  font-size:32px;
  margin-bottom:10px;
}

.project-meta{
  font-size:13px;
  opacity:.6;
  margin-bottom:20px;
  display:flex;
  gap:20px;
}

body[data-theme="dark"] .project-meta{
  opacity:.7;
}

.project-intro p{
  line-height:1.6; /* ✅ Mejora: más aire */
  font-size:15px;
}


/* ---------------- */
/* HERO */
/* ---------------- */

.project-hero{
  margin-bottom:60px;
}

.project-hero img{
  width:100%;
  display:block;
}


/* ---------------- */
/* GRID 2 */
/* ---------------- */

.project-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-bottom:60px;
}

.project-grid-2 img{
  width:100%;
  display:block;
}


/* ---------------- */
/* GRID 3 */
/* ---------------- */

.project-grid-3{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:20px;
  margin-bottom:60px;
}

.project-grid-3 img{
  width:100%;
  display:block;
}


/* ---------------- */
/* FULL IMAGE */
/* ---------------- */

.project-full{
  margin-bottom:60px;
}

.project-full img{
  width:100%;
  display:block;
}


/* ---------------- */
/* CLICKABLE */
/* ---------------- */

.clickable-image{
  transition:transform .3s ease, filter .3s ease;
  cursor: zoom-in; /* 🔥 Mejora UX clara */
}

.clickable-image:hover{
  transform:scale(1.04); /* 🔥 más notorio */
  filter: brightness(0.95);
}


/* ---------------- */
/* LIGHTBOX */
/* ---------------- */

.lightbox{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,.92);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999;
  animation:fadeIn .25s ease;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

.lightbox-image{
  max-width:90%;
  max-height:90%;
  opacity:1;
  transition:opacity .25s ease;
  animation:zoomIn .25s ease;
}

@keyframes zoomIn{
  from{transform:scale(.95);opacity:0}
  to{transform:scale(1);opacity:1}
}

.lightbox-image.fade-out{
  opacity:0;
}


/* CLOSE */

.lightbox-close{
  position:absolute;
  top:30px;
  right:40px;
  font-size:40px;
  color:white;
  cursor:pointer;
}


/* ARROWS */

.lightbox-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:48px;
  color:white;
  cursor:pointer;
  z-index:1001;
  padding:20px;
}

.lightbox-prev{
  left:20px;
}

.lightbox-next{
  right:20px;
}

.lightbox-arrow:hover{
  opacity:.7;
}


/* ---------------- */
/* RESPONSIVE */
/* ---------------- */

@media (max-width:768px){

  .project-header{
    padding:20px;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .project-contact{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .project-contact a{
    margin-left:0;
    margin-right:15px;
  }

  .controls{
    margin-left:0;
  }

  .project-container{
    padding:40px 20px;
  }

  .project-grid-2{
    grid-template-columns:1fr;
  }

  .project-grid-3{
    grid-template-columns:1fr 1fr;
  }

}

/* ---------------- */
/* LOGOTECA GRID */
/* ---------------- */

.logos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.logo-item {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0,0,0,0.06);

  transition: all 0.3s ease;
}

html[data-theme="dark"] .logo-item {
  border: 1px solid rgba(255,255,255,0.08);
}

.logo-item {
  position: relative;
}

.logo-item img {
  position: absolute;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;

  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* BN visible */
.logo-bn {
  opacity: 1;
}

/* color oculto */
.logo-color {
  opacity: 0;
}

/* hover */
.logo-item:hover .logo-bn {
  opacity: 0;
}

.logo-item:hover .logo-color {
  opacity: 1;
}

.logo-item:hover {
  transform: scale(1.04);
}

/* responsive */

@media (max-width: 768px) {
  .logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}