:root {
    --bg-black: #050505;
    --wine: #720e16;          /* color de marca: fondos y bordes */
    --wine-text: #e04552;     /* versión clara del vino para texto (buen contraste sobre negro) */
    --wine-hover: #a1141f;
    --text-white: #ffffff;
    --text-muted: #b8b8b8;
    --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg-black); color: var(--text-white); font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--wine); color: #fff; padding: .6rem 1rem; z-index: 2000; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--wine-text); outline-offset: 3px; }

/* Navegación */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 10%; position: fixed; width: 100%; top: 0; background: rgba(5, 5, 5, 0.92); z-index: 1000; }
.logo { font-family: 'Oswald', Impact, sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; color: #fff; text-decoration: none; }
.wine { color: var(--wine-text); }
.navbar ul { display: flex; list-style: none; }
.navbar ul li a { color: white; text-decoration: none; margin-left: 2rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; transition: color .3s; }
.navbar ul li a:hover { color: var(--wine-text); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 3px; width: 100%; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Evita que la barra fija tape los títulos al navegar por anclas */
section[id], header[id] { scroll-margin-top: var(--nav-h); }

/* Hero / Portada */
.hero { min-height: 100vh; min-height: 100svh; padding: 0 5%; background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.6)), url('img/hero.jpg') center/cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-title { font-family: 'Oswald', Impact, sans-serif; font-size: clamp(2.4rem, 9vw, 6rem); line-height: 1.05; margin-bottom: 1rem; }
.hero-subtitle { font-size: clamp(.9rem, 3.5vw, 1.3rem); letter-spacing: clamp(2px, 1vw, 6px); text-transform: uppercase; color: var(--text-white); margin-bottom: 0.5rem; font-weight: 600; }
.hero-tagline { font-size: clamp(.75rem, 2.8vw, .9rem); letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2.5rem; }

/* Botones */
.btn-primary, .btn-outline { padding: 1rem 2rem; text-decoration: none; font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; display: inline-block; margin: 10px; transition: 0.3s; }
.btn-primary { background: var(--wine); color: white; border: 1px solid var(--wine); }
.btn-outline { border: 1px solid white; color: white; }
.btn-outline:hover { background: #fff; color: #000; }
.btn-primary:hover { background: var(--wine-hover); transform: translateY(-3px); }

/* Secciones */
.section { padding: 40px 10%; min-height: auto; }
.content { width: 100%; max-width: 1200px; margin: 0 auto; }
.title { font-family: 'Oswald', Impact, sans-serif; font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; margin-bottom: 2rem; text-transform: uppercase; border-bottom: 3px solid var(--wine); display: inline-block; padding-bottom: 5px; }

.about-container { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.about-text { flex: 1 1 300px; }
.about-text h3 { font-family: 'Oswald', Impact, sans-serif; font-size: 1.8rem; margin-bottom: 15px; }
.about-text p { margin-bottom: 1rem; max-width: 62ch; }
.about-text .about-role { color: var(--wine-text); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: .9rem; }
.about-cta { color: var(--wine-text); font-weight: 600; }
.about-img { flex: 0 1 400px; max-width: 100%; }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; border-radius: 5px; box-shadow: -15px 15px 0px var(--wine); }

/* Experiencia */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 24px; }
.exp-card h3 { font-family: 'Oswald', Impact, sans-serif; color: var(--wine-text); margin-bottom: 0.8rem; text-transform: uppercase; font-size: 1.25rem; border-left: 4px solid var(--wine); padding-left: .7rem; }
.exp-card { display: flex; flex-direction: column; justify-content: flex-end; }
.exp-card h3 { line-height: 1.3; display: flex; align-items: flex-end; min-height: calc(2 * 1.3 * 1.25rem); }
@media (max-width: 600px) {
    .exp-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
    .exp-card h3 { font-size: .95rem; min-height: calc(2 * 1.3 * .95rem); padding-left: .5rem; border-left-width: 3px; }
    .exp-square p { font-size: .72rem; line-height: 1.45; padding: .6rem; }
}
.exp-square { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #0d0d0d; border: 1px solid #222; cursor: default; }
.exp-square img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .8s ease, filter .6s ease; }
.exp-square p { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; background: var(--wine); font-size: 1rem; line-height: 1.6; opacity: 0; transform: translateY(14px); transition: opacity .6s ease .1s, transform .6s ease .1s; }
.exp-square:hover img, .exp-square:focus img, .exp-square:focus-within img { opacity: 0; transform: scale(1.12); filter: blur(6px); }
.exp-square:hover p, .exp-square:focus p, .exp-square:focus-within p { opacity: 1; transform: none; }

/* Galería y Vídeos */
.gallery-compact { padding-bottom: 20px; }
.videos-compact { padding-top: 20px; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 15px; }
.cat-item { height: 260px; background: #111; background-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), var(--cover, none); background-size: cover; background-position: center; border: 1px solid #222; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: 0.4s; position: relative; overflow: hidden; }
.cat-item span { font-family: 'Oswald', Impact, sans-serif; font-size: 1.5rem; z-index: 2; text-transform: uppercase; }
.cat-item:hover, .cat-item:focus-visible { background-color: var(--wine); border-color: var(--wine); }

/* Slider */
.video-slider-container { position: relative; overflow: hidden; width: 100%; }
.video-slider { display: flex; transition: transform 0.5s ease; touch-action: pan-y; }
.video-slide { min-width: 100%; }
.player-mock { width: 100%; aspect-ratio: 16/9; background: #111; border: 1px dashed var(--wine); display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--wine-text); font-weight: 700; font-size: clamp(1rem, 3vw, 1.6rem); text-decoration: none; transition: background .3s, color .3s; }
.player-mock small { color: var(--text-muted); font-weight: 400; font-size: .85rem; }
.player-mock:hover { background: var(--wine); color: #fff; }
.player-mock:hover small { color: #fff; }
.slider-nav { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.slider-nav button { background: transparent; border: 1px solid var(--wine); color: white; padding: 10px 20px; cursor: pointer; font-family: 'Oswald', Impact, sans-serif; transition: 0.3s; }
.slider-nav button:hover { background: var(--wine); }
.yt-link { margin-top: 1.5rem; text-align: center; }
.yt-link a, .back, .empty a { color: var(--wine-text); text-decoration: none; }
.yt-link a:hover, .back:hover, .empty a:hover { text-decoration: underline; }

/* Contacto */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.social-links a { display: block; color: white; font-size: 1.8rem; text-decoration: none; font-family: 'Oswald', Impact, sans-serif; margin-bottom: 10px; transition: 0.3s; }
.social-links a:hover { color: var(--wine-text); padding-left: 10px; }
.contact-form input, .contact-form textarea { width: 100%; background: #111; border: 1px solid #444; padding: 1rem; color: white; margin-bottom: 10px; font-family: inherit; font-size: 1rem; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9a9a9a; }
.contact-form button { width: 100%; background: var(--wine); color: white; border: none; padding: 1rem; cursor: pointer; font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; transition: 0.3s; }
.contact-form button:hover { background: var(--wine-hover); }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.form-status { margin-top: 12px; min-height: 1.5em; }
.form-status.ok { color: #6fdc8c; }
.form-status.error { color: #ff8a8a; }

footer { padding: 3rem; text-align: center; color: #a3a3a3; font-size: 0.8rem; border-top: 1px solid #222; margin-top: 40px; }

/* Subpáginas (galerías y vídeos) */
.sub-hero { padding: calc(var(--nav-h) + 40px) 10% 0; }
.sub-hero .content > p { color: var(--text-muted); margin-top: -1rem; margin-bottom: 1.5rem; }
.back { display: block; width: fit-content; margin-bottom: 1.5rem; font-size: .9rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 15px; }
.media-item { position: relative; display: block; width: 100%; padding: 0; border: 1px solid #222; background: #111; cursor: pointer; overflow: hidden; aspect-ratio: 4 / 3; color: #fff; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.video-card:hover img, .video-card:focus-visible img { transform: scale(1.05); }
.video-card { aspect-ratio: 16 / 9; }
.video-card .vtitle { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem; background: linear-gradient(transparent, rgba(0,0,0,.85)); text-align: left; font-size: .9rem; }
.video-card .play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; background: rgba(114, 14, 22, .9); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.media-item[hidden] { display: none; }
.video-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.video-card .vtitle { font-weight: 600; line-height: 1.3; }
.video-card:hover .play, .video-card:focus-visible .play { background: var(--wine-hover); transform: scale(1.1); }
.video-card .play { transition: transform .3s, background .3s; padding-left: 4px; }
.more-btn { background: transparent; border: 1px solid var(--wine); color: #fff; padding: 10px 24px; margin: 0 14px 12px 0; cursor: pointer; font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; transition: background .3s; }
.more-btn:hover { background: var(--wine); }
.empty { grid-column: 1 / -1; padding: 3rem 1rem; border: 1px dashed var(--wine); text-align: center; color: var(--text-muted); }

dialog.lightbox { border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; margin: 0; color: #fff; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lb-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 12px; }
.lb-inner img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb-inner iframe { width: min(1000px, 100%); aspect-ratio: 16 / 9; border: 0; }
.lb-btn { position: absolute; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.35); color: #fff; width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 8px; top: 50%; }
.lb-next { right: 8px; top: 50%; }

@media (max-width: 768px) {
    .navbar { padding: 1rem 5%; }
    :root { --nav-h: 64px; }
    .nav-toggle { display: flex; }
    .navbar ul { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(5, 5, 5, 0.98); border-top: 1px solid #222; padding: .5rem 5% 1rem; }
    .navbar ul.open { display: flex; }
    .navbar ul li a { display: block; margin: 0; padding: .9rem 0; font-size: 1rem; border-bottom: 1px solid #1a1a1a; }
    .section, .sub-hero { padding-left: 5%; padding-right: 5%; }
    .contact-wrapper { grid-template-columns: 1fr; gap: 30px; }
    .about-container { flex-direction: column; }
    .about-img { flex-basis: auto; width: 100%; max-width: 400px; }
    .about-img img { box-shadow: -10px 10px 0 var(--wine); }
    .lb-prev, .lb-next { top: auto; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Carrusel tipo "coverflow": el vídeo activo en el centro y el anterior/siguiente desenfocados a los lados */
.vcarousel { --w: min(640px, 62%); --ratio: 16 / 9; --gap: 72%; max-width: 1100px; margin: 0 auto; }
.vcarousel.vertical { --w: min(270px, 52%); --ratio: 9 / 16; --gap: 78%; max-width: 780px; }
.vc-stage { position: relative; overflow: hidden; padding: 12px 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.vc-stage:focus-visible { outline-offset: -2px; }
.vc-track { position: relative; width: var(--w); margin: 0 auto; aspect-ratio: var(--ratio); }
.vc-slide { position: absolute; inset: 0; cursor: pointer; transition: transform .6s cubic-bezier(.22,.8,.3,1), opacity .6s, filter .6s; will-change: transform; }
.vc-slide[data-pos="c"] { transform: translateX(calc(var(--d) * var(--gap))) scale(1); z-index: 3; cursor: default; }
.vc-slide[data-pos="s"] { transform: translateX(calc(var(--d) * var(--gap))) scale(.8); z-index: 2; filter: blur(5px) brightness(.6); opacity: .85; }
.vc-slide[data-pos="x"] { transform: translateX(calc(var(--d) * var(--gap))) scale(.6); z-index: 1; opacity: 0; pointer-events: none; }
.vc-media { position: relative; width: 100%; height: 100%; background: #111; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; overflow: hidden; cursor: pointer; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.vc-slide:not([data-pos="c"]) .vc-media { cursor: pointer; }
.vc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vc-slide[data-pos="c"] .vc-media:hover img { transform: scale(1.03); }
.vc-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vc-media .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgba(114, 14, 22, .92); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; padding-left: 5px; transition: transform .3s, background .3s; }
.vc-slide[data-pos="c"] .vc-media:hover .play { background: var(--wine-hover); transform: scale(1.1); }
.vc-media .vtitle { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.1rem 1rem; background: linear-gradient(transparent, rgba(0,0,0,.92)); font-family: 'Oswald', Impact, sans-serif; font-size: clamp(1rem, 2.6vw, 1.35rem); line-height: 1.25; text-align: left; }
.vertical .vc-media .vtitle { font-size: 1.05rem; }
.vc-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--wine); background: rgba(5,5,5,.7); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .3s; display: flex; align-items: center; justify-content: center; padding-bottom: 4px; }
.vc-btn:hover { background: var(--wine); }
.vc-prev { left: 8px; }
.vc-next { right: 8px; }
.vc-counter { text-align: center; margin-top: 1rem; color: var(--text-muted); letter-spacing: 2px; font-size: .9rem; }
#reels .yt-link { margin-top: 1.5rem; }
@media (max-width: 600px) {
    .vcarousel { --w: 74%; --gap: 70%; }
    .vcarousel.vertical { --w: 58%; --gap: 72%; }
    .vc-btn { width: 36px; height: 36px; font-size: 1.4rem; }
    .vc-media { border-radius: 16px; }
    .vc-media .play { width: 52px; height: 52px; font-size: 1.2rem; }
    .vc-slide[data-pos="s"] { filter: blur(3px) brightness(.6); }
}
@media (prefers-reduced-motion: reduce) { .vc-slide { transition: none; } }

/* Álbumes de fotos: filas justificadas (se leen de izquierda a derecha, respetando el orden de data.js) */
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-grid::after { content: ""; flex-grow: 999; }
.photo-grid .media-item { width: auto; min-width: 0; padding: 0; border-radius: 6px; background: #111; }
.photo-grid .media-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid .empty { flex: 1 0 100%; }
/* Al señalar una foto: recuadro rojo muy suave por fuera, sin ningún otro efecto */
.photo-grid .media-item { outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .25s; }
.photo-grid .media-item:hover, .photo-grid .media-item:focus-visible { outline-color: rgba(224, 69, 82, .45); }
@media (max-width: 600px) { .photo-grid .media-item { outline-offset: 2px; } }
@media (max-width: 600px) { .photo-grid { gap: 5px; } }

/* Portadas de álbum: 4 en una fila en pantallas grandes, 2x2 en el resto */
.category-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .cat-item { height: 190px; } .cat-item span { font-size: 1.2rem; } }

/* Portadas de álbum: zoom suave de la foto al pasar el ratón (como en Experiencia) */
.cat-item { background: #111; background-image: none; isolation: isolate; }
.cat-item::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--cover, none) center / cover no-repeat; transition: transform .7s cubic-bezier(.22,.8,.3,1); }
.cat-item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.4); transition: background .5s; }
.cat-item:hover, .cat-item:focus-visible { background-color: #111; border-color: var(--wine); }
.cat-item:hover::before, .cat-item:focus-visible::before { transform: scale(1.12); }
.cat-item:hover::after, .cat-item:focus-visible::after { background: rgba(0,0,0,.2); }
.cat-item span { text-shadow: 0 2px 12px rgba(0,0,0,.7); transition: transform .5s; }
.cat-item:hover span { transform: scale(1.06); }

/* Contacto: solo el formulario, centrado */
.contact-wrapper { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; gap: 0; }
#contacto .content { text-align: center; }
.contact-form { text-align: left; }

/* Redes en el pie de página */
.footer-social { display: flex; justify-content: center; gap: 1.8rem; margin-bottom: 1.2rem; }
.footer-social a { color: #fff; display: inline-flex; padding: 6px; opacity: .85; transition: opacity .3s, transform .3s; }
.footer-social a:hover, .footer-social a:focus-visible { opacity: 1; transform: scale(1.12); }
