body {
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

:root {
    --primary: #fb923c;
    --secondary: #22c55e;
    --secondary-light: #4ade80;
    --secondary-dark: #16a34a;
    --hero-bg: #f0f7ff;
    --hero-accent: #e0f2fe;
    --logo-text: #374151;
}

/* Header Sticky Base & Transitions */
header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled State - Applied via JS */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Text color changes only in scrolled state */
header.scrolled h2, 
header.scrolled nav a {
    color: #1e293b !important; /* slate-800 */
}

header.scrolled nav a:hover {
    color: var(--primary) !important;
}

header.scrolled .logo-container h2 {
    color: #0f172a !important; /* slate-900 */
}

.hero-section {
    background: #6D28D9; /* Fallback */
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%); /* Modern vibrant purple gradient */
    position: relative;
    overflow: hidden;
}

/* Background circles/shapes similar to Martex */
.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-section .hero-shape-1 {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.05);
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-section .hero-shape-2 {
    position: absolute;
    top: 20%;
    left: 15%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Dots pattern for the bottom left corner */
.hero-section .hero-dots {
    position: absolute;
    bottom: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px; /* prevent subpixel rendering artifacts */
    left: 0;
    right: 0;
    height: 4vw; /* reduced depth of the bend */
    background: #ffffff;
    border-top-left-radius: 50% 100%;
    border-top-right-radius: 50% 100%;
    z-index: 10;
    pointer-events: none;
}

/* Solution Banner specific tweaks */
.solution-banner {
    margin-top: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.solution-banner .cta-banner-title {
    font-size: 1.8rem;
    /* Smaller Font Size */
    margin-bottom: 30px;
}

.solution-banner .cta-banner-img-container img {
    box-shadow: none;
    /* Remove white-box look */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    /* More natural shadow for cutout */
}

@media (min-width: 768px) {
    .solution-banner {
        margin-top: 40px;
    }

    .solution-banner .cta-banner-title {
        font-size: 2.2rem;
        /* Adjusted to 2.2rem for desktop */
    }
}

/* Horizontal Hero Section Styles */
.horizontal-hero {
    background: url('img/hero-horizontal-bg.png') no-repeat center center;
    background-size: cover;
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.horizontal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(30, 27, 75, 0.3) 0%, rgba(30, 58, 138, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.horizontal-hero>div {
    position: relative;
    z-index: 2;
}



.horizontal-hero-title {
    color: white;
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 24px;
}

.horizontal-hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 40px;
    font-weight: 500;
}

.btn-demo-orange {
    background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
    color: white;
    font-weight: 800;
    padding: 16px 36px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.btn-demo-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.5);
}

.btn-precios-ghost {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-precios-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 1024px) {
    .horizontal-hero-title {
        font-size: 3.5rem;
    }
}


.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.card-shadow {
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.1);
}

.dashboard-main-shadow {
    box-shadow: 0 50px 100px -20px rgba(15, 23, 42, 0.15), 0 30px 60px -30px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hex-logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hex-logo-container img {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

header.scrolled .logo-white {
    display: none;
}

header.scrolled .logo-color {
    display: block !important;
}

.hex-logo-container:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.4));
}

/* Platform Section Animations */
@keyframes dash {
    to {
        stroke-dashoffset: -200;
        /* Moves the dashes */
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.connection-path {
    stroke-dasharray: 10, 10;
    animation: dash 20s linear infinite;
    /* Slower flow */
}

/* 3D Transform Container for the Cube Center */
.perspective-container {
    perspective: 1000px;
}

.cube-box {
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

/* Core Logo New Animation */
@keyframes core-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(251, 146, 60, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(251, 146, 60, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(251, 146, 60, 0.3));
    }
}

.core-logo-anim {
    animation: core-pulse 4s ease-in-out infinite;
}

/* Orbital Core Design */
.orbital-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(251, 146, 60, 0.3);
    /* Primary color low opacity */
    animation: spin 30s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: rgba(251, 146, 60, 0.1);
    animation-duration: 40s;
}

.ring-2 {
    width: 75%;
    height: 75%;
    border-top-color: transparent;
    border-left-color: transparent;
    animation-duration: 25s;
    animation-direction: reverse;
}

.ring-3 {
    width: 110%;
    height: 110%;
    border: 1px solid rgba(34, 197, 94, 0.1);
    animation-duration: 60s;
}

.glass-hub {
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px -10px rgba(251, 146, 60, 0.2);
    z-index: 20;
    transition: transform 0.3s ease;
}

.glass-hub:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px -10px rgba(251, 146, 60, 0.3);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Feature Tabs Section */
.feature-tab {
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0;
    /* slate-200 */
    cursor: pointer;
}

.feature-tab:hover {
    background-color: #f8fafc;
    /* slate-50 */
}

.feature-tab.active {
    border-left-color: #fb923c;
    /* primary */
}

.feature-tab h3 {
    color: #475569;
    /* slate-600 */
}

.feature-tab.active h3 {
    color: #0f172a;
    /* slate-900 */
}

.feature-visual {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.feature-visual.active {
    opacity: 1;
    transform: translateY(0);
    /*position: relative;*/
    pointer-events: auto;
}

/* Pricing Section Styles */
#pricing-section {
    background-image: radial-gradient(circle at 0% 0%, rgba(251, 146, 60, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
}

.pricing-card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pricing-card-hover:hover {
    transform: translateY(-10px);
}

/* Logo Carousel Animation */
@keyframes infinite-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% / 2));
    }
}

.logo-carousel-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 10px 0;
}

.logo-carousel-track {
    display: flex;
    width: max-content;
    animation: infinite-scroll 40s linear infinite;
}

.logo-carousel-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex: 0 0 auto;
    width: 160px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 25px;
    opacity: 1;
    filter: none;
    transition: all 0.5s ease;
}

.logo-item:hover {
    opacity: 0.4;
    filter: grayscale(100%);
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* New Banner Styles */
.cta-banner-box {
    background: white;
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    margin-top: 100px;
    /* Increased to allow image overlap above */
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
    .cta-banner-box {
        flex-direction: row;
        padding: 0 60px;
        min-height: 320px;
        border-radius: 60px;
        margin-top: 80px;
    }
}

.cta-banner-img-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin-top: -160px;
    /* Stronger overlap above */
    margin-bottom: 20px;
    z-index: 20;
}

@media (min-width: 768px) {
    .cta-banner-img-container {
        width: 40%;
        margin-top: -60px;
        margin-bottom: -40px;
        /* Overlap below */
        margin-left: -100px;
        /* Overlap left */
    }
}

.cta-banner-img-container img {
    border-radius: 24px;
    /* Soften the edges since it's not transparent */
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
}

.cta-banner-content {
    flex: 1;
    text-align: center;
}

.cta-banner-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e3a8a;
    /* Deep blue */
    margin-bottom: 40px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .cta-banner-title {
        font-size: 3.5rem;
    }
}

.btn-contactanos {
    background: linear-gradient(90deg, #6324fa 0%, #3b82f6 100%);
    color: white;
    font-weight: 800;
    padding: 18px 45px;
    border-radius: 50px;
    font-size: 1.125rem;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-contactanos:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

/* Form Success Message Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Floating WhatsApp Button Pulse */
@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.fixed.bottom-6.right-6 {
    animation: whatsapp-pulse 2s infinite;
}

/* Responsive Fixes - Only for mobile to avoid affecting desktop */
@media (max-width: 640px) {
    .logo-container h2 {
        font-size: 0.875rem !important; /* Smaller text-sm instead of text-lg */
    }
    
    header a[href="#contacto"].bg-secondary {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap;
    }

    .logo-container {
        gap: 6px !important;
    }

    header {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* Hero Buttons Side-by-Side Fix */
@media (max-width: 480px) {
    .hero-btns {
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }
    .hero-btns a {
        padding: 14px 10px !important;
        font-size: 0.9rem !important;
        flex: 1;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
}
