:root {
    --bg-color: #020617;
    --surface-color: #0f172a;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --container-width: 1200px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
    align-items: center;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.logo> :not(.logo-icon) {
    display: inline;
    white-space: nowrap;
}

/* Make the first span (Avanza) white */
.logo>span:first-of-type {
    color: white;
}

/* Target only the span with class 'accent' for Ecom */
.logo .accent {
    color: var(--accent-color);
}

.logo-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Visibility */
.mobile-menu-btn,
.menu-close-btn {
    display: none;
}

.mobile-only {
    display: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero */
.hero {
    padding: 10rem 0 5rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Benefits */
.benefits {
    padding: 5rem 0;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
}

.benefit-card i {
    width: 60px;
    height: 60px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

/* Services */
.services {
    padding: 8rem 0;
    background: linear-gradient(to bottom, transparent, var(--surface-color), transparent);
}

.services .grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .services .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .services .grid-3 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.service-card.highlight {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.service-icon i {
    color: var(--accent-color);
    width: 40px;
    height: 40px;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.service-list i {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
}

/* Process */
.process {
    padding: 8rem 0;
}

.steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 4rem;
}

.step {
    flex: 1;
    position: relative;
    max-width: 250px;
}

.step-num {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--glass-border);
    margin-top: 25px;
}

/* About */
.about {
    padding: 8rem 0;
}

.about-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Final CTA */
.final-cta {
    padding: 5rem 0 8rem;
}

.card-gradient {
    background: var(--gradient-1);
    padding: 4rem;
    border-radius: 32px;
    text-align: center;
    color: white;
}

.card-gradient h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-gradient p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.card-gradient .btn-primary {
    background: white;
    color: var(--bg-color);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.footer-contact {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-contact a {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-icon {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.social-icon i {
    width: 24px;
    height: 24px;
}

/* IA Advantage */
.ia-advantage {
    padding: 5rem 0;
}

.ia-advantage .glass-card {
    padding: 4rem;
    border-radius: 40px;
}

.ia-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.ia-feature {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.ia-feature i {
    height: 60px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.ia-feature h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.ia-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    position: relative;
}

.orbit {
    width: 300px;
    height: 300px;
    border: 1px dashed var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.center-icon {
    width: 80px !important;
    height: 80px !important;
    color: var(--accent-color);
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.5));
}

.orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: orbit 10s linear infinite;
}

.orbit-item:nth-child(2) {
    animation-delay: 0s;
}

.orbit-item:nth-child(3) {
    animation-delay: -3.3s;
}

.orbit-item:nth-child(4) {
    animation-delay: -6.6s;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(150px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(150px) rotate(-360deg);
    }
}

@media (max-width: 968px) {
    .orbit {
        width: 200px;
        height: 200px;
    }

    @keyframes orbit {
        from {
            transform: rotate(0deg) translateX(100px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(100px) rotate(-360deg);
        }
    }
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero {
        padding: 4rem 0 2rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        font-size: 1.05rem;
    }

    .hero-btns {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        order: -1;
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .step-line {
        display: none;
    }

    /* Mobile Menu Styles */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        z-index: 2000;
        /* Ensure button stays on top of the menu overlay */
        position: relative;
        /* Ensure z-index works */
    }

    .mobile-menu-btn i {
        width: 32px;
        height: 32px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 999;
        padding-bottom: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    /* Close Button inside menu */
    .menu-close-btn {
        position: absolute;
        top: 2rem;
        right: 2rem;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0.5rem;
    }

    .menu-close-btn i {
        width: 32px;
        height: 32px;
    }

    .nav-links li {
        margin: 1rem 0;
        /* Reduced margin */
    }

    .nav-links a {
        font-size: 1.25rem;
        /* Reduced font size */
        font-weight: 600;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .services,
    .process,
    .about,
    .ia-advantage,
    .benefits,
    .final-cta {
        padding: 2.5rem 0;
    }

    .grid-2 {
        gap: 3rem;
    }

    .service-card {
        padding: 2.5rem 1.5rem;
    }

    .card-gradient {
        padding: 3rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.25rem;
        width: 100%;
        overflow: hidden;
        /* Contain inner overflows */
    }

    /* Fix potential overflow from hero effect */
    .hero::before {
        right: -50px;
        width: 200px;
        height: 200px;
        opacity: 0.5;
    }

    /* Adjust orbit to stay within bounds */
    .orbit {
        width: 250px;
        height: 250px;
        max-width: 100%;
    }

    @keyframes orbit {
        from {
            transform: rotate(0deg) translateX(80px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(80px) rotate(-360deg);
        }
    }

    header {
        padding: 1rem 0;
    }

    nav {
        justify-content: center;
        position: relative;
        min-height: 48px;
    }

    .nav-actions {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Center Content */
    body {
        text-align: center;
    }

    h1,
    h2,
    h3,
    h4,
    p {
        text-align: center;
    }

    .about-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h1 {
        font-size: 2.4rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card {
        align-items: center;
        /* Center flex children */
        padding: 2rem 1.25rem;
    }

    .service-list li {
        justify-content: center;
    }

    .ia-feature {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-gradient {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .card-gradient h2 {
        font-size: 2.2rem;
    }

    .card-gradient p {
        font-size: 1.05rem;
    }

    .footer-contact {
        flex-direction: column;
        gap: 0.4rem;
    }

    .whatsapp-float {
        right: 20px;
        bottom: 20px;
        left: auto;
        transform: none;
        width: 60px;
        height: 60px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
        box-shadow: 0 5px 15px rgba(37, 211, 102, 0.5);
    }

    .whatsapp-float:hover {
        transform: scale(1.1);
    }

    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float i {
        width: 32px;
        height: 32px;
    }
}