/* Dynamic Effects CSS for Coran Labs */

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffcc, #0099ff, #ff00ff);
    width: 0;
    z-index: 10000;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.7);
}

/* TypeWriter Effect */
.typewriter {
    color: #00ffcc;
    font-weight: bold;
    position: relative;
    display: inline-block;
    min-height: 1.2em;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.typewriter::after {
    content: '|';
    animation: blink 1s infinite;
    color: #00ffcc;
    font-weight: normal;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Reveal on Scroll Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Service Cards */
.services {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.services::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent,
        rgba(0, 255, 204, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.services:hover::before {
    animation: shimmer 0.5s ease-in-out;
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.services:hover {
    transform: perspective(1000px) translateZ(20px) scale(1.05);
    box-shadow:
        0 25px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 255, 204, 0.2) inset;
    border-color: #00ffcc !important;
}

/* Cursor Trail */
.cursor-trail-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
}

/* Dark Mode - REMOVED (using light theme only) */

/* Navbar Animations */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar-scrolled {
    background-color: rgba(0, 0, 0, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    padding: 10px 0 !important;
}

.navbar-hidden {
    transform: translateY(-100%);
}

/* Animated Buttons */
.btn, .btn-accent, .btn-with-line {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn::before, .btn-accent::before, .btn-with-line::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;
    z-index: -1;
}

.btn:hover::before, .btn-accent:hover::before, .btn-with-line:hover::before {
    width: 300%;
    height: 300%;
}

/* Portfolio Item Hover Effects */
.portfolio-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.portfolio-item img {
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(0, 255, 204, 0.3),
        rgba(0, 153, 255, 0.3)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.portfolio-item:hover::after {
    opacity: 1;
}

/* Loading Animation Enhancement */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-circle {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(0, 255, 204, 0.1);
    border-top: 3px solid #00ffcc;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #00ffcc, #0099ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3em;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

/* Animated Statistics */
[data-counter] {
    font-size: 3rem;
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Parallax Elements */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Glow Effects for Important Elements */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        #00ffcc,
        transparent
    );
    animation: glowLine 3s infinite;
}

@keyframes glowLine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Card Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.services:hover {
    animation: float 2s ease-in-out infinite;
}

/* Text Selection Style */
::selection {
    background: #00ffcc;
    color: #000;
}

::-moz-selection {
    background: #00ffcc;
    color: #000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .preloader::before {
        font-size: 1.5rem;
    }

    [data-counter] {
        font-size: 2rem;
    }
}

/* Page Load Animation */
body.loaded * {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(90deg, #00ffcc, #0099ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}