
/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;

  scroll-behavior: smooth;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/* --------------------------------------------------------------------------------------------------------------------
   Reset básico
-------------------------------------------------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  color: var(--color-green);
  background-color: var(--color-fondooscuro);
  line-height: 1.6;
  transition: opacity 0.5s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* --------------------------------------------------------------------------------------------------------------------
   Variables globales
-------------------------------------------------------------------------------------------------------------------- */
:root {
  --color-fondooscuro: #2e2233;
  --color-fondooscuro2: #ff5e5e;
  --color-rojooscuro: #7B2012;
  --color-rojo: #F05445;
  --color-darkgreen: #0A3F2A;
  --color-green: #79F0B0;
  --color-lightgreen: #D0E6D5;


  --fuente-bellota: "Bellota Text", sans-serif;
  --fuente-titulos: "Amatic SC";
  /*--fuente-surfer: "Original Surfer", sans-serif;*/

  --font-title-large: clamp(3rem, 7vw, 6rem);
  --font-title-medium: clamp(1.3rem, 4vw, 2.5rem);
  --font-body: clamp(1rem, 2.5vw, 1.70rem);
  --font-body-peq: clamp(0.9rem, 2vw, 1.2rem);
}

/* --------------------------------------------------------------------------------------------------------------------
   Layout común: Header, Footer
-------------------------------------------------------------------------------------------------------------------- */
header {
  display: flex;
  justify-content: center;
  padding: 0 2rem;
  background-color: var(--color-rojooscuro);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header nav {
  width: 100%;
  align-items: center;
  display: flex;
  justify-content: center;
  color: var(--color-lightgreen);
  font-family: var(--fuente-titulos);
  font-size: var(--font-body);
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  z-index: 9999;
}

nav .nav-links li {
  font-weight: 600;
  padding: 10px;
  transition:
    color 0.3s,
    background-color 0.3s,
    transform 0.3s ease;
  cursor: pointer!important;
}

nav .nav-links li:hover {
  color: var(--color-rojo);
  background-color: var(--color-darkgreen);
  transform: translateY(5px);
}

footer {
  background-color: var(--color-green);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  margin-top: 4rem;
}


h1 {
  font-size: var(--font-title-large);
  font-family: var(--fuente-titulos);
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1rem;
}

h2 {
  font-size:  var(--font-title-large);
  font-family: var(--fuente-titulos);
}

h3 {
  font-family: var(--fuente-titulos);
  font-size: var(--font-title-medium);
}

p {
  font-family: var(--fuente-bellota);
  font-weight: 300;
  font-size: var(--font-body-peq);
}

#menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  position: static;
  flex-direction: row;
  background: none;
  box-shadow: none;
  width: auto;
  padding: 0;
}

.colorao {
  color: var(--color-rojo)!important;
}

/* --------------------------------------------------------------------------------------------------------------------
   Botones
-------------------------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background-color: var(--color-rojooscuro);
  color: var(--color-lightgreen);
  padding: 0.8rem 1.8rem;
  font-weight: bold;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
  margin-top: 1rem;
  border: none;
}

.btn:hover {
  background-color: var(--color-fondooscuro2);
  transform: translateY(5px) rotate(-5deg);
}

/* --------------------------------------------------------------------------------------------------------------------
                                                                            estructuras
-------------------------------------------------------------------------------------------------------------------- */

article {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: min(100%, 1200px);
  margin: 100px auto;
}

article img {
  width: min(100%, 500px);
}

.intro-proyecto{

}

.img {
  flex-direction: row;
}
.img div {
  width: max(45%, 350px);
  z-index: 100;
  padding: 2em;
  background-color: rgba(0, 0, 0, 0.5);
}
.img img {
  width: min(100%, 370px);
  z-index: 1;
}

.derecha {
  transform: translateY(30px) translateX(-10em);
}
.izquierda {
  transform: translateY(30px) translateX(10em);
  align-self: flex-start;
}

.imagenes-grid {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.imagenes-grid img {
  width: min(100%, 500px);
  aspect-ratio: 1/1;
}

.intro-proyecto {
    background-color: rgba(0, 0, 0, 0.5);
    width: min(100%, 1200px);
    padding: 2em;
}

.doble-columna {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  align-content: center;
}
.doble-columna button, .doble-columna .panel {
  font-size: var(--font-body);
}

.doble-columna article{
  width: min(100%, 250px);
  margin: 30px;
}

.parallax-section {
  height: 100dvh;
  background-size: cover;
  background-attachment: scroll;
  background-repeat: no-repeat;
  background-position: center 0;
  z-index: 1;
}
.parallax-mini {
  height: auto;
  min-height: 70dvh;
}


.justified-gallery {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  width: min(100%, 1600px);
  margin: 0 auto;
}

.justified-gallery img {
  max-width: 100%;
  flex-grow: 1;
  height: max(350px, 30vh);
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.justified-gallery img:hover {
  transform: scale(105%);
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}

.justified-gallery h2, .justified-gallery p{
  align-self: center;
  padding: 40px 2em;
  flex: 0 1 auto;
}
.justified-gallery p {
  max-width: 500px;
}

.lista-grande {
  width: min(100%, 900px);
}
.lista-grande div {
  margin-top: 20px;
}


/* -------------------------- FOOTER ----------------*/
footer{
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: black;
  font-size: var(--font-body-peq);
}
.redes-sociales{
  display: flex;
  gap: 10px;
  width: 180px;
}
.redes-sociales a img {
  width: 40px;
  aspect-ratio: 1 / 1;
}

/* --------------------------------------------------------------------------------------------------------------------
                                                                              MAINPAGE
-------------------------------------------------------------------------------------------------------------------- */


section {
  background: var(--color-fondooscuro);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 1rem 100px 1rem;
}

.section-fullscreen {
  min-height: 100dvh;
}



/* --------------------------------------------------------------------------------------------------------------------
   Hero (mainpage)
-------------------------------------------------------------------------------------------------------------------- */
#hero {
  background-image: url("../img/bg-index.jpg");
}

#hero p {
  color: #666666;
}

#highlight-text {
  font-size: var(--font-title-medium);
  max-width: 800px;
  font-family: var(--fuente-bellota);
  line-height: 1.6;
  text-align: center;
  color: white; /* Texto blanco inicialmente */
  transition: opacity 3s ease; /* Transición para el desvanecimiento */
}


.highlight {
  color: white; /* Inicialmente las palabras clave son blancas */
  opacity: 1; /* Las palabras "Soy" y "diseñador" no se desvanece */
  transition: color 3s ease; /* Transición solo en el color */
}

.fade-text {
  opacity: 1;
  transition: opacity 3s ease; /* Transición para desvanecer */
}

/* Efecto después de 2 segundos */
#highlight-text.transition .fade-text {
  text-decoration: line-through;
  opacity: 0.3; /* Desvanece el resto del texto */
}

#highlight-text.transition .highlight {
  color: var(--color-fondooscuro2);
}

/* --------------------------------------------------------------------------------------------------------------------
   Sección Proyectos (mainpage)
-------------------------------------------------------------------------------------------------------------------- */
#proyectos {
  position: relative;
  padding: 0;
  overflow: visible;
  background-color: #f9f0e8;
}
#proyectos > h2, #contacto {
  color: var(--color-fondooscuro);
}

.papel {
  width: 100%;
  height: 100px;
  background-size: cover;
  background-position: top;
  transform: translateY(-100px);
  z-index: 300;
}
.papelabajo {
  transform: translateY(100px);
}

#proyectos > h2 {
  padding: 50px;
}

.proyectos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 2rem;
  z-index: 2;
  width: min(100%, 1200px);
}

.proyecto {
  flex: 1 1 45%;
  /*min-width: 300px;*/
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 1px solid #ccc;
  cursor: pointer;
  background: #fff;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.imagen-slider {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition:
    background-image 1s ease-out,
    max-height 1s ease;
}

/* InfoProyecto oculto por defecto */
.infoProyecto {
  flex-wrap: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(0%);
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 2rem;
  z-index: 800;
  transition: 1s ease;
}


.infoProyecto a {
  width: auto;
  padding: 20px;
  background-color: var(--color-rojo);
  color: var(--color-fondooscuro);
  align-self: flex-end;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: bold;
}

.infoProyecto h2 {
  font-size: var(--font-title-medium);
  line-height: 1.2;
  width: 100%;
  word-break: break-word;
  color: var(--color-rojo);
}

.infoProyecto p {
  font-size: var(--font-body-peq);
  line-height: 1.5;
  width: 100%;
  word-break: break-word;
}



/* --------------------------------------------------------------------------------------------------------------------
   Sección Sobre mi (mainpage)
-------------------------------------------------------------------------------------------------------------------- */
#sobre-mi-resumen {
  background-image: url("../img/50.jpg");
  background-size: cover;
  gap: 2em;
}
#sobre-mi-resumen h2, #sobre-mi-resumen p {
  align-self: center;
  width: min(90%, 600px);
}


/* --------------------------------------------------------------------------------------------------------------------
Sección Contacto (mainpage)
-------------------------------------------------------------------------------------------------------------------- */
#contacto {
  position: relative;
  padding: 0;
  overflow: visible;
  background-color: #f9f0e8;
}


#contacto article a {
  width: max(20%, 130px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  margin-top: 5px;
}

#contacto article {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: min(100%, 800px);
  margin: 50px;
}

#contacto article:first-of-type {
  flex-direction: column;
}

#contacto p {
  font-size: var(--font-body);
  font-family: var(--fuente-bellota);
  font-weight: bold;
}

#contacto form {
  width: min(100%, 700px);
  display: flex;
  flex-direction: column;
  font-family: var(--fuente-bellota);
  font-weight: bold;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

#contacto form button {
  align-self: flex-end;
}

#iconos-redes a {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-green);
  transition:
    background-color 0.7s ease,
    transform 0.7s ease;
}
#iconos-redes a:hover {
  background-color: var(--color-darkgreen);
  transform: translateY(10px);
}

#iconos-redes a img {
  width: 50%;
  color: white;
}


/* --------------------------------------------------------------------------------------------------------------------
                                                                           Página Sobre mí
-------------------------------------------------------------------------------------------------------------------- */
.sobre-mi {
  text-align: center;
}

.sobre-mi img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 2rem;
}

.sobre-mi p {
  margin: 2rem 0;
}

.cabecera-sobremi div img {
  width: 100%;
  aspect-ratio: 1/1;
  clip-path: polygon(
    25% 5%, 75% 5%,
    100% 50%,
    75% 95%, 25% 95%,
    0% 50%
  );
  object-fit: cover;
}

.cabecera-sobremi div {
  width: min(100%, 500px);
  margin: 30px;
}

.cabecera-sobremi svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask: url(#hex-mask);
  -webkit-mask: url(#hex-mask);
  animation: girarHex 5s linear infinite;
}


.accordion {
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
  padding: 14px;
  box-shadow: rgba(0, 0, 0, 0.5) 0 5px 10px;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  width: 100%;
  transition: background-color 0.2s ease;
  z-index: 900;
  margin-top: 15px;
}

.accordion:hover {
  background-color: #e0e0e0;
}

.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  background-color: var(--color-lightgreen);
  color: var(--color-rojo);
  font-family: var(--fuente-bellota);
  border-left: 3px solid #ccc;
  padding: 0;
  width: 100%;
  z-index: 850;
  transform: translateY(-5px);
}
.doble-columna .accordion{
  font-family: var(--fuente-bellota);
  font-weight: bold;
}
.doble-columna .panel {
  font-weight: bold;
}

.panel ul {
  padding: 0 20px;
}

.panel.open {
  padding-top: 10px;
  padding-bottom: 20px;
}

.panel li {
  margin: 10px 0;
  border-bottom: black 1px solid;
}


.panel li:last-child {
  border-bottom: none;
  padding-bottom: 20px;
}

.lista li {
  padding: 0.5em;
  list-style: circle;
  font-size: var(--font-body-peq);
}

#sobre-mi-mas p{
  width: min(100%, 700px);
  margin: 30px auto;
}

/* --------------------------------------------------------------------------------------------------------------------
                                                                          Página Contacto
-------------------------------------------------------------------------------------------------------------------- */


.contacto form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contacto input,
.contacto textarea {
  padding: 1rem;
  border: 1px solid #ccc;
  font-family: inherit;
}

.contacto button {
  background-color: var(--color-fondooscuro);
  color: var(--color-green);
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contacto button:hover {
  background-color: var(--color-fondooscuro2);
}

/*---------------------------------------------------------- PROYECTOS ----------------------------------------------*/
.card-proyecto {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.proyecto-hor, .proyecto-vert, .ficha-proyecto {
  display: grid;
  grid-template-areas:
    "titulo"
    "texto"
    "img1"
    "img2";
}

.ficha-proyecto {
  grid-template-areas:
    "titulo"
    "imagen"
    "texto";
  transition:
    --img-aspect 0.4s ease,
    transform 0.5s ease,
    box-shadow 0.5s ease,
    max-height 0.4s ease,
    padding 0.3s ease;
}

.ficha-proyecto .imagen-slider{
  grid-area: imagen;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.ficha-proyecto h3:hover {
  color: var(--color-rojo);
  background-color: var(--color-darkgreen);
}

.ficha-proyecto p, .ficha-proyecto h3 {
  align-self: start;
  padding: 10px 2rem;
}
.ficha-proyecto p{
  grid-area: texto;
}
.ficha-proyecto h3{
  grid-area: titulo;
  width: fit-content;
  margin: 20px auto;
}

.proyecto-hor{
  grid-template-areas:
    "titulo"
    "texto"
    "img1"
    "img2";
}
.proyecto-vert{
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "titulo titulo"
    "texto texto"
    "img3 img3"
    "img2 img1";
}

.proyecto-vert img, .proyecto-hor img {
  margin: 5px auto;
  object-fit: cover;
  max-height: 350px;
  object-position: center;
  width: 100%;
  height: 100%;
  align-self: end;
}
.proyecto-hor img {
  max-height: 350px;
  object-position: top;
}

.proyecto-hor h3, .proyecto-vert h3{
  grid-area: titulo;
  height: 100%;
  padding: 1em;
}

.proyecto-vert h3 {
}
.proyecto-hor p, .proyecto-vert p{
  grid-area: texto;
  height: 100%;
  padding: 1em 2em 3em 1em;
}
.proyecto-vert img:nth-of-type(3) {
  object-position: top;
  max-height: 350px;
  grid-area: img3;
}
.proyecto-hor img:nth-of-type(1), .proyecto-vert img:nth-of-type(1){
  grid-area: img1;
}
.proyecto-hor img:nth-of-type(2), .proyecto-vert img:nth-of-type(2) {
  grid-area: img2;
}



/* Layout horizontal en pantallas grandes */
@media (min-width: 768px) {
  .ficha-proyecto {
    max-height: 200px;
    overflow: hidden;
    grid-template-columns: minmax(400px, 1fr) 1fr;
    grid-template-rows: 1fr 4fr;
    grid-template-areas:
      "imagen titulo"
      "imagen texto";
    align-items: center;
  }

  .ficha-proyecto .imagen-slider {
    min-width: 400px;
    height: 500px;
    align-self: start;
  }

  .ficha-proyecto h3 {
    transform: translate(-30%, 20%);
    background-color: #142d3b;
    width: 100%;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.4);
    transition: transform 0.6s ease-in-out, background-color 0.5s ease, color 0.5s ease;
  }

  .open .imagen-slider {
    max-height: 500px;
  }

  /* Alternar imagen/texto usando nth-of-type */
  .card-proyecto:nth-of-type(even) .ficha-proyecto{
    grid-template-areas:
      "titulo imagen"
      "texto imagen";
    grid-template-columns: 1fr minmax(400px, 1fr);
  }
  .card-proyecto:nth-of-type(even) .ficha-proyecto h3 {
    transform: translate(30%, 20%);
    text-align: right;
  }

  .degradado {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    width: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    transition: height 0.4s ease;
    z-index: 2000;
  }

  .card-proyecto .open {
   transform: scale(110%);
  }

  .open + .degradado {
    height: 0;
  }
  .open h3 {
    transform: translate(0);
  }
  .card-proyecto:nth-of-type(even) .open h3 {
    transform: translate(0);
  }

  .proyecto-hor {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "titulo titulo"
      "texto texto"
      "img1 img2";
  }
  .proyecto-vert {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "titulo titulo img3"
      "texto texto img3"
      "img1 img2 img3";
  }

  .proyecto-vert img:nth-of-type(3), .proyecto-vert img {
    max-height: 600px;
  }

  .trigger-lightbox-complejo {
    transition: transform 0.5s ease,
                box-shadow 0.5s ease;
  }
  .trigger-lightbox-complejo:hover {
    transform: scale(106%);
    box-shadow: 0 5px 5px black;
    z-index: 8000;
  }

  .child-open {
    overflow: visible;
  }
  /* Mostrar cuando se hace hover */
  .proyecto:hover .infoProyecto {
    transform: translateY(-100%);
  }


}

/* -------------------------------- IMAGENES OCULTAS -------------------------------*/

/* Fondo negro traslúcido que cubre todo */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Contenido centrado */
.lightbox-content {
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

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

/* Botón de cerrar */
.lightbox .close {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
  color: white;
  background: black;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hidden {
  display: none;
}



/*----------------------------------------------------------- STEFI'S -----------------------------------------------*/

#imgcorpo-bg {
  background-image: url('../img/index/diseno.jpg');
}
#interf-bg {
  background-image: url("../img/index/interf.jpg");
}
#pack-bg {
  background-image: url("../img/index/packging.jpg");
}


/* --------------------------------------------------------------------------------------------------------------------
   Responsive para móviles
-------------------------------------------------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: black;
    color: #45d2ab;
    gap: 3rem;
    z-index: 1000;

    /* ANIMACION */
    transition: height 0.8s ease;
  }

  .nav-links.active {
    height: 100vh;
    z-index: 9000;
  }

  #menu-toggle {
    display: block;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 9999;
  }

  .img img {
    transform: rotate(0deg);
  }
  .izquierda {
    order: 1;
  }

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

  .izquierda, .derecha {
    transform: none;
    align-self: center;
  }

  .proyectos-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Espacio entre proyectos */
  }

  .proyecto {
    display: flex;
    aspect-ratio: unset;
    flex-direction: column; /* Los elementos del proyecto estarán apilados */
    justify-content: flex-start;
    width: 100%;
    border: 1px solid #ccc;
    background: #fff;
  }

  /* Imagen siempre visible en móvil */
  .imagen-slider {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
  }

  /* Información del proyecto siempre visible en móvil */
  .proyecto .infoProyecto {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    color: white;
    z-index: 10;
    padding-top: 3em;
  }

  .infoProyecto p {
    display: flex;
  }
  .infoProyecto a {
    display: flex;
    width: fit-content;
    align-self: flex-end;
  }



  #redes-contacto a {
    width: 40%;
    margin-top: 20px;
  }
}



body.preload {
  visibility: hidden;
  opacity: 0;
}

