/* ===========================================
   TRINITARIA DIGITAL V6 - "FINTECH SERIO"
   Professional Banking-Trust Design System
   =========================================== */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap');

/* ===== Design Tokens ===== */
:root {
    /* Fintech Serio Palette */
    --primary-900: #0F172A;
    /* Navy Profundo */
    --primary-800: #1E293B;
    --primary-700: #334155;
    --primary-600: #475569;

    /* Corporate Blue */
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --blue-500: #3B82F6;
    --blue-400: #60A5FA;
    --blue-100: #DBEAFE;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;

    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typography */
    --font-display: 'Instrument Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sizing - PREMIUM SPACING */
    --header-height: 80px;
    --container-max: 1200px;
    --section-padding: 120px;
    --section-padding-mobile: 80px;

    /* PREMIUM SHADOWS - Blue-tinted for depth */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12),
        0 4px 8px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16),
        0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow-float: 0 20px 50px rgba(37, 99, 235, 0.15),
        0 8px 20px rgba(15, 23, 42, 0.1);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* PREMIUM EASING */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--primary-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== Layout ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section {
    padding: var(--section-padding) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--section-padding-mobile) 0;
    }
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-900);
}

.text-gradient {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 100;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05),
        0 4px 20px rgba(15, 23, 42, 0.08);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header__logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header__logo-text {
    display: flex;
    flex-direction: column;
}

.header__logo-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-900);
    letter-spacing: -0.02em;
}

.header__logo-tagline {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.nav {
    display: none;
}

.nav__list {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    transition: color var(--transition-fast);
    padding: 8px 0;
}

.nav__link:hover {
    color: var(--blue-600);
}

.nav__cta {
    background: var(--blue-600);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.nav__cta:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
}

/* Mobile Menu */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-800);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Hamburger X Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    padding: 24px;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 99;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav__link {
    display: block;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-800);
    border-bottom: 1px solid var(--gray-100);
    min-height: 48px;
}

.mobile-nav__cta {
    display: block;
    margin-top: 24px;
    padding: 16px 24px;
    background: var(--blue-600);
    color: var(--white);
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    min-height: 48px;
}

.mobile-nav__cta:hover {
    background: var(--blue-700);
}

@media (min-width: 768px) {
    .nav {
        display: flex;
        align-items: center;
        gap: 32px;
    }

    .menu-toggle {
        display: none;
    }
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08), transparent 70%);
    pointer-events: none;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.hero__content {
    max-width: 600px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--blue-100);
    color: var(--blue-700);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero__title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 540px;
}

.hero__cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 64px;
}

.hero__stats {
    display: flex;
    gap: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.hero__stat {
    text-align: left;
}

.hero__stat-number {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-900);
    letter-spacing: -0.02em;
}

.hero__stat-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-500);
    letter-spacing: 0.02em;
}

/* Hero Visual */
.hero__visual {
    position: relative;
}

.hero__logo-display {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -30px;
    /* Pull up slightly */
}

.hero__logo-main {
    width: 350px;
    height: 350px;
    border-radius: 50px;
    background: var(--white);
    box-shadow: var(--shadow-float);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

/* Handle both direct img and picture > img */
.hero__logo-main picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hero__logo-main img,
.hero__logo-main picture img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (min-width: 1024px) {
    .hero__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn--primary {
    background: var(--blue-600);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--blue-700);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.btn--secondary {
    background: var(--white);
    color: var(--primary-800);
    border: 1px solid var(--gray-300);
}

.btn--secondary:hover {
    border-color: var(--blue-500);
    color: var(--blue-600);
    background: var(--gray-50);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 100ms;
}

/* Accessibility Focus States */
.btn:focus-visible,
.portfolio__tab:focus-visible,
.nav__link:focus-visible,
.nav__cta:focus-visible,
.mobile-nav__link:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.section-header__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blue-600);
    margin-bottom: 12px;
}

.section-header__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-header__description {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.8;
}

/* ===== 3 PILLARS SECTION ===== */
.pillars {
    background: var(--gray-50);
}

.pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 768px) {
    .pillars__grid {
        grid-template-columns: 1fr;
    }
}

.pillar-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--gray-200);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-out-expo);
}

.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12),
        0 8px 16px rgba(15, 23, 42, 0.08);
    border-color: transparent;
}

.pillar-card:hover::before {
    transform: scaleX(1);
}

.pillar-card__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--blue-100);
    color: var(--blue-600);
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    transition: transform 0.4s var(--ease-out-expo),
        box-shadow 0.4s var(--ease-out-expo);
}

.pillar-card:hover .pillar-card__number {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.pillar-card__title {
    font-size: 20px;
    margin-bottom: 12px;
}

.pillar-card__description {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.75;
}

/* ===== PROBLEMS & SOLUTIONS ===== */
.problems {
    background: var(--primary-900);
    color: var(--white);
}

.problems .section-header__eyebrow {
    color: var(--blue-400);
}

.problems .section-header__title {
    color: var(--white);
}

.problems .section-header__description {
    color: var(--gray-400);
}

.problems__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .problems__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.problem-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.4s var(--ease-out-expo);
}

.problem-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

.problem-card__pain {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.problem-card__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--error);
}

.problem-card__pain-text {
    font-size: 16px;
    color: var(--gray-300);
    font-style: italic;
}

.problem-card__solution {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.problem-card__solution-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--success);
}

.problem-card__solution-text {
    font-size: 16px;
    color: var(--white);
    font-weight: 500;
}

/* ===== PORTFOLIO ===== */
.portfolio {
    background: var(--white);
}

.portfolio__tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.portfolio__tab {
    padding: 12px 24px;
    background: var(--gray-100);
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.portfolio__tab::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--blue-600);
    transition: all 0.3s var(--ease-out-expo);
    transform: translateX(-50%);
}

.portfolio__tab:hover {
    background: var(--gray-200);
}

.portfolio__tab:hover::after {
    width: 60%;
}

.portfolio__tab.active {
    background: var(--blue-600);
    color: var(--white);
}

.portfolio__tab.active::after {
    display: none;
}

.portfolio__content {
    display: none;
}

.portfolio__content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card */
.product-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    background: var(--gray-50);
    border-radius: 24px;
    padding: 48px;
}

@media (min-width: 768px) {
    .product-card {
        grid-template-columns: 1fr 1fr;
    }
}

.product-card__content {
    max-width: 480px;
}

.product-card__category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blue-600);
    margin-bottom: 16px;
}

.product-card__title {
    font-size: 32px;
    margin-bottom: 16px;
}

.product-card__description {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.7;
}

.product-card__features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.product-card__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--primary-800);
}

.product-card__feature-icon {
    width: 20px;
    height: 20px;
    color: var(--success);
}

.product-card__visual {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.product-card__placeholder {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 64px;
    color: var(--gray-400);
    font-size: 14px;
}

/* Coming Soon Card */
.coming-soon-card {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: 24px;
    padding: 64px;
    text-align: center;
}

.coming-soon-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--gray-400);
}

.coming-soon-card__title {
    font-size: 24px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.coming-soon-card__text {
    font-size: 15px;
    color: var(--gray-500);
}

/* ===== CONTACT ===== */
.contact {
    background: var(--gray-50);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 768px) {
    .contact__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact__info {
    max-width: 400px;
}

.contact__info-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.contact__info-text {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--primary-800);
}

.contact__info-icon {
    width: 20px;
    height: 20px;
    color: var(--blue-600);
}

/* Form */
.contact__form {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1),
        0 4px 12px rgba(15, 23, 42, 0.05);
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-800);
    margin-bottom: 8px;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px var(--blue-100);
}

.form__textarea {
    min-height: 120px;
    resize: vertical;
}

.form__submit {
    width: 100%;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary-900);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast--success {
    background: var(--success);
}

.toast--error {
    background: var(--error);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-900);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer__brand {
    max-width: 300px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer__logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
}

.footer__logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer__logo-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.footer__description {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.7;
}

.footer__links-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.footer__links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__link {
    font-size: 14px;
    color: var(--gray-300);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--white);
}

.footer__bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer__copyright {
    font-size: 13px;
    color: var(--gray-500);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo),
        transform 0.8s var(--ease-out-expo);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== UTILITIES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        width: 100%;
        justify-content: center;
    }

    .hero__cta-group {
        flex-direction: column;
    }
}

/* Hero Stats - Extra Small Screens */
@media (max-width: 400px) {
    .hero__stats {
        flex-direction: column;
        gap: 0;
    }

    .hero__stat {
        text-align: center;
        padding: 16px 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .hero__stat:last-child {
        border-bottom: none;
    }

    .hero__stat-number {
        font-size: 28px;
    }
}

/* Toast - Mobile Centered */
@media (max-width: 480px) {
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
        justify-content: center;
    }
}

/* ===== FORM LOADING STATES ===== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== FADE-IN PERFORMANCE ===== */
.fade-in {
    will-change: transform, opacity;
}

/* ===== CEREBRO TRINITARIO CHATBOT ===== */

/* Widget Container */
.cerebro-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: var(--font-body);
}

/* FAB Button */
.cerebro-fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-float);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.cerebro-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.3);
}

.cerebro-fab__icon {
    width: 28px;
    height: 28px;
    color: white;
}

.cerebro-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--blue-500);
    animation: cerebroPulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes cerebroPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Hide FAB when chat is open */
.cerebro-widget.open .cerebro-fab {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* Modal Container */
.cerebro-modal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

.cerebro-widget.open .cerebro-modal {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay (mobile only) */
.cerebro-modal__overlay {
    display: none;
}

/* Chat Card */
.cerebro-chat {
    width: 380px;
    max-height: 550px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    box-shadow: var(--shadow-float);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s var(--ease-out-expo);
}

.cerebro-widget.open .cerebro-chat {
    transform: translateY(0);
}

/* Chat Header */
.cerebro-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-900), #1a365d);
    color: white;
}

.cerebro-chat__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cerebro-chat__avatar {
    font-size: 28px;
    line-height: 1;
}

.cerebro-chat__title {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

.cerebro-chat__status {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.cerebro-chat__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cerebro-chat__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cerebro-chat__close svg {
    width: 16px;
    height: 16px;
    color: white;
}

/* Messages Body */
.cerebro-chat__body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.cerebro-chat__body::-webkit-scrollbar {
    width: 4px;
}

.cerebro-chat__body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

/* Message Bubbles */
.cerebro-message {
    max-width: 85%;
    animation: messageFadeIn 0.3s var(--ease-out-expo);
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cerebro-message--bot {
    align-self: flex-start;
}

.cerebro-message--user {
    align-self: flex-end;
}

.cerebro-message__bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.cerebro-message--bot .cerebro-message__bubble {
    background: var(--gray-100);
    color: var(--primary-800);
    border-bottom-left-radius: 4px;
}

.cerebro-message--user .cerebro-message__bubble {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.cerebro-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.cerebro-typing__dot {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.cerebro-typing__dot:nth-child(1) {
    animation-delay: 0s;
}

.cerebro-typing__dot:nth-child(2) {
    animation-delay: 0.2s;
}

.cerebro-typing__dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

/* Input Area */
.cerebro-chat__input {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

/* Chips (Option Buttons) */
.cerebro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cerebro-chip {
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-800);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.cerebro-chip:hover {
    border-color: var(--blue-500);
    color: var(--blue-600);
    background: var(--blue-100);
}

/* Text Input */
.cerebro-text-input {
    display: flex;
    gap: 8px;
}

.cerebro-text-input__field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 100px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.cerebro-text-input__field:focus {
    outline: none;
    border-color: var(--blue-500);
}

.cerebro-text-input__send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-600);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cerebro-text-input__send:hover {
    background: var(--blue-700);
}

.cerebro-text-input__send svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cerebro-widget {
        bottom: 16px;
        right: 16px;
    }

    .cerebro-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .cerebro-modal__overlay {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
    }

    .cerebro-chat {
        width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        position: relative;
        z-index: 1;
    }

    .cerebro-chat__body {
        max-height: calc(90vh - 140px);
    }
}

/* ===== FAQ WIDGET (SIMPLIFIED HELPER) ===== */

/* Reuse cerebro styles with faq prefix */
.faq-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.faq-widget.open .faq-fab {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.faq-widget.open .faq-modal {
    opacity: 1;
    visibility: visible;
}

.faq-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gray-600);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s var(--ease-out-expo);
}

.faq-fab:hover {
    transform: scale(1.05);
    background: var(--gray-500);
}

.faq-fab__icon {
    width: 24px;
    height: 24px;
    color: white;
}

.faq-modal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

.faq-modal__overlay {
    display: none;
}

.faq-chat {
    width: 360px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-float);
    overflow: hidden;
}

.faq-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-600);
    color: white;
}

.faq-chat__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-chat__avatar {
    font-size: 24px;
}

.faq-chat__title {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.faq-chat__status {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.faq-chat__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-chat__close svg {
    width: 16px;
    height: 16px;
    color: white;
}

.faq-chat__body {
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.faq-message {
    max-width: 90%;
    animation: messageFadeIn 0.3s var(--ease-out-expo);
}

.faq-message--bot {
    align-self: flex-start;
}

.faq-message__bubble {
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.faq-message__bubble a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 600;
}

.faq-message__bubble a:hover {
    text-decoration: underline;
}

/* FAQ Typing Dots Animation */
.typing-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-dots span {
    animation: typingDots 1.4s infinite;
    font-weight: bold;
    font-size: 18px;
    color: var(--gray-500);
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {

    0%,
    60%,
    100% {
        opacity: 0.3;
    }

    30% {
        opacity: 1;
    }
}

.faq-chat__input {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.faq-chip {
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-800);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.faq-chip:hover {
    border-color: var(--blue-500);
    background: var(--blue-100);
}

.faq-chip--primary {
    background: #CE1126;
    color: white;
    border-color: #CE1126;
    font-weight: 600;
}

.faq-chip--primary:hover {
    background: #a80e1f;
    border-color: #a80e1f;
}

/* FAQ Text Input */
.faq-text-input {
    display: flex;
    gap: 8px;
}

.faq-text-input__field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 100px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.faq-text-input__field:focus {
    outline: none;
    border-color: var(--blue-500);
}

.faq-text-input__send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue-600);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.faq-text-input__send:hover {
    background: var(--blue-700);
}

.faq-text-input__send svg {
    width: 16px;
    height: 16px;
    color: white;
}

/* Red CTA Button Styles */
.nav__cta--diagnostic,
.mobile-nav__cta--diagnostic,
.btn--diagnostic {
    background: #CE1126 !important;
}

.nav__cta--diagnostic:hover,
.mobile-nav__cta--diagnostic:hover,
.btn--diagnostic:hover {
    background: #a80e1f !important;
}

/* ===== DIAGNOSTIC PAGE (IMMERSIVE) ===== */

.diagnostic-page {
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1a365d 50%, #0F172A 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Minimal Header */
.diagnostic-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    z-index: 100;
}

.diagnostic-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.diagnostic-header__logo:hover {
    opacity: 1;
}

.diagnostic-header__logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

/* Background Orbs */
.diagnostic-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.diagnostic-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.diagnostic-bg__orb--1 {
    width: 600px;
    height: 600px;
    background: rgba(37, 99, 235, 0.15);
    top: -200px;
    right: -200px;
}

.diagnostic-bg__orb--2 {
    width: 400px;
    height: 400px;
    background: rgba(206, 17, 38, 0.1);
    bottom: -100px;
    left: -100px;
}

/* Main Container - Fit within viewport */
.diagnostic-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 24px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    max-height: 100vh;
}

/* Progress Bar */
.diagnostic-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 200;
}

.diagnostic-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #CE1126, var(--blue-500));
    width: 0%;
    transition: width 0.5s var(--ease-out-expo);
}

/* Chat Card - Constrained height */
.diagnostic-card {
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 160px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Chat Container - Internal scroll */
.chat-container,
.diagnostic-messages {
    flex: 1;
    padding: 32px;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diagnostic-message {
    animation: messageFadeIn 0.4s var(--ease-out-expo);
}

.diagnostic-message--bot {
    max-width: 90%;
}

.diagnostic-message__bubble {
    padding: 16px 20px;
    background: var(--gray-100);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--primary-800);
}

.diagnostic-message--user {
    align-self: flex-end;
}

.diagnostic-message--user .diagnostic-message__bubble {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: white;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

/* Input Area - Fixed at bottom */
.diagnostic-input {
    flex-shrink: 0;
    padding: 20px 32px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    max-height: 50vh;
    overflow-y: auto;
}

/* Large Chips */
.diagnostic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.diagnostic-chip {
    padding: 16px 24px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-800);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
    text-align: center;
}

.diagnostic-chip:hover {
    border-color: var(--blue-500);
    background: var(--blue-100);
    transform: translateY(-2px);
}

.diagnostic-chip:active {
    transform: scale(0.98);
}

/* Contact Form */
.diagnostic-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diagnostic-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diagnostic-form__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.diagnostic-form__input {
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.diagnostic-form__input:focus {
    outline: none;
    border-color: var(--blue-500);
}

.diagnostic-form__submit {
    padding: 18px 32px;
    background: #CE1126;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    margin-top: 8px;
}

.diagnostic-form__submit:hover {
    background: #a80e1f;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(206, 17, 38, 0.3);
}

.diagnostic-form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer */
.diagnostic-footer {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-align: center;
}

/* Success State */
.diagnostic-success {
    text-align: center;
    padding: 40px;
}

.diagnostic-success__icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.diagnostic-success__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 16px;
}

.diagnostic-success__text {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}

.diagnostic-success__btn {
    padding: 14px 28px;
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.diagnostic-success__btn:hover {
    background: var(--blue-700);
}

/* Confetti */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .diagnostic-main {
        padding: 70px 12px 16px;
    }

    .diagnostic-card {
        border-radius: 16px;
        max-height: calc(100vh - 100px);
    }

    .chat-container,
    .diagnostic-messages {
        padding: 16px;
        min-height: 0;
        gap: 10px;
    }

    .diagnostic-message__bubble {
        font-size: 16px;
        padding: 14px 16px;
    }

    .diagnostic-input {
        padding: 14px 16px 16px;
    }

    .diagnostic-chip,
    .option-chip {
        min-width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .diagnostic-form__submit {
        font-size: 16px;
        padding: 16px 24px;
    }

    .faq-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: flex-end;
    }

    .faq-modal__overlay {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
    }

    .faq-chat {
        width: 100%;
        border-radius: 20px 20px 0 0;
        position: relative;
        z-index: 1;
    }

    /* Fix: Ensure FAQ widget doesn't overlap footer on mobile */
    .faq-widget {
        bottom: 20px;
    }
}

/* ===== V3.0 PRODUCTION CLASSES ===== */

/* Glass Card (Reusable Glassmorphism Component) */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

/* Chat Container */
.chat-container {
    padding: 28px 32px;
    padding-bottom: 20px;
    min-height: 150px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Messages */
.chat-message {
    animation: messageFadeIn 0.4s var(--ease-out-expo);
    display: block;
    opacity: 1;
}

.chat-message--bot {
    max-width: 90%;
    align-self: flex-start;
    display: block;
    opacity: 1;
    z-index: 10;
}

.chat-message--user {
    max-width: 85%;
    align-self: flex-end;
}

.chat-bubble {
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 17px;
    line-height: 1.6;
    display: block;
}

.chat-message--bot .chat-bubble {
    background-color: #F1F5F9;
    color: #1E293B;
    border-bottom-left-radius: 4px;
}

.chat-message--user .chat-bubble {
    background: linear-gradient(135deg, #002D62, #1a365d);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
    background: var(--gray-100);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Option Chips Container */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Option Chip Button */
.option-chip {
    padding: 16px 24px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-800);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
    text-align: center;
    font-family: inherit;
}

.option-chip:hover {
    border-color: var(--blue-500);
    background: var(--blue-100);
    transform: translateY(-3px);
    box-shadow: var(--shadow-float);
}

.option-chip:active {
    transform: scale(0.98);
}

/* Lead Capture Form */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.form-input {
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    padding: 18px 32px;
    background: #CE1126;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    margin-top: 8px;
    font-family: inherit;
}

.submit-btn:hover {
    background: #a80e1f;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(206, 17, 38, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 24px;
    animation: successPop 0.6s var(--ease-out-expo);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 16px;
}

.success-text {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}

.success-btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.success-btn:hover {
    background: var(--blue-700);
    transform: translateY(-2px);
}

/* Fade Up Animation */
.fade-up {
    animation: fadeUpIn 0.4s var(--ease-out-expo);
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive for Chat */
@media (max-width: 768px) {
    .chat-container {
        padding: 24px;
        min-height: 200px;
    }

    .chat-bubble {
        font-size: 15px;
        padding: 14px 16px;
    }

    .option-chip {
        min-width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .lead-form {
        padding: 16px;
    }

    .success-icon {
        font-size: 56px;
    }

    .success-title {
        font-size: 24px;
    }
}

/* Text Input for Name */
.text-input-container {
    display: flex;
    gap: 10px;
}

.text-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.send-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--blue-600);
    color: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: var(--blue-700);
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.98);
}

/* Option Chip Disabled State */
.option-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 768px) {
    .text-input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .send-btn {
        width: 44px;
        height: 44px;
    }
}

/* ===== AUDIT FIXES V2.0 ===== */

/* --- Back Button for Diagnostic Flow (Premium Ghost Style) --- */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 8px;
    padding: 10px 28px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.back-btn:hover {
    background: var(--white);
    border-color: var(--blue-400);
    color: var(--blue-600);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.back-btn:active {
    transform: translateY(0) scale(0.98);
}

/* --- Phase Indicator for Progressive Disclosure --- */
.phase-indicator {
    text-align: center;
    font-size: 11px;
    color: var(--gray-400);
    margin-bottom: 20px;
    padding: 6px 14px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 100px;
    letter-spacing: 0.03em;
    font-weight: 500;
}


.phase-indicator strong {
    color: var(--blue-600);
    font-weight: 600;
}

/* Center phase indicator in diagnostic input */
.diagnostic-input {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.diagnostic-input .chips-container {
    width: 100%;
}

/* --- Improved Option Chips with Glassmorphism --- */
.option-chip {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-800);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
    text-align: center;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.option-chip:hover {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(219, 234, 254, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.option-chip:active {
    transform: scale(0.98) translateY(0);
}

/* --- FAB Breathing Animation --- */
.faq-fab {
    animation: fabBreathe 3s infinite ease-in-out;
}

@keyframes fabBreathe {

    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-float);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 25px 60px rgba(37, 99, 235, 0.25),
            0 10px 25px rgba(15, 23, 42, 0.15);
    }
}

/* Stop animation when widget is open */
.faq-widget.open .faq-fab {
    animation: none;
}

/* --- Mobile Keyboard Fix: Input stays visible --- */
@media (max-width: 768px) {

    /* Fix FAB position on Android (avoid navbar overlap) */
    .faq-fab {
        bottom: 80px !important;
        right: 20px !important;
    }

    .faq-widget.open .faq-modal {
        bottom: 80px !important;
        right: 20px !important;
    }

    /* Diagnostic form scroll into view when keyboard opens */
    .lead-form {
        scroll-margin-bottom: 200px;
    }

    .diagnostic-input {
        padding-bottom: 24px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    /* Smaller chips on mobile */
    .option-chip {
        min-width: 100%;
        padding: 14px 18px;
        font-size: 15px;
    }

    /* Phase indicator smaller on mobile */
    .phase-indicator {
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Back button smaller on mobile */
    .back-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* --- "Did you mean?" Suggestion Chips in Support Chat --- */
.faq-suggestion {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.faq-suggestion__chip {
    padding: 6px 12px;
    background: var(--blue-100);
    border: 1px solid var(--blue-300);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    color: var(--blue-700);
    cursor: pointer;
    transition: all 0.2s;
}

.faq-suggestion__chip:hover {
    background: var(--blue-200);
    border-color: var(--blue-500);
}

/* --- Improved Submit Button Visibility on Mobile --- */
@media (max-width: 768px) {
    .submit-btn {
        position: sticky;
        bottom: 0;
        z-index: 10;
        margin-top: 16px;
    }

    .lead-form {
        padding-bottom: 100px;
        /* Extra space for keyboard */
    }
}

/* --- Better Focus States for Accessibility --- */
.option-chip:focus-visible,
.back-btn:focus-visible,
.faq-chip:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

/* --- Smooth scroll behavior for diagnostic chat --- */
.chat-container {
    scroll-behavior: smooth;
}

/* ===== GASTOTRACK MOCKUP VISUAL ===== */
.product-card__mockup {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

.mockup-screen {
    width: 280px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-float);
    animation: float 6s ease-in-out infinite;
}

.mockup-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-500);
}

.mockup-dot:first-child {
    background: #EF4444;
}

.mockup-dot:nth-child(2) {
    background: #F59E0B;
}

.mockup-dot:nth-child(3) {
    background: #10B981;
}

.mockup-content {
    padding: 24px;
}

.mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
    margin-bottom: 20px;
}

.mockup-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-600) 100%);
    border-radius: 4px 4px 0 0;
    animation: barGrow 2s ease-out forwards;
    transform-origin: bottom;
}

.mockup-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.mockup-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.mockup-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.mockup-bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes barGrow {
    0% {
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);
    }
}

.mockup-stats {
    text-align: center;
}

.mockup-stat {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.mockup-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .mockup-screen {
        width: 240px;
    }

    .mockup-chart {
        height: 80px;
    }

    .mockup-stat {
        font-size: 20px;
    }
}

/* ===== CONTACT & LEGAL MODALS ===== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.modal-card {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-float), 0 0 60px rgba(37, 99, 235, 0.1);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s var(--ease-out-expo);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-card--legal {
    max-width: 560px;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    color: var(--gray-600);
}

/* Modal Header */
.modal-header {
    padding: 32px 32px 20px;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
}

.modal-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--gray-500);
}

/* Modal Body */
.modal-body {
    padding: 24px 32px 32px;
}

.modal-body--scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* Contact Items */
.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--gray-50);
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.3s var(--ease-out-expo);
    border: 1px solid transparent;
}

.contact-item:last-child {
    margin-bottom: 0;
}

a.contact-item:hover {
    background: var(--white);
    border-color: var(--gray-200);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.contact-item--whatsapp:hover {
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.3);
}

.contact-item--whatsapp:hover .contact-item__icon {
    color: #25D366;
}

.contact-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-600);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: color 0.2s;
}

.contact-item__icon svg {
    width: 22px;
    height: 22px;
}

.contact-item__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item__label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-item__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-800);
}

.contact-item__arrow {
    font-size: 18px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

a.contact-item:hover .contact-item__arrow {
    transform: translateX(4px);
    color: var(--blue-600);
}

/* Legal Modal Styles */
.legal-section {
    margin-bottom: 20px;
}

.legal-section:last-of-type {
    margin-bottom: 0;
}

.legal-heading {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 8px;
}

.legal-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600);
    text-align: justify;
}

.legal-text strong {
    color: var(--primary-800);
}

/* Legal Lists */
.legal-list {
    margin: 12px 0 0 0;
    padding-left: 24px;
    list-style-type: disc;
}

.legal-list li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.legal-list li:last-child {
    margin-bottom: 0;
}

.legal-list li strong {
    color: var(--primary-800);
}

.legal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.legal-footer p {
    font-size: 12px;
    color: var(--gray-400);
}

/* Footer Legal Link Style */
.footer__link--legal {
    font-size: 13px;
    opacity: 0.7;
}

.footer__link--legal:hover {
    opacity: 1;
}

/* Modal Mobile Responsive */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }

    .modal-card {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 24px 24px 16px;
    }

    .modal-body {
        padding: 16px 24px 32px;
    }

    .modal-title {
        font-size: 20px;
    }

    .contact-item {
        padding: 14px;
    }

    .contact-item__icon {
        width: 40px;
        height: 40px;
    }
}

/* Estilos para el contenido Markdown dentro del chat */
.chat-message--bot p {
    margin-bottom: 12px;
    /* Espacio entre párrafos */
    line-height: 1.6;
    /* Lectura cómoda */
}

.chat-message--bot strong {
    color: #002D62;
    /* Azul Soberano para resaltar */
    font-weight: 700;
}

.chat-message--bot ul,
.chat-message--bot ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.chat-message--bot li {
    margin-bottom: 6px;
}

/* Tarjeta de Intercepción Ampliada */
.intercept-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    /* Oculto abajo */

    width: 90%;
    /* Ocupa casi todo el ancho en móviles */
    max-width: 600px;
    /* Bastante ancho en Desktop */

    background: rgba(255, 255, 255, 0.95);
    /* Más opaco para resaltar */
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 30px;

    box-shadow: 0 30px 60px -10px rgba(0, 45, 98, 0.4);
    /* Sombra profunda */
    border: 1px solid rgba(255, 255, 255, 0.6);

    z-index: 999;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

/* Estado Visible */
.intercept-toast.visible {
    transform: translateX(-50%) translateY(0);
}

/* Tipografía Grande */
.intercept-toast h4 {
    font-size: 1.8rem;
    /* Muy grande */
    color: #002D62;
    margin-bottom: 10px;
    font-weight: 800;
}

.intercept-toast p {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.6;
}

/* Botones Grandes */
.toast-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Botón Principal con Latido */
.toast-actions .btn-primary-small {
    padding: 15px 40px;
    font-size: 1.1rem;
    background-color: #CE1126;
    /* Rojo Acción */
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 10px 20px -5px rgba(206, 17, 38, 0.4);
    animation: btnPulse 2s infinite;
}

/* Animación de Latido */
@keyframes btnPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(206, 17, 38, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(206, 17, 38, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(206, 17, 38, 0);
    }
}

/* Botón Secundario (Ignorar) */
.toast-actions .btn-text {
    font-size: 1rem;
    color: #64748B;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* Ajuste Móvil */
@media (max-width: 768px) {
    .toast-actions {
        flex-direction: column-reverse;
        /* Botón grande arriba */
        width: 100%;
    }

    .toast-actions .btn-primary-small {
        width: 100%;
        text-align: center;
    }
}

/* ===========================================
   PHASE 2: MOTION DESIGN & MICRO-INTERACTIONS
   Cinematic Animations for Premium Feel
   =========================================== */

/* ===== Cinematic Hero Entrance ===== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Animation Classes */
.hero-animate {
    animation: fadeSlideUp 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
}

.hero-animate--right {
    animation: fadeSlideRight 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
}

.hero-animate--scale {
    animation: scaleIn 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
}

/* Staggered Delay Classes */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

/* ===== Magnetic Button Effect ===== */
.btn--magnetic {
    transition: transform 0.2s var(--ease-out-expo);
    will-change: transform;
}

.btn--magnetic:hover {
    /* Slight scale on hover for feedback */
    box-shadow: var(--shadow-float);
}

/* ===== Animated Counter Styling ===== */
.counter-animate {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    /* Prevents layout shift during counting */
}

/* ===== Stat Number Highlight on Animation ===== */
.hero__stat-number.counting {
    color: var(--blue-600);
    transition: color 0.3s ease;
}

.hero__stat-number.counted {
    color: var(--primary-900);
    transition: color 0.5s ease 0.2s;
}

/* ===== Pulse Animation for Live Badges ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.pulse-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* ===========================================
   PHASE 3: LIVE ACTIVITY BADGE (FOMO)
   Market Differentiator Component
   =========================================== */

.live-activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 16px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(59, 130, 246, 0.1);
    transition: all 0.3s var(--ease-out-expo);
}

.live-activity-badge:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(59, 130, 246, 0.2);
}

/* Pulsing Red Dot */
.live-pulse-dot {
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
    }
}

/* Count Number Styling */
.live-count {
    font-weight: 700;
    font-size: 15px;
    color: var(--blue-400);
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    text-align: center;
}

/* Subtle text */
.live-text {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .live-activity-badge {
        font-size: 11px;
        padding: 6px 12px;
        gap: 6px;
    }

    .live-count {
        font-size: 13px;
    }

    .live-pulse-dot {
        width: 6px;
        height: 6px;
    }
}

/* ===========================================
   COOKIE CONSENT BANNER (GDPR COMPLIANT)
   V3.0 Luxury Fintech Style - Compact
   =========================================== */

.cookie-card {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 340px;
    /* Reduced from 400px */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    /* Slightly smaller radius */
    padding: 16px;
    /* Reduced from 24px */
    z-index: 1000;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(226, 232, 240, 0.6);

    /* Animation State: Hidden */
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.6s var(--ease-out-back);
}

.cookie-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-icon {
    font-size: 20px;
    /* Smaller icon */
    flex-shrink: 0;
    padding-top: 2px;
}

.cookie-text h5 {
    font-family: var(--font-display);
    font-size: 14px;
    /* Reduced size */
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: 2px;
}

.cookie-text p {
    font-family: var(--font-body);
    font-size: 12px;
    /* Reduced size */
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0;
}

.cookie-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.btn-text-small {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-text-small:hover {
    background: var(--gray-50);
    color: var(--primary-700);
}

.btn-primary-small {
    background: var(--blue-600);
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    /* Compact padding */
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
    background: var(--blue-500);
}

.cookie-card.hidden {
    display: none;
    /* Just for Fallback */
    /* Real logic is handled by .visible class toggle */
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cookie-card {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        padding: 16px;
    }

    .cookie-content {
        flex-direction: row;
        /* Keep row layout on mobile for compactness if possible, or col if text is long. Let's keep flex-dir column if text wraps too much but row is better for compact. */
        flex-direction: column;
        gap: 8px;
    }

    .cookie-icon {
        font-size: 18px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
    }

    .btn-primary-small {
        flex-grow: 1;
        text-align: center;
    }
}
/* Markdown Styles for Chat */
.chat-message--bot h1, .chat-message--bot h2, .chat-message--bot h3 { font-size: 1.1em; margin-bottom: 8px; color: var(--finance-blue); }
.chat-message--bot p { margin-bottom: 12px; line-height: 1.6; }
.chat-message--bot p:last-child { margin-bottom: 0; }
.chat-message--bot strong { color: #002D62; font-weight: 700; }
.chat-message--bot ul, .chat-message--bot ol { margin-left: 20px; margin-bottom: 12px; }
.chat-message--bot li { margin-bottom: 6px; }
