/* ================================================
   TECTI - Liquid Glass Premium Styles
   Ultra-Interactive Design with Device Detection
   ================================================ */

/* ===== GLASS CARD - Premium Interactive ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, box-shadow;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(6, 182, 212, 0.12),
            transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover::before {
    opacity: 1;
}

/* Shimmer light sweep on hover */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.glass-card:hover::after {
    left: 150%;
}

.glass-card:hover {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(6, 182, 212, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(6, 182, 212, 0.25);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dark .glass-card:hover {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(6, 182, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== GLASS NAVIGATION ===== */
.glass-nav {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dark .glass-nav {
    background: rgba(15, 23, 42, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.glass-nav:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 20px rgba(6, 182, 212, 0.08);
}

/* Nav Items */
.nav-item {
    padding: 0.625rem;
    border-radius: 0.75rem;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 60%;
}

.nav-item:hover,
.nav-item.active {
    color: #0891b2;
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.dark .nav-item:hover,
.dark .nav-item.active {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.15);
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 640px) {
    .glass-nav {
        padding: 0.5rem 0.75rem !important;
        gap: 0.125rem;
    }

    .nav-item {
        padding: 0.375rem;
    }

    .nav-item i {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    .glass-nav .w-px {
        height: 1.25rem !important;
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }
}

@media (max-width: 400px) {
    .glass-nav {
        padding: 0.4rem 0.5rem !important;
        gap: 0.0625rem;
    }

    .nav-item {
        padding: 0.3rem;
    }

    .nav-item i {
        width: 1.125rem !important;
        height: 1.125rem !important;
    }

    .glass-nav .w-px {
        height: 1.125rem !important;
        margin-left: 0.125rem !important;
        margin-right: 0.125rem !important;
    }
}

/* Tablets */
@media (min-width: 641px) and (max-width: 1024px) {
    .glass-nav {
        padding: 0.75rem 1rem !important;
        gap: 0.25rem;
    }

    .nav-item i {
        width: 1.375rem !important;
        height: 1.375rem !important;
    }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-up {
    transform: translateY(60px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* ===== BACKGROUND BLOB ANIMATION ===== */
.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.03);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.3);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.6);
}

/* ===== TAB BUTTONS ===== */
.tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    color: #475569;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.tab-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tab-btn:active::after {
    width: 300px;
    height: 300px;
}

.dark .tab-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.tab-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
    border-color: rgba(6, 182, 212, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.2));
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

/* Tab content grid display */
.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
}

/* ===== ANIMATED STATS COUNTER ===== */
.stats-section {
    position: relative;
    z-index: 10;
}

.stat-counter-card {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.stat-counter-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.stat-counter-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.dark .stat-counter-label {
    color: #94a3b8;
}

/* ===== HERO TYPING ANIMATION ===== */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    margin-left: 2px;
    animation: blink 0.8s ease-in-out infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ===== PARTICLE CANVAS (BACKGROUND) ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== GRADIENT TEXT ANIMATION ===== */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== MOBILE TOUCH EFFECTS ===== */
@media (hover: none) and (pointer: coarse) {

    /* Touch-specific: remove hover effects that don't work on mobile */
    .glass-card:hover {
        transform: none;
    }

    .glass-card:active {
        transform: scale(0.98);
        border-color: rgba(6, 182, 212, 0.4);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.15),
            0 0 30px rgba(6, 182, 212, 0.15);
        transition-duration: 0.15s;
    }

    .tab-btn:hover {
        transform: none;
    }

    .tab-btn:active {
        transform: scale(0.96);
        background: rgba(6, 182, 212, 0.3);
    }

    .nav-item:hover {
        transform: none;
    }

    .nav-item:active {
        transform: scale(0.9);
        background: rgba(6, 182, 212, 0.2);
    }

    /* No shimmer on touch */
    .glass-card::after {
        display: none;
    }
}

/* ===== DESKTOP HOVER EFFECTS ===== */
@media (hover: hover) and (pointer: fine) {
    .glass-card {
        cursor: default;
    }

    /* Magnetic effect on nav items */
    .nav-item {
        transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* Enhanced section images */
    .tab-content img:hover {
        transform: scale(1.08);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }
}

/* ===== FLOATING CTA PULSE ===== */
@keyframes ctaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(6, 182, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.cta-pulse {
    animation: ctaPulse 2.5s ease-in-out infinite;
}

/* ===== SHIMMER LOADING FOR IMAGES ===== */
.img-loading {
    position: relative;
    overflow: hidden;
}

.img-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}