/**
 * Construction Square - Modern 2026 Styles
 * Glassmorphism, 3D effects, and cutting-edge design
 */

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(139, 35, 50, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-primary {
    background: rgba(139, 35, 50, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 35, 50, 0.3);
}

/* ============================================
   3D CARD EFFECTS
   ============================================ */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow:
        0 20px 60px rgba(139, 35, 50, 0.2),
        0 0 0 1px rgba(139, 35, 50, 0.1);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 35, 50, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: inherit;
    z-index: -1;
}

.card-3d:hover::before {
    opacity: 1;
}

/* ============================================
   GRADIENT BACKGROUNDS
   ============================================ */
.gradient-bg-primary {
    background: linear-gradient(135deg,
        #8B2332 0%,
        #6B1A26 50%,
        #A52A3A 100%);
}

.gradient-bg-animated {
    background: linear-gradient(-45deg,
        #8B2332,
        #6B1A26,
        #A52A3A,
        #8B2332);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* ============================================
   NEON GLOW EFFECTS
   ============================================ */
.neon-border {
    position: relative;
    border: 2px solid #8B2332;
    box-shadow:
        0 0 5px #8B2332,
        0 0 10px #8B2332,
        0 0 20px #8B2332,
        inset 0 0 10px rgba(139, 35, 50, 0.2);
}

.neon-text {
    color: #8B2332;
    text-shadow:
        0 0 10px rgba(139, 35, 50, 0.8),
        0 0 20px rgba(139, 35, 50, 0.6),
        0 0 30px rgba(139, 35, 50, 0.4);
}

/* ============================================
   MODERN BUTTONS
   ============================================ */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8B2332, #6B1A26);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 35, 50, 0.3);
}

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

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

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 35, 50, 0.4);
}

.btn-modern:active {
    transform: translateY(0);
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */
.float-element {
    animation: float 6s ease-in-out infinite;
}

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

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   MORPHING SHAPES
   ============================================ */
.morphing-blob {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(45deg,
        rgba(139, 35, 50, 0.3),
        rgba(165, 42, 58, 0.3));
    animation: morph 20s ease-in-out infinite;
    filter: blur(40px);
}

@keyframes morph {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
        transform: translate(0, 100px) rotate(180deg);
    }
    75% {
        border-radius: 30% 70% 70% 30% / 70% 30% 70% 30%;
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* ============================================
   TEXT EFFECTS
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, #8B2332, #A52A3A, #6B1A26);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        #8B2332 0%,
        #A52A3A 50%,
        #8B2332 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(139, 35, 50, 0.1);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow:
        0 0 20px rgba(139, 35, 50, 0.4),
        0 0 40px rgba(139, 35, 50, 0.2);
}

/* ============================================
   PARALLAX LAYERS
   ============================================ */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        rgba(139, 35, 50, 0.1) 25%,
        rgba(139, 35, 50, 0.2) 50%,
        rgba(139, 35, 50, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B2332, #A52A3A);
    z-index: 9999;
    transform-origin: left;
    box-shadow: 0 2px 10px rgba(139, 35, 50, 0.5);
}

/* ============================================
   IMAGE HOVER ZOOM
   ============================================ */
.image-zoom-container {
    overflow: hidden;
    border-radius: 12px;
}

.image-zoom {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.image-zoom-container:hover .image-zoom {
    transform: scale(1.1) rotate(2deg);
}

/* ============================================
   TOOLTIP MODERN
   ============================================ */
.tooltip-modern {
    position: relative;
}

.tooltip-modern::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    backdrop-filter: blur(10px);
}

.tooltip-modern:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* ============================================
   STATS COUNTER STYLING
   ============================================ */
.stat-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg,
        rgba(139, 35, 50, 0.2),
        rgba(139, 35, 50, 0.1));
    border-color: rgba(139, 35, 50, 0.4);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .card-3d:hover {
        transform: translateY(-5px);
    }

    .morphing-blob {
        display: none;
    }

    #particle-canvas {
        opacity: 0.5;
    }
}

/* ============================================
   DARK MODE ENHANCEMENTS
   ============================================ */
.dark .glass-card {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .card-3d {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dark .card-3d:hover {
    box-shadow: 0 20px 60px rgba(139, 35, 50, 0.3);
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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