/* ====================================
   MODERN ANIMATIONS & TRANSITIONS
   ==================================== */

/* Page Transition Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    animation: logoRotate 2s ease-in-out infinite;
}

.loader-text {
    font-size: 18px;
    color: #00c6ff;
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Rotating Canvas Animation */
@keyframes logoRotate {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1); }
}

/* Smooth Fade In/Out */
@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);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 198, 255, 0.5),
                    0 0 10px rgba(0, 198, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 198, 255, 0.8),
                    0 0 30px rgba(0, 198, 255, 0.5);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Wave Animation */
@keyframes wave {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scale Pulse */
@keyframes scalePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Text Gradient Animation */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ====================================
   SECTION ANIMATIONS
   ==================================== */

section {
    animation: fadeInUp 0.8s ease-out;
}

.hero-section {
    animation: none !important;
}

.hero-content h1 {
    animation: fadeInDown 1s ease-out;
}

.hero-content h2 {
    animation: fadeInDown 1.2s ease-out;
}

.hero-content p {
    animation: fadeInUp 1.4s ease-out;
}

.hero-content .btn {
    animation: fadeInUp 1.6s ease-out;
    transition: all 0.3s ease;
}

.hero-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 198, 255, 0.3);
}

/* ====================================
   CARD ANIMATIONS
   ==================================== */

.card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 198, 255, 0.15);
}

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

/* Service Card */
.service-card {
    border: 2px solid transparent;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.service-card:hover {
    border-color: #00c6ff;
    background: linear-gradient(135deg, #f0f8ff 0%, #e0f7ff 100%);
}

.service-img {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    height: 200px;
    object-fit: cover;
}

.service-card:hover .service-img {
    transform: scale(1.1) rotate(2deg);
}

/* ====================================
   BUTTON ANIMATIONS
   ==================================== */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::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, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #00c6ff 0%, #0099cc 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0099cc 0%, #0077aa 100%);
    box-shadow: 0 8px 25px rgba(0, 198, 255, 0.5);
    transform: translateY(-3px);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
}

/* ====================================
   TEXT ANIMATIONS
   ==================================== */

.display-5 {
    animation: fadeInDown 0.8s ease-out;
    background: linear-gradient(135deg, #1a1a2e 0%, #00c6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
    background-size: 200% 200%;
}

.lead {
    animation: fadeInUp 1s ease-out;
}

/* ====================================
   HOVER EFFECTS
   ==================================== */

a, button {
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00c6ff;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* ====================================
   NAVBAR ANIMATIONS
   ==================================== */

.navbar {
    animation: fadeInDown 0.6s ease-out;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: #00c6ff;
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* ====================================
   IMAGE ANIMATIONS
   ==================================== */

.gallery-img {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.gallery-img:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 15px 40px rgba(0, 198, 255, 0.2);
}

.img-fluid {
    animation: fadeInUp 0.8s ease-out;
}

/* ====================================
   FLIP ANIMATION
   ==================================== */

.company-card {
    perspective: 1000px;
    height: 280px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.company-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-front {
    background: white;
    transform: rotateY(0deg);
}

.card-back {
    background: linear-gradient(135deg, #00c6ff 0%, #0099cc 100%);
    color: white;
    transform: rotateY(180deg);
}

.company-logo {
    max-width: 120px;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

/* ====================================
   LOADING SKELETON
   ==================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ====================================
   RESPONSIVE ANIMATIONS
   ==================================== */

@media (max-width: 768px) {
    .page-loader {
        animation-duration: 0.5s;
    }
    
    section {
        animation-duration: 0.6s;
    }
    
    .card {
        animation-duration: 0.5s;
    }
    
    .display-5 {
        font-size: 24px !important;
    }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .page-loader,
    section,
    .card,
    .btn {
        animation: none !important;
    }
}
