/* ==========================================================================
   Cano Films | Global Styles
   Paleta: Negro (#050505), Blanco (#F0F0F0) y Dorado Premium (#D4AF37)
   ========================================================================== */

:root {
    --color-gold: #D4AF37;
    --color-gold-light: #F3E5AB;
    --color-gold-dark: #AA771C;
    --color-gold-rgb: 212, 175, 55;
    --color-dark: #050505;
    --color-surface: #111111;
    --color-surface-hover: #181818;
    --color-light: #f0f0f0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    background-color: var(--color-dark);
    color: var(--color-light);
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN
   ========================================================================== */
.header-glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(5, 5, 5, 0.88);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* Botón WhatsApp Header Oficial (Color Verde Sólido del Logo de WhatsApp) */
.btn-whatsapp-header {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 9999px !important;
    background: #25D366 !important;
    border: 1px solid #20ba56 !important;
    color: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.btn-whatsapp-header:hover {
    background: #20ba56 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.7) !important;
    transform: translateY(-1px) scale(1.03) !important;
}

/* Switcher de Idioma con Banderas */
.lang-switcher {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    border-radius: 9999px !important;
    padding: 3px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
}

.lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.3rem 0.65rem !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    border-radius: 9999px !important;
    transition: all 0.25s ease !important;
    color: rgba(255, 255, 255, 0.65) !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
}

.lang-btn.active {
    background: var(--color-gold) !important;
    color: var(--color-dark) !important;
    box-shadow: 0 0 14px rgba(var(--color-gold-rgb), 0.45) !important;
}

.lang-btn:hover:not(.active) {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.flag-icon {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

/* Botón Hamburguesa */
.hamburger-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 0.5rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
}

.hamburger-btn:hover {
    border-color: var(--color-gold) !important;
    background: rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

.hamburger-line {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background-color: #f0f0f0 !important;
    border-radius: 9999px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hamburger-line.line-2 {
    background-color: var(--color-gold) !important;
}

.hamburger-btn.open .line-1 {
    transform: translateY(7px) rotate(45deg) !important;
    background-color: var(--color-gold) !important;
}
.hamburger-btn.open .line-2 {
    opacity: 0 !important;
    transform: translateX(-10px) !important;
}
.hamburger-btn.open .line-3 {
    transform: translateY(-7px) rotate(-45deg) !important;
    background-color: var(--color-gold) !important;
}

@media (max-width: 639px) {
    .btn-whatsapp-header {
        padding: 0.28rem 0.48rem !important;
        gap: 0.24rem !important;
        font-size: 0.625rem !important;
    }

    .lang-switcher {
        padding: 2px !important;
        gap: 1px !important;
    }

    .lang-btn {
        padding: 0.2rem 0.36rem !important;
        gap: 0.18rem !important;
        font-size: 0.625rem !important;
    }

    .hamburger-btn {
        width: 34px !important;
        height: 34px !important;
        gap: 4px !important;
    }

    .hamburger-line {
        width: 16px !important;
    }

    .hamburger-btn.open .line-1 {
        transform: translateY(6px) rotate(45deg) !important;
    }

    .hamburger-btn.open .line-3 {
        transform: translateY(-6px) rotate(-45deg) !important;
    }
}

@media (max-width: 359px) {
    .btn-whatsapp-header {
        padding: 0.35rem !important;
        width: 32px !important;
        height: 32px !important;
        justify-content: center !important;
    }

    .btn-whatsapp-header .wa-label-mobile {
        display: none !important;
    }
}

/* ==========================================================================
   DRAWER / MENÚ HAMBURGUESA (ESTRICTAMENTE ESCONDIDO POR DEFECTO)
   ========================================================================== */
.nav-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 420px !important;
    height: 100vh !important;
    background: rgba(8, 8, 8, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-left: 1px solid rgba(212, 175, 55, 0.25) !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 2rem 1.75rem !important;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.85) !important;
    transform: translateX(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.4s !important;
}

.nav-drawer.active {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.drawer-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 99998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease, visibility 0.35s !important;
}

.drawer-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Enlaces del Menú Hamburguesa */
.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-family: 'Syncopate', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    transition: all 0.25s ease;
}

.drawer-link:hover,
.drawer-link.current {
    color: var(--color-gold);
    padding-left: 0.5rem;
}

.drawer-link .link-num {
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.1em;
}

.drawer-link:hover .link-num {
    color: var(--color-gold);
}

/* ==========================================================================
   BOTÓN FLOTANTE OFICIAL WHATSAPP (ACOMPAÑA EL SCROLL PERMANENTEMENTE)
   ========================================================================== */
.whatsapp-float {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    z-index: 99990 !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 9999px !important;
    background: #25d366 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5), 0 0 15px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.whatsapp-float:hover {
    transform: scale(1.12) translateY(-3px) !important;
    box-shadow: 0 16px 40px rgba(37, 211, 102, 0.65), 0 0 25px rgba(37, 211, 102, 0.5) !important;
}

.whatsapp-float .pulse-ring {
    position: absolute;
    inset: -5px;
    border-radius: 9999px;
    border: 2px solid #25d366;
    animation: ping-wa 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes ping-wa {
    75%, 100% {
        transform: scale(1.45);
        opacity: 0;
    }
}

/* Tooltip WhatsApp */
.whatsapp-float .wa-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(10, 10, 10, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(37, 211, 102, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 639px) {
    .whatsapp-float {
        bottom: 1.15rem !important;
        right: 1.15rem !important;
        width: 52px !important;
        height: 52px !important;
    }

    .whatsapp-float .wa-tooltip {
        display: none;
    }
}

/* ==========================================================================
   BENTO GRID PRINCIPAL
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 170px;
    gap: 0.75rem;
    padding: 0.75rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 250px;
        gap: 1.25rem;
        padding: 1.25rem;
    }
}

.bento-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    display: block;
}

.bento-item:hover {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 20px 40px -15px rgba(212, 175, 55, 0.2);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
    filter: grayscale(60%) contrast(1.05);
}

.bento-item:hover img {
    transform: scale(1.06);
    filter: grayscale(0%) contrast(1.1);
}

.video-card iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none !important;
}

.bento-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    pointer-events: none;
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.4) 45%, transparent 85%);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    pointer-events: none;
    z-index: 10;
}

.bento-item:hover .bento-overlay,
.gallery-card:hover .bento-overlay {
    opacity: 1;
}

/* Spans Grid */
.span-col-2 { grid-column: span 2 / span 2; }
.span-col-3 { grid-column: span 3 / span 3; }
.span-col-4 { grid-column: span 4 / span 4; }
.span-row-2 { grid-row: span 2 / span 2; }
.span-row-3 { grid-row: span 3 / span 3; }

@media (max-width: 767px) {
    .mobile-span-col-1 { grid-column: span 1 / span 1; }
    .mobile-span-col-2 { grid-column: span 2 / span 2; }
    .mobile-span-row-2 { grid-row: span 2 / span 2; }
    
    .bento-item img {
        filter: grayscale(15%);
    }
    
    .bento-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.2) 60%, transparent 100%);
        padding: 0.75rem;
    }

    .bento-overlay > div {
        min-width: 0;
        max-width: 100%;
    }
    
    .bento-overlay h3 {
        font-size: 0.78rem;
        line-height: 1.15;
        overflow-wrap: break-word;
    }

    .bento-overlay h4 {
        font-size: 0.95rem;
        line-height: 1.2;
        overflow-wrap: break-word;
    }
}

/* Marquee / Ticker */
.marquee-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    background: rgba(212, 175, 55, 0.02);
    padding: 0.85rem 0;
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    animation: scroll-left 25s linear infinite;
    will-change: transform;
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   GALERÍA SUBSITIOS
   ========================================================================== */
.subsite-hero {
    position: relative;
    padding: 4rem 1.5rem 2.5rem;
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    overflow-wrap: break-word;
}

@media (max-width: 639px) {
    .subsite-hero {
        padding: 2.75rem 1rem 2rem;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gallery-card {
    position: relative;
    min-width: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 4 / 3;
    transition: all 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-gold);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.15);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* Galería Editorial Masonry (respeta orientación vertical y horizontal) */
.gallery-masonry {
    width: 100%;
    columns: 1;
    column-gap: 1.25rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        columns: 3;
    }
}

.gallery-card.masonry-card {
    width: 100%;
    aspect-ratio: auto;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.25rem;
}

.gallery-card.masonry-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-modal img {
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-dark);
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}
