/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Affiliate Program public marketing page styles.
 * Dark-themed, conversion-focused layout with animated hero, step flow,
 * commission formula, FAQ accordion, and mobile bottom navigation.
 */

/* =============================================
   RESET / TOKENS
   ============================================= */
:root {
    --aff-bg:           #0a1020;
    --aff-bg-mid:       #0d1628;
    --aff-bg-card:      #111a30;
    --aff-border:       rgba(255,255,255,0.08);
    --aff-accent:       #3a9ff5;
    --aff-accent-glow:  rgba(58,159,245,0.25);
    --aff-gold:         #c9a430;
    --aff-text:         #e8edf5;
    --aff-muted:        #8a97b0;
    --aff-radius:       12px;
    --aff-radius-lg:    20px;
    --aff-transition:   0.25s ease;
    --aff-max-width:    1160px;
    --aff-max-narrow:   760px;
}

body {
    background-color: var(--aff-bg) !important;
    background-image: none !important;
}

#wrapper, #content-wrapper, #content-fluid {
    background: transparent !important;
}

footer {
    background-color: var(--aff-bg) !important;
}

/* =============================================
   SKIP LINK
   ============================================= */
.aff-skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--aff-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: top var(--aff-transition);
}
.aff-skip-link:focus {
    top: 1rem;
}

/* =============================================
   SCROLL PROGRESS
   ============================================= */
.aff-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--aff-accent), var(--aff-gold));
    z-index: 9000;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* =============================================
   PAGE NAV (DESKTOP DOTS)
   ============================================= */
.aff-page-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.aff-nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 1.5px solid rgba(255,255,255,0.3);
    transition: background var(--aff-transition), transform var(--aff-transition);
    position: relative;
    display: block;
}
.aff-nav-dot::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--aff-transition);
}
.aff-nav-dot:hover::after { opacity: 1; }
.aff-nav-dot.active,
.aff-nav-dot:hover {
    background: var(--aff-accent);
    transform: scale(1.3);
}

@@media (max-width: 768px) {
    .aff-page-nav { display: none; }
}

/* =============================================
   MOBILE BOTTOM NAV
   ============================================= */
.aff-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    background: rgba(10,16,32,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--aff-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.aff-mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.25rem;
    color: var(--aff-muted);
    text-decoration: none;
    font-size: 0.65rem;
    transition: color var(--aff-transition);
    gap: 3px;
}
.aff-mobile-nav-item.active,
.aff-mobile-nav-item:hover { color: var(--aff-accent); }
.aff-mobile-nav-icon { font-size: 1.15rem; }
.aff-mobile-nav-label { font-size: 0.6rem; }

@@media (min-width: 769px) { .aff-mobile-nav { display: none !important; } }

/* =============================================
   PAGE & SECTIONS
   ============================================= */
.aff-page {
    color: var(--aff-text);
    overflow-x: hidden;
}
.aff-section { padding: 5rem 1.5rem; }
.aff-section-dark { background-color: var(--aff-bg); }
.aff-section-mid  { background-color: var(--aff-bg-mid); }
.aff-section-cta  {
    background: linear-gradient(135deg, #0d1a30 0%, #0a1020 100%);
    border-top: 1px solid var(--aff-border);
}
.aff-container {
    max-width: var(--aff-max-width);
    margin: 0 auto;
}
.aff-container-narrow {
    max-width: var(--aff-max-narrow);
    margin: 0 auto;
}

/* =============================================
   SECTION HEADER
   ============================================= */
.aff-section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.aff-section-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aff-accent);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--aff-accent-glow);
    border-radius: 20px;
    background: var(--aff-accent-glow);
}
.aff-section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--aff-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.aff-section-sub {
    font-size: 1rem;
    color: var(--aff-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* =============================================
   HERO
   ============================================= */
.aff-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 8rem 1.5rem 4rem;
}
.aff-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.aff-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(58,159,245,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58,159,245,0.06) 1px, transparent 1px);
    background-size: 50px 50px;
}
.aff-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(58,159,245,0.12) 0%, transparent 65%),
                linear-gradient(180deg, transparent 60%, var(--aff-bg) 100%);
}
.aff-hero-particles { position: absolute; inset: 0; pointer-events: none; }
.aff-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--aff-accent);
    opacity: 0.25;
    animation: aff-float 6s ease-in-out infinite;
}
.aff-p1 { width: 6px; height: 6px; top: 20%; left: 15%; animation-delay: 0s; }
.aff-p2 { width: 4px; height: 4px; top: 40%; left: 80%; animation-delay: 1.5s; }
.aff-p3 { width: 8px; height: 8px; top: 65%; left: 25%; animation-delay: 3s; }
.aff-p4 { width: 3px; height: 3px; top: 30%; left: 55%; animation-delay: 2s; }
.aff-p5 { width: 5px; height: 5px; top: 75%; left: 70%; animation-delay: 4s; }

@@keyframes aff-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-16px); }
}

.aff-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.aff-hero-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.aff-label-line {
    width: 40px;
    height: 1px;
    background: var(--aff-accent);
    display: inline-block;
}
.aff-label-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aff-accent);
}
.aff-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--aff-text);
    margin-bottom: 1.25rem;
}
.aff-hero-highlight { color: var(--aff-accent); }
.aff-hero-sub {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--aff-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.aff-hero-sub strong { color: var(--aff-text); }

.aff-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.aff-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--aff-transition);
    border: none;
    cursor: pointer;
}
.aff-btn-large {
    padding: 0.9rem 2.25rem;
    font-size: 1.05rem;
}
.aff-btn-primary {
    background: var(--aff-accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--aff-accent-glow);
}
.aff-btn-primary:hover {
    background: #2a8de0;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--aff-accent-glow);
    color: #fff;
}
.aff-btn-ghost {
    background: transparent;
    color: var(--aff-text);
    border: 1px solid var(--aff-border);
}
.aff-btn-ghost:hover {
    background: rgba(255,255,255,0.06);
    color: var(--aff-text);
}

/* =============================================
   HERO STATS
   ============================================= */
.aff-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--aff-border);
    border-radius: var(--aff-radius-lg);
    backdrop-filter: blur(8px);
}
.aff-stat { text-align: center; }
.aff-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--aff-accent);
}
.aff-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--aff-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.aff-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--aff-border);
}
@@media (max-width: 480px) {
    .aff-stat-divider { display: none; }
    .aff-hero-stats { gap: 1rem; }
}

/* =============================================
   WHY JOIN - CARDS
   ============================================= */
.aff-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.aff-card {
    background: var(--aff-bg-card);
    border: 1px solid var(--aff-border);
    border-radius: var(--aff-radius-lg);
    padding: 1.75rem;
    transition: border-color var(--aff-transition), transform var(--aff-transition);
}
.aff-card:hover {
    border-color: rgba(58,159,245,0.35);
    transform: translateY(-4px);
}
.aff-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--aff-accent-glow);
    color: var(--aff-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.aff-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--aff-text);
    margin-bottom: 0.5rem;
}
.aff-card-body {
    font-size: 0.9rem;
    color: var(--aff-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* =============================================
   HOW IT WORKS - STEPS
   ============================================= */
.aff-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}
.aff-step {
    flex: 1;
    min-width: 180px;
    max-width: 240px;
    text-align: center;
    padding: 0 1rem;
}
.aff-step-connector {
    flex: 0 0 40px;
    height: 2px;
    background: var(--aff-border);
    margin-top: 2rem;
    align-self: flex-start;
}
@@media (max-width: 720px) {
    .aff-steps { flex-direction: column; align-items: center; gap: 2rem; }
    .aff-step { max-width: 100%; }
    .aff-step-connector {
        width: 2px;
        height: 2rem;
        flex: 0 0 auto;
        margin: 0 auto;
    }
}
.aff-step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--aff-accent-glow);
    border: 2px solid var(--aff-accent);
    color: var(--aff-accent);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.aff-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--aff-text);
    margin-bottom: 0.4rem;
}
.aff-step-body {
    font-size: 0.875rem;
    color: var(--aff-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* =============================================
   COMMISSION TRANSPARENCY
   ============================================= */
.aff-commission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
@@media (max-width: 768px) {
    .aff-commission-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Formula */
.aff-commission-formula {
    background: var(--aff-bg-card);
    border: 1px solid var(--aff-border);
    border-radius: var(--aff-radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.aff-formula-step {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}
.aff-formula-result {
    background: var(--aff-accent-glow);
    border: 1px solid rgba(58,159,245,0.3);
}
.aff-formula-rate {
    background: rgba(201,164,48,0.08);
    border: 1px solid rgba(201,164,48,0.2);
}
.aff-formula-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--aff-text);
}
.aff-formula-note {
    display: block;
    font-size: 0.75rem;
    color: var(--aff-muted);
    margin-top: 2px;
}
.aff-formula-op {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--aff-accent);
    line-height: 1.5;
}

/* Details */
.aff-commission-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.aff-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.aff-detail-icon {
    font-size: 1.15rem;
    color: var(--aff-accent);
    margin-top: 2px;
    min-width: 20px;
}
.aff-detail-item strong {
    display: block;
    color: var(--aff-text);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.aff-detail-item p {
    font-size: 0.875rem;
    color: var(--aff-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* =============================================
   FAQ
   ============================================= */
.aff-faq {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--aff-border);
    border-radius: var(--aff-radius-lg);
    overflow: hidden;
}
.aff-faq-item {
    border-bottom: 1px solid var(--aff-border);
}
.aff-faq-item:last-child { border-bottom: none; }
.aff-faq-q {
    width: 100%;
    background: var(--aff-bg-card);
    border: none;
    color: var(--aff-text);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background var(--aff-transition);
}
.aff-faq-q:hover,
.aff-faq-q[aria-expanded="true"] { background: rgba(58,159,245,0.06); }
.aff-faq-chevron {
    font-size: 0.75rem;
    color: var(--aff-accent);
    transition: transform var(--aff-transition);
    flex-shrink: 0;
}
.aff-faq-q[aria-expanded="true"] .aff-faq-chevron { transform: rotate(180deg); }
.aff-faq-a {
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem 1.25rem;
}
.aff-faq-a p {
    font-size: 0.9rem;
    color: var(--aff-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* =============================================
   CTA SECTION
   ============================================= */
.aff-cta-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--aff-text);
    margin-bottom: 1rem;
}
.aff-cta-sub {
    font-size: 1rem;
    color: var(--aff-muted);
    margin-bottom: 2rem;
}
.aff-cta-small {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--aff-muted);
}
.aff-cta-small a { color: var(--aff-accent); }

/* =============================================
   MOBILE BODY PADDING (prevent overlap with bottom nav)
   ============================================= */
@@media (max-width: 768px) {
    .aff-hero { padding-bottom: 6rem; }
    .aff-section { padding-bottom: 6rem; }
}

/* =============================================
   PRINT
   ============================================= */
@@media print {
    .aff-page-nav,
    .aff-mobile-nav,
    .aff-scroll-progress,
    .aff-hero-bg,
    .aff-hero-particles { display: none !important; }
    .aff-hero { min-height: auto; padding: 2rem 1rem; }
    body, #wrapper, #content-wrapper { background: #fff !important; color: #000 !important; }
}
