/* ========================================
   Custom Keyframe Animations
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   Animation Delays
======================================== */
.delay-75 {
    animation-delay: 75ms;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-150 {
    animation-delay: 150ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.animate-delay-item {
    opacity: 0;
}

/* ========================================
   Glassmorphism Utilities
======================================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-dark {
    background: rgba(128, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   Hero Gradient Background
======================================== */
.hero-gradient {
    background: #800000;
    /* Fallback solid color */
    background: linear-gradient(135deg,
            #800000 0%,
            #6b1c1c 25%,
            #800000 50%,
            #a31f1f 75%,
            #800000 100%) !important;
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

.hero-pattern {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 223, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(255, 223, 0, 0.05) 0%, transparent 40%);
}

/* ========================================
   Custom Scrollbar
======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   Focus States for Accessibility
======================================== */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.3);
}

.focus-ring-gold:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 223, 0, 0.5);
}

/* ========================================
   Button Hover Effects
======================================== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.5s;
}

.btn-shine:hover::before {
    left: 100%;
}

/* ========================================
   Card Hover Lift Effect
======================================== */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-8px);
}

/* ========================================
   Status Pulse Animation
======================================== */
.status-pulse {
    position: relative;
}

.status-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-online::before {
    background: rgba(34, 197, 94, 0.4);
}

.status-maintenance::before {
    background: rgba(234, 179, 8, 0.4);
}

@keyframes statusPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* ========================================
   Timeline Styling
======================================== */
.timeline-line {
    background: linear-gradient(180deg, #800000 0%, rgba(128, 0, 0, 0.2) 100%);
}

/* ========================================
   Modal Backdrop
======================================== */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ========================================
   Gradient Text
======================================== */
.text-gradient {
    background: linear-gradient(135deg, #FFDF00 0%, #fff8c5 50%, #FFDF00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    line-height: 1.15;
    padding-bottom: 0.08em;
}

/* ========================================
   Section Dividers
======================================== */
.section-divider {
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

/* ========================================
   Line Clamp Utility
======================================== */
.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}