/**
 * TECH PREMIUM EFFECTS
 * Technologiczny styl dla strony B.S.G
 * ==============================================
 */

/* ===================================
   TECH STATS - Monospace Numbers + Glitch
   =================================== */

.stat-number,
.big-number {
    font-family: 'Courier New', 'Consolas', monospace !important;
    font-size: 64px !important;
    font-weight: 900 !important;
    color: #EB5A3E;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 
        0 0 10px rgba(235, 90, 62, 0.5),
        0 0 20px rgba(235, 90, 62, 0.3),
        0 0 30px rgba(235, 90, 62, 0.2);
    position: relative;
    letter-spacing: -2px;
}

/* Corner Brackets - Top Left */
.stat-item::before,
.number-box::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #EB5A3E;
    border-left: 3px solid #EB5A3E;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover::before,
.number-box:hover::before {
    opacity: 1;
    width: 40px;
    height: 40px;
    top: 5px;
    left: 5px;
}

/* Corner Brackets - Top Right, Bottom Left, Bottom Right */
.stat-item::after,
.number-box::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #EB5A3E;
    border-right: 3px solid #EB5A3E;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.stat-item:hover::after,
.number-box:hover::after {
    opacity: 1;
    width: 40px;
    height: 40px;
    top: 5px;
    right: 5px;
}

/* Additional brackets using pseudo-element on child */
.stat-item,
.number-box {
    position: relative;
}

.stat-item .stat-number::before,
.number-box .big-number::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #EB5A3E;
    border-left: 3px solid #EB5A3E;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.stat-item:hover .stat-number::before,
.number-box:hover .big-number::before {
    opacity: 1;
    width: 40px;
    height: 40px;
    bottom: -35px;
    left: 5px;
}

.stat-item .stat-number::after,
.number-box .big-number::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #EB5A3E;
    border-right: 3px solid #EB5A3E;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.stat-item:hover .stat-number::after,
.number-box:hover .big-number::after {
    opacity: 1;
    width: 40px;
    height: 40px;
    bottom: -35px;
    right: 5px;
}

.stat-item > *,
.number-box > * {
    position: relative;
    z-index: 1;
}

/* Counter animation state */
.stat-number.counting,
.big-number.counting {
    animation: techPulse 0.1s ease-in-out;
}

@keyframes techPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Glitch effect on hover */
.stat-number:hover,
.big-number:hover {
    animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* ===================================
   MAGNETIC BUTTONS - Tech Style
   =================================== */

.btn,
.btn-primary,
.btn-secondary,
.button-text {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: transform;
}

/* Ripple container */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Circuit board ripple pattern */
.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 10px 10px;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

/* Magnetic hover state */
.btn.magnetic-active {
    z-index: 10;
}

/* Tech border glow */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(235, 90, 62, 0.5), 
        rgba(61, 155, 255, 0.5),
        rgba(184, 61, 255, 0.5));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Scanning line inside button */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 100%;
}

/* ===================================
   REVEAL ANIMATIONS - Improved
   =================================== */

.reveal-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-fade.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-slide-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-slide-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.reveal-fade:nth-child(1) { transition-delay: 0.1s; }
.reveal-fade:nth-child(2) { transition-delay: 0.2s; }
.reveal-fade:nth-child(3) { transition-delay: 0.3s; }
.reveal-fade:nth-child(4) { transition-delay: 0.4s; }
.reveal-fade:nth-child(5) { transition-delay: 0.5s; }
.reveal-fade:nth-child(6) { transition-delay: 0.6s; }

/* ===================================
   DETAIL BLOCKS - Corner Brackets DISABLED
   User didn't want this effect on service blocks
   =================================== */

/* REMOVED - was adding unwanted corner brackets on hover */

/* ===================================
   VALUE ITEMS & PREMIUM CARDS - Corner Brackets (Optional)
   Add class "tech-brackets" to enable
   =================================== */

/* Note: Use wrapper div to avoid conflict with existing ::before/::after */
.value-item.tech-brackets,
.premium-card.tech-brackets {
    position: relative;
}

/* Corner Brackets - Using box-shadow for multiple borders */
.value-item.tech-brackets,
.premium-card.tech-brackets {
    box-shadow: 
        /* Top Left */
        inset 35px 35px 0 -32px transparent,
        inset 37px 0 0 -34px transparent,
        inset 0 37px 0 -34px transparent,
        /* Top Right */  
        inset -35px 35px 0 -32px transparent,
        inset -37px 0 0 -34px transparent,
        inset 0 37px 0 -34px transparent,
        /* Bottom Left */
        inset 35px -35px 0 -32px transparent,
        inset 37px 0 0 -34px transparent,
        inset 0 -37px 0 -34px transparent,
        /* Bottom Right */
        inset -35px -35px 0 -32px transparent,
        inset -37px 0 0 -34px transparent,
        inset 0 -37px 0 -34px transparent,
        /* Original shadow */
        0 20px 40px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-item.tech-brackets:hover,
.premium-card.tech-brackets:hover {
    box-shadow: 
        /* Top Left - expanded */
        inset 40px 40px 0 -37px #FF6B3D,
        inset 3px 0 0 0 #FF6B3D,
        inset 0 3px 0 0 #FF6B3D,
        /* Top Right - expanded */
        inset -40px 40px 0 -37px #FF6B3D,
        inset -3px 0 0 0 #FF6B3D,
        inset 0 3px 0 0 #FF6B3D,
        /* Bottom Left - expanded */
        inset 40px -40px 0 -37px #FF6B3D,
        inset 3px 0 0 0 #FF6B3D,
        inset 0 -3px 0 0 #FF6B3D,
        /* Bottom Right - expanded */
        inset -40px -40px 0 -37px #FF6B3D,
        inset -3px 0 0 0 #FF6B3D,
        inset 0 -3px 0 0 #FF6B3D,
        /* Glow shadow */
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 48px rgba(255, 107, 61, 0.16);
}

/* ===================================
   TECH LOADING INDICATORS
   =================================== */

.tech-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(235, 90, 62, 0.3);
    border-top-color: #EB5A3E;
    border-radius: 50%;
    animation: techSpin 0.8s linear infinite;
}

@keyframes techSpin {
    to { transform: rotate(360deg); }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .stat-number {
        font-size: 48px !important;
    }
    
    .btn::after {
        display: none; /* Disable scanning line on mobile */
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .stat-number,
    .btn,
    .reveal-fade,
    .reveal-slide-left,
    .reveal-slide-right,
    .reveal-scale,
    .stat-item::before,
    .stat-item::after,
    .btn::before,
    .btn::after,
    .btn-ripple {
        animation: none !important;
        transition: none !important;
    }
}

