/* ========================================
   PHIMED B2B Solutions - Design System
   ======================================== */

:root {
    /* PHIMED Brand Colors - Dark Navy Theme */
    --primary-500: #1a237e;
    --primary-600: #151c5f;
    --primary-700: #0f1543;
    --primary-800: #0a0f2e;
    --primary-900: #060a1f;

    /* Navy Blue Backgrounds */
    --navy-darkest: #060a1f;
    --navy-dark: #0f1543;
    --navy-medium: #1a237e;
    --navy-light: #283593;

    /* Accent Colors */
    --accent-blue: #38BDF8;
    --accent-cyan: #22D3EE;
    --accent-purple: #A78BFA;
    --accent-green: #10B981;
    --accent-orange: #FB923C;


    /* Compat aliases (evita títulos/gráficos negros por variables no definidas) */
    --secondary-300: #93C5FD;
    --secondary-400: #67E8F9;
    --secondary-500: #38BDF8;
    --font-body: var(--font-primary);

    /* Neutrals - Dark theme */
    --neutral-50: #FFFFFF;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;

    /* Gradients - Dark Navy */
    --gradient-primary: linear-gradient(135deg, #0f1543 0%, #1a237e 50%, #283593 100%);
    --gradient-secondary: linear-gradient(135deg, #1a237e 0%, #38BDF8 100%);
    --gradient-accent: linear-gradient(135deg, #22D3EE 0%, #A78BFA 100%);
    --gradient-hero: radial-gradient(ellipse at top, #1a237e 0%, #0f1543 50%, #060a1f 100%);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Typography - DM Sans (PHIMED brand font) */
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'DM Sans', 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(127, 70, 217, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--navy-darkest);
    color: var(--neutral-100);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.01em;
}

p {
    margin-bottom: var(--space-md);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-text {
    color: var(--secondary-400);
    font-weight: 600;
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-title {
    margin-bottom: var(--space-3xl);
}

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

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
    transition: transform var(--transition-base);
}

.btn:hover::before {
    transform: scale(1.05);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover {
    box-shadow: var(--shadow-xl), 0 0 40px rgba(127, 70, 217, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    top: -300px;
    right: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-secondary);
    bottom: -250px;
    left: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--gradient-accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

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

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    text-align: center;
    padding: var(--space-2xl) 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    margin-bottom: var(--space-lg);
    color: var(--neutral-50);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--neutral-300);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--neutral-300);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--secondary-400));
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    50% {
        opacity: 1;
    }

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

/* ========================================
   Animations
   ======================================== */

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in-up:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-animate {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ========================================
   Positioning Section
   ======================================== */

.positioning {
    background: var(--navy-dark);
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.positioning-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.positioning-text {
    font-size: 1.25rem;
    color: var(--neutral-200);
    line-height: 1.8;
}

/* ========================================
   Solutions Section
   ======================================== */

.solutions {
    background: var(--navy-darkest);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.solution-card {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.4) 0%, rgba(15, 21, 67, 0.4) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

.solution-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.6) 0%, rgba(15, 21, 67, 0.6) 100%);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.3), 0 0 30px rgba(56, 189, 248, 0.2);
}

.solution-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: transform var(--transition-bounce);
}

.solution-card:hover .solution-icon {
    transform: rotate(10deg) scale(1.1);
}

.solution-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.solution-card h3 {
    color: var(--neutral-50);
    margin-bottom: var(--space-md);
}

.solution-description {
    color: var(--neutral-300);
    margin-bottom: var(--space-md);
}

.features-label {
    font-weight: 600;
    color: var(--secondary-400);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.solution-features {
    list-style: none;
}

.solution-features li {
    padding-left: 1.5rem;
    margin-bottom: var(--space-sm);
    position: relative;
    color: var(--neutral-300);
    font-size: 0.9375rem;
}

.solution-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-400);
    font-weight: bold;
}

/* ========================================
   Genomics Section
   ======================================== */

.genomics {
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.genomics-background {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.dna-helix {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 35px,
            var(--primary-500) 35px,
            var(--primary-500) 37px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 35px,
            var(--secondary-500) 35px,
            var(--secondary-500) 37px);
    animation: dnaRotate 20s linear infinite;
}

@keyframes dnaRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.genomics-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.genomics-intro {
    font-size: 1.25rem;
    color: var(--neutral-200);
    text-align: center;
    margin-bottom: var(--space-2xl);
    line-height: 1.8;
}

.genomics-subtitle {
    text-align: center;
    color: var(--secondary-400);
    margin-bottom: var(--space-xl);
}

.genomics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.genomics-item {
    background: rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.genomics-item:hover {
    background: rgba(26, 35, 126, 0.5);
    border-color: var(--accent-cyan);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.3);
}

.genomics-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.genomics-item p {
    color: var(--neutral-200);
    font-size: 0.9375rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.genomics-conclusion {
    text-align: center;
    padding: var(--space-2xl);
    background: rgba(26, 35, 126, 0.4);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.genomics-conclusion p {
    font-size: 1.25rem;
    margin-bottom: 0;
}


/* ========================================
   Genomics Bio Chart (fallback integrado)
   ======================================== */
.bio-chart {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(15, 21, 67, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-2xl) 0;
    overflow: hidden;
}

.chart-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.chart-curve {
    stroke: #67E8F9;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawCurve 1.35s ease-out forwards;
}

@keyframes drawCurve {
    to { stroke-dashoffset: 0; }
}

.chart-fill {
    fill: url(#chartGradient);
    opacity: 0;
    animation: fadeInFill 0.8s ease-out 0.8s forwards;
}

@keyframes fadeInFill {
    to { opacity: 0.30; }
}

.chart-point {
    fill: #67E8F9;
    stroke: #dbeafe;
    stroke-width: 2;
    opacity: 0;
    animation: popIn 0.45s ease-out forwards;
}

.chart-point:nth-of-type(1) { animation-delay: 0.20s; }
.chart-point:nth-of-type(2) { animation-delay: 0.35s; }
.chart-point:nth-of-type(3) { animation-delay: 0.50s; }
.chart-point:nth-of-type(4) { animation-delay: 0.65s; }
.chart-point:nth-of-type(5) { animation-delay: 0.80s; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0); }
    60% { transform: scale(1.22); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================================
   Benefits Section
   ======================================== */

.benefits {
    background: var(--navy-darkest);
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.benefit-card {
    background: rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.benefit-card:hover {
    background: rgba(26, 35, 126, 0.5);
    border-color: var(--accent-cyan);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.3);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 50%;
    transition: transform var(--transition-bounce);
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.15) rotate(5deg);
}

.benefit-icon svg {
    width: 35px;
    height: 35px;
    color: white;
}

.benefit-card h3 {
    font-size: 1.25rem;
    color: var(--neutral-50);
    margin-bottom: 0;
}

/* ========================================
   Implementation Section
   ======================================== */

.implementation {
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.implementation-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.implementation-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-500), var(--secondary-500));
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: var(--space-3xl);
}

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

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(127, 70, 217, 0.2);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.15);
    box-shadow: 0 0 0 12px rgba(127, 70, 217, 0.3), var(--shadow-glow);
}

.phase-number {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

.timeline-content {
    background: rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.timeline-item:hover .timeline-content {
    background: rgba(26, 35, 126, 0.5);
    border-color: var(--accent-cyan);
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.3);
}

.timeline-content h3 {
    color: var(--neutral-50);
    margin-bottom: var(--space-sm);
}

.timeline-content p {
    color: var(--neutral-300);
    margin-bottom: 0;
}


/* ========================================
   Seguimiento Evolutivo (gráfico)
   ======================================== */

.followup-visual {
    margin: var(--space-3xl) auto 0;
    max-width: 980px;
    background: rgba(10, 22, 58, 0.68);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.followup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.followup-head h3 {
    margin: 0;
    color: var(--neutral-50);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.followup-intro,
.followup-note {
    color: var(--neutral-200);
    margin: 0.25rem 0 1rem;
}

.followup-chart-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 1rem;
    align-items: stretch;
}

.followup-chart {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: linear-gradient(180deg, rgba(8, 17, 45, 0.88) 0%, rgba(7, 14, 36, 0.98) 100%);
}

.followup-chart .grid line {
    stroke: rgba(129, 140, 248, 0.12);
    stroke-width: 1;
}

.followup-chart .axis {
    stroke: rgba(148, 163, 184, 0.75);
    stroke-width: 1.5;
}

.followup-chart .axis-labels text {
    fill: rgba(203, 213, 225, 0.92) !important;
    color: rgba(203, 213, 225, 0.92) !important;
    font-family: var(--font-body), 'DM Sans', sans-serif !important;
    font-size: 12px;
    font-weight: 500;
}

.followup-chart .x-labels text {
    font-size: 11px;
}

.followup-chart .zones line {
    stroke-width: 1.8;
    opacity: 0.92;
}

.followup-chart .z-veryhigh { stroke: #ef4444; }
.followup-chart .z-high { stroke: #f97316; }
.followup-chart .z-medium { stroke: #facc15; }
.followup-chart .z-low { stroke: #22c55e; }
.followup-chart .z-border { stroke: #38bdf8; }

.followup-chart .evo-area {
    fill: url(#phAreaGrad);
}

.followup-chart .evo-line {
    fill: none;
    stroke: url(#phLineGrad);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}

.followup-chart .evo-points circle {
    fill: #67E8F9;
    stroke: #0b122f;
    stroke-width: 2;
}

.followup-chart .evo-points .point-last {
    fill: #A78BFA;
}

.followup-side-legend {
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(4, 12, 33, 0.7);
    border-radius: 12px;
    padding: 0.75rem 0.75rem;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 0.25rem;
    min-height: 100%;
}

.followup-side-legend span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--neutral-100);
    font-size: 0.82rem;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
    padding: 0.2rem 0;
}

.followup-side-legend span:last-child {
    border-bottom: none;
}

@media (max-width: 920px) {
    .followup-chart-wrap {
        grid-template-columns: 1fr;
    }

    .followup-side-legend {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto auto;
        gap: 0.35rem 0.75rem;
    }

    .followup-side-legend span {
        border-bottom: none;
        border-left: 2px solid rgba(56, 189, 248, 0.35);
        padding: 0.1rem 0 0.1rem 0.45rem;
    }
}

@media (max-width: 640px) {
    .followup-visual {
        padding: var(--space-md);
    }

    .followup-chart .axis-labels text {
        font-size: 10px;
    }
}

/* ========================================
   CTA Final Section
   ======================================== */

.cta-final {
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    padding: var(--space-4xl) 0;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.cta-background {
    position: absolute;
    inset: 0;
}

.orb-4 {
    width: 700px;
    height: 700px;
    background: var(--gradient-primary);
    top: -350px;
    left: -250px;
}

.orb-5 {
    width: 600px;
    height: 600px;
    background: var(--gradient-secondary);
    bottom: -300px;
    right: -200px;
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--neutral-200);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Contact Form
   ======================================== */

.contact-form {
    background: var(--navy-dark);
    padding: var(--space-4xl) 0;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(26, 35, 126, 0.4);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.b2b-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-weight: 600;
    color: var(--neutral-200);
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1.125rem;
    background: rgba(15, 21, 67, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    color: var(--neutral-50);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(15, 21, 67, 0.7);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.03);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary-500);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label span:last-child {
    color: var(--neutral-200);
    font-size: 0.9375rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--navy-darkest);
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    padding: var(--space-2xl) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-brand h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.footer-brand p {
    color: var(--neutral-400);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--neutral-300);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--neutral-400);
    font-size: 0.875rem;
    margin-bottom: 0;
}


/* ========================================
   Site Header / Logo
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    background: rgba(6, 10, 31, 0.65);
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    opacity: 0.95;
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: 0.95rem;
    color: var(--neutral-100);
}

.hero {
    padding-top: 74px;
}

@media (max-width: 768px) {
    .site-header-inner {
        min-height: 64px;
    }

    .brand-logo {
        height: 36px;
    }

    .brand-text {
        font-size: 0.8rem;
        letter-spacing: 0.14em;
    }

    .hero {
        padding-top: 64px;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    :root {
        --space-2xl: 3rem;
        --space-3xl: 4rem;
        --space-4xl: 5rem;
    }

    section {
        padding: var(--space-3xl) 0;
    }

    .hero {
        min-height: auto;
        padding: var(--space-4xl) 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .genomics-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .implementation-timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
    }

    .phase-number {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .form-wrapper {
        padding: var(--space-lg);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .btn {
        padding: 0.875rem 1.5rem;
    }

    .btn-large {
        padding: 1rem 1.75rem;
    }
}

/* ========================================
   WordPress hardening / overrides
   ======================================== */

/* Scope global para evitar que el tema sobreescriba tipografías/colores */
.phimed-b2b,
.phimed-b2b * {
    box-sizing: border-box;
}

.phimed-b2b {
    background: var(--navy-darkest) !important;
    color: var(--neutral-100) !important;
}

/* Forzar títulos y textos (evita títulos negros por CSS del tema) */
.phimed-b2b h1,
.phimed-b2b h2,
.phimed-b2b h3,
.phimed-b2b h4,
.phimed-b2b h5,
.phimed-b2b h6,
.phimed-b2b .section-title,
.phimed-b2b .hero-title,
.phimed-b2b .genomics-subtitle {
    color: var(--neutral-50) !important;
}

.phimed-b2b p,
.phimed-b2b li,
.phimed-b2b label,
.phimed-b2b input,
.phimed-b2b select,
.phimed-b2b textarea {
    color: var(--neutral-200) !important;
}

.phimed-b2b .gradient-text {
    background: linear-gradient(135deg, #67E8F9 0%, #A78BFA 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Encabezado namespaced para no chocar con el header del tema */
.ph-site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1200 !important;
    background: rgba(6, 10, 31, 0.78) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
    backdrop-filter: blur(10px);
}

.ph-site-header-inner {
    min-height: 78px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem;
}

.ph-brand-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    flex-shrink: 0;
}

/* FIX logo gigante */
.ph-brand-logo,
.phimed-b2b .ph-brand-logo,
.phimed-b2b-container .ph-brand-logo,
.ph-site-header .ph-brand-logo,
.ph-site-header img.ph-brand-logo {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.ph-brand-text {
    font-family: var(--font-display) !important;
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
    font-size: 0.95rem !important;
    color: var(--neutral-100) !important;
    line-height: 1 !important;
}

.ph-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ph-nav a {
    color: var(--neutral-100) !important;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.92;
    transition: opacity .2s ease, color .2s ease;
}

.ph-nav a:hover {
    color: var(--accent-cyan) !important;
    opacity: 1;
}

/* Dejar espacio del header fijo */
.phimed-b2b .hero {
    padding-top: 96px !important;
}

/* Encabezados de cards y labels siempre claros */
.phimed-b2b .solution-card h3,
.phimed-b2b .benefit-card h3,
.phimed-b2b .timeline-content h3,
.phimed-b2b .features-label,
.phimed-b2b .hero-subtitle,
.phimed-b2b .hero-description,
.phimed-b2b .genomics-intro,
.phimed-b2b .genomics-item p {
    color: var(--neutral-100) !important;
}

/* Inputs visibles en tema oscuro */
.phimed-b2b .form-group input,
.phimed-b2b .form-group select,
.phimed-b2b .form-group textarea {
    color: var(--neutral-100) !important;
}



/* Forzar colores en bloque de seguimiento */
.phimed-b2b .followup-head h3,
.phimed-b2b .followup-intro,
.phimed-b2b .followup-note,
.phimed-b2b .followup-side-legend span,
.phimed-b2b .followup-chip {
    color: var(--neutral-100) !important;
}

.phimed-b2b .followup-chip {
    color: var(--accent-cyan) !important;
}

@media (max-width: 900px) {
    .ph-site-header-inner {
        min-height: 68px !important;
    }

    .ph-brand-logo,
    .phimed-b2b .ph-brand-logo,
    .phimed-b2b-container .ph-brand-logo,
    .ph-site-header .ph-brand-logo,
    .ph-site-header img.ph-brand-logo {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }

    .ph-brand-text {
        font-size: 0.82rem !important;
        letter-spacing: 0.1em !important;
    }

    .ph-nav {
        gap: 0.9rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .ph-nav a {
        font-size: 0.85rem;
    }

    .phimed-b2b .hero {
        padding-top: 86px !important;
    }
}

@media (max-width: 640px) {
    .ph-nav {
        display: none;
    }

    .phimed-b2b .hero {
        padding-top: 80px !important;
    }
}


/* ========================================
   V8 hardening adicional (WordPress/theme proof)
   ======================================== */
.phimed-b2b .section-title,
.phimed-b2b .section-title *,
.phimed-b2b .hero-title,
.phimed-b2b .hero-subtitle,
.phimed-b2b .hero-description,
.phimed-b2b .genomics-subtitle,
.phimed-b2b .solution-card h3,
.phimed-b2b .benefit-card h3,
.phimed-b2b .timeline-content h3,
.phimed-b2b .features-label,
.phimed-b2b .followup-head h3,
.phimed-b2b .followup-intro,
.phimed-b2b .followup-note,
.phimed-b2b .followup-side-legend span {
    color: var(--neutral-100) !important;
}

.phimed-b2b .followup-chart text,
.phimed-b2b .followup-chart .axis-labels text,
.phimed-b2b .followup-chart .x-labels text {
    fill: rgba(203, 213, 225, 0.92) !important;
    color: rgba(203, 213, 225, 0.92) !important;
}

.phimed-b2b .followup-chart .axis { stroke: rgba(148, 163, 184, 0.85) !important; }
.phimed-b2b .followup-chart .grid line { stroke: rgba(129, 140, 248, 0.18) !important; }

.phimed-b2b .bio-chart .chart-curve { stroke: #67E8F9 !important; }
.phimed-b2b .bio-chart .chart-fill { fill: url(#chartGradient) !important; }
.phimed-b2b .bio-chart .chart-point {
    fill: #67E8F9 !important;
    stroke: #DBEAFE !important;
}

/* Animaciones más rápidas y sincronizadas con el scroll */
.reveal-text,
.card-animate {
    will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
    .phimed-b2b *,
    .phimed-b2b *::before,
    .phimed-b2b *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-text,
    .card-animate,
    .fade-in-up {
        opacity: 1 !important;
        transform: none !important;
    }
}
