/* Components and Animation Styles */

/* Animation Base Classes */
.animate-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.animate-element:nth-child(1) { transition-delay: 0.1s; }
.animate-element:nth-child(2) { transition-delay: 0.2s; }
.animate-element:nth-child(3) { transition-delay: 0.3s; }
.animate-element:nth-child(4) { transition-delay: 0.4s; }
.animate-element:nth-child(5) { transition-delay: 0.5s; }
.animate-element:nth-child(6) { transition-delay: 0.6s; }

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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: left 0.5s;
}

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

.btn-icon {
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(-45deg, #1e3a8a, #059669, #ea580c, #1e3a8a);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

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

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

.float:nth-child(2) { animation-delay: 2s; }
.float:nth-child(3) { animation-delay: 4s; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(30, 58, 138, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #059669);
    border-radius: 2px;
    transform: translateX(-100%);
    transition: transform 1s ease-out;
}

.progress-fill.animate {
    transform: translateX(0);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #1e3a8a;
}

/* Accordion */
.accordion-item {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background: #e2e8f0;
}

.accordion-header.active {
    background: #1e3a8a;
    color: white;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-body {
    padding: 1.5rem;
}

/* Tabs */
.tabs {
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #1e3a8a;
    background: rgba(30, 58, 138, 0.05);
}

.tab-button.active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a;
}

.tab-content {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #059669;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    border-left-color: #dc2626;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 40px;
    border-radius: 6px;
    width: 120px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .animate-element {
        transform: translateY(20px);
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .animate-element {
        border: 1px solid currentColor;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .modal-content {
        border: 2px solid #1e3a8a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-element,
    .card-hover,
    .btn,
    .float,
    .pulse,
    .gradient-text,
    .progress-fill,
    .tooltip::after,
    .tooltip::before,
    .modal,
    .modal-content,
    .accordion-content,
    .tab-content,
    .notification,
    .skeleton {
        animation: none !important;
        transition: none !important;
    }
    
    .animate-element {
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    .modal,
    .notification,
    .tooltip::after,
    .tooltip::before {
        display: none !important;
    }
    
    .animate-element {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .btn {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: #000 !important;
    }
}

