* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations */
html {
    /* Enable font smoothing for better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Optimize scroll performance */
    scroll-behavior: smooth;
}

/* Global performance hints */
*,
*::before,
*::after {
    /* Promote compositing for better performance */
    backface-visibility: hidden;
    /* Optimize text rendering */
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    height: 100vh;
    background: #000;
    color: #fff;
    position: relative;
    /* GPU acceleration for better performance */
    transform: translateZ(0);
    will-change: auto;
    /* Better font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Map Background - GPU optimized */
.map-feature {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* GPU acceleration for smooth scrolling */
    will-change: auto;
    transform: translateZ(0);
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.map {
    width: 100%;
    height: 100%;
    opacity: 0.9;
    /* GPU acceleration for map rendering */
    will-change: transform;
    transform: translateZ(0);
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Leaflet marker pane visibility */
.leaflet-pane {
    z-index: 400 !important;
}

.leaflet-marker-pane {
    z-index: 600 !important;
}

/* Tech Grid Background */
.tech-grid {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
    z-index: 5;
    opacity: 0.5;
    pointer-events: none;
    /* GPU acceleration */
    will-change: transform;
    transform: translateZ(0);
}

@keyframes grid-move {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(50px, 50px, 0); }
}

/* Particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 6;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 25s infinite linear;
    /* GPU acceleration for smooth animation */
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes float {
    from {
        transform: translate3d(0, 100vh, 0);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    to {
        transform: translate3d(100px, -100vh, 0);
        opacity: 0;
    }
}

/* Hero Container - Single Screen Layout */
.hero-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Hero Header */
.hero-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.logo-minimal {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.6);
    animation: pulse 2s infinite;
    /* GPU acceleration */
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

@keyframes pulse {
    0%, 100% {
        transform: scale3d(1, 1, 1);
        box-shadow: 0 0 60px rgba(0, 255, 255, 0.6);
    }
    50% {
        transform: scale3d(1.05, 1.05, 1);
        box-shadow: 0 0 80px rgba(0, 255, 255, 0.8);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    letter-spacing: 5px;
    background: linear-gradient(45deg, #00ffff, #0080ff, #00ffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
    margin-bottom: 0.5rem;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* GPU acceleration */
    will-change: background-position;
    transform: translateZ(0);
}

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

.hero-tagline {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

/* Services Grid */
.services-grid {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.service-icon-box {
    width: 90px;
    height: 90px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    /* GPU acceleration for smooth interactions */
    will-change: transform, box-shadow, border-color;
    transform: translateZ(0);
}

.service-icon-box:hover {
    transform: translate3d(0, -10px, 0) scale3d(1.1, 1.1, 1);
    border-color: #00ffff;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.4);
}

.service-icon-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.service-icon-box:hover::before {
    opacity: 1;
}

/* Override for Web service - no blue background */
.service-icon-box[data-service="web"]::before {
    display: none;
}

/* Override for SMTP service - no blue background */
.service-icon-box[data-service="smtp"]::before {
    display: none;
}

.service-icon-box i {
    font-size: 2rem;
    color: #00ffff;
    margin-bottom: 0.5rem;
    /* Better icon rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.service-icon-box span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Enhanced text visibility and rendering with stronger contrast */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-weight: 600;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(0, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    /* Ensure text is always readable */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* CTA Button */
.hero-cta {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.contact-btn {
    background: linear-gradient(45deg, #00cccc, #0066cc);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 3rem;
    border-radius: 50px;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    /* GPU acceleration */
    will-change: transform, box-shadow;
    transform: translateZ(0);
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

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

.contact-btn:hover {
    transform: scale3d(1.05, 1.05, 1);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.6);
}

.contact-btn i {
    color: #fff;
}

/* Contact Modal */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.contact-modal.active {
    display: flex;
}

.modal-content {
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 30px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #00ffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    color: #00ffff;
    margin-bottom: 2rem;
    font-size: 2rem;
    letter-spacing: 3px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border: none;
    padding: 1rem;
    border-radius: 50px;
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

.contact-info {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(0, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Active effect style for services - Efecto simple sin verde */
.service-icon-box.active {
    transform: translate3d(0, -10px, 0) scale3d(1.1, 1.1, 1);
    border: 2px solid #00ffff !important;
    box-shadow: 
        0 20px 40px rgba(0, 255, 255, 0.4),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    background: rgba(0, 40, 80, 0.9) !important;
    /* GPU acceleration */
    will-change: transform, box-shadow, border-color;
}

.service-icon-box.active i {
    color: #00ffff !important;
    filter: drop-shadow(0 0 10px #00ffff);
    text-shadow: 0 0 10px #00ffff;
}

.service-icon-box.active span {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    font-weight: bold;
}


/* Visitor Counter Minimal */
.visitor-counter-minimal {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(0, 255, 255, 0.8);
    font-size: 0.9rem;
    z-index: 100;
}

.visitor-counter-minimal i {
    font-size: 1rem;
}

#visitor-count {
    font-weight: bold;
}

/* Glitch effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #00ffff, #0080ff, #00ffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    clip: rect(44px, 450px, 56px, 0);
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    clip: rect(12px, 450px, 72px, 0);
}

@keyframes glitch-1 {
    0% {
        clip: rect(132px, 350px, 101px, 30px);
        transform: translateX(0);
    }
    20% {
        clip: rect(92px, 350px, 31px, 30px);
        transform: translateX(-2px);
    }
    40% {
        clip: rect(12px, 350px, 72px, 30px);
        transform: translateX(2px);
    }
    60% {
        clip: rect(42px, 350px, 62px, 30px);
        transform: translateX(-1px);
    }
    80% {
        clip: rect(52px, 350px, 22px, 30px);
        transform: translateX(1px);
    }
    100% {
        clip: rect(32px, 350px, 92px, 30px);
        transform: translateX(0);
    }
}

@keyframes glitch-2 {
    0% {
        clip: rect(2px, 350px, 61px, 30px);
        transform: translateX(0);
    }
    20% {
        clip: rect(22px, 350px, 111px, 30px);
        transform: translateX(2px);
    }
    40% {
        clip: rect(52px, 350px, 31px, 30px);
        transform: translateX(-1px);
    }
    60% {
        clip: rect(12px, 350px, 91px, 30px);
        transform: translateX(1px);
    }
    80% {
        clip: rect(32px, 350px, 11px, 30px);
        transform: translateX(-2px);
    }
    100% {
        clip: rect(72px, 350px, 51px, 30px);
        transform: translateX(0);
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: -400px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #00ffff;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transition: right 0.5s ease;
    z-index: 10000;
}

.notification.show {
    right: 2rem;
}

.notification.success {
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

/* Responsive Design - Mobile Optimizations */
@media (max-width: 768px) {
    /* Map responsiveness for mobile */
    .map-feature {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    
    .map-container {
        width: 100%;
        height: 100%;
        touch-action: none; /* Prevent scroll interference */
    }
    
    .map {
        width: 100%;
        height: 100%;
    }
    
    /* Adjust hero container for mobile */
    .hero-container {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }
    
    /* Make tech hubs visible on mobile */
    .tech-hub-marker {
        transform: scale(0.8);
    }
    
    /* Email delivery positioning fix for mobile */
    .flying-email {
        z-index: 1000;
    }
    
    /* Ensure email counter is visible on mobile */
    .email-counter {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
        z-index: 1001 !important;
    }
    
    @media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .services-grid {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .service-icon-box {
        width: 70px;
        height: 70px;
    }

    .service-icon-box i {
        font-size: 1.5rem;
    }

    .service-icon-box span {
        font-size: 0.7rem;
    }

    .contact-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .visitor-counter-minimal {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }
}

@media (max-height: 700px) {
    .hero-header {
        margin-bottom: 1.5rem;
    }

    .logo-minimal {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .services-grid {
        margin-bottom: 2rem;
    }

    .service-icon-box {
        width: 70px;
        height: 70px;
    }
}

/* Service-specific hover animations */

/* SMTP Email Animation - Enhanced with consistent interactive effects and GPU optimization */
.service-icon-box[data-service="smtp"] {
    position: relative;
    overflow: visible;
    /* Enable same hover effects as other buttons with GPU acceleration */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, border-color, background;
    transform: translateZ(0);
}

/* Add consistent hover effects for SMTP button with enhanced visibility */
.service-icon-box[data-service="smtp"]:hover {
    transform: translate3d(0, -10px, 0) scale3d(1.1, 1.1, 1);
    border-color: #00ffff;
    box-shadow: 
        0 20px 40px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
    background: rgba(0, 40, 80, 0.9);
}

/* Ensure SMTP button has glowing border effect like others */
.service-icon-box[data-service="smtp"]:hover::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #00ffff, #0080ff, #00ffff);
    border-radius: 22px;
    opacity: 0.3;
    z-index: -1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Email pulse effect */
.service-icon-box[data-service="smtp"]:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: emailPulse 1.5s ease-out infinite;
    z-index: -1;
}

/* SMTP icon animation */
.service-icon-box[data-service="smtp"]:hover i {
    animation: emailBounce 0.8s ease-out;
    color: #00ffff;
    filter: drop-shadow(0 0 15px #00ffff);
}

@keyframes emailBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0) rotateZ(0deg);
    }
    40% {
        transform: translate3d(0, -15px, 0) rotateZ(-5deg);
    }
    60% {
        transform: translate3d(0, -8px, 0) rotateZ(5deg);
    }
}




/* VoIP Sound Waves Animation */
.service-icon-box[data-service="voip"] {
    position: relative;
    overflow: visible;
}

.service-icon-box[data-service="voip"]::before,
.service-icon-box[data-service="voip"]::after {
    content: '';
    position: absolute;
    border: 2px solid #00ffff;
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
}

/* Override border color when active */
.service-icon-box[data-service="voip"].active-effect::before,
.service-icon-box[data-service="voip"].active-effect::after {
    border-color: #00ff00;
}

.service-icon-box[data-service="voip"]::before {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.service-icon-box[data-service="voip"]::after {
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
}

@keyframes soundWave {
    0% {
        opacity: 0.8;
        transform: scale3d(1, 1, 1);
    }
    100% {
        opacity: 0;
        transform: scale3d(1.5, 1.5, 1);
    }
}

.service-icon-box[data-service="voip"]:hover::before,
.service-icon-box[data-service="voip"].active-effect::before {
    animation: soundWave 1s ease-out infinite;
}

.service-icon-box[data-service="voip"]:hover::after,
.service-icon-box[data-service="voip"].active-effect::after {
    animation: soundWave 1s ease-out 0.3s infinite;
}

/* Additional sound wave rings */
.service-icon-box[data-service="voip"]:hover i,
.service-icon-box[data-service="voip"].active-effect i {
    animation: vibrate 0.3s ease-in-out infinite;
}

@keyframes vibrate {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-2px, 0, 0); }
    75% { transform: translate3d(2px, 0, 0); }
}

/* Android App Bounce Animation */
.service-icon-box[data-service="android"] i {
    transition: all 0.3s ease;
}

@keyframes appBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0) rotateZ(0deg);
    }
    40% {
        transform: translate3d(0, -20px, 0) rotateZ(-10deg);
    }
    60% {
        transform: translate3d(0, -10px, 0) rotateZ(10deg);
    }
}

.service-icon-box[data-service="android"]:hover i {
    animation: appBounce 0.8s ease-out;
    color: #00ff00;
    filter: drop-shadow(0 0 20px #00ff00);
}

.service-icon-box[data-service="android"].active-effect i {
    /* La animación se controla desde JavaScript para el efecto activo */
    color: #00ff00;
    filter: drop-shadow(0 0 20px #00ff00);
}

/* Android glow effect */
.service-icon-box[data-service="android"]:hover {
    box-shadow: 0 20px 40px rgba(0, 255, 0, 0.6);
    background: radial-gradient(ellipse at center, rgba(0, 255, 0, 0.1) 0%, transparent 70%);
}

/* Security Shield Pulse Animation */
.service-icon-box[data-service="security"] {
    position: relative;
    overflow: visible;
}

.service-icon-box[data-service="security"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
}

@keyframes shieldPulse {
    0% {
        opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale3d(0.8, 0.8, 1);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale3d(1.5, 1.5, 1);
    }
}

.service-icon-box[data-service="security"]:hover::before,
.service-icon-box[data-service="security"].active-effect::before {
    animation: shieldPulse 1.5s ease-out infinite;
}

.service-icon-box[data-service="security"]:hover i {
    animation: lockRotate 0.6s ease-out;
}

.service-icon-box[data-service="security"].active-effect i {
    /* La animación se controla desde JavaScript para el efecto activo */
}

@keyframes lockRotate {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* Web/Platform Code Brackets Animation */
.service-icon-box[data-service="web"] {
    position: relative;
    overflow: visible;
}

.service-icon-box[data-service="web"]::before,
.service-icon-box[data-service="web"]::after {
    font-family: monospace;
    position: absolute;
    font-size: 1.5rem;
    color: #00ffff;
    opacity: 0;
    font-weight: bold;
    z-index: 10;
}

.service-icon-box[data-service="web"]::before {
    content: '<';
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
}

.service-icon-box[data-service="web"] {
    /* Estilos específicos para Web sin el ::after */
}

@keyframes expandBrackets {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.service-icon-box[data-service="web"]:hover::before {
    animation: expandBrackets 0.5s ease-out forwards;
    transform-origin: right center;
}

.service-icon-box[data-service="web"]:hover::after {
    animation: expandBrackets 0.5s ease-out forwards;
    transform-origin: left center;
}

.service-icon-box[data-service="web"]:hover i {
    animation: stackFloat 1s ease-in-out infinite;
}

@keyframes stackFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Enhanced general hover effects */
.service-icon-box:hover {
    transform: translate3d(0, -10px, 0) scale3d(1.1, 1.1, 1);
    border-color: #00ffff;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.4);
    background: rgba(0, 40, 80, 0.9);
}

/* Enhanced hover effects for button labels with maximum visibility */
.service-icon-box:hover span {
    color: rgba(255, 255, 255, 1);
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 1),
        0 1px 4px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
    font-weight: 700;
    transform: translate3d(0, -1px, 0);
    /* Add glow background for extreme visibility */
    background: radial-gradient(ellipse at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    -webkit-background-clip: initial;
    background-clip: initial;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Active effect style */
.service-icon-box.active-effect {
    transform: translate3d(0, -10px, 0) scale3d(1.1, 1.1, 1);
    border-color: #00ff00;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.8);
    background: rgba(0, 60, 0, 0.9);
    /* GPU acceleration */
    will-change: transform, box-shadow, border-color;
}

.service-icon-box.active-effect i {
    color: #00ff00 !important;
    filter: drop-shadow(0 0 20px #00ff00);
}

/* Leaflet overrides for dark theme */
.leaflet-container {
    background: #000;
    font-family: inherit;
}

.leaflet-control-zoom {
    display: none;
}

.leaflet-control-attribution {
    display: none;
}

/* Code Rain Animation - Matrix style */
@keyframes codefall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

/* Matrix fall animation */
@keyframes matrixfall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translate3d(0, calc(100vh + 200px), 0);
    }
}

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

/* Email Animation Styles */
@keyframes fadeOut {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

@keyframes emailPulse {
    0% {
        transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
        opacity: 1;
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale3d(3, 3, 1);
        opacity: 0;
    }
}

/* Additional styles for code rain elements */
.code-rain-element {
    will-change: transform, opacity;
}

/* Additional styles for flying emails */
.flying-email {
    will-change: transform, left, top, opacity;
}

/* Inbox notification animation */
@keyframes inboxNotification {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, -60px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70px) scale(0.8);
    }
}

/* Cell Tower Markers */
.cell-tower-marker {
    position: relative;
}

.tower-base {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tower-base i {
    font-size: 24px;
    color: #0066ff;
    filter: drop-shadow(0 0 10px #0066ff);
    z-index: 2;
    position: relative;
}

.signal-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.signal-wave.wave-1 {
    animation: signalPulse 2s ease-out infinite;
}

.signal-wave.wave-2 {
    animation: signalPulse 2s ease-out infinite 0.5s;
}

.signal-wave.wave-3 {
    animation: signalPulse 2s ease-out infinite 1s;
}

@keyframes signalPulse {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* Ring ring animation */
@keyframes ringRingPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Active tower styles */
.cell-tower-marker.active-tower i,
.tower-base.active-tower i {
    color: #00ff00 !important;
    filter: drop-shadow(0 0 20px #00ff00) !important;
}

.cell-tower-marker.active-tower .signal-wave,
.tower-base.active-tower .signal-wave {
    border-color: #00ff00 !important;
}

/* Ringing tower animation */
.cell-tower-marker.ringing .signal-wave,
.tower-base.ringing .signal-wave {
    animation-duration: 0.5s !important;
    border-color: #00ff00 !important;
}

/* VoIP path dots - ensure they're green */
.voip-path-dot {
    background: #00ff00 !important;
    box-shadow: 0 0 4px #00ff00;
}

/* VoIP communication icons */
.voip-communication {
    color: #00ff00 !important;
    background: transparent !important;
}

.voip-communication i {
    color: #00ff00 !important;
    filter: drop-shadow(0 0 10px #00ff00);
}

/* Tower top glow */
.tower-top-glow {
    background: #00ff00 !important;
    box-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00 !important;
}

/* OK popup animation */
@keyframes okPopup {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -80px) scale(1);
        opacity: 0;
    }
}

