/* Custom CSS for TERKMARK Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar scrolled state */
.navbar-scrolled {
    background-color: rgba(26, 43, 95, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled .navbar-text {
    color: white !important;
}

/* Hero canvas animation */
#network-canvas {
    width: 100%;
    height: 100%;
}

/* Service card hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Stat counter animation */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form input styles */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #C41E3A;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
    outline: none;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from left */
.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale up animation */
.scale-up {
    animation: scaleUp 0.4s ease forwards;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for CTA buttons */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(196, 30, 58, 0);
    }
}

/* Timeline styles for About page */
.timeline-item {
    position: relative;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: #C41E3A;
    border-radius: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 24px;
    width: 2px;
    height: calc(100% - 16px);
    background-color: #e5e7eb;
}

.timeline-item:last-child::after {
    display: none;
}

/* Card hover glow effect */
.glow-on-hover {
    transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(196, 30, 58, 0.3);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #C41E3A, #1a2b5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

#mobile-menu.active {
    max-height: 400px;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: #10b981;
}

.toast.error {
    background-color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stat-item div:first-child {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* Accessibility - focus visible */
:focus-visible {
    outline: 2px solid #C41E3A;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
