/* =====================================================
   DEVELPROJECTS - STYLES.CSS 
   Versión Móvil Optimizada
   ===================================================== */

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --secondary-color: #4f46e5;
    --accent-color: #fbbf24;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --error-color: #ef4444;
    
    /* Espaciado responsive */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Tamaños táctiles mínimos */
    --touch-target-min: 44px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

/* Prevenir scroll cuando el menú móvil está abierto */
body.menu-open {
    overflow: hidden;
}

/* Prevenir scroll cuando el chat está abierto en móvil */
body.chat-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ===== TIPOGRAFÍA RESPONSIVE ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    line-height: 1.7;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--text-dark);
    z-index: 1002;
}

.logo-icon {
    font-size: clamp(1.25rem, 3.5vw, 1.75rem);
}

.logo-text {
    white-space: nowrap;
}

/* Botón hamburguesa */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.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(7px, -7px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0.5rem;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--secondary-color);
}

/* ===== SELECTOR DE IDIOMAS ===== */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-height: var(--touch-target-min);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.language-btn:hover,
.language-btn:focus {
    background: var(--bg-light);
    border-color: var(--text-gray);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    min-height: var(--touch-target-min);
    background: var(--white);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9375rem;
    text-align: left;
}

.lang-option:hover,
.lang-option:focus {
    background: var(--bg-light);
}

.lang-option.active {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary-color);
}

.lang-option .flag {
    font-size: 1.125rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: clamp(6rem, 15vw, 8rem) 1rem clamp(3rem, 8vw, 4rem);
    margin-top: 4rem;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-size: clamp(0.8125rem, 2vw, 0.9375rem);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gradient-text {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

/* ===== BOTONES Y CTAs ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: clamp(0.875rem, 2vw, 1.125rem) clamp(1.5rem, 4vw, 2rem);
    min-height: var(--touch-target-min);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9375rem, 2vw, 1rem);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--white);
    color: var(--text-dark);
}

.btn-hero {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    padding: clamp(1rem, 2.5vw, 1.2rem) clamp(1.5rem, 4vw, 2.5rem);
}

.btn-icon {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.btn-large {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    padding: clamp(1rem, 2.5vw, 1.2rem) clamp(1.75rem, 4vw, 2.5rem);
}

.hero-cta {
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

.hero-cta-subtext {
    margin-top: 1rem;
    color: rgba(255,255,255,0.9);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.cta-center {
    text-align: center;
    margin-top: clamp(2rem, 5vw, 3rem);
}

.social-proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem;
}

.proof-icon {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.proof-text {
    font-size: clamp(0.8125rem, 2vw, 0.9375rem);
    opacity: 0.95;
}

/* ===== PROBLEM + SOLUTION SECTION ===== */
.problem-section {
    padding: clamp(3rem, 8vw, 4rem) 1rem;
    background: var(--bg-light);
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 4rem);
    align-items: start;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.accent-red {
    color: var(--error-color);
}

.problem-list,
.solution-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.problem-item,
.solution-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
}

.problem-dot {
    width: 10px;
    height: 10px;
    background: var(--error-color);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.solution-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.solution-icon {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ===== USE CASES SECTION ===== */
.use-cases {
    padding: clamp(3rem, 8vw, 4rem) 1rem;
}

.center {
    text-align: center;
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--text-gray);
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
}

.case-card {
    background: var(--white);
    border-radius: 1rem;
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.case-icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: 1rem;
    text-align: center;
}

.case-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.case-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.case-problem,
.case-solution,
.case-result {
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.case-problem strong,
.case-solution strong,
.case-result strong {
    display: block;
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.case-problem {
    background: #fef2f2;
    border-left: 4px solid var(--error-color);
}

.case-solution {
    background: #f0fdf4;
    border-left: 4px solid var(--primary-color);
}

.case-result {
    background: #fffbeb;
    border-left: 4px solid var(--accent-color);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: clamp(3rem, 8vw, 4rem) 1rem;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2rem);
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-number {
    width: 3rem;
    height: 3rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.service-title {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-desc {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: clamp(0.9375rem, 2vw, 1rem);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: clamp(3rem, 8vw, 4rem) 1rem;
}

.contact-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-cta {
    text-align: center;
    margin-bottom: 2rem;
    grid-column: 1 / -1;
}

.contact-email-text {
    margin-top: 1.5rem;
    color: var(--text-gray);
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.email-highlight {
    color: var(--secondary-color);
    font-size: clamp(1.125rem, 2.8vw, 1.25rem);
    display: inline-block;
    margin-top: 0.5rem;
}

.contact-info {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.contact-subtitle {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.contact-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: clamp(0.9375rem, 2vw, 1rem);
}

.feature span:first-child {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: clamp(2rem, 5vw, 3rem) 1rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    text-align: left;
}

.footer-tagline {
    margin-top: 0.5rem;
    color: #d1d5db;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    color: var(--text-gray);
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
}

/* ===== WEBCHAT IA ===== */
#n8n-ai-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

#n8n-chat-toggle {
    width: 60px;
    height: 60px;
    min-height: var(--touch-target-min);
    border-radius: 50%;
    background: var(--primary-color) !important;
    color: var(--white) !important;
    border: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5) !important;
    transition: all 0.3s ease;
    font-size: 24px;
    z-index: 999999 !important;
    -webkit-tap-highlight-color: transparent;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#n8n-chat-toggle:hover,
#n8n-chat-toggle:focus {
    transform: scale(1.1);
    background: var(--primary-hover);
}

#n8n-ai-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: min(380px, calc(100vw - 40px));
    height: min(600px, calc(100vh - 140px));
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 999998 !important;
    border: 1px solid var(--border-color);
    animation: chatSlideIn 0.3s ease-out;
}

@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.chat-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: clamp(0.9375rem, 2vw, 1rem);
}

.chat-header p {
    margin: 0.25rem 0 0 0;
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    opacity: 0.9;
}

#n8n-close-chat {
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

#n8n-close-chat:hover,
#n8n-close-chat:focus {
    background: rgba(255,255,255,0.1);
}

#n8n-chat-messages {
    flex: 1;
    padding: clamp(0.75rem, 2vw, 1rem);
    padding-bottom: 120px; /* Espacio extra para evitar que el input tape mensajes */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    background: var(--bg-light);
    -webkit-overflow-scrolling: touch;
    min-height: 0; /* Importante para flex container */
}

#n8n-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#n8n-chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#n8n-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

#n8n-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#n8n-typing-indicator {
    display: none;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #64748b;
    font-size: 0.875rem;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10002;
}

#n8n-chat-form {
    display: flex;
    gap: 0.625rem;
    align-items: flex-end;
}

#n8n-chat-input {
    flex: 1;
    padding: 0.875rem 1rem;
    min-height: var(--touch-target-min);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    background: var(--white);
    resize: none;
    -webkit-appearance: none;
}

#n8n-chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.send-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.send-btn:hover,
.send-btn:focus {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* Mensajes del chat */
.message {
    animation: messageSlide 0.3s ease;
    padding: clamp(0.625rem, 2vw, 0.875rem) clamp(0.875rem, 3vw, 1.125rem);
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    font-size: clamp(0.875rem, 2.5vw, 0.9375rem);
    hyphens: auto;
}

.user-message {
    align-self: flex-end;
    background: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.bot-message {
    align-self: flex-start;
    background: var(--white);
    color: #374151;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    margin-right: auto;
}

@keyframes messageSlide {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== BANNER DE COOKIES ===== */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--text-dark);
    color: var(--white);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 999997 !important;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0 0 1rem 0;
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    min-height: var(--touch-target-min);
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.cookie-btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.cookie-btn-primary:hover,
.cookie-btn-primary:focus {
    background: var(--primary-hover);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
}

.cookie-btn-secondary:hover,
.cookie-btn-secondary:focus {
    background: rgba(255,255,255,0.1);
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
    padding: 0.625rem 0;
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target-min);
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1024px) {
    .problem-grid {
        gap: 3rem;
    }
    
    .social-proof {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== RESPONSIVE: MÓVIL ===== */
@media (max-width: 768px) {
    /* Menú móvil */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 80vw);
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 6rem 2rem 2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        gap: 0;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.125rem;
    }
    
    .language-switcher {
        width: 100%;
        margin-top: 1rem;
    }
    
    .language-btn {
        width: 100%;
        justify-content: center;
    }
    
    .language-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    /* Hero responsive */
    .hero {
        padding: 5rem 1rem 2.5rem;
    }
    
    .social-proof {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Problem section */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Contact section */
    .contact-form-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Chat en pantalla completa */
    #n8n-ai-chat {
        bottom: 16px !important;
        right: 16px !important;
        z-index: 999999 !important;
        position: fixed !important;
        display: block !important;
    }
    
    #n8n-chat-toggle {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 60px !important;
        height: 60px !important;
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6) !important;
    }
    
    #n8n-ai-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 999998 !important;
    }
    
    .chat-header {
        border-radius: 0;
        padding: 1.25rem 1rem;
    }
    
    #n8n-chat-messages {
        padding: 1rem 0.75rem;
        padding-bottom: 140px; /* Más espacio en móvil para el input y teclado */
        gap: 0.625rem;
    }
    
    .message {
        max-width: 90%;
        font-size: 15px !important;
        padding: 0.75rem 1rem;
    }
    
    #n8n-chat-input {
        font-size: 16px !important;
        padding: 1rem !important;
    }
    
    .chat-input-container {
        padding: 1rem;
        position: sticky;
        bottom: 0;
        z-index: 10003;
        background: var(--white);
        border-top: 2px solid var(--border-color);
    }
    
    #n8n-chat-form {
        gap: 0.5rem;
    }
    
    .send-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    
    /* Banner de cookies */
    #cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 90px;
        max-width: none;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ===== RESPONSIVE: MÓVIL PEQUEÑO ===== */
@media (max-width: 480px) {
    .cases-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .social-proof {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    
    .btn {
        width: 100%;
        max-width: 320px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* ===== UTILIDADES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Prevenir highlight en tap en móviles */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Mejorar smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Mejorar rendimiento de animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}