/* ============================================================================
   Components: Common Controls
   ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.btn-icon-spacing i {
    margin-right: 8px;
    font-size: 1.1em;
    vertical-align: middle;
}
/* ============================================================================
   Components: Scroll Controls
   ========================================================================= */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

/* ============================================================================
   Components: Global Lightbox
   ========================================================================= */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-top);
    background: rgba(8, 11, 19, 0.92);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.25s ease;
}

.lightbox-content {
    position: relative;
    max-width: min(1000px, 90vw);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(59, 130, 246, 0.2);
    background: rgba(15, 20, 28, 0.85);
}

.lightbox-content img,
.lightbox-content iframe {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: inherit;
    object-fit: contain;
    background: #05070c;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-zoom-reset {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 20, 32, 0.8);
    color: rgba(226, 232, 240, 0.85);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(15, 20, 32, 0.5);
}

.lightbox-close {
    top: 14px;
    right: 14px;
    z-index: 2;
}

.lightbox-prev {
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

.lightbox-zoom-reset {
    bottom: 18px;
    right: 18px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-zoom-reset:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(15, 23, 42, 0.92);
    color: #FFFFFF;
}

.lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.lightbox-content iframe {
    border: none;
    aspect-ratio: 16 / 9;
    width: min(960px, 90vw);
}

.lightbox-video-wrapper {
    width: min(960px, 90vw);
    max-height: 90vh;
}

@media (max-width: 768px) {
    .lightbox-overlay {
        padding: 1.25rem;
    }

    .lightbox-content {
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--radius-xl);
    }

    .lightbox-content img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 85vh;
        object-fit: contain;
        object-position: center;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;
    }

    .lightbox-counter {
        bottom: 12px;
        font-size: 0.85rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
