/* Test Landing — Modern Effects (tech background, animations, button effects) */

/* ===== Animated Tech Background ===== */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.tech-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridScroll 20s linear infinite;
    transform-origin: 0 0;
}

body.light-mode .tech-bg-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.07) 1px, transparent 1px);
}

@keyframes gridScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-60px, -60px); }
}

/* Floating tech circles */
.tech-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(96, 165, 250, 0.08);
    animation: floatCircle 25s ease-in-out infinite;
}

body.light-mode .tech-circle {
    border-color: rgba(15, 23, 42, 0.12);
}

.tech-circle:nth-child(1) {
    width: 400px; height: 400px;
    top: -100px; right: -100px;
    animation-delay: 0s;
    animation-duration: 30s;
}

.tech-circle:nth-child(2) {
    width: 300px; height: 300px;
    bottom: -50px; left: -50px;
    animation-delay: -5s;
    animation-duration: 25s;
}

.tech-circle:nth-child(3) {
    width: 200px; height: 200px;
    top: 40%; left: 60%;
    animation-delay: -10s;
    animation-duration: 20s;
}

.tech-circle:nth-child(4) {
    width: 150px; height: 150px;
    top: 20%; left: 10%;
    animation-delay: -15s;
    animation-duration: 35s;
}

@keyframes floatCircle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* Glowing dots */
.tech-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.15;
    animation: pulseDot 4s ease-in-out infinite;
}

body.light-mode .tech-dot {
    opacity: 0.35;
    background: rgba(15, 23, 42, 0.4);
}

.tech-dot:nth-child(5) { top: 15%; left: 20%; animation-delay: 0s; }
.tech-dot:nth-child(6) { top: 70%; left: 80%; animation-delay: -1s; }
.tech-dot:nth-child(7) { top: 40%; left: 40%; animation-delay: -2s; }
.tech-dot:nth-child(8) { top: 85%; left: 15%; animation-delay: -3s; }
.tech-dot:nth-child(9) { top: 25%; left: 75%; animation-delay: -0.5s; }
.tech-dot:nth-child(10) { top: 60%; left: 50%; animation-delay: -1.5s; }

@keyframes pulseDot {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(2); }
}

/* ===== Button Ripple Effect ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    top: 50%;
    left: 50%;
    transform: scale(0);
    opacity: 0;
}

.ripple:active::after {
    animation: rippleAnim 0.6s ease-out;
}

body.light-mode .ripple::after {
    background: rgba(0, 0, 0, 0.12);
}

@keyframes rippleAnim {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(4); opacity: 0; }
}

/* Button press effect */
.btn:active,
.toggle-btn:active {
    transform: scale(0.95) !important;
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for cards */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Card hover enhancements ===== */
.card {
    position: relative;
    isolation: isolate;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

body.light-mode .card::before {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), transparent 60%);
}

.card:hover::before {
    opacity: 1;
}

/* ===== Nav link underline animation ===== */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ===== Service detail hover ===== */
.service-detail {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-detail:hover {
    transform: translateX(4px);
    border-color: var(--border-hover);
}

.service-detail::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.service-detail:hover::before {
    height: 100%;
}

/* ===== Contact item hover ===== */
.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

/* ===== Form input focus glow ===== */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus,
body.light-mode .form-group select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ===== Hero entrance animation ===== */
.hero {
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== Slideshow ===== */
.slideshow {
    width: 80%;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.light-mode .slideshow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.slideshow-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.slideshow-slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slideshow-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.slideshow-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slideshow-arrow.prev { left: 0.75rem; }
.slideshow-arrow.next { right: 0.75rem; }

/* ===== Responsive: Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
    .slideshow {
        width: 90%;
        margin: 1.5rem auto;
    }

    .slideshow-arrow {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .slideshow-dot {
        width: 8px;
        height: 8px;
    }
}

/* ===== Responsive: Small Mobile (max-width: 480px) ===== */
@media (max-width: 480px) {
    .slideshow {
        width: 95%;
        margin: 1rem auto;
    }

    .slideshow-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .slideshow-arrow.prev {
        left: 0.4rem;
    }

    .slideshow-arrow.next {
        right: 0.4rem;
    }

    .slideshow-dot {
        width: 7px;
        height: 7px;
    }

    .slideshow-dots {
        bottom: 0.6rem;
        gap: 0.35rem;
    }
}

/* ===== Smooth theme transition ===== */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav, footer, .card, .service-detail, .contact-item,
.form-group input, .form-group textarea, .form-group select,
.toggle-btn {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
