@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

/* Estilos básicos */
* {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'IM Fell French Canon', serif;
    background-color: white;
    color: black;
    overflow-x: auto;
    cursor: auto !important; /* Changed from none to auto */
}

/* 🔹 Sección Intro */
#intro {
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none !important;
    z-index: 100;
    transition: opacity 4s ease-in-out !important;
}

#intro video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-title {
    font-size: clamp(2rem, 6vw, 6rem);
    padding: 1rem 2rem;
    border-radius: 1rem;
    color: black;
    opacity: 0;
    transition: opacity 12s ease-in-out !important;
    cursor: none !important;
    text-align: center;
}

.hidden {
    display: none;
}

/* 🔹 Cabecera - Fixed with cursor support */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 1);
    z-index: 10;
    pointer-events: none !important;
    cursor: none !important;
}

.logo {
    font-size: 1.5rem;
    position: absolute;
    top: 2rem;
    right: 6rem;
    cursor: none !important;
    pointer-events: auto !important;
}

.info-btn, .close-info {
    font-size: clamp(1.5rem, 3vw, 2rem);
    background: none;
    border: none;
    color: black;
    cursor: none !important;
    position: absolute;
    top: 1.8rem;
    pointer-events: auto !important;
    z-index: 11;
}

.info-btn {
    left: 1.5rem;
    z-index: 30;
}

/* 🔹 Panel de información */
.info-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 37%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.5s ease;
    z-index: 20;
    padding: 2rem;
    cursor: none !important;
}

.info-panel.active {
    left: 0;
}

.close-info {
    left: 1.25rem;
}

.info-panel p.contact a,
.info-panel p.contact a:visited {
    color: rgb(122, 122, 122) !important;
    font-weight: bold;
    text-decoration: none;
}

.info-panel p.contact a:hover {
    color: black;
    text-decoration: underline;
}

.info-panel p {
    margin-bottom: 1em; /* Espacio entre todos los párrafos */
    line-height: 1.6; /* Mejora la legibilidad */
}

/* 🔹 Galería */
.gallery-container {
    position: relative;
    transform: translateY(-50%);
    top: 50vh;
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    z-index: 5;
    cursor: none !important;
}

.gallery {
    display: flex;
    margin-top: 15vh;
    gap: 2rem;
    padding: 2rem;
    height: 75vh;
    cursor: none !important;
}

.image {
    flex: 0 0 auto;
    height: 100%;
    width: auto;
    position: relative;
    scroll-snap-align: center;
    cursor: none !important;
}

.image-transition-wrapper {
    flex: 0 0 auto;
    height: auto;
    min-width: 200px;
    width: auto; 
    position: relative;
    scroll-snap-align: center;
    overflow: hidden;
    cursor: none !important;
}

.image img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.image-transition-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-transition-wrapper img {
    width: max-content;
    max-width: 100%;
    height: auto;
    position: absolute;
    opacity: 0;
    cursor: none !important;
}

.image-transition-wrapper img.active {
    opacity: 1;
}

/* Estilos del cursor personalizado - Fixed version */
#custom-cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: black;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

/* Cambiar color del cursor cuando está sobre elementos oscuros */
.dark-background #custom-cursor {
    background-color: white;
    cursor: none !important;
}

/* Escalar el cursor cuando está sobre elementos interactivos - Fixed selector */
button:hover ~ #custom-cursor,
a:hover ~ #custom-cursor,
.image:hover ~ #custom-cursor,
.image-transition-wrapper:hover ~ #custom-cursor,
.logo:hover ~ #custom-cursor,
button:hover + #custom-cursor,
a:hover + #custom-cursor,
.image:hover + #custom-cursor,
.image-transition-wrapper:hover + #custom-cursor,
.logo:hover + #custom-cursor {
    transform: translate(-50%, -50%) scale(1.5);
}

a, button, .image, .image-transition-wrapper {
    cursor: none !important;
}

.gallery::-webkit-scrollbar,
.gallery-container .gallery::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.gallery,
.gallery-container .gallery {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

@media (max-width: 1000px) and (orientation: landscape){
    .info-panel {
      left: -100% !important;
      z-index: 20 !important;
    }
  
    .info-panel.active {
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      z-index: 9999 !important;
    }
    .info-panel p {
        margin-bottom: 1em;
        line-height: 1.6;
        margin-right: 2.5rem;
    }

    #custom-cursor {
      display: none !important;
    }

    body {
      cursor: default !important;
    }

    .gallery {
        margin-top: 2vh;
        gap: 2rem;
        padding: 2rem;
        height: 75vh;
        cursor: none !important;
    }

    header {
      position: relative !important;
      pointer-events: auto !important;
      cursor: auto !important;
      z-index: 10;
    }

    html, body {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }
}

@media (max-width: 767px) {
    .info-panel {
      left: -100% !important;
      z-index: 20 !important;
    }

    .info-panel.active {
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      z-index: 9999 !important;

    }

    .info-panel p {
        margin-bottom: 1em;
        line-height: 1.6;
        margin-right: 2.5rem;
    }

    #custom-cursor {
      display: none !important;
    }

    body {
      cursor: default !important;
    }

    .gallery-container {
        top: 37vh;
    }

    header {
      position: relative !important;
      pointer-events: auto !important;
      cursor: auto !important;
      z-index: 10;
    }

    html, body {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }
}
