/* ========================================
   EODEVS - Custom Styles
   ======================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0033A0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #001A4D;
}

/* Selection Color */
::selection {
    background: #0033A0;
    color: white;
}

/* ========================================
   Animations
   ======================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Staggered animations for children */
.animate-stagger > * {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* ========================================
   Header Styles
   ======================================== */

/* Header shadow on scroll */
header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Hero Section
   ======================================== */

#inicio {
    position: relative;
}

/* Gradient overlay for hero */
#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 26, 77, 0.4) 100%);
    pointer-events: none;
}

/* ========================================
   Cards & Interactive Elements
   ======================================== */

/* Service cards hover effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   Form Styles
   ======================================== */

/* Input focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* ========================================
   Product Section
   ======================================== */

/* TAVEN mockup animation */
.mockup-container {
    transition: transform 0.5s ease;
}

.mockup-container:hover {
    transform: scale(1.02) rotate(0deg);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Utility Classes
   ======================================== */

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #0033A0, #3366CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shadow variations */
.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 51, 160, 0.1);
}

.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 51, 160, 0.2);
}

/* ========================================
   Mobile Menu
   ======================================== */

#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    /* Reduce animations on mobile for performance */
    .animate-float {
        animation: none;
    }

    /* Adjust hero padding */
    #inicio {
        padding-top: 80px;
    }
}

/* Reduced motion preference */
@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;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    header,
    footer,
    #contacto form {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
