:root {
    /* Fondos - Tema claro y profesional */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;

    /* Acento Azul Eléctrico Vibrante */
    --primary-500: #0070f3;
    --primary-400: #0060df;
    --primary-600: #0050c0;

    /* Gradientes */
    --grad-blue: linear-gradient(135deg, #0070f3 0%, #00dfd8 100%);

    /* Textos - Invertidos para fondo claro */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-quaternary: #94a3b8;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajuste de partículas para fondo claro */
.particle {
    opacity: 0.15 !important;
}

.text-glow {
    color: var(--primary-500);
    text-shadow: 0 0 10px rgba(0, 112, 243, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Particles --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-500);
    border-radius: 50%;
    opacity: 0.5;
    animation: float-particle 20s infinite ease-in-out;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }

    25% {
        transform: translate(100px, -100px);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50px, -200px);
        opacity: 0.6;
    }

    75% {
        transform: translate(-100px, -100px);
        opacity: 0.8;
    }
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 112, 243, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 40px;
    /* Space between logo and menu */
}

.nav-logo {
    height: 70px;
    width: auto;
    border-radius: 12px;
    filter: invert(1) hue-rotate(180deg) brightness(1.1) contrast(1.1) drop-shadow(0 4px 12px rgba(0, 112, 243, 0.1));
    transition: var(--transition-smooth);
}

.nav-logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 5px 15px rgba(0, 112, 243, 0.25));
}


.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    margin-right: auto;
    /* Push CTA to the right */
}

.nav-link {
    text-decoration: none;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-400);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 140px;
    padding-bottom: 20px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.pulse-icon {
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-400);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.label-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-400);
}

.hero-title {
    font-size: 56px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.text-glow {
    color: var(--primary-400);
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-tertiary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.rotate-animation {
    animation: rotate-y 8s linear infinite;
    transform-style: preserve-3d;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes rotate-y {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Old scrolling logo styles removed as requested */

.btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--grad-blue);
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: white;
    box-shadow: 0 4px 24px rgba(0, 112, 243, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 112, 243, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    border: 1px solid var(--primary-500);
    color: var(--primary-400);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-plus {
    font-size: 24px;
    color: var(--primary-400);
}

.stat-label {
    font-size: 14px;
    color: var(--text-quaternary);
}

/* --- Hero Visual --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sphere {
    width: 450px;
    height: 450px;
    position: relative;
    z-index: 2;
}

.sphere-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 112, 243, 0.2);
    box-shadow:
        0 0 60px rgba(0, 112, 243, 0.1),
        inset 0 0 40px rgba(0, 112, 243, 0.1);
    background: white;
    /* Prevent background bleeding through inverted image */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 60px;
    border-radius: 50%;
    /* Rounded corners for the rotating logo */
    filter: invert(1) hue-rotate(180deg) brightness(1.1) contrast(1.1) drop-shadow(0 15px 40px rgba(0, 112, 243, 0.15));
}

.visual-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 1;
}

.header-img-label {
    max-height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 112, 243, 0.3));
    margin-bottom: 20px;
}

.header-img-label.centered {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.clients-display {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    border: 1px solid rgba(0, 112, 243, 0.05);
}

.clients-banner-centered {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    /* Significativamente más grande para legibilidad */
    object-fit: contain;
    filter: drop-shadow(0 10px 40px rgba(0, 112, 243, 0.15));
    transition: var(--transition-smooth);
}

.clients-banner-centered:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 15px 50px rgba(0, 112, 243, 0.2));
}

.about-image-main {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 112, 243, 0.2);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: zoom-in;
    z-index: 10;
    position: relative;
}

.about-image-main:hover {
    transform: scale(2.2);
    /* Massive zoom */
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

/* --- Contact Form Section --- */
.contact-form-section {
    padding: 60px 0;
    background: radial-gradient(circle at bottom right, rgba(0, 112, 243, 0.05) 0%, transparent 50%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-info-items {
    margin-top: 40px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 24px;
    color: var(--primary-400);
    width: 50px;
    height: 50px;
    background: rgba(0, 112, 243, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.info-item span {
    display: block;
    font-size: 14px;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item p {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background: rgba(0, 112, 243, 0.05);
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.1);
}

.btn-block {
    width: 100%;
}

/* --- Services Section --- */
.services-section {
    padding: 20px 0 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-label {
    color: var(--primary-500);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 24px;
}

.section-title-large {
    font-size: 54px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.section-title-large i {
    font-size: 0.8em;
    opacity: 0.9;
}

.section-subtitle-alt {
    font-size: 28px;
    color: var(--primary-500);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-description-top {
    color: var(--text-tertiary);
    font-size: 17px;
    max-width: 750px;
    margin: 0 auto 30px;
}

.section-subtitle {
    color: var(--text-tertiary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card-flip {
    height: 300px;
    /* Reducida para ajustarse mejor a las imágenes */
    perspective: 1000px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.service-card-flip:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.service-card-front {
    background: var(--bg-tertiary);
}

.dual-images {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-image-half {
    width: 100%;
    height: 50%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-flip:hover .service-image-half {
    transform: scale(1.1);
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Se ve completa sin recortes */
    padding: 20px;
    /* Espacio para que respire la imagen técnica */
    transition: transform 0.5s ease;
}

.service-card-flip:hover .service-image {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 40%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    text-align: center;
}

.service-title-front {
    font-size: 18px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glass-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card-back {
    transform: rotateY(180deg);
}

.service-list-back {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.service-list-back li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-list-back li::before {
    content: '•';
    color: var(--primary-500);
    font-weight: bold;
}

.service-title-back {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-400);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-tag {
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- About Section --- */
.about-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-card {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo {
    width: 250px;
}

.glow-primary {
    filter: drop-shadow(0 0 30px rgba(0, 112, 243, 0.2));
}

.about-text {
    font-size: 17px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.about-list {
    list-style: none;
    margin-top: 32px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 500;
}

.text-info {
    color: var(--primary-400);
}

/* --- CTA Section --- */
.cta-section {
    padding: 60px 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--bg-secondary) 100%);
    border-radius: 40px;
    padding: 80px;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    transform: translate(-50%, -50%);
    z-index: 0;
}

.cta-title {
    font-size: 42px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--text-tertiary);
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.btn-large {
    padding: 20px 48px;
    font-size: 18px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 60px;
    padding-bottom: 80px;
}

.footer-brand .logo-container {
    margin-bottom: 24px;
}

.footer-logo {
    height: 60px;
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 2px 8px rgba(0, 112, 243, 0.1));
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.social-link:hover {
    background: var(--primary-500);
    transform: translateY(-4px);
}

.footer-title {
    font-size: 18px;
    margin-bottom: 32px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-tertiary);
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary-400);
    padding-left: 8px;
}

.footer-contact p {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
}

.footer-contact i {
    color: var(--primary-400);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 32px 0;
    color: var(--text-quaternary);
    font-size: 14px;
}

.footer-legal a {
    color: var(--text-quaternary);
    text-decoration: none;
    margin-left: 24px;
}

.visitor-counter {
    color: var(--text-quaternary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 24px;
}

.visitor-counter i {
    opacity: 0.7;
}

.visitor-counter span {
    color: inherit;
}


/* --- Responsive --- */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 48px;
    }

    .section-title-large {
        font-size: 44px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        margin: 0 auto 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .section-title-large {
        font-size: 36px;
        flex-direction: column;
        gap: 10px;
    }

    .section-subtitle-alt {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .navbar {
        padding: 15px 0;
    }

    .container {
        padding: 0;
        /* Margen del teléfono */
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        z-index: 1001;
        background: transparent;
        border: none;
    }

    .mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background: var(--text-primary);
        transition: 0.3s;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        justify-content: center;
        align-items: center;
        z-index: 1000;
        gap: 32px;
    }

    .hero-title {
        font-size: 32px;
    }

    .section-title-large {
        font-size: 28px;
    }

    .section-subtitle-alt {
        font-size: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-card {
        padding: 40px 20px;
    }

    .sphere {
        width: 280px;
        height: 280px;
    }

    .hero-image {
        padding: 40px;
    }

    .about-image-main:hover {
        transform: scale(1.1);
        /* Limit zoom on mobile to prevent layout breaking */
    }

    .clients-display {
        padding: 30px 15px;
    }

    .mobile-menu-toggle {
        order: 11;
    }
}