/* ============================================================================
   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 12px rgba(102, 126, 234, 0.20),
        0 2px 4px rgba(102, 126, 234, 0.12);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);  /* More subtle */
    box-shadow:
        0 8px 24px rgba(102, 126, 234, 0.25),
        0 4px 8px rgba(102, 126, 234, 0.15);
    filter: brightness(1.08);  /* Less aggressive */
}

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

/* WhatsApp Container */
.whatsapp-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    display: block;
    width: 64px;
    height: 64px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    filter: drop-shadow(0 2px 6px rgba(37, 211, 102, 0.35));
}

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 10px rgba(37, 211, 102, 0.5));
}

.whatsapp-float:active {
    transform: scale(0.95);
}

/* WhatsApp Popup */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 220px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.whatsapp-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1;
}

.whatsapp-popup-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.whatsapp-popup-close svg {
    width: 16px;
    height: 16px;
}

.whatsapp-popup-content {
    padding-right: 20px;
}

.whatsapp-popup-content p {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .whatsapp-container {
        bottom: 24px;
        right: 24px;
    }

    .whatsapp-float {
        width: 56px;
        height: 56px;
        filter: drop-shadow(0 2px 4px rgba(37, 211, 102, 0.25));
    }

    .whatsapp-float:hover {
        filter: drop-shadow(0 3px 8px rgba(37, 211, 102, 0.4));
    }

    .whatsapp-popup {
        bottom: 70px;
        min-width: 200px;
        max-width: 240px;
        padding: 14px 18px;
    }

    .whatsapp-popup-content p {
        font-size: 13px;
    }
}

/* ============================================================================
   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;
    }
}
