/* Capa moderna: sustituye jQuery/Vegas/prettyPhoto/Tipsy con CSS y JS nativos.
   Se carga después de styles.css (el diseño original se conserva). */

:root { --accent: #f30b27; }

body { overflow: hidden; }
a:focus-visible, button:focus-visible, #slideshow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Fondo a pantalla completa con fundido (antes: Vegas) */
.bg { position: fixed; inset: 0; z-index: -2; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity 2s ease; }
.bg.on { opacity: 1; }
#bg-overlay { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: transparent url(../images/overlay.png); opacity: .5; }

/* Paneles del menú (antes: animaciones jQuery) */
.panel { transition: opacity .75s cubic-bezier(.22,1,.36,1), top .75s cubic-bezier(.22,1,.36,1); }
.panel.show { display: block !important; }
.panel.open { opacity: 1 !important; top: 190px !important; }
#base { transition: left .75s cubic-bezier(.83,0,.17,1), opacity .75s; }
#base.open { left: 0 !important; opacity: 1 !important; }
#marker { transition: left .75s cubic-bezier(.22,1,.36,1); }
#marker img { transition: width .75s cubic-bezier(.22,1,.36,1); }
#menu a.disabled { color: #fff; cursor: default; }
#portfolio { max-height: calc(100vh - 340px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }

/* Miniaturas */
#thumbs { transition: opacity 1s ease 1.5s; }
body.ready #thumbs { opacity: 1; }
#thumbs ul li a { display: block; }
#thumbs ul li img { display: block; transition: border-color .2s; }
#thumbs ul li a:hover img, #thumbs ul li a.active img { border-color: var(--accent) !important; }
#slideshow { cursor: pointer; }

/* Icono de zoom en las portadas de galería */
a.cover { display: block; position: relative; }
#portfolio a.cover::after {
	content: ''; position: absolute; left: 0; top: 0; margin: 4px 0 0 4px; width: 122px; height: 107px;
	background: url(../images/zoom_icon_2.png) no-repeat; opacity: 0; transition: opacity .3s; pointer-events: none;
}
#portfolio a.cover:hover::after, #portfolio a.cover:focus-visible::after { opacity: 1; }
#portfolio .categories img { object-fit: cover; }
#about .right a.rollover { position: relative; display: block; }
#about .right a.rollover::after {
	content: ''; position: absolute; left: 0; top: 0; margin: 7px 0 2px 0; width: 149px; height: 43px;
	background: url(../images/zoom_icon.png) no-repeat; opacity: 0; transition: opacity .3s; pointer-events: none;
}
#about .right a.rollover:hover::after { opacity: 1; }

/* Formulario */
#contact .form .fields::placeholder { color: #fff; opacity: .75; }
#contact .form .fields { border-radius: 0; }
#contact .form .fields:focus { outline: 0; border-bottom-color: var(--accent); }
#contact .form .button { border: 0; }

/* Visor de fotos (antes: prettyPhoto) */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb-stage { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 92vw; max-height: 84vh; object-fit: contain; box-shadow: 0 10px 40px #000; opacity: 0; transition: opacity .25s; }
.lb-img.loaded { opacity: 1; }
.lb-cap { color: #ddd; font: 300 14px 'Signika', sans-serif; margin-top: 12px; min-height: 18px; text-align: center; }
.lb button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 34px; line-height: 1; padding: 14px 18px; opacity: .75; transition: opacity .2s, color .2s; }
.lb button:hover { opacity: 1; color: var(--accent); }
.lb-close { top: 8px; right: 12px; font-size: 44px !important; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 18px; left: 22px; color: #999; font: 300 13px 'Signika', sans-serif; }
.lb.single .lb-prev, .lb.single .lb-next, .lb.single .lb-count { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
