/* ==================== GLOBAL ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==================== SCROLL ANIMATIONS ==================== */

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* ==================== CARD STYLES ==================== */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    height: 200px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    animation: rotate 4s linear infinite;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color, #1e293b);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary, #64748b);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ==================== BUTTON STYLES ==================== */

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: translateX(5px);
}

.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ==================== SECTION STYLES ==================== */

section {
    scroll-margin-top: 100px;
}

section h2 {
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

/* ==================== LOADING SPINNER ==================== */

.spinner {
    border: 4px solid rgba(52, 152, 219, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* ==================== BADGE STYLES ==================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--info-50, #e0f2fe);
    color: var(--info-700, #0369a1);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: fadeInUp 0.6s ease-out;
}

.badge-success {
    background: var(--success-50, #f0fdf4);
    color: var(--success-700, #15803d);
}

.badge-warning {
    background: var(--warning-50, #fefce8);
    color: var(--warning-700, #a16207);
}

.badge-danger {
    background: var(--error-50, #fef2f2);
    color: var(--error-700, #b91c1c);
}

/* ==================== GRADIENT TEXT ==================== */

.text-gradient {
    background: linear-gradient(135deg, #3498db 0%, #e74c3c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== HOVER EFFECTS ==================== */

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hover-shine:hover::after {
    left: 100%;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    section h2 {
        font-size: 1.8rem;
    }

    .card-header {
        height: 150px;
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    section h2 {
        font-size: 1.5rem;
    }

    .card-header {
        height: 120px;
        font-size: 1.5rem;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
html.dark-theme .card-title,
body.dark-theme .card-title {
    color: var(--dark-text, #f8fafc);
}

html.dark-theme .card-text,
body.dark-theme .card-text {
    color: var(--dark-text-secondary, #cbd5e1);
}

html.dark-theme .badge,
body.dark-theme .badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

html.dark-theme .badge-success,
body.dark-theme .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

html.dark-theme .badge-warning,
body.dark-theme .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

html.dark-theme .badge-danger,
body.dark-theme .badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
