/* ===== Mejoras de diseño — alejandrocadavid.online ===== */

/* Selección de texto y focus coherentes con la estética */
::selection { background: rgba(255,255,255,.92); color: #000; }
:focus-visible { outline: 2px solid rgba(255,255,255,.78); outline-offset: 4px; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* Titular del hero: más presencia tipográfica */
.hero-title, h1.font-display { letter-spacing: .01em; }

/* ===== Galería con fotografías reales ===== */
.gal-photo {
  background-size: cover;
  background-position: center;
  transition: transform .8s cubic-bezier(.22,.61,.36,1), filter .8s ease;
  filter: saturate(.92);
  will-change: transform;
}
.gallery-item:hover .gal-photo {
  transform: scale(1.05);
  filter: saturate(1.05);
}
/* Ocultar el número/categoría placeholder cuando hay foto */
.has-photo .gal-photo > div:first-child { opacity: 0; }
/* Velo sutil para que el overlay de hover lea mejor sobre foto */
.has-photo .gal-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35));
  pointer-events: none;
}

/* ===== Lightbox con imagen ===== */
.lb-photo {
  display: block;
  max-width: min(86vw, 1100px);
  max-height: 66vh;
  object-fit: contain;
  margin: 0 auto 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: lbIn .45s cubic-bezier(.22,.61,.36,1);
}
@keyframes lbIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* Botones y enlaces: transición más sedosa */
a, button { transition-duration: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== Selector de idioma ===== */
#lang-switch {
  position: fixed;
  top: 22px;
  right: 76px;
  z-index: 9999;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.45);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  gap: 7px;
  align-items: center;
  transition: border-color .3s;
}
#lang-switch:hover { border-color: rgba(255,255,255,.45); }
#lang-switch .ls-sep { opacity: .35; }
#lang-switch span.active { color: #fff; }
@media (max-width: 768px) {
  #lang-switch { top: auto; bottom: 18px; right: 18px; }
}

/* ===== Navegación móvil accesible sobre el bundle existente ===== */
.ac-menu-toggle {
  position: fixed;
  top: 22px;
  right: 18px;
  z-index: 10000;
  width: 44px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.ac-menu-toggle span {
  position: absolute;
  width: 17px;
  height: 1px;
  background: currentColor;
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.ac-menu-toggle span:first-child { transform: translateY(-4px); }
.ac-menu-toggle span:last-child { transform: translateY(4px); }
body.ac-nav-open .ac-menu-toggle span:first-child { transform: rotate(45deg); }
body.ac-nav-open .ac-menu-toggle span:last-child { transform: rotate(-45deg); }

@media (max-width: 768px) {
  .ac-menu-toggle { display: flex; }
  #lang-switch { right: 74px; }
  nav, [role="navigation"] {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height .3s ease, opacity .25s ease, transform .25s ease;
  }
  body.ac-nav-open nav,
  body.ac-nav-open [role="navigation"] {
    max-height: 70vh;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  nav a, [role="navigation"] a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ===== Ajustes responsive móvil ===== */
@media (max-width: 640px) {
  h1, .font-display { overflow-wrap: break-word; }
  body { overflow-x: hidden; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Lightbox propio: navegación entre fotos ===== */
#ac-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  place-items: center;
  padding: 72px 72px 40px;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(18px);
}
body.ac-gallery-open #ac-gallery-lightbox { display: grid; }
#ac-gallery-lightbox figure {
  width: min(1120px, 100%);
  margin: 0;
  text-align: center;
}
#ac-gallery-lightbox img {
  max-height: 76vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
}
#ac-gallery-lightbox figcaption {
  margin-top: 18px;
  color: rgba(255,255,255,.82);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ac-gallery-close,
.ac-gallery-prev,
.ac-gallery-next {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.ac-gallery-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}
.ac-gallery-prev,
.ac-gallery-next {
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translateY(-50%);
  font-size: 42px;
  line-height: 1;
}
.ac-gallery-prev { left: 24px; }
.ac-gallery-next { right: 24px; }

@media (max-width: 700px) {
  #ac-gallery-lightbox { padding: 76px 18px 34px; }
  .ac-gallery-prev,
  .ac-gallery-next {
    top: auto;
    bottom: 18px;
    width: 46px;
    height: 46px;
    transform: none;
  }
  .ac-gallery-prev { left: 18px; }
  .ac-gallery-next { right: 18px; }
}
