/* Enhanced Animations and Moving Background Elements */

/* CSS Variables for Easy Customization */
:root {
    --animation-primary: #2563eb;
    --animation-secondary: #10b981;
    --animation-accent: #f59e0b;
    --animation-dark: #1d4ed8;
    --animation-light: #e0e7ff;
    --animation-opacity: 0.1;
    --animation-shape-opacity: 0.03;
    --floating-speed: 20s;
    --shape-speed: 60s;
    --gradient-speed: 8s;
    --grid-speed: 20s;
    --light-sweep-speed: 4s;
    --bounce-speed: 2s;
    --pulse-speed: 2s;
}

/* Animated Background Elements */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    opacity: var(--animation-opacity);
    animation: float var(--floating-speed) infinite linear;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--animation-primary), var(--animation-secondary));
    border-radius: 50%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-element:nth-child(2) {
    top: 20%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, var(--animation-secondary), var(--animation-primary));
    border-radius: 20px;
    animation-delay: -5s;
    animation-duration: 30s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 20%;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--animation-dark), var(--animation-secondary));
    border-radius: 50%;
    animation-delay: -10s;
    animation-duration: 35s;
}

.floating-element:nth-child(4) {
    bottom: 30%;
    right: 25%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--animation-secondary), var(--animation-dark));
    border-radius: 15px;
    animation-delay: -15s;
    animation-duration: 40s;
}

.floating-element:nth-child(5) {
    top: 50%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--animation-primary), var(--animation-accent));
    border-radius: 50%;
    animation-delay: -20s;
    animation-duration: 45s;
}

.floating-element:nth-child(6) {
    top: 60%;
    right: 10%;
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, var(--animation-accent), var(--animation-primary));
    border-radius: 20px;
    animation-delay: -25s;
    animation-duration: 50s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: var(--animation-opacity);
    }
    25% {
        transform: translateY(-20px) rotate(90deg) scale(1.1);
        opacity: calc(var(--animation-opacity) + 0.05);
    }
    50% {
        transform: translateY(-40px) rotate(180deg) scale(0.9);
        opacity: var(--animation-opacity);
    }
    75% {
        transform: translateY(-20px) rotate(270deg) scale(1.05);
        opacity: calc(var(--animation-opacity) + 0.05);
    }
    100% {
        transform: translateY(0px) rotate(360deg) scale(1);
        opacity: var(--animation-opacity);
    }
}

/* Moving Geometric Shapes */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: var(--animation-shape-opacity);
    animation: moveShape var(--shape-speed) infinite linear;
}

.shape:nth-child(1) {
    top: 15%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: var(--animation-primary);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation-delay: 0s;
}

.shape:nth-child(2) {
    top: 70%;
    right: 10%;
    width: 150px;
    height: 150px;
    background: var(--animation-secondary);
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    animation-delay: -20s;
}

.shape:nth-child(3) {
    bottom: 10%;
    left: 15%;
    width: 180px;
    height: 180px;
    background: var(--animation-dark);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: -40s;
}

@keyframes moveShape {
    0% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateX(100px) translateY(-50px) rotate(120deg);
    }
    66% {
        transform: translateX(-50px) translateY(100px) rotate(240deg);
    }
    100% {
        transform: translateX(0px) translateY(0px) rotate(360deg);
    }
}

/* Enhanced Hero Section with Parallax */
.hero {
    background: linear-gradient(135deg, #0f172a, var(--animation-primary), var(--animation-secondary));
    background-size: 400% 400%;
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: gradientShift var(--gradient-speed) ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: gridMove var(--grid-speed) linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(10px, 10px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, var(--animation-light), #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6));
    }
}

.hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Enhanced Buttons with Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Enhanced Laptop Cards */
.laptop-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    /* Ensure laptop cards are always visible */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.laptop-card:nth-child(1) { animation-delay: 0.1s; }
.laptop-card:nth-child(2) { animation-delay: 0.2s; }
.laptop-card:nth-child(3) { animation-delay: 0.3s; }
.laptop-card:nth-child(4) { animation-delay: 0.4s; }
.laptop-card:nth-child(5) { animation-delay: 0.5s; }

.laptop-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.laptop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--animation-primary), var(--animation-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.laptop-card:hover::before {
    transform: scaleX(1);
}

.card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.laptop-card:hover .card-image img {
    transform: scale(1.02);
}

/* Force laptop cards to stay visible */
.laptop-card,
.laptop-card.fade-in,
.laptop-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

/* Override any problematic animations for laptop cards */
.laptop-card * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Enhanced Search Section */
.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    animation: lightSweep var(--light-sweep-speed) ease-in-out infinite;
}

@keyframes lightSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.search-input:focus-within {
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Enhanced Floating WhatsApp Button */
.floating-whatsapp {
    animation: bounce var(--bounce-speed) infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.floating-whatsapp::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse var(--pulse-speed) infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

/* Enhanced Logo Animation */
.logo i {
    animation: pulse var(--pulse-speed) infinite;
}

.logo:hover {
    transform: scale(1.05);
}

/* Enhanced Navigation Hover Effects */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--animation-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    transform: translateY(-2px);
}

/* Enhanced Form Inputs */
.form-group input:focus,
.form-group textarea:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Enhanced Alerts */
.alert {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Section Headers */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--animation-primary), var(--animation-secondary));
    border-radius: 2px;
}

/* Enhanced Feature Cards */
.feature {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature:hover::before {
    transform: scaleX(1);
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: #2563eb;
}

.feature i {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #10b981);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature:hover i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.feature:hover h3 {
    color: #2563eb;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Enhanced Contact Methods */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-method {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: #2563eb;
    color: white;
}

.contact-method i {
    font-size: 2.5rem;
    color: #2563eb;
    transition: all 0.3s ease;
}

.contact-method:hover i {
    transform: scale(1.1);
    color: #10b981;
}

.contact-method span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Enhanced About Section */
.about-text h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Enhanced Search Section */
.search-section {
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    animation: lightSweep 4s ease-in-out infinite;
}

/* Enhanced Main Header */
.main-header {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.main-header:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

/* Enhanced Logo */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    animation: pulse 2s infinite;
}

/* Enhanced Navigation */
.main-nav a {
    position: relative;
    transition: all 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    transform: translateY(-2px);
}


/* Enhanced Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: bounce 2s infinite;
}

.floating-whatsapp:hover {
    background: #128c7e;
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.floating-whatsapp::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

/* Enhanced Form Elements */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: scale(1.01);
}

/* Enhanced Buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Enhanced Alerts */
.alert {
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

/* Enhanced Section Headers */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    border-radius: 2px;
}

/* Enhanced Feature Cards */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Enhanced Contact Items */
.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    transition: all 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.1);
}

/* Enhanced Footer Links */
.footer-section ul li a:hover {
    transform: translateX(5px);
}

/* Responsive Design for Animations */
@media (max-width: 768px) {
    .floating-element {
        display: none;
    }
    
    .shape {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    /* Optimize hero animations for mobile */
    .hero {
        animation: none !important;
        background: linear-gradient(135deg, #0f172a, #2563eb, #10b981) !important;
        background-size: 100% 100% !important;
    }
    
    .hero::before {
        display: none !important;
    }
    
    /* Reduce animation complexity on mobile */
    .laptop-card {
        animation: none !important;
        transition: transform 0.2s ease !important;
    }
    
    .laptop-card:hover {
        transform: translateY(-5px) !important;
    }
    
    /* Optimize button animations */
    .btn {
        transition: all 0.2s ease !important;
    }
    
    .btn:hover {
        transform: translateY(-2px) !important;
    }
    
    /* Disable complex animations on mobile */
    .feature-card::before,
    .laptop-card::before,
    .btn::before {
        display: none !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: var(--animation-primary);
    color: white;
}

::-moz-selection {
    background: var(--animation-primary);
    color: white;
}
