/* Importing Tailwind CSS via CDN */
@import 'https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css';

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { text-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(59, 130, 246, 0.6); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
    100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
}

@keyframes rotateData {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animation classes */
.animate-fadeIn { animation: fadeIn 1.5s ease-in-out; }
.animate-slideInLeft { animation: slideInFromLeft 1.2s ease-out; }
.animate-slideInRight { animation: slideInFromRight 1.2s ease-out; }
.animate-slideInBottom { animation: slideInFromBottom 1.2s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glowPulse 2s infinite; }
.animate-rotate { animation: rotateData 20s linear infinite; }
.animate-textGlow { animation: textGlow 3s infinite; }

/* Staggered animations */
.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; }

/* Custom styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* Cybersecurity background elements */
.cyber-bg {
    position: relative;
    overflow: hidden;
    background-color: #050a14;
}

.cyber-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(10, 15, 30, 0.95), rgba(5, 10, 20, 0.98)), url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    z-index: -1;
}

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* Network graph animation */
.network-graph {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.network-node {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    animation: nodePulse 3s infinite ease-in-out;
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.2), transparent);
    transform-origin: 0 0;
    z-index: -1;
    animation: lineGlow 4s infinite ease-in-out;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

.cyber-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Digital rain effect */
.digital-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.digital-rain span {
    position: absolute;
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.5), transparent);
    animation-name: digitalRain;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes digitalRain {
    0% { transform: translateY(-100px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(calc(100vh + 100px)); opacity: 0; }
}

/* Hover effects for service cards */
.service-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scale(10);
    opacity: 0.1;
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.4s ease;
}

.btn-primary:hover::after {
    left: 0;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Navigation link hover effects */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu transition */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

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

/* Image hover effects */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Glow effect for important elements */
.glow-effect {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
}

/* Scroll reveal animation - will be controlled by JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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