:root {
    --bg-color: #0f172a;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 60%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --accent: #FF5500;
    --accent-glow: rgba(255, 85, 0, 0.4);
}

/* --- RESET & BASICS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    /* CRÍTICO: Evita el bamboleo horizontal */
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.brand,
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- UTILITIES --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Menos padding en móvil para ganar espacio */
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 85, 0, 0.3);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent);
    color: #fff;
    padding: 16px 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    border: 1px solid var(--accent);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    width: auto;
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn:hover::after {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

@media (max-width: 480px) {
    .btn-outline {
        width: auto;
        /* Allow it to fit on same line */
        padding: 10px 16px;
        /* Slightly smaller padding */
        font-size: 0.8rem;
    }
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(255, 85, 0, 0.05);
    color: var(--accent);
}

/* --- HEADER --- */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(3, 3, 3, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    /* Reduced gap to ensure fit */
    /* flex-wrap removed to keep on same line */
}

.brand-container {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-sub strong {
    color: var(--accent);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    /* Más espacio arriba para móvil */
    padding-bottom: 60px;
    overflow: hidden;
}

#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Let mouse pass through to content if needed, but we track it on window */
}

/* Fix Background Overflow */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    width: 80vw;
    /* Usar vw en vez de px fijos */
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.15;
    transform: translateX(-50%);
    z-index: -1;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.1;
        transform: translateX(-50%) scale(0.9);
    }

    100% {
        opacity: 0.2;
        transform: translateX(-50%) scale(1.1);
    }
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    /* Ajuste clamp para móviles pequeños */
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-wrap: break-word;
    /* Evita desbordamiento de palabras largas */
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    /* Permitir wrap en móviles muy pequeños */
}

.hero-stats {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 1280px) {
    .hero h1 {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }

    .hero-stats {
        position: relative;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 60px;
        right: auto;
        top: auto;
        padding: 0 10px;
    }

    .stat-item {
        flex: 1 1 140px;
        margin-bottom: 10px;
    }
}

.stat-item {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 24px;
    transition: border-color 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    color: #fff;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- GLASS CARDS & SECTIONS --- */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.1;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 60px auto;
    font-size: 1.1rem;
    padding: 0 10px;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Asegurar que no se desborde */
}

@media (max-width: 768px) {
    .glass-card {
        padding: 24px;
    }

    /* Menos padding interno en móvil */
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 85, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* --- GRID & FLEX FIXES --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media(max-width: 640px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Columna única en móvil */
}

/* --- PRICING FIX --- */
.pricing-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.price-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.8) 100%);
    flex: 1 1 300px;
    /* Base 300px pero puede encogerse/crecer */
    width: 100%;
    max-width: 400px;
    /* No más ancho que esto */
    min-width: 280px;
    /* Mínimo seguro para iPhone pequeño */
}

.price-spacer {
    height: 29px;
    /* Altura del badge */
    margin-bottom: 20px;
    display: block;
}

@media (max-width: 480px) {
    .price-card {
        min-width: 100%;
    }

    /* En móviles muy pequeños, 100% ancho */
}

.price-card.featured {
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 85, 0, 0.1);
    transform: scale(1.02);
    /* Cuidado en móvil con esto */
    z-index: 2;
}

@media (max-width: 900px) {
    .price-card.featured {
        transform: none;
    }

    /* Quitar scale en tablet/móvil para evitar overflow */
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    align-self: center;
}

.price-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    margin: 15px 0 15px 0;
}

.price-sub {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    border-left: 2px solid var(--accent);
    padding-left: 10px;
    min-height: 48px;
}

.setup-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    /* Permitir wrap si el texto es largo */
}

.setup-box span,
.setup-box strong {
    font-size: 0.9rem;
}

.features {
    flex-grow: 1;
    margin-bottom: 30px;
}

.features li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #d1d5db;
    font-size: 0.9rem;
}

.features li svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- AI SECTION --- */
.ai-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #222;
    border-radius: 30px;
    padding: 60px;
    position: relative;
    overflow: hidden;
    /* Importante para cortar las ondas */
}

@media(max-width: 900px) {
    .ai-layout {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 40px;
    }
}

.ai-bg-wave {
    position: absolute;
    right: -100px;
    top: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.1) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.ai-chat-ui {
    background: #0b141a;
    /* WhatsApp Dark Background */
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    /* WhatsApp Doodle Placeholder */
    background-size: 400px;
    background-blend-mode: soft-light;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    max-width: 90%;
    position: relative;
    opacity: 0;
    /* Hidden initially for animation */
    transform: translateY(10px);
}

.chat-left {
    background: #202c33;
    /* WhatsApp Dark Received Message */
    color: #e9edef;
    border-bottom-left-radius: 2px;
    border-left: none;
}



.chat-right {
    background: #005c4b;
    /* WhatsApp Dark Sent Message */
    color: #e9edef;
    margin-left: auto;
    border-bottom-right-radius: 2px;
    text-align: right;
}

.ai-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Caja precios IA responsive */
.ai-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media(max-width: 400px) {
    .ai-pricing-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .ai-pricing-right {
        text-align: left !important;
    }
}

/* --- PLACEHOLDERS --- */
.img-placeholder {
    width: 100%;
    height: 200px;
    background: #111;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 25px;
}

.img-placeholder i {
    font-size: 3rem;
    color: #333;
}

.img-placeholder::after {
    content: '[ Imagen IA ]';
    color: #444;
    font-size: 0.8rem;
    margin-top: 10px;
    text-transform: uppercase;
}

.team-placeholder {
    width: 100%;
    height: 300px;
    background: #111;
    border-radius: 12px;
    border: 1px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #555;
    transition: 0.3s;
}

.team-placeholder:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- TESTIMONIALS --- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* 280px min para móvil */
    gap: 30px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}

/* --- FOOTER --- */
footer {
    padding: 60px 0 40px 0;
    border-top: 1px solid #222;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* --- PRESS TICKER --- */
.press-ticker {
    background: #0b141a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.ticker-item {
    font-family: 'Syne', sans-serif;
    /* Keep Syne for press logos for distinct look, or Outfit */
    font-weight: 700;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
    cursor: default;
}

.ticker-item:hover {
    color: rgba(255, 255, 255, 0.8);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- FAQ ACCORDION --- */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 85, 0, 0.3);
}

.faq-item.active {
    border-color: var(--accent);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question span {
    flex: 1;
    padding-right: 20px;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--accent);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 28px 24px 28px;
}

.faq-answer p {
    color: #ccc;
    line-height: 1.8;
    margin: 0;
}

.faq-answer strong {
    color: #fff;
}