/* ==========================================
   PROFESSIONAL ANIMATIONS STYLESHEET
   ERP Implementation Report - ABC Holdings
   ========================================== */

/* === CSS Custom Properties === */
:root {
    --primary-color: #1abc9c;
    --primary-dark: #16a085;
    --text-dark: #2c3e50;
    --text-gray: #34495e;
    --text-light: #555;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-slower: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base Animation Keyframes === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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 fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* === Page Load Animations === */
body {
    animation: fadeIn 0.6s ease-out;
}

header {
    animation: fadeInDown 0.7s ease-out;
}

header h1 {
    position: relative;
    overflow: hidden;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
    transition: all 0.5s ease;
    transform: translateX(-50%);
}

header:hover h1::after {
    width: 60%;
}

/* === Navigation Enhancements === */
nav.top-nav {
    animation: fadeInDown 0.7s ease-out 0.1s both;
}

nav.top-nav a {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    transform: translateY(0);
}

nav.top-nav a::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 ease;
}

nav.top-nav a:hover::before {
    left: 100%;
}

nav.top-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
}

nav.top-nav a:active {
    transform: translateY(0);
}

/* === Main Container Animation === */
main.container {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* === Section & Card Animations === */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slower);
}

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

section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* === Table of Contents Animations === */
.toc-list {
    animation: scaleIn 0.6s ease-out 0.3s both;
}

.toc-list li {
    opacity: 0;
    animation: fadeInLeft 0.5s ease-out forwards;
}

.toc-list li:nth-child(1) { animation-delay: 0.4s; }
.toc-list li:nth-child(2) { animation-delay: 0.5s; }
.toc-list li:nth-child(3) { animation-delay: 0.6s; }
.toc-list li:nth-child(4) { animation-delay: 0.7s; }
.toc-list li:nth-child(5) { animation-delay: 0.8s; }
.toc-list li:nth-child(6) { animation-delay: 0.9s; }
.toc-list li:nth-child(7) { animation-delay: 1.0s; }
.toc-list li:nth-child(8) { animation-delay: 1.1s; }

.toc-list a {
    position: relative;
    overflow: hidden;
}

.toc-list a::after {
    content: '→';
    position: absolute;
    right: 60px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-normal);
}

.toc-list a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.toc-list a:hover .page-number {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.page-number {
    transition: all var(--transition-normal);
}

/* === Image Animations === */
img {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    transition: all var(--transition-slow);
}

img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* === Form Animations === */
input[type="text"],
input[type="email"],
textarea {
    transition: all var(--transition-normal);
    border: 2px solid #ddd;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
    transform: translateY(-2px);
}

button {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.4);
}

button:active {
    transform: translateY(0);
}

/* === List Item Animations === */
ul li {
    opacity: 0;
    animation: fadeInLeft 0.5s ease-out forwards;
}

section ul li:nth-child(1) { animation-delay: 0.3s; }
section ul li:nth-child(2) { animation-delay: 0.4s; }
section ul li:nth-child(3) { animation-delay: 0.5s; }
section ul li:nth-child(4) { animation-delay: 0.6s; }
section ul li:nth-child(5) { animation-delay: 0.7s; }

/* === Footer Animation === */
footer {
    animation: fadeIn 0.6s ease-out 0.8s both;
    transition: all var(--transition-normal);
}

footer:hover {
    color: var(--primary-color);
}

footer p {
    position: relative;
}

footer p::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

footer:hover p::before {
    opacity: 1;
}

/* === Paragraph Text Animation === */
main p {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

/* === H2/H3 Heading Animations === */
h2, h3 {
    position: relative;
    display: inline-block;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-slow);
}

section:hover h2::before {
    width: 100%;
}

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

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

/* === Scroll Progress Indicator === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* === Back to Top Button === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* === Responsive Animations === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 600px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* === Professional Card Hover Effects === */
.card-hover {
    transition: all var(--transition-normal);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* === Gradient Text Effect === */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark), var(--text-dark));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
}
