/**
 * Netsurf Club - Custom Styles
 * Additional styles beyond Tailwind CSS
 */

/* ==========================================
   Base Styles
   ========================================== */

/* Smooth scrolling & prevent horizontal overflow */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Prevent horizontal scroll from animations/effects */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #3b82f6;
    color: white;
}

/* ==========================================
   Typography
   ========================================== */

/* Better font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Navigation
   ========================================== */

/* Header shadow on scroll */
.header-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Dropdown menu animation */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================
   Hero Section
   ========================================== */

/* Gradient text animation */
.gradient-text-animated {
    background-size: 200% auto;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Hero floating cards with different timings */
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}

/* Shimmer effect for cards */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Glowing border effect */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, #ff003c, transparent, #ff003c);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-border:hover::before {
    opacity: 0.5;
}

/* Network lines pulse animation */
@keyframes line-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.network-line {
    animation: line-pulse 2s ease-in-out infinite;
}

/* Dot pulse animation */
@keyframes dot-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.network-dot {
    animation: dot-pulse 2s ease-in-out infinite;
}

/* Hero scroll indicator bounce */
@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* ==========================================
   Cards and Boxes
   ========================================== */

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Buttons
   ========================================== */

/* Button press effect */
.btn-press:active {
    transform: scale(0.98);
}

/* Gradient button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* ==========================================
   FAQ Section
   ========================================== */

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-content {
    display: block;
}

/* ==========================================
   Animations
   ========================================== */

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation delay */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Pulse ring animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   Loading States
   ========================================== */

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #f1f5f9 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* ==========================================
   Form Styles
   ========================================== */

/* Input focus effect */
.input-focus-effect {
    position: relative;
}

.input-focus-effect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: all 0.3s ease;
}

.input-focus-effect:focus-within::after {
    left: 0;
    width: 100%;
}

/* ==========================================
   Back to Top Button
   ========================================== */

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   Responsive Utilities
   ========================================== */

/* Hide on mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    header,
    footer,
    #back-to-top,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

/* Focus visible */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

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

/* ==========================================
   Dark Mode Support (Future)
   ========================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}
