/* =====================================================
   NECTEREAI - Tech Automation & AI
   Premium Dark Mode Landing Page
   Color Principal: Azul Eléctrico (#3B82F6)
   Estilo: Dark Luxury Tech
   ===================================================== */

/* =====================================================
   0. IMPORTS & RESET
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
   1. CUSTOM PROPERTIES (DESIGN TOKENS)
   ===================================================== */
:root {
    /* Fondos - Tonalidades ligeramente más claras con matiz azulado sutil */
    --bg-primary: #050510;
    --bg-secondary: #0B0B14;
    --bg-tertiary: #1A1A24;

    /* Textos - Ligeramente más luminosos */
    --text-primary: #F8F9FC;
    --text-secondary: #E8E9ED;
    --text-tertiary: #A8AABA;
    --text-quaternary: #7B7D8E;

    /* Color Principal - Azul Eléctrico Luminoso */
    --primary-50: #F0F6FF;
    --primary-100: #DEEAFF;
    --primary-200: #C4DDFF;
    --primary-300: #9CC5FD;
    --primary-400: #6BACFB;
    --primary-500: #4B8DF7;
    --primary-600: #3070ED;
    --primary-700: #2258DB;
    --primary-800: #2046B5;
    --primary-900: #1E3B8F;
    --primary-rgb: 75, 141, 247;

    /* Bordes y superficies - Algo más visibles */
    --border-primary: rgba(255, 255, 255, 0.08);
    --border-secondary: rgba(255, 255, 255, 0.12);
    --surface-glass: rgba(255, 255, 255, 0.04);
    --surface-glass-hover: rgba(255, 255, 255, 0.07);

    /* Tipografía */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Espaciado */
    --section-padding: 120px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* =====================================================
   2. BASE STYLES
   ===================================================== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 700;
}

/* =====================================================
   3. PARTICLES BACKGROUND
   ===================================================== */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(var(--primary-rgb), 0.4);
    border-radius: 50%;
    animation: float-particle linear infinite;
    will-change: transform, opacity;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* =====================================================
   4. NAVBAR
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 5, 16, 0.85);
    border-bottom: 1px solid var(--border-primary);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.navbar-logo svg {
    width: 40px;
    height: 40px;
}

.navbar-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
}

.navbar-logo-brand-info {
    display: flex;
    flex-direction: column;
}

.navbar-logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-logo-text span {
    color: var(--primary-500);
}

.navbar-logo-text-sub {
    font-size: 0.75rem;
    color: var(--text-quaternary);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    padding: 2px;
    margin-left: 8px;
}

.lang-btn {
    padding: 4px 10px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.lang-btn.active {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-400);
}

.lang-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.navbar-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: var(--transition-base);
    position: relative;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: var(--transition-base);
    border-radius: 1px;
}

.navbar-links a:hover {
    color: var(--text-primary);
}

.navbar-links a:hover::after {
    width: 100%;
}

/* Mobile menu toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 4px;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =====================================================
   5. BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--surface-glass-hover);
    border-color: rgba(var(--primary-rgb), 0.4);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.15);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.8125rem;
}

.btn-navbar {
    padding: 10px 24px;
    font-size: 0.8125rem;
}

/* Pulse glow animation for primary CTA */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.5), 0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

.btn-pulse {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* =====================================================
   6. HERO SECTION
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(var(--primary-rgb), 0.05) 0%, transparent 40%);
    animation: hero-bg-shift 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes hero-bg-shift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-2%, 1%);
    }

    66% {
        transform: translate(2%, -1%);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-400);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-500);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    animation: label-pulse 2s ease-in-out infinite;
}

@keyframes label-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.1;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-tertiary);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-image {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hero-float 6s ease-in-out infinite;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-xl);
    filter: drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.25));
    transition: filter 0.5s ease;
}

.hero-img:hover {
    filter: drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.4));
}

.hero-visual-orb {
    width: 500px;
    height: 500px;
    position: relative;
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-orb-inner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.25), transparent 70%),
        radial-gradient(circle at 70% 70%, rgba(var(--primary-rgb), 0.15), transparent 60%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    box-shadow: 0 0 80px rgba(var(--primary-rgb), 0.15),
        inset 0 0 60px rgba(var(--primary-rgb), 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-svg {
    width: 65%;
    height: 65%;
    filter: drop-shadow(0 0 30px rgba(var(--primary-rgb), 0.4));
    animation: hero-logo-pulse 4s ease-in-out infinite;
}

.hero-logo-svg circle[fill="#3B82F6"] {
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.8));
}

.hero-logo-svg line {
    filter: drop-shadow(0 0 4px rgba(var(--primary-rgb), 0.5));
}

@keyframes hero-logo-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 30px rgba(var(--primary-rgb), 0.4));
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(var(--primary-rgb), 0.7));
    }
}

.hero-orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.hero-orb-ring:nth-child(2) {
    inset: -20px;
    animation: ring-rotate 20s linear infinite;
}

.hero-orb-ring:nth-child(3) {
    inset: -50px;
    animation: ring-rotate 30s linear infinite reverse;
}

.hero-orb-ring:nth-child(4) {
    inset: -80px;
    border-style: dashed;
    animation: ring-rotate 40s linear infinite;
    opacity: 0.5;
}

@keyframes ring-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Small floating nodes on the orb */
.hero-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6);
}

.hero-node:nth-child(5) {
    top: 10%;
    left: 50%;
    animation: node-pulse 3s ease-in-out infinite;
}

.hero-node:nth-child(6) {
    top: 50%;
    left: 95%;
    animation: node-pulse 3s ease-in-out 0.5s infinite;
}

.hero-node:nth-child(7) {
    top: 85%;
    left: 40%;
    animation: node-pulse 3s ease-in-out 1s infinite;
}

.hero-node:nth-child(8) {
    top: 40%;
    left: 5%;
    animation: node-pulse 3s ease-in-out 1.5s infinite;
}

@keyframes node-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6);
    }

    50% {
        transform: scale(1.5);
        box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.9);
    }
}

/* =====================================================
   7. SOCIAL PROOF / TRUST
   ===================================================== */
.social-proof {
    padding: 80px 0;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.social-proof-label {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 32px;
}

.tech-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 60px;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    transition: var(--transition-base);
}

.tech-chip:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary-400);
    background: rgba(var(--primary-rgb), 0.05);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.metric-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.metric-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.03);
    transform: translateY(-4px);
}

.metric-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-400);
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* =====================================================
   8. SECTION COMMON STYLES
   ===================================================== */
.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--primary-400);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-title span {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.0625rem;
    color: var(--text-tertiary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =====================================================
   9. SERVICES - FLIP CARDS
   ===================================================== */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.flip-card {
    perspective: 1000px;
    height: 380px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

.flip-card-front {
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
}

.flip-card-visual {
    height: 200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card:hover .service-card-img {
    transform: scale(1.05);
}

/* CSS-generated service visuals */
.service-visual-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.service-visual-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, transparent 60%);
}

.service-visual-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--bg-tertiary), transparent);
    z-index: 1;
}

/* Individual service visual patterns */
.sv-leads .service-visual-bg {
    background: radial-gradient(circle at 30% 40%, rgba(var(--primary-rgb), 0.2), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(var(--primary-rgb), 0.1), transparent 40%),
        var(--bg-primary);
}

.sv-calendar .service-visual-bg {
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.12), transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(var(--primary-rgb), 0.18), transparent 40%),
        var(--bg-primary);
}

.sv-support .service-visual-bg {
    background: radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.15), transparent 50%),
        linear-gradient(45deg, rgba(var(--primary-rgb), 0.05), transparent),
        var(--bg-primary);
}

.sv-integrations .service-visual-bg {
    background: radial-gradient(circle at 20% 80%, rgba(var(--primary-rgb), 0.15), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(var(--primary-rgb), 0.1), transparent 40%),
        var(--bg-primary);
}

.sv-admin .service-visual-bg {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), transparent),
        radial-gradient(circle at 60% 40%, rgba(var(--primary-rgb), 0.2), transparent 50%),
        var(--bg-primary);
}

.sv-analytics .service-visual-bg {
    background: radial-gradient(circle at 40% 60%, rgba(var(--primary-rgb), 0.18), transparent 50%),
        linear-gradient(200deg, rgba(var(--primary-rgb), 0.08), transparent),
        var(--bg-primary);
}

/* Service visual SVG icons */
.service-icon-wrap {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.service-icon-wrap svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary-400);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flip-card-front-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.flip-card-front h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.flip-card-hint {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

.flip-card-back {
    background: var(--bg-tertiary);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    justify-content: center;
}

.flip-card-back h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-400);
}

.flip-card-back p {
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: justify;
}

.flip-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.flip-card-tag {
    padding: 4px 14px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--primary-400);
    letter-spacing: 0.03em;
}

/* =====================================================
   10. SHOWCASE / CASES
   ===================================================== */
.showcase {
    background: var(--bg-primary);
    overflow: hidden;
}

.showcase-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.showcase-visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    aspect-ratio: 4/3;
    background: radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.15), transparent 70%),
        linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-visual-inner {
    position: relative;
    width: 80%;
    height: 70%;
}

/* Animated workflow nodes */
.workflow-node {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-node svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-400);
    fill: none;
    stroke-width: 1.5;
}

.workflow-node:nth-child(1) {
    top: 10%;
    left: 5%;
    animation: node-float 4s ease-in-out infinite;
}

.workflow-node:nth-child(2) {
    top: 10%;
    left: 40%;
    animation: node-float 4s ease-in-out 0.3s infinite;
}

.workflow-node:nth-child(3) {
    top: 10%;
    right: 5%;
    animation: node-float 4s ease-in-out 0.6s infinite;
}

.workflow-node:nth-child(4) {
    top: 45%;
    left: 20%;
    animation: node-float 4s ease-in-out 0.9s infinite;
}

.workflow-node:nth-child(5) {
    top: 45%;
    right: 20%;
    animation: node-float 4s ease-in-out 1.2s infinite;
}

.workflow-node:nth-child(6) {
    bottom: 10%;
    left: 35%;
    animation: node-float 4s ease-in-out 1.5s infinite;
}

@keyframes node-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Connecting lines */
.workflow-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.workflow-lines svg {
    width: 100%;
    height: 100%;
}

.workflow-lines line {
    stroke: rgba(var(--primary-rgb), 0.2);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.showcase-cases {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.case-card {
    padding: 28px;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-500), transparent);
    border-radius: 3px;
    opacity: 0;
    transition: var(--transition-base);
}

.case-card:hover {
    background: var(--surface-glass-hover);
    border-color: rgba(var(--primary-rgb), 0.2);
    transform: translateX(8px);
}

.case-card:hover::before {
    opacity: 1;
}

.case-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.case-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.case-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-400);
    fill: none;
    stroke-width: 1.5;
}

.case-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
}

.case-card p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: justify;
}

.case-metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.case-metric-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-400);
}

.case-metric-label {
    font-size: 0.8125rem;
    color: var(--text-quaternary);
}

/* =====================================================
   11. PROCESS
   ===================================================== */
.process {
    background: var(--bg-secondary);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 56px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), rgba(var(--primary-rgb), 0.3), transparent);
    z-index: 0;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.process-step-number {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary);
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-400);
    transition: var(--transition-base);
}

.process-step:hover .process-step-number {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-500);
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
    transform: scale(1.1);
}

.process-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.process-step h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* =====================================================
   12. FAQ
   ===================================================== */
.faq {
    background: var(--bg-primary);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
}

.faq-item.active {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.03);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: var(--transition-base);
}

.faq-question:hover {
    color: var(--primary-400);
}

.faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--primary-400);
}

.faq-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-content {
    padding: 0 24px 20px;
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    line-height: 1.7;
    text-align: justify;
}

/* =====================================================
   13. ABOUT
   ===================================================== */
.about {
    background: var(--bg-secondary);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.about-visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    aspect-ratio: 1;
    background: radial-gradient(circle at 40% 40%, rgba(var(--primary-rgb), 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg-tertiary), var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-visual-content {
    text-align: center;
}

.about-visual-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-visual-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-400);
    fill: none;
    stroke-width: 1.5;
}

.about-visual-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-quaternary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.about-content h2 span {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    font-size: 1rem;
    color: var(--text-tertiary);
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: justify;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.about-stat {
    text-align: center;
    padding: 20px;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}

.about-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-400);
    margin-bottom: 4px;
}

.about-stat-label {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   14. CTA FINAL
   ===================================================== */
.cta-final {
    padding: 120px 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cta-final::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    z-index: 0;
}

.cta-final::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), transparent);
}

.cta-final .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-final-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 64px 48px;
    background: rgba(var(--primary-rgb), 0.03);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
}

.cta-final h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.cta-final h2 span {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-final-subtitle {
    font-size: 1.0625rem;
    color: var(--text-tertiary);
    margin-bottom: 36px;
    line-height: 1.6;
}

.cta-final .btn {
    margin-bottom: 16px;
}

.cta-microcopy {
    font-size: 0.8125rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

/* =====================================================
   15. FOOTER
   ===================================================== */
.footer {
    padding: 48px 0 32px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand svg {
    width: 32px;
    height: 32px;
}

.footer-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: contain;
}

.footer-brand-info {
    display: flex;
    flex-direction: column;
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand-name span {
    color: var(--primary-500);
}

.footer-brand-sub {
    font-size: 0.75rem;
    color: var(--text-quaternary);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-quaternary);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-primary);
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-quaternary);
}

.footer-domain {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

.footer-domain a {
    color: var(--primary-400);
}

/* Footer Social Links */
.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-quaternary);
    transition: var(--transition-base);
}

.social-link:hover {
    color: var(--primary-400);
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.15);
    transform: translateY(-2px);
}

.social-link svg {
    flex-shrink: 0;
}

/* Button Small Variant */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
    gap: 6px;
}

/* =====================================================
   16. SCROLL REVEAL ANIMATIONS
   ===================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

.reveal-delay-5 {
    transition-delay: 0.5s;
}

.reveal-delay-6 {
    transition-delay: 0.6s;
}

/* =====================================================
   17. MOBILE MENU
   ===================================================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-base);
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.mobile-menu a:hover {
    color: var(--primary-400);
}

/* =====================================================
   18. RESPONSIVE
   ===================================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual-orb {
        width: 350px;
        height: 350px;
    }

    .hero-visual-image {
        width: 350px;
        height: 350px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .process-timeline::before {
        display: none;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .about-visual {
        max-width: 300px;
        margin: 0 auto;
    }

    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 64px 0;
    }

    .navbar-links {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-visual-orb {
        width: 280px;
        height: 280px;
    }

    .hero-visual-image {
        width: 280px;
        height: 280px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .flip-card {
        height: 340px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 24px 16px;
    }

    .process-timeline {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-layout {
        gap: 32px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .cta-final-box {
        padding: 40px 24px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Reduce particles on mobile */
    .particle:nth-child(n+20) {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .tech-chips {
        gap: 8px;
    }

    .tech-chip {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* =====================================================
   19. SCROLLBAR CUSTOM
   ===================================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.3);
}

/* =====================================================
   20. BACK TO TOP BUTTON & FLOATING ACTIONS
   ===================================================== */

/* Shared floating container — bottom-right, visible on scroll */
.floating-actions {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    /* Hidden initially */
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-actions.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

/* Back-to-top integrated inside floating-actions */
.back-to-top {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: var(--transition-base);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.5), 0 8px 24px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.back-to-top svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Book Appointment Floating Button ---- */
.floating-book-wrap {
    position: relative;
}

/* Main button */
.floating-book-btn {
    padding: 8px 18px;
    font-size: 0.875rem;
    height: auto;
    min-height: 48px;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.35) !important;
    animation: none !important;
    align-items: center;
}

/* Text column inside button */
.floating-book-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1;
}

.floating-book-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.2;
}

.floating-book-sub {
    font-size: 0.675rem;
    font-weight: 500;
    color: rgba(34, 34, 34, 0.78);
    letter-spacing: 0.02em;
    line-height: 1;
}

.floating-book-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.floating-book-btn[aria-expanded="true"] .floating-book-chevron {
    transform: rotate(180deg);
}

/* Upward Dropdown */
.floating-book-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: var(--radius-md);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.floating-book-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.floating-book-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
}

.floating-book-option:last-child {
    border-bottom: none;
}

.floating-book-option:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-400);
}

.floating-book-option svg {
    flex-shrink: 0;
    opacity: 0.7;
}


/* =====================================================
   21. CONTACT FORM MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    padding: 24px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 60px rgba(var(--primary-rgb), 0.1), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-glass);
    border: 1px solid var(--border-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary-400);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.modal-header {
    margin-bottom: 32px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.modal-header h2 span {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.form-group label .optional {
    font-weight: 400;
    color: var(--text-quaternary);
    font-size: 0.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: var(--transition-base);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-quaternary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-submit {
    margin-top: 8px;
}

/* Privacy Checkbox */
.form-group-checkbox {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 0 !important;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    color: var(--text-tertiary) !important;
    line-height: 1.5;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-secondary);
    border-radius: var(--radius-xs, 4px);
    background: var(--bg-tertiary);
    transition: var(--transition-base);
    position: relative;
    margin-top: 1px;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid var(--primary-400);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-label input[type="checkbox"]:checked~.checkbox-custom {
    border-color: var(--primary-500);
    background: rgba(var(--primary-rgb), 0.15);
}

.checkbox-label input[type="checkbox"]:checked~.checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label input[type="checkbox"]:focus-visible~.checkbox-custom {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-500);
}

.checkbox-label:hover .checkbox-custom {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.checkbox-label a {
    color: var(--primary-400);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
}

.checkbox-label a:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

.form-submit .btn {
    width: 100%;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.form-success.show {
    display: block;
}

.form-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-400);
    fill: none;
    stroke-width: 2;
}

.form-success h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

/* =====================================================
   22. FORM VALIDATION ERRORS
   ===================================================== */
/* Error state for inputs, selects, textareas */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Error state for checkbox */
.form-group-checkbox.has-error .checkbox-custom {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Error message text */
.field-error {
    display: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ef4444;
    margin-top: 4px;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.form-group.has-error .field-error {
    display: block;
}

.form-group-checkbox.has-error .field-error {
    display: block;
    margin-top: 6px;
}

/* =====================================================
   23. LEGAL SECTION
   ===================================================== */
.legal {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--primary-400);
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content p {
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    line-height: 1.8;
    margin-bottom: 12px;
    text-align: justify;
}

.legal-content ul {
    list-style: none;
    margin-bottom: 16px;
    padding-left: 0;
}

.legal-content ul li {
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.legal-content ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-500);
    font-weight: 700;
}

.legal-content a {
    color: var(--primary-400);
    transition: var(--transition-base);
}

.legal-content a:hover {
    text-decoration: underline;
}

/* =====================================================
   23. RESPONSIVE ADDITIONS (new components)
   ===================================================== */
@media (max-width: 768px) {
    .modal-content {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 24px 16px;
    }
}

/* =====================================================
   24. RESPONSIVE — Floating Actions
   ===================================================== */
@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 16px;
        gap: 8px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
    }

    .floating-book-btn {
        padding: 8px 14px;
        font-size: 0.8125rem;
        height: 42px;
    }

    .floating-book-dropdown {
        min-width: 160px;
    }

    .floating-book-option {
        padding: 11px 14px;
        font-size: 0.8125rem;
    }
}


/* =====================================================
   25. SELECTION
   ===================================================== */
::selection {
    background: rgba(var(--primary-rgb), 0.3);
    color: var(--text-primary);
}

/* =====================================================
   26. FLOATING CHAT BUTTON (n8n)
   ===================================================== */

/* Custom chat toggle button */
.floating-chat-btn {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, var(--primary-500), #6366f1);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: var(--transition-base);
    overflow: visible;
}

.floating-chat-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            rgba(var(--primary-rgb), 0.6),
            rgba(99, 102, 241, 0.4),
            rgba(var(--primary-rgb), 0.6));
    animation: chat-ring-spin 4s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-chat-btn:hover::before,
.floating-chat-btn.active::before {
    opacity: 1;
}

@keyframes chat-ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.floating-chat-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.6), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.floating-chat-btn.active {
    background: linear-gradient(135deg, #6366f1, var(--primary-500), #1d4ed8);
    transform: scale(1.05);
}

/* "IA" badge on top-right of the chat button */
.floating-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #6366f1, var(--primary-400));
    border: 2px solid var(--bg-primary);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    animation: badge-pulse 2.5s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.5);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(var(--primary-rgb), 0);
    }
}

/* Hide n8n's own toggle button visually — but NOT with display:none
   so that programmatic .click() still works */
.n8n-chat .chat-window-toggle,
.n8n-chat-window-toggle {
    position: fixed !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =====================================================
   n8n Chat Widget — Custom Theme (matches NECTEREAI)
   Uses exact CSS variable names from the @n8n/chat docs
   ===================================================== */
:root {
    /* ---- Colors (exact doc naming: double-dash prefix) ---- */
    --chat--color--primary: #3B82F6;
    --chat--color--primary-shade-50: #2563EB;
    --chat--color--primary--shade-100: #1D4ED8;
    --chat--color--secondary: #6366f1;
    --chat--color-secondary-shade-50: #4f46e5;

    /* Body uses white surfaces, dark text (standard chat look) */
    --chat--color-white: #ffffff;
    --chat--color-light: #f5f6fa;
    --chat--color-light-shade-50: #e8eaf0;
    --chat--color-light-shade-100: #d0d3de;
    --chat--color-medium: #9ca3af;
    --chat--color-dark: #111827;
    --chat--color-disabled: #d1d5db;
    --chat--color-typing: #6b7280;

    /* ---- Base Layout ---- */
    --chat--spacing: 1rem;
    --chat--border-radius: 12px;
    --chat--transition-duration: 0.2s;
    --chat--font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ---- Window Dimensions ---- */
    --chat--window--width: 380px;
    --chat--window--height: 580px;
    --chat--window--bottom: 100px;
    --chat--window--right: 32px;
    --chat--window--z-index: 999;
    --chat--window--border: 1px solid rgba(59, 130, 246, 0.2);
    --chat--window--border-radius: 20px;
    --chat--window--margin-bottom: 0;

    /* ---- Header ---- */
    --chat--header-height: auto;
    --chat--header--padding: 16px 20px;
    --chat--header--background: linear-gradient(135deg, #0B0B14 0%, #1A1A24 100%);
    --chat--header--color: #F8F9FC;
    --chat--header--border-top: none;
    --chat--header--border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    --chat--header--border-left: none;
    --chat--header--border-right: none;
    --chat--heading--font-size: 1rem;
    --chat--subtitle--font-size: 0.72rem;
    --chat--subtitle--line-height: 1.4;

    /* ---- Messages ---- */
    --chat--message--font-size: 0.875rem;
    --chat--message--padding: 10px 14px;
    --chat--message--border-radius: 12px;
    --chat--message-line-height: 1.55;
    --chat--message--margin-bottom: 0.5rem;
    --chat--message--bot--background: #f0f2f8;
    --chat--message--bot--color: #111827;
    --chat--message--bot--border: none;
    --chat--message--user--background: #3B82F6;
    --chat--message--user--color: #ffffff;
    --chat--message--user--border: none;
    --chat--message--pre--background: rgba(0, 0, 0, 0.07);
    --chat--messages-list--padding: 1rem;

    /* ---- Toggle (hidden — we use our own button) ---- */
    --chat--toggle--size: 0px;
    --chat--toggle--width: 0px;
    --chat--toggle--height: 0px;
    --chat--toggle--border-radius: 50%;
    --chat--toggle--background: #3B82F6;
    --chat--toggle--hover--background: #2563EB;
    --chat--toggle--active--background: #1D4ED8;
    --chat--toggle--color: #fff;

    /* ---- Input / Textarea ---- */
    --chat--textarea--height: 48px;
    --chat--textarea--max-height: 12rem;
    --chat--input--font-size: 0.875rem;
    --chat--input--border: 0;
    --chat--input--border-radius: 10px;
    --chat--input--padding: 0.7rem 0.9rem;
    --chat--input--background: #ffffff;
    --chat--input--text-color: #111827;
    --chat--input--line-height: 1.5;
    --chat--input--placeholder--font-size: 0.875rem;
    --chat--input--border-active: 0;
    --chat--input--left--panel--width: 2rem;

    /* ---- Body & Footer container ---- */
    --chat--body--background: #ffffff;
    --chat--footer--background: #f5f6fa;
    --chat--footer--color: #6b7280;

    /* ---- Send Button ---- */
    --chat--input--send--button--background: #3B82F6;
    --chat--input--send--button--color: #ffffff;
    --chat--input--send--button--background-hover: #2563EB;
    --chat--input--send--button--color-hover: #ffffff;

    /* ---- File Button ---- */
    --chat--input--file--button--background: #1A1A24;
    --chat--input--file--button--color: #6b7280;
    --chat--input--file--button--background-hover: #1A1A24;
    --chat--input--file--button--color-hover: #3B82F6;
    --chat--files-spacing: 0.25rem;

    /* ---- Action Buttons (start new conversation etc.) ---- */
    --chat--button--padding: 0.6rem 1.1rem;
    --chat--button--border-radius: 8px;
    --chat--button--font-size: 0.875rem;
    --chat--button--line-height: 1;
    --chat--button--color--primary: #ffffff;
    --chat--button--background--primary: #3B82F6;
    --chat--button--border--primary: none;
    --chat--button--color--primary--hover: #ffffff;
    --chat--button--background--primary--hover: #2563EB;
    --chat--button--border--primary--hover: none;
    --chat--button--color--primary--disabled: #ffffff;
    --chat--button--background--primary--disabled: #44445a;
    --chat--button--border--primary--disabled: none;
    --chat--button--color--secondary: #F8F9FC;
    --chat--button--background--secondary: #2a2a38;
    --chat--button--border--secondary: none;
    --chat--button--color--secondary--hover: #3B82F6;
    --chat--button--background--secondary--hover: #1A1A24;
    --chat--button--border--secondary--hover: none;
    --chat--close--button--color-hover: #3B82F6;
}

/* ---- Position & base font ---- */
.n8n-chat {
    --chat--window--bottom: 100px;
    --chat--window--right: 32px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Window (glassmorphism wrapper) ---- */
.n8n-chat .chat-window {
    background: rgba(5, 5, 16, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.08), 0 24px 64px rgba(0, 0, 0, 0.7) !important;
    overflow: hidden !important;
}

/* ---- Messages body ---- */
.n8n-chat .chat-messages-list,
.n8n-chat .messages {
    background: #ffffff !important;
}

/* ==========================================
   INPUT AREA — white, clean look
   ========================================== */

/* Footer wrapper — uniform color. Uses class patterns that n8n uses for the input container ONLY.
   Avoids :last-child/:first-child because they can match the header when the chat-window
   has a different child structure than expected. */
.n8n-chat .chat-input,
.n8n-chat [class*="chat-input"],
.n8n-chat [class*="chatInput"],
.n8n-chat [class*="chat-footer"],
.n8n-chat [class*="chatFooter"] {
    background: #f5f6fa !important;
    border-top: 1px solid #e8eaf0 !important;
}

.n8n-chat .chat-input {
    padding: 10px 12px !important;
    gap: 8px !important;
    align-items: center !important;
    display: flex !important;
}

/* Textarea */
.n8n-chat .chat-input textarea {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d0d3de !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    resize: none !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    flex: 1 !important;
    min-height: 42px !important;
}

.n8n-chat .chat-input textarea::placeholder {
    color: #9ca3af !important;
}

.n8n-chat .chat-input textarea:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Send button — clean blue pill matching the web palette */
.n8n-chat .chat-input button {
    background: #3B82F6 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
    padding: 0 !important;
}

.n8n-chat .chat-input button:hover {
    background: #2563EB !important;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.5) !important;
    transform: scale(1.08) !important;
}

.n8n-chat .chat-input button svg {
    width: 18px !important;
    height: 18px !important;
}


/* =====================================================
   HEADER REAL — clase correcta según código fuente n8n
   ===================================================== */

/* Header container: flex row con icono + texto + botón de cierre */
.n8n-chat .chat-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    background: linear-gradient(135deg, #0B0B14 0%, #1A1A24 100%) !important;
    color: #F8F9FC !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* Icono robot via ::before — 100% CSS, no se puede borrar con JS */
.n8n-chat .chat-header::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none'%3E%3Crect x='5' y='11' width='26' height='19' rx='4' fill='%233B82F6' fill-opacity='0.15' stroke='%233B82F6' stroke-width='1.5'/%3E%3Crect x='11' y='16' width='5' height='5' rx='1.5' fill='%233B82F6'/%3E%3Crect x='20' y='16' width='5' height='5' rx='1.5' fill='%233B82F6'/%3E%3Cpath d='M13 27h10' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M18 11V7' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='18' cy='5.5' r='1.5' fill='%233B82F6'/%3E%3Cpath d='M5 18H2M34 18h-3' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Bloque título+subtítulo ocupa el espacio restante */
.n8n-chat .chat-header > *:not(.chat-close-button) {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Título h1 */
.n8n-chat .chat-header h1 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #F8F9FC !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

/* "AI" en azul: se usa ::after en el h1 con content vacío
    y se oculta el texto original reemplazándolo con color vía
    text-shadow (truco CSS sin JS) */
.n8n-chat .chat-header h1 {
    /* Oculta el texto NECTEREAI para reemplazarlo */
    color: transparent !important;
    background: linear-gradient(90deg, #F8F9FC 0%, #F8F9FC 81%, #3B82F6 81%, #3B82F6 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Subtítulo p */
.n8n-chat .chat-header p {
    font-size: 0.72rem !important;
    color: rgba(248, 249, 252, 0.6) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Botón cerrar (X): empujado al final con margin auto */
.n8n-chat .chat-close-button,
.n8n-chat .chat-header .chat-close-button {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    color: rgba(248, 249, 252, 0.5) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 4px !important;
    cursor: pointer !important;
    transition: color 0.2s, background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.n8n-chat .chat-close-button:hover,
.n8n-chat .chat-header .chat-close-button:hover {
    color: #3B82F6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Mantener para compat — las reglas de .chat-window-header antiguas no deben interferir */
.n8n-chat .chat-window-header {
    background: linear-gradient(135deg, #0B0B14 0%, #1A1A24 100%) !important;
    color: #F8F9FC !important;
}


/* ---- Logo injected via JS ---- */
.n8n-chat-logo-injected {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 10px;
}

/* ---- "AI" blue in title (injected via JS span) ---- */
.n8n-chat-title-ai {
    color: #3B82F6;
    font-weight: 800;
}

/* ---- Scrollbar inside chat ---- */
.n8n-chat .chat-messages-list::-webkit-scrollbar,
.n8n-chat .messages::-webkit-scrollbar {
    width: 4px;
}

.n8n-chat .chat-messages-list::-webkit-scrollbar-track,
.n8n-chat .messages::-webkit-scrollbar-track {
    background: transparent;
}

.n8n-chat .chat-messages-list::-webkit-scrollbar-thumb,
.n8n-chat .messages::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

/* ---- Welcome / get-started screen ---- */
.n8n-chat .chat-welcome-screen,
.n8n-chat .welcome-screen {
    background: #ffffff !important;
    color: #111827 !important;
}

/* ---- Typing indicator ---- */
.n8n-chat .typing-indicator span,
.n8n-chat [class*="typingIndicator"] span {
    background: #3B82F6 !important;
}

/* ---- Responsive — mobile ---- */
@media (max-width: 768px) {
    .floating-chat-btn {
        width: 42px;
        height: 42px;
    }

    .n8n-chat {
        --chat--window--bottom: 88px;
        --chat--window--right: 16px;
    }

    .n8n-chat .chat-window {
        width: calc(100vw - 32px) !important;
        max-width: 380px !important;
    }
}