/* ============================================================
   ANDRADE GUINCHOS — Componentes Customizados
   Lightbox, Dropdown, Submenu Mobile, Scroll Animations
   ============================================================ */

/* -----------------------------------------------------------
   LIGHTBOX
   ----------------------------------------------------------- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
}

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

.lightbox-img-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(88vw, 960px);
    max-height: 90vh;
}

.lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-counter {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.lightbox-close svg {
    pointer-events: none;
}

/* Nav arrows */
.lightbox-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav:active {
    transform: scale(0.93);
}

.lightbox-prev:hover {
    transform: translateX(-3px);
}

.lightbox-next:hover {
    transform: translateX(3px);
}

.lightbox-nav svg {
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .lightbox-nav {
        width: 42px;
        height: 42px;
    }

    .lightbox-nav svg {
        width: 24px;
        height: 24px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }

    .lightbox-img {
        max-height: 75vh;
        border-radius: 8px;
    }
}

/* -----------------------------------------------------------
   NAVBAR DROPDOWN
   ----------------------------------------------------------- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    padding: 8px;
    z-index: 50;
    animation: dropdownIn 0.18s ease;
}

.dropdown-group:hover .dropdown-menu,
.dropdown-group:focus-within .dropdown-menu {
    display: block;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: block;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f0faf5;
    color: #006a2d;
}

/* -----------------------------------------------------------
   MOBILE SUBMENU (ACCORDION)
   ----------------------------------------------------------- */
#mobile-submenu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-submenu-content.open {
    max-height: 600px;
}

/* -----------------------------------------------------------
   SCROLL ANIMATIONS (fade-up)
   ----------------------------------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------
   STICKY CARD REVEAL
   ----------------------------------------------------------- */
.sticky-card {
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

/* -----------------------------------------------------------
   NOISE OVERLAY (Visual texture)
   ----------------------------------------------------------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    filter: url(#noiseFilter);
    will-change: transform;
}

/* -----------------------------------------------------------
   WHATSAPP PULSE BUTTON
   ----------------------------------------------------------- */
@keyframes waPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    60%       { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

.wa-pulse {
    animation: waPulse 2.2s infinite;
}
