/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes progressBar {
    from { width: 0; }
    to { width: var(--scroll-width, 0%); }
}

@keyframes rotateIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(221, 38, 41, 0.1);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: var(--fenix-red);
    width: 0;
    transition: width 0.1s ease;
    animation: progressBar 0.3s ease-out;
}

/* Page Header */
.page-header {
    animation: fadeIn 1s ease-out;
}

.page-header h1 {
    animation: fadeInUp 0.8s ease-out;
}

.page-header p {
    animation: fadeInUp 0.8s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Privacy Navigation */
.privacy-nav {
    animation: slideInLeft 0.8s ease-out;
    transition: all 0.3s ease;
}

.privacy-nav:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.privacy-nav ul li {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.privacy-nav ul li:nth-child(1) { animation-delay: 0.1s; }
.privacy-nav ul li:nth-child(2) { animation-delay: 0.2s; }
.privacy-nav ul li:nth-child(3) { animation-delay: 0.3s; }
.privacy-nav ul li:nth-child(4) { animation-delay: 0.4s; }
.privacy-nav ul li:nth-child(5) { animation-delay: 0.5s; }
.privacy-nav ul li:nth-child(6) { animation-delay: 0.6s; }
.privacy-nav ul li:nth-child(7) { animation-delay: 0.7s; }
.privacy-nav ul li:nth-child(8) { animation-delay: 0.8s; }

.privacy-nav a {
    transition: all 0.3s ease;
}

.privacy-nav a:hover {
    color: var(--fenix-red);
    transform: translateX(10px);
}

/* Privacy Sections */
.privacy-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: calc(var(--section-index, 0) * 0.2s);
    transition: all 0.3s ease;
}

.privacy-section:hover {
    transform: translateY(-5px);
}

.privacy-section h2 {
    position: relative;
    padding-left: 20px;
}

.privacy-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--fenix-red);
    transition: height 0.3s ease;
}

.privacy-section:hover h2::before {
    height: 100%;
}

/* Info Icons */
.info-icon {
    transition: all 0.3s ease;
}

.privacy-section:hover .info-icon {
    animation: rotateIcon 1s ease-in-out;
    color: var(--fenix-red);
}

/* Category Icons */
.category-title i {
    transition: all 0.3s ease;
}

.category-title:hover i {
    animation: rotateIcon 1s ease-in-out;
    color: var(--fenix-red);
}

/* Print Button */
.print-btn {
    animation: fadeIn 1s ease-out;
    transition: all 0.3s ease;
}

.print-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.print-btn i {
    transition: all 0.3s ease;
}

.print-btn:hover i {
    animation: rotateIcon 1s ease-in-out;
    color: var(--fenix-red);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .privacy-section {
        animation-delay: calc(var(--section-index, 0) * 0.1s);
    }
    
    .privacy-nav ul li {
        animation-delay: calc(var(--item-index, 0) * 0.1s);
    }
}
