@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 0.5s;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: Morning memories;
  src: url(Fonts/Webfont/MorningMemories.woff);
}

@font-face {
  font-family: morning memories script;
  src: url(Fonts/Webfont/MorningMemories.woff2);
}

body.noscroll {
  overflow: hidden;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: -webkit-linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  z-index: 9999;
  transition: opacity 0.5s ease;
}

body.dark-mode #preloader {
  background: -webkit-linear-gradient(#262633, #2E2E3B, #262633);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(90deg, #262633, #2E2E3B, #262633);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

/* Cuando se oculta */
#preloader.oculto {
  opacity: 0;
  pointer-events: none;
}


/* Animación de secciones */
.seccion {
  opacity: 0;
  transform: rotateY(90deg);
  transition: transform 0.6s ease, opacity 0.6s ease;
  will-change: transform, opacity;
}

.seccion.visible {
  opacity: 1;
  transform: rotateY(0deg);
}


/* Tema claro y oscuro */
body {
  color: #1a1a1a;
  background: -webkit-linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 2rem;
  margin-bottom: 1rem;
}

body.dark-mode {
  color: #F2F2F2;
  background: -webkit-linear-gradient(90deg, #262633, #2E2E3B, #262633);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(90deg, #262633, #2E2E3B, #262633);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

a {
  text-decoration: none;
  color: inherit;
  /* para que no se pongan azules */
  margin: 0;
  padding: 0;
}

button {
  text-decoration: none;
  border-radius: 40px;
}

body.dark-mode button {
  color: #F2F2F2;
}

h1 {
  font-size: 28px;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
}

h2 {
  font-size: 14px;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
}

h3 {
  font-size: 1.5rem;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 500;
  margin: 0;
  padding: 0;
  text-align: center;
  margin: 0;

}

p {
  color: #4e4e4e;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

body.dark-mode p {
  color: #cacaca;
}



body.dark-mode .green-text {
  display: none;
}
body.dark-mode .green-text-dark {
  display: inline;
}

.green-text-dark {
  display: none;
}

body.dark-mode .green-text-dark {
  display: inline;
}



/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  z-index: 1000;
  transition: transform 0.2s ease;
}

#logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

#name {
  margin: 0;
  font-family: Morning memories;
  font-size: 34px;
}

#sub-logo {
  margin: 0;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
  font-size: 21px;
}

#nav-tittles {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 18px;
}

#nav-tittles li a {
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
  display: inline-block;
  transition: 0.2s ease-in;
}

#nav-tittles li a:hover {
  font-weight: 500;
  transform: translateY(-3px);
  transition: 0.2s ease-in;
}

.hamburger-icon {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* BREAKPOINT: Tablet hacia abajo (≤991px) */
@media screen and (max-width: 991px) {
  #nav-tittles {
    display: none;
    /* Ocultamos el menú por defecto */
    flex-direction: column;
    position: fixed;
    top: 60px;
    /* Ajustamos para que no quede pegado a la parte superior */
    right: 0;
    background: -webkit-linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(90deg, #e5e8ed, #f0f0f2, #e5e8ed);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    box-shadow: 0px 2px 8px #CACACA;
    border: 1px solid white;
    width: 160px;
    text-align: left;
    margin-left: auto;
    margin: 40px 20px 40px auto;
    padding: 20px;
    border-radius: 20px;
  }

  body.dark-mode #nav-tittles {
    background: -webkit-linear-gradient(#262633, #2E2E3B, #262633);
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(#262633, #2E2E3B, #262633);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    box-shadow: 0px 2px 8px #000;
    border: 1px solid white;
  }

  #nav-tittles.active {
    display: flex;
  }

  /* Hacemos visible el botón de hamburguesa en pantallas pequeñas */
  .hamburger-icon {
    display: block;
  }
}

@media screen and (max-width: 512px) {
  #navbar {
    padding: 20px 20px;
  }
}


/* Sobre mi */
#about-me {
  display: flex;
  flex-direction: column;
  margin-inline: 120px;
  margin-top: 120px;
  gap: 0.5rem;
}

#message {
  display: flex;
  flex-direction: column;
  color: #007B81;
  font-weight: 500;
  font-size: 2rem;
}

body.dark-mode #message {
  color: #00AEB8;
}

#social {
  display: none;
}

#inicio {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  object-fit: cover;
}

#botones {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  object-fit: contain;
  align-items: center;
  margin: 0;
  padding: 0;
}

#darkModeToggle {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  border: 1px solid white;
  border-radius: 40px;
  align-items: center;
  margin: 0;
  padding: 4px 12px;
  background-color: #EEEFF3;
  box-shadow: 0px 2px 8px #CACACA;
  cursor: pointer;
}

body.dark-mode #darkModeToggle {
  background-color: #2C303F;
  box-shadow: 0px 2px 8px #000;
}

#iconoTema {
  height: 2.5rem;
  width: 2.5rem;
  object-fit: cover;
  border-radius: 50%;
}

#iconoTema img {
  width: 75%;
  height: 75%;
}

#languages {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
}

#banderas {
  margin: 0;
  width: 2.5rem;
  height: 2.5rem;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#ESP,
#ENG {
  display: flex;
  flex-direction: row;
  font-size: 14px;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
  margin: 0;
  padding: 4px 16px;
  align-items: center;
  gap: 12px;
  outline: none;
  box-shadow: none;
  border: 1px solid white;
  border-radius: 40px;
  background-color: #EEEFF3;
  transition: 0.2s ease-in;
}

body.dark-mode #ESP,
body.dark-mode #ENG {
  border-color: #CACACA;
  background-color: #2C303F;
}

#ESP.active,
#ENG.active {
  font-weight: 500;
  border: 1px solid white;
  box-shadow: 0px 2px 8px #CACACA;
}

#ESP.active:hover {
  background-color: #EEEFF3;
}

#ENG.active:hover {
  background-color: #EEEFF3;
}

#ESP.active h2,
#ENG.active h2 {
  font-weight: 500;
}

body.dark-mode #ESP.active {
  background-color: #2C303F;
  box-shadow: 0px 2px 8px #000;
  border-color: #fff;
}

body.dark-mode #ENG.active {
  background-color: #2C303F;
  box-shadow: 0px 2px 8px #000;
  border-color: #fff;
}

body.dark-mode #ESP.active:hover {
  background-color: #2C303F;
}

body.dark-mode #ENG.active:hover {
  background-color: #2C303F;
}

#ENG:hover {
  font-weight: 500;
  background: #E4E5E9;
  box-shadow: 0px 2px 8px #CACACA;
  transition: 0.2s ease-in;
  cursor: pointer;
}

#ESP:hover {
  font-weight: 500;
  background: #E4E5E9;
  box-shadow: 0px 2px 8px #CACACA;
  transition: 0.2s ease-in;
  cursor: pointer;
}

body.dark-mode #ENG:hover {
  background: #3D404D;
  ;
  box-shadow: 0px 2px 8px #000;
}

body.dark-mode #ESP:hover {
  background: #3D404D;
  box-shadow: 0px 2px 8px #000;
}

.hero-section {
  display: flex;
  flex-direction: row;
  gap: 4rem;
}

.desc {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.desc h3 {
  text-align: start;
}

#quote p {
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0;
  padding: 0;
  color: #007B81;
}

body.dark-mode #quote p {
  color: #00AEB8;
}

#yo {
  display: none;
}

.float-img {
  position: relative;
  float: left;
  width: 350px;
  height: 350px;
  shape-outside: circle(50%);
  border-radius: 50%;
  margin-right: 1rem;
}

.float-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 4px 4px 7px #0002;
  display: block;
}

/* Borde animado con pseudoelemento */
.float-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  translate: -2px -1px;
  width: 353px;
  height: 353px;
  border-radius: 50%;
  background: conic-gradient(#007B81, #ffffff, #ffffff, #ffffff, #ffffff, #ffffff);
  animation: girar 6s linear infinite;
  z-index: -1;
}

body.dark-mode .float-img::before {
  background: conic-gradient(#00AEB8, #ffffff, #ffffff, #ffffff, #ffffff, #ffffff);
}

@keyframes girar {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.icono {
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.icono img {
  width: 2.5rem;
  border-radius: 50%;
  transition: 0.2s ease-in;
}

.icono {
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.icono img {
  width: 2.5rem;
  border-radius: 50%;
  transition: 0.2s ease-in;
}

.icono img:hover {
  transform: translate(0.3rem, -0.3rem);
  transition: 0.2s ease-in;
}




/* BREAKPOINT: Desktop pequeño 1250px*/
@media screen and (max-width: 1250px) {
  #about-me {
    margin-inline: 100px;
  }

  .hero-section {
    gap: 1.5rem;
  }

  #salto {
    display: none;
  }

  .float-img {
    width: 280px;
    height: 280px;
  }

  /* Borde animado con pseudoelemento */
  .float-img::before {
    width: 283px;
    height: 283px;
    translate: -1.5px -1.2px;
  }
}


/* BREAKPOINT: Tablet 991px*/
@media screen and (max-width: 991px) {
  #about-me {
    margin-top: 100px;
    margin-inline: 40px;
    gap: 1rem;
  }

  #message {
    font-size: 28px;
  }

  #languages {
    gap: 14px;
    padding: 6px 10px;
  }

  .hero-section {
    flex-direction: column;
    align-items: center;
  }

  .float-img {
    width: 380px;
    height: 380px;
  }

  .float-img::before {
    width: 382px;
    height: 382px;
    translate: -1px -1px;
  }

  #name {
    margin: 0;
    font-family: Morning memories;
    font-size: 34px;
  }

  #sub-logo {
    margin: 0;
    font-family: "Rubik", Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 21px;
  }
}



/* BREAKPOINT: Mobile L */
@media screen and (max-width: 767px) {
  #about-me {
    margin-top: 100px;
    margin-inline: 40px;
  }

  #inicio {
    align-items: start;
  }

  #name {
    font-size: 30px;
  }

  #sub-logo {
    font-size: 18px;
  }

  .hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  #inicio {
    display: flex;
    flex-direction: column;
  }

  #imagen {
    display: none;
  }

  #languages {
    margin: 0;
    padding: 0;
  }

  .float-img {
    display: none;
  }

  #yo {
    display: block;
    position: relative;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
  }

  #yo img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 4px 4px 7px #0002;
  }


  /*#yo{
  align-items: center;
  display:flex;
  position: relative;
  width: 70%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  }
 #yo img{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 4px 4px 7px #0002;
  }
#yo::before {
  content: '';
  display:contents;
  position: absolute;
  aspect-ratio: 1 / 1;
  top: 0;
  left: 0;
  translate: -2.5px -2px;
  width: 101%;
  border-radius: 50%;
  background: conic-gradient(#007B81, #ffffff, #ffffff, #ffffff, #ffffff, #ffffff);
  animation: girar 5s linear infinite;
  z-index: -1;
}
body.dark-mode #yo::before {
  background: conic-gradient(#00AEB8, #ffffff, #ffffff, #ffffff, #ffffff, #ffffff);
}*/




  #social {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: auto;
    align-items: center;
    justify-content: center;
  }

  .social-icon img {
    width: 2.5rem;
  }

  #name {
    font-size: 30px;
  }

  #languages {
    gap: 14px;
    padding: 6px 10px;
  }

  #hero-section {
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
  }

  h3 {
    font-size: 24px;
  }

  p {
    font-size: 18px;
  }

  #languages {
    gap: 14px;
    padding: 6px 10px;
  }

  h3 {
    font-size: 24px;
  }

  p {
    font-size: 18px;
  }

  #quote {
    font-size: 16px;
  }

  h4 {
    font-size: 16px;
  }
}


/* BREAKPOINT: Movil */
@media screen and (max-width: 600px) {

  #about-me {
    margin-top: 100px;
    margin-inline: 20px;
  }

  #inicio {
    flex-direction: column;
    align-items: start;
  }

  #message {
    font-size: 24px;
  }

  #languages {
    gap: 14px;
    padding: 0;
  }

  #hero-section {
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
  }

  #desc {
    padding: 1rem;
  }

  h3 {
    font-size: 24px;
  }

  p {
    font-size: 18px;
  }

  #quote {
    font-size: 18px;
  }

  .hero-section {
    align-items: center;
  }

  #yo {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
  }

  /*#yo{
  align-items: center;
  display:flex;
  position: relative;
  width: 70%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  }
  #yo img{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 4px 4px 7px #0002;
  }
  #yo::before {
  content: '';
  display:contents;
  position: absolute;
  aspect-ratio: 1 / 1;
  top: 0;
  left: 0;
  translate: -1px -1.5px;
  width: 101%;
  border-radius: 50%;
  background: conic-gradient(#007B81, #ffffff, #ffffff, #ffffff, #ffffff, #ffffff);
  animation: girar 5s linear infinite;
  z-index: -1;
}*/
}

/* BREAKPOINT: Movil pequeño */
@media screen and (max-width: 380px) {
  #banderas {
    display: none;
  }
}







/*Proyectos*/
/* ===== SECCIÓN PROYECTOS ===== */
#projects {
  display: flex;
  flex-direction: column;
  margin-inline: 120px;
  gap: 1rem;
}

/* ===== BOTONES ===== */
.buttons {
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.buttons button {
  padding: 0.7em 1.5em;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-size: 1.1em;
  font-weight: 100;
  border: 1px solid white;
  background: #EEEFF3;
  border-radius: 40px;
  cursor: pointer;
  transition: 0.2s;
}

.buttons button:hover,
.buttons .btn-clicked {
  font-weight: 500;
  box-shadow: 0px 2px 8px #CACACA;
}

body.dark-mode .buttons button {
  border: 1px solid #F2F2F2;
  background: #2C303F;
}

body.dark-mode .buttons button:hover,
body.dark-mode .buttons .btn-clicked {
  background: #2C303F;
  box-shadow: 0px 2px 8px #000;
  border: 1px solid #FFF;
}

/* ===== GRID DE PROYECTOS ===== */
.images {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
}

/* Cada bloque de proyecto */
.bloque {
  display: block;
  /* visible por defecto */
}

.bloque.hidden {
  display: none;
  /* se oculta cuando no pertenece a la categoría */
}

/* Miniaturas */
.images img {
  width: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ===== ÍCONO SUPERIOR EN IMAGEN ===== */
.icon-container {
  position: relative;
}

.size-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: 2px;
}

.size-icon:hover {
  background: rgba(0, 0, 0, 0.5);
  transition: ease-in 0.2s;
}

/* ===== ENLACES DE CATEGORÍAS (Ver más, Prototipo) ===== */
.categorias {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.categorias li {
  margin: 0;
  padding: 0;
}

.categorias .single-tool {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  transition: transform 0.2s ease;
}

.categorias .single-tool:hover {
  transform: translateY(-1px);
  /* sutil, igual que antes */
}

.categorias .single-tool img {
  width: 18px;
  height: 18px;
}

.categorias .single-tool h4 {
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0;
}

.tools {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tools .single-tool {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #EEEFF3;
  border-radius: 20px;
}

body.dark-mode .tools .single-tool {
  background: #2C303F;
}

.tools .single-tool img {
  width: 20px;
  height: 20px;
}

.tools .single-tool p {
  font-size: 1rem;
  margin: 0;
}




/* Menu de proyectos */
@media screen and (max-width: 1439px) {
  .images {
    max-width: 100%;
  }
}

.images img {
  margin-right: 0;
  margin-left: 0;
  width: 100%;
}

@media screen and (max-width: 600px) {
  .buttons button {
    width: 100%;
    display: block;
  }

  .images img {
    width: 100%;
  }
}

/* Bloques de proyectos */
.bloque {
  display: flex;
  flex-direction: column;
  border: 1px solid #FFFF;
  border-radius: 0.5rem;
  background-color: #EEEFF3;
  box-shadow: 0px 2px 8px #CACACA;
  align-items: start;
}

body.dark-mode .bloque {
  background-color: #2C303F;
  box-shadow: 0px 2px 8px #000;
}

.bloque:hover {
  cursor: pointer;
  animation: scale 0.2s ease forwards;
}

.bloque:not(:hover) {
  animation: reduce 0.2s ease forwards;
}

@keyframes scale {
  to {
    transform: scale(103%);
  }
}

@keyframes reduce {
  from {
    transform: scale(103%);
  }

  to {
    transform: scale(100%);
  }
}

.bloque-texto {
  display: flex;
  flex-direction: column;
  margin: 8px 16px;
  gap: 0.3rem;
}

.bloque-texto h3 {
  text-align: start;
}

.texto-bloque {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.5rem;
}

.categorias {
  display: flex;
  flex-direction: row;
  margin: 0;
  padding: 0;
  list-style: none;
}

.categorias li p,
.categorias li a h4 {
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  transition: 0.2s ease-in;
}

.tools {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin: 0;
}

.single-tool {
  display: flex;
  flex-direction: row;
  gap: 2px;
  align-items: center;
}

.single-tool img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.icon-image {
  width: 20px;
  height: 20px;
  border-radius: 0 !important;
}

.icon-2 {
  display: none;
}

body.dark-mode .icon-2 {
  display: block;
}

body.dark-mode .icon-1 {
  display: none;
}

.single-tool p {
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
  font-size: 1rem;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h4 {
  margin: 0;
  padding: 0;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: #007B81;
}


body.dark-mode h4 {
  color: #00AEB8;
}


.single-tool:hover h4 {
  transition: 0.2s ease-in;
  cursor: pointer;
  text-decoration: underline;
}

body.dark-mode .single-tool:hover h4 {
  color: #00AEB8;
}

/* Botón cerrar para el lightboxModal */
#lightboxModal .close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  /* más alto que flechas y thumbnails */
  transition: color 0.2s ease-in;
}





/* BREAKPOINT: Desktop pequeño */
@media screen and (max-width: 1250px) {
  #projects {
    margin-inline: 100px;
  }

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





/* BREAKPOINT: Tablet */
@media screen and (max-width: 991px) {
  #projects {
    margin-inline: 40px;
    gap: 1rem;
  }

  .buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }

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

  /* Lightbox */
  .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 40px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .lightbox.hidden {
    display: none;
  }

  .lightbox-img {
    width: 90%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  .close {
    position: fixed;
    top: 1%;
    right: 2%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
  }
}


/* BREAKPOINT: Móvil L */
@media screen and (max-width: 767px) {
  #projects {
    margin-inline: 40px;
    gap: 1rem;
  }

  .buttons {
    gap: 8px;
  }

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

  .images img {
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  /* Lightbox */
  .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 40px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .lightbox.hidden {
    display: none;
  }

  .lightbox-img {
    width: 90%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  h3 {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h4 {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .close {
    position: fixed;
    top: 1%;
    right: 2%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
  }
}




/* BREAKPOINT: Móvil */
@media screen and (max-width: 600px) {
  h3 {
    max-width: 180%;
  }

  h4 {
    max-width: 100%;
  }

  #projects {
    margin-inline: 20px;
    gap: 1rem;
  }

  .images {
    grid-template-columns: repeat(1, 1fr);
    gap: 1em;
  }

  .images img {
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  /* Lightbox */
  .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 40px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .lightbox.hidden {
    display: none;
  }

  .lightbox-img {
    width: 90%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  .close {
    position: fixed;
    top: 1%;
    right: 2%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
  }
}

/* BREAKPOINT: Móvil pequeño */
@media screen and (max-width: 380px) {
  .categorias {
    flex-direction: column;
  }
}









/* Modal general */
/* Contenedor del lightbox (modal) */
.modal {
  display: none;
  /* oculto por defecto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: 40px;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  /* para prueba */
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
}


/* Contenido del modal */
.modal-content {
  position: relative;
  padding: 0;
  text-align: center;
  align-items: center;
}

/* Imagen principal mostrada */
#mainImage {
  width: 80%;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
  margin: auto;
}


.thumbnail-nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Miniaturas */
.thumbnails {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 0;
}

/* Flechas de navegación */
.prev,
.next {
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  transition: ease-in 0.2s;
  margin: 0.5rem;
}

.prev:hover,
.next:hover {
  color: green;
  transition: ease-in 0.2s;
}




/* Contenedor de miniaturas */
.thumbnails {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 90%;
}

/* Miniaturas individuales */
.thumbnails img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: ease-in 0.2s;
  border-radius: 4px;
}

.thumbnails img.active {
  opacity: 1;
  border: 2px solid white;
}

@media screen and (max-width: 767px) {
  #mainImage {
    width: 80%;
    max-height: 50vh;
  }
}





/* Contacto*/
#contact {
  margin-inline: 20rem;
  gap: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
}

#formulario-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

#formularios {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.5rem;
}

#nombre ::placeholder {
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
}


#formulario-contact input,
#formulario-contact textarea {
  width: 100%;
  border: 1px solid white;
  background-color: #EEEFF3;
  box-shadow: 0px 2px 8px #CACACA;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
  border-radius: 12px;
  resize: vertical;
  color: #1a1a1a
}

body.dark-mode #formulario-contact input,
body.dark-mode #formulario-contact textarea {
  background-color: #2C303F;
  box-shadow: 0px 2px 8px #000;
  color: #FFFFFf;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  border: 1px solid #000;
  background-color: #EEEFF3;
  border-radius: 4px;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-size: 1rem;
}

form textarea {
  height: 140px;
  resize: vertical;
  /* Puedes quitar esto si no quieres que se redimensione */
}

#formulario-contact button {
  width: 50%;
  border: 1px solid white;
  background-color: #007B81;
  color: #F2F2F2;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 8px #CACACA;
  display: flex;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 500;
}

body.dark-mode #formulario-contact button {
  box-shadow: 0px 2px 8px #000;
}

#formulario-contact button:hover {
  background-color: #005f65;
}

input::placeholder {
  color: #4e4e4e;
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-weight: 100;
}

body.dark-mode input::placeholder {
  color: white;
}


/* BREAKPOINT: Desktop pequeño*/
@media screen and (max-width: 1250px) {
  #contact {
    margin-inline: 12rem;
  }
}

/* BREAKPOINT: Tablet*/
@media screen and (max-width: 991px) {

  #contact {
    gap: 16px;
    margin-inline: 40px;
  }

  #formulario-contact {
    gap: 0.5rem;
  }

  form textarea {
    height: 140px;
  }

  #formulario-contact button {
    width: 100%;
  }
}


/* BREAKPOINT: Movil L*/
@media screen and (max-width: 767px) {

  #contact {
    margin-inline: 40px;
    gap: 16px;
  }

  #formulario-contact {
    gap: 0.5rem;
  }

  form textarea {
    height: 140px;
  }

  #formulario-contact button {
    width: 100%;
  }
}

/* Movil */
@media screen and (max-width: 600px) {


  #contact {
    margin-inline: 20px;
    gap: 16px;
  }

  #formulario-contact {
    gap: 0.5rem;
  }

  form textarea {
    height: 140px;
  }

  #formulario-contact button {
    width: 100%;
  }
}