html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "bricolage-grotesque", sans-serif;
  background-color: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body {
  flex: 1;
  cursor: url("assets/cursor_02.png") 32 5, auto !important;
}

body,
a,
button,
img,
* {
  cursor: url("assets/cursor_02.png") 32 5, auto !important;
}

main {
  flex: 1;
}

.logo img {
  height: 70px;
  display: block;
  transition: transform 0.2s ease;
  margin-left: 10px;
  margin-top: 20px;
}

/* HEADER */
header {
  background-color: transparent;
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1; /* el header queda debajo del drawer */
}

/* NAV */
nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav a {
  position: relative;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Subrayado animado */
nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #000;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #000;
}

nav a:hover::after {
  width: 100%;
}

section {
  padding: 4rem 2rem;
}

footer {
  text-align: center;
  padding: 0.1rem;
  font-size: 0.7rem;
  color: #a5a5a5;
  border-top: 1px solid #d4d4d4;
}

/* === Layout de texto y galería === */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
  padding: 0rem 0rem;
}

.text-side h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0rem;
  margin-top: 1px;
}

.text-side p {
  font-size: 1.1rem;
  margin: 0.3rem 0;
  line-height: 1.5rem;
}

/* Galería más pequeña */
.gallery.small {
  column-count: 3;
  column-gap: 10px;
  padding: 0;
}

.gallery.small img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 6px;
}

/* Texto introductorio */
.intro-text {
  font-size: 1rem;
  line-height: 1.5rem;
  text-align: justify;
  margin-bottom: 2.5rem;
  color: #111;
  z-index: 0;
}

/* Bloque de ferias */
.ferias-block {
  margin-top: 2.5rem;
}

.ferias-block h1 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.ferias-block p {
  font-size: 1rem;
  margin: 0.2rem 0;
  line-height: 1.2rem;
}

/* Galería general */
.gallery {
  column-count: 3;
  column-gap: 15px;
  padding: 20px;
}

.gallery img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: block;
  object-fit: contain;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* === ABOUT US === */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
}

.about-text {
  text-align: left;
}

.about-video video {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}

/* CONTACT */
.contact-section {
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ff80d9;
  box-shadow: 0 0 5px rgba(255, 128, 217, 0.5);
}

.contact-form button {
  background-color: #ffbcf2;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #ff9be6;
}

/* Logo animado */
@keyframes wiggle-stopmotion {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}

.logo img:hover {
  animation: wiggle-stopmotion 0.6s steps(4) infinite;
}

/* Responsive */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .gallery.small { column-count: 2; }
}

@media (max-width: 768px) {
  .gallery.small { column-count: 1; }
  .about-section { grid-template-columns: 1fr; }
  .about-video { margin-top: 2rem; }
}

/* === MENÚ MÓVIL CORREGIDO (SIEMPRE ENCIMA) === */

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  z-index: 9999;
  cursor: pointer;
  border: none;
  position: relative;
}
.nav-toggle .bar {
  position: relative;
  width: 20px;
  height: 2px;
  background: #000;
}
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #000;
}
.nav-toggle .bar::before { top: -6px; }
.nav-toggle .bar::after { top: 6px; }

/* Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: all;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(88vw, 360px);
  background: #fff;
  color: #000;
  border-left: 1px solid #d4d4d4;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  padding: 20px;
  z-index: 9999;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  overflow-y: auto;

  /* 🔹 Añade estas líneas */
  isolation: isolate;             /* aísla el contexto del panel */
  background-blend-mode: normal;  /* evita mezclas con filtros */
  mix-blend-mode: normal;         /* fuerza opacidad pura */
}

.mobile-drawer.is-open .drawer-panel {
  transform: translateX(0);
}
.mobile-drawer.is-closing .drawer-panel {
  transform: translateX(100%);
}

/* Menú interno */
.mobile-nav {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.mobile-nav a {
  display: block;
  padding: 12px 10px;
  font-size: 1.1rem;
  color: inherit;
  text-decoration: none;
  position: static;
}
.back-home {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #000;
  text-decoration: none;
}
.back-home:hover { text-decoration: underline; }

/* Animaciones */
@keyframes drawerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drawerPanelIn {
  0% { transform: translateX(12%) scale(.98); opacity: 0; }
  60% { transform: translateX(0) scale(1.01); opacity: 1; }
  100% { transform: translateX(0) scale(1); }
}
@keyframes drawerItemIn {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.mobile-drawer.is-open .drawer-backdrop {
  animation: drawerFadeIn 220ms ease-out both;
}
.mobile-drawer.is-open .drawer-panel {
  animation: drawerPanelIn 320ms cubic-bezier(.2,.9,.2,1) both;
}
.mobile-drawer.is-open .mobile-nav li {
  opacity: 0;
  animation: drawerItemIn 300ms ease-out forwards;
}
.mobile-drawer.is-open .mobile-nav li:nth-child(1){animation-delay:60ms;}
.mobile-drawer.is-open .mobile-nav li:nth-child(2){animation-delay:120ms;}
.mobile-drawer.is-open .mobile-nav li:nth-child(3){animation-delay:180ms;}
.mobile-drawer.is-open .mobile-nav li:nth-child(4){animation-delay:240ms;}
.mobile-drawer.is-open .mobile-nav li:nth-child(5){animation-delay:300ms;}
.mobile-drawer.is-open .back-home {
  animation: drawerItemIn 280ms ease-out both 40ms;
}

/* Responsive */
@media (max-width: 899px) {
  nav ul.desktop-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 900px) {
  nav ul.desktop-nav { display: flex; }
  .nav-toggle, .mobile-drawer { display: none !important; }
}

/* Asegurar jerarquía correcta */
main, footer, header {
  position: relative;
  z-index: 1;
}

/* === Otros === */
.instagram-link {
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  transition: font-weight 0.2s ease;
}
.instagram-link:hover { font-weight: 700; }

img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}
