:root {
    --layout-max-width: 1120px;
    --layout-gutter: clamp(1.5rem, 5vw, 3rem);
    /* Further reduce global roundness */
    --radius-sm: 0.2rem;
    --radius-md: 0.35rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-pill: 9999px;
}

/* Depth-based radius utilities */
.depth-1 { border-radius: var(--radius-lg); }
.depth-2 { border-radius: var(--radius-md); }
.depth-3 { border-radius: var(--radius-sm); }
.depth-4, .depth-5, .depth-6 { border-radius: 0; }

/* Prefer depth utilities where applied */
[class*="depth-"] {
    border-radius: inherit;
}

.rounded-xl {
    border-radius: var(--radius-sm);
}

.rounded-2xl {
    border-radius: var(--radius-md);
}

.rounded-3xl {
    border-radius: var(--radius-lg);
}

.bounded-width {
    width: 100%;
    max-width: calc(var(--layout-max-width) + (var(--layout-gutter) * 2));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--layout-gutter);
    padding-right: var(--layout-gutter);
}

#navbar {
    width: min(var(--layout-max-width), calc(100% - (var(--layout-gutter) * 2)));
}

.bg-grid-pattern {
    background-image:
        linear-gradient(#0ea5e933 1px, transparent 1px),
        linear-gradient(90deg, #0ea5e933 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center;
}

#navbar {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#navbar .navbar-panel {
    transition: all 0.4s ease;
}

#navbar .desktop-links a {
    white-space: nowrap;
}

.sales-card {
    position: relative;
}

.cta-highlight {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid rgba(14, 165, 233, 0.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.glass-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid rgba(14, 165, 233, 0.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.cta-primary,
.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.9rem 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cta-primary {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: #fff;
    box-shadow: 0 18px 38px rgba(14, 165, 233, 0.28);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(14, 165, 233, 0.35);
}

.cta-secondary {
    color: #0ea5e9;
    border: 2px solid rgba(14, 165, 233, 0.45);
    background: rgba(255, 255, 255, 0.9);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    background: rgba(14, 165, 233, 0.08);
}

.service-card {
    position: relative;
    isolation: isolate;
    transition: transform 0.35s ease;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: var(--radius-xl);
    background: var(--service-halo, rgba(14, 165, 233, 0.25));
    filter: blur(18px);
    opacity: 0.45;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: -1;
    pointer-events: none;
}

.service-card:hover::before,
.service-card:focus-within::before {
    opacity: 0;
    transform: scale(1.1);
}

.service-card:hover,
.service-card:focus-within {
    transform: scale(1.04);
}

.service-card--blue {
    --service-halo: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.28));
}

.service-card--green {
    --service-halo: linear-gradient(135deg, rgba(16, 185, 129, 0.26), rgba(5, 150, 105, 0.26));
}

.service-card--purple {
    --service-halo: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(129, 140, 248, 0.3));
}

.onboarding-section {
    position: relative;
    background: linear-gradient(160deg, #f8fbff 0%, #eef6ff 35%, #ffffff 100%);
}

.onboarding-wrapper {
    position: relative;
    z-index: 1;
}

.onboarding-grid {
    display: grid;
    gap: 1.5rem;
    justify-items: center;
    align-items: start;
}

@media (min-width: 768px) {
    .onboarding-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .onboarding-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
        justify-content: center;
        max-width: 1000px;
        margin: 0 auto;
    }
}

/* Hide sections on mobile */
@media (max-width: 767px) {
    /* Hide messages gallery section on mobile */
    .onboarding-section {
        display: none !important;
    }

    /* Show hero image on mobile */
    #hero .relative img {
        display: block !important;
    }

    /* Show floating cards on mobile */
    #hero .absolute {
        display: block !important;
    }

    /* Hide desktop navigation link for gallery on mobile */
    .desktop-nav a[href="#onboarding"] {
        display: none !important;
    }

    /* Mobile hero layout - text on top, image below */
    #hero .grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        align-items: center;
        min-height: 100vh;
    }

    #hero .space-y-8 {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        order: 1 !important;
    }

    /* Hide floating cards on mobile */
    #hero .absolute {
        display: none !important;
    }

    /* Image below text on mobile */
    #hero .relative {
        order: 2 !important;
    }

    /* Style floating cards as inline cards on mobile */
    #hero .absolute .bg-white {
        display: inline-block !important;
        margin: 0.5rem !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }

    /* Improve text sizing on mobile */
    #hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }

    #hero p {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }

    /* Better button spacing on mobile */
    #hero .flex {
        margin-top: 1rem !important;
    }
}

.onboarding-step {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 280px;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 auto;
}

.onboarding-step:hover,
.onboarding-step:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.onboarding-step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(16, 185, 129, 0.95));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.25);
}

.onboarding-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.onboarding-step p {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.4;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.onboarding-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.8rem;
    color: #1e293b;
    font-weight: 600;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.onboarding-meta i {
    color: #0ea5e9;
}

#navbar.navbar-hidden {
    opacity: 0;
    transform: translate(-50%, -30px);
    pointer-events: none;
}

.final-cta-section {
    position: relative;
    background: #F5F8FD;
    overflow: hidden;
}

.final-cta-card {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.final-cta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.18);
}

.final-metric {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(14, 165, 233, 0.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.final-metric:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.final-metric-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    color: #fff;
}

.final-cta-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.final-form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.93);
    color: #1f2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.final-form-input::placeholder {
    color: #94a3b8;
}

.final-form-input:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.7);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.footer-wrapper {
    background: #fff;
    padding: 4rem 0;
}

.footer-floating {
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    padding: 3rem var(--layout-gutter);
}

.footer-brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.footer-description {
    color: #475569;
    max-width: 30rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: rgba(148, 163, 184, 0.12);
    color: #0f172a;
    transition: all 0.25s ease;
}

.footer-social a:hover {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

.footer-links a {
    color: #475569;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #0ea5e9;
}

@media (max-width: 768px) {
    .footer-floating {
        border-radius: var(--radius-lg);
        padding: 2.5rem var(--layout-gutter);
    }
}


/* Animaciones suaves para secciones */
[data-animate] {
    position: relative;
    opacity: 0;
    transition: opacity 0.65s ease, transform 0.65s ease;
    will-change: opacity, transform;
}

[data-animate="fade-up"] {
    transform: translateY(42px);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate="scale-in"] {
    transform: scale(0.96);
}

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

[data-animate]::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: inherit;
    background: rgba(15, 118, 110, 0.06);
    filter: blur(32px);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

[data-animate].is-visible::after {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    [data-animate]::after {
        opacity: 0 !important;
    }
}

/* Ajuste de color para títulos principales */
.text-gray-900 {
    color: #1D2E2E !important;
}

/* Additional responsive improvements */
@media (max-width: 640px) {
    /* Improve button touch targets */
    .cta-primary,
    .cta-secondary {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }

    /* Better spacing for mobile sections */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    /* Improve card spacing on mobile */
    .service-card {
        margin-bottom: 1rem;
    }

    /* Better mobile navigation spacing */
    .navbar-panel {
        padding: 0.75rem 1rem;
    }

    /* Improve form inputs on mobile */
    .final-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Show floating cards in hero section for desktop/web */

/* Hero section with proper spacing for navbar */
.hero-with-navbar-spacing {
    padding-top: 8rem; /* Reduced space for navbar */
    min-height: 100vh; /* Full viewport height */
}

/* Hero grid set to 100vh */
#hero .grid {
    min-height: 100vh;
}

/* Ensure proper vertical alignment considering navbar */
#hero .grid {
    align-items: center;
    min-height: 100%;
}

/* Responsive adjustments for hero spacing */
@media (max-width: 768px) {
    .hero-with-navbar-spacing {
        padding-top: 6rem; /* Reduced space on mobile */
    }

    #hero .grid {
        min-height: 100vh;
    }
}

@media (min-width: 1024px) {
    .hero-with-navbar-spacing {
        padding-top: 10rem; /* Slightly more space on larger screens */
    }

    #hero .grid {
        min-height: 100vh;
    }
}

/* Ensure proper touch targets for all interactive elements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for touch devices */
    button,
    a,
    input,
    textarea,
    select {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .service-card:hover,
    .service-card:focus-within {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.whatsapp-float .whatsapp-text {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #25d366;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

.whatsapp-float i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Hide WhatsApp button on mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        display: none !important;
    }
}


/* Mobile navbar improvements */
@media (max-width: 768px) {
    #hero {
        padding-top: 2rem !important;
    }

    /* Hide mobile navbar initially */
    #navbar {
        opacity: 0 !important;
        transform: translate(-50%, -30px) !important;
        pointer-events: none !important;
        transition: opacity 0.4s ease, transform 0.4s ease !important;
    }

    /* Show navbar when user interacts */
    #navbar.navbar-visible {
        opacity: 0.95 !important;
        transform: translate(-50%, 0) !important;
        pointer-events: auto !important;
    }
}

