/* ============================================
   LIGHTBOX STYLES
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    width: 40px;
    height: 40px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-close {
    background: url(../images/icons/close.svg) no-repeat center;
    background-size: contain;
    top: 20px;
    right: 40px;
}

.lightbox-prev {
    background: url(../images/icons/previous.svg) no-repeat center;
    background-size: contain;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    background: url(../images/icons/next.svg) no-repeat center;
    background-size: contain;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slide-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-up {
    animation-name: fade-up;
}

.fade-down {
    animation-name: fade-down;
}

.fade-in {
    animation-name: fade-in;
}

.zoom-in {
    animation-name: zoom-in;
}

.slide-left {
    animation-name: slide-left;
}

.slide-right {
    animation-name: slide-right;
}

/* ============================================
   FORM VALIDATION STYLES
   ============================================ */
.form-control.invalid {
    border-color: #dc3545;
}

.form-control.valid {
    border-color: #28a745;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12pt;
    margin-top: 5px;
    font-weight: 400;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   TOOLTIPS (Optional Enhancement)
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
}

/* ============================================
   STICKY ELEMENTS
   ============================================ */
.sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ============================================
   ACCESSIBILITY FOCUS STYLES
   ============================================ */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   PRINT-SPECIFIC OVERRIDES
   ============================================ */
@media print {
    .lightbox,
    [data-tooltip]::before {
        display: none !important;
    }
}