/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Ancient Iberian Heritage Product Page - Cinematic Styling
 * Immersive, narrative-driven design for Iberian heritage experience.
 * Color palette inspired by Iberian terracotta, gold, and Mediterranean tones.
 */

/* ========================================
   CSS VARIABLES - Iberian Color Palette
   ======================================== */
:root {
    /* Core Colors */
    --ibr-deep: #1a0f0a;
    --ibr-terracotta: #2d1810;
    --ibr-terracotta-light: #3d2218;
    --ibr-gold: #c9a030;
    --ibr-gold-light: #d4b54d;
    --ibr-gold-dark: #8b6914;
    --ibr-amber: #b87333;
    --ibr-ochre: #a67c2e;
    --ibr-olive: #5a5a3a;
    --ibr-olive-light: #6b6b4b;
    --ibr-mist: rgba(255, 255, 255, 0.85);
    --ibr-mist-dim: rgba(255, 255, 255, 0.6);

    /* Typography */
    --ibr-font-display: 'Playfair Display', Georgia, serif;
    --ibr-font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --ibr-section-padding: 120px;
    --ibr-section-padding-mobile: 80px;

    /* Transitions */
    --ibr-transition-fast: 0.2s ease;
    --ibr-transition-medium: 0.4s ease;
    --ibr-transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BODY OVERRIDES
   ======================================== */
body:has(.ibr-main) {
    background-color: var(--ibr-deep) !important;
    background-image: none !important;
}

.ibr-main {
    background-color: var(--ibr-deep);
    color: var(--ibr-mist);
    font-family: var(--ibr-font-body);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    position: relative;
    z-index: 1;
}

body:has(.ibr-main) #wrapper,
body:has(.ibr-main) #content-wrapper,
body:has(.ibr-main) #content-fluid,
body:has(.ibr-main) > div {
    background: transparent !important;
}

body:has(.ibr-main) footer {
    background-color: var(--ibr-deep) !important;
}

.ibr-main p {
    color: var(--ibr-mist-dim);
}

/* ========================================
   ACCESSIBILITY - Skip Link
   ======================================== */
.ibr-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: var(--ibr-gold);
    color: var(--ibr-deep);
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    transition: top var(--ibr-transition-fast);
}

.ibr-skip-link:focus {
    top: 0;
    outline: 3px solid var(--ibr-gold-light);
    outline-offset: 2px;
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */
.ibr-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--ibr-gold), var(--ibr-amber));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ========================================
   PAGE NAVIGATION DOTS
   ======================================== */
.ibr-page-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}

.ibr-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    transition: all var(--ibr-transition-fast);
    position: relative;
}

.ibr-nav-dot:hover,
.ibr-nav-dot.active {
    background: var(--ibr-gold);
    transform: scale(1.2);
}

.ibr-nav-dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ibr-transition-fast);
}

.ibr-nav-dot:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .ibr-page-nav {
        display: none;
    }
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.ibr-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ibr-gold);
    color: var(--ibr-deep);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--ibr-transition-medium);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(201, 160, 48, 0.3);
}

.ibr-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ibr-back-to-top:hover {
    background: var(--ibr-gold-light);
    transform: translateY(-4px);
}

/* ========================================
   SECTION BASE STYLES
   ======================================== */
.ibr-section {
    padding: var(--ibr-section-padding) 0;
    position: relative;
}

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

.ibr-chapter-header {
    text-align: center;
    margin-bottom: 60px;
}

.ibr-chapter-number {
    display: inline-block;
    font-family: var(--ibr-font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ibr-gold);
    margin-bottom: 16px;
}

.ibr-section-title {
    font-family: var(--ibr-font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: white;
    margin: 0 0 16px;
    line-height: 1.2;
}

.ibr-section-subtitle {
    font-size: 1.125rem;
    color: var(--ibr-mist-dim);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   HERO SECTION
   ======================================== */
.ibr-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.ibr-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ibr-hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.ibr-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 15, 10, 0.7) 0%,
        rgba(26, 15, 10, 0.85) 50%,
        rgba(26, 15, 10, 0.95) 100%
    );
}

.ibr-hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(201, 160, 48, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(184, 115, 51, 0.1) 0%, transparent 50%);
    animation: ibrParticleFloat 20s ease-in-out infinite;
}

@keyframes ibrParticleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.ibr-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Badge */
.ibr-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(201, 160, 48, 0.15);
    border: 1px solid rgba(201, 160, 48, 0.3);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ibr-gold);
    margin-bottom: 32px;
}

/* Hero Title */
.ibr-hero-title {
    font-family: var(--ibr-font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--ibr-mist-dim);
}

.ibr-title-prelude {
    display: block;
    font-style: italic;
}

.ibr-title-accent {
    display: block;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 600;
    font-style: normal;
    color: white;
    margin-top: 16px;
    background: linear-gradient(135deg, #ffffff 0%, var(--ibr-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Lead */
.ibr-hero-lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--ibr-mist-dim);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Hero Stats */
.ibr-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.ibr-stat-item {
    text-align: center;
}

.ibr-stat-value {
    display: block;
    font-family: var(--ibr-font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--ibr-gold);
}

.ibr-stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ibr-mist-dim);
    margin-top: 4px;
}

.ibr-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .ibr-stat-divider {
        display: none;
    }
    .ibr-hero-stats {
        gap: 32px;
    }
}

/* Hero Price */
.ibr-hero-price {
    margin-bottom: 32px;
}

.ibr-price-tag {
    display: inline-flex;
    flex-direction: column;
    padding: 16px 32px;
    background: rgba(45, 24, 16, 0.6);
    border: 1px solid rgba(201, 160, 48, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.ibr-price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ibr-mist-dim);
}

.ibr-price-amount {
    font-family: var(--ibr-font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--ibr-gold);
}

.ibr-price-note {
    font-size: 0.8rem;
    color: var(--ibr-mist-dim);
}

/* Hero CTA Buttons */
.ibr-hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.ibr-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--ibr-gold) 0%, var(--ibr-gold-dark) 100%);
    color: var(--ibr-deep);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--ibr-transition-medium);
    box-shadow: 0 4px 20px rgba(201, 160, 48, 0.3);
}

.ibr-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 160, 48, 0.4);
    color: var(--ibr-deep);
    text-decoration: none;
}

.ibr-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: transparent;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--ibr-transition-medium);
}

.ibr-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
}

.ibr-btn-large {
    padding: 20px 48px;
    font-size: 1.125rem;
}

/* Trust Badges */
.ibr-trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ibr-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--ibr-mist-dim);
}

.ibr-trust-item i {
    color: var(--ibr-amber);
}

/* Featured Preview */
.ibr-featured-preview {
    margin-top: 20px;
}

.ibr-preview-card {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px 12px 12px;
    background: rgba(45, 24, 16, 0.6);
    border: 1px solid rgba(201, 160, 48, 0.2);
    border-radius: 60px;
    backdrop-filter: blur(10px);
}

.ibr-preview-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ibr-gold);
}

.ibr-preview-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.ibr-preview-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ibr-gold);
}

.ibr-preview-badge i {
    margin-right: 4px;
}

.ibr-preview-name {
    font-weight: 500;
    color: white;
    font-size: 0.9rem;
}

.ibr-preview-meta {
    font-size: 0.75rem;
    color: var(--ibr-mist-dim);
}

/* Scroll Indicator */
.ibr-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ibr-mist-dim);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: ibrScrollBounce 2s ease-in-out infinite;
}

.ibr-scroll-indicator:hover {
    color: var(--ibr-gold);
}

@keyframes ibrScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   ANIMATIONS
   ======================================== */
.animate-fade-in {
    opacity: 0;
    animation: ibrFadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: ibrFadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes ibrFadeIn {
    to { opacity: 1; }
}

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

/* ========================================
   STORY SECTION
   ======================================== */
.ibr-story {
    background: linear-gradient(180deg, var(--ibr-deep) 0%, var(--ibr-terracotta) 100%);
}

.ibr-story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .ibr-story-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.ibr-story-text {
    max-width: 600px;
}

.ibr-story-lead {
    font-size: 1.25rem;
    color: white !important;
    margin-bottom: 24px;
    line-height: 1.8;
}

.ibr-story-text p {
    margin-bottom: 20px;
}

.ibr-story-quote {
    margin: 40px 0;
    padding: 24px 32px;
    border-left: 4px solid var(--ibr-gold);
    background: rgba(201, 160, 48, 0.1);
    font-family: var(--ibr-font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--ibr-gold-light);
}

.ibr-story-quote p {
    margin: 0;
    color: var(--ibr-gold-light) !important;
}

/* Culture Cards */
.ibr-culture-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ibr-culture-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all var(--ibr-transition-medium);
}

.ibr-culture-card:hover {
    transform: translateY(-4px);
    border-color: var(--ibr-gold);
    background: rgba(201, 160, 48, 0.05);
}

.ibr-culture-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.ibr-culture-card.mesolithic .ibr-culture-icon {
    background: rgba(107, 142, 35, 0.2);
    color: #6B8E23;
}

.ibr-culture-card.chalcolithic .ibr-culture-icon {
    background: rgba(205, 133, 63, 0.2);
    color: #CD853F;
}

.ibr-culture-card.bronze-age .ibr-culture-icon {
    background: rgba(184, 134, 11, 0.2);
    color: #B8860B;
}

.ibr-culture-card.iron-age .ibr-culture-icon {
    background: rgba(70, 130, 180, 0.2);
    color: #4682B4;
}

.ibr-culture-card.roman .ibr-culture-icon {
    background: rgba(139, 0, 0, 0.2);
    color: #8B0000;
}

.ibr-culture-card h3 {
    font-family: var(--ibr-font-display);
    font-size: 1.25rem;
    color: white;
    margin-bottom: 4px;
}

.ibr-culture-period {
    font-size: 0.75rem;
    color: var(--ibr-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ibr-culture-card p {
    font-size: 0.875rem;
    margin-top: 12px;
    line-height: 1.6;
}

/* ========================================
   REVELATIONS SECTION
   ======================================== */
.ibr-revelations {
    background: var(--ibr-terracotta);
}

.ibr-revelations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.ibr-revelation-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all var(--ibr-transition-medium);
}

.ibr-revelation-card:hover {
    transform: translateY(-4px);
    border-color: var(--ibr-gold);
    background: rgba(201, 160, 48, 0.05);
}

.ibr-revelation-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 160, 48, 0.2) 0%, rgba(184, 115, 51, 0.2) 100%);
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--ibr-gold);
    margin-bottom: 20px;
}

.ibr-revelation-card h3 {
    font-family: var(--ibr-font-display);
    font-size: 1.25rem;
    color: white;
    margin-bottom: 12px;
}

.ibr-revelation-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ========================================
   MAP PREVIEW SECTION
   ======================================== */
.ibr-map-preview {
    background: linear-gradient(180deg, var(--ibr-terracotta) 0%, var(--ibr-deep) 100%);
}

.ibr-map-preview-container {
    margin-top: 48px;
}

.ibr-map-preview-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(201, 160, 48, 0.2);
}

.ibr-map-preview-map {
    width: 100%;
    height: 500px;
    background: var(--ibr-terracotta-light);
    position: relative;
}

@media (max-width: 768px) {
    .ibr-map-preview-map {
        height: 400px;
    }

    .ibr-map-preview-overlay {
        padding: 24px;
    }

    .ibr-map-preview-content h3 {
        font-size: 1.5rem;
    }

    .ibr-map-features-list {
        font-size: 0.875rem;
    }
}

.ibr-map-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(26, 15, 10, 0.95) 30%,
        rgba(26, 15, 10, 0.98) 100%
    );
    padding: 32px 48px;
    pointer-events: none;
    z-index: 1000;
}

.ibr-map-preview-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--ibr-mist);
}

.ibr-map-preview-content h3 {
    font-family: var(--ibr-font-display);
    font-size: 1.75rem;
    color: var(--ibr-gold);
    margin-bottom: 16px;
}

.ibr-map-preview-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    color: var(--ibr-mist-dim);
}

.ibr-map-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.ibr-map-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.9375rem;
    color: var(--ibr-mist-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ibr-map-features-list li:last-child {
    border-bottom: none;
}

.ibr-map-features-list i {
    color: var(--ibr-gold);
    font-size: 1rem;
}

/* Map Demo Markers */
.ibr-map-demo-marker {
    background: transparent !important;
    border: none !important;
}

.ibr-map-marker-pin {
    width: 20px;
    height: 20px;
    background: var(--ibr-gold);
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(201, 160, 48, 0.6);
    animation: ibrMarkerPulse 2s ease-in-out infinite;
}

@keyframes ibrMarkerPulse {
    0%, 100% {
        transform: rotate(-45deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(-45deg) scale(1.2);
        opacity: 0.8;
    }
}

/* ========================================
   REPORT PREVIEW SECTION
   ======================================== */
.ibr-report-preview {
    background: var(--ibr-deep);
}

.ibr-report-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.ibr-rp-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all var(--ibr-transition-medium);
}

.ibr-rp-card:hover {
    transform: translateY(-4px);
    border-color: var(--ibr-gold);
    background: rgba(201, 160, 48, 0.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.ibr-rp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ibr-rp-card-header i {
    font-size: 1.5rem;
    color: var(--ibr-gold);
}

.ibr-rp-card-header h4 {
    font-family: var(--ibr-font-display);
    font-size: 1.125rem;
    color: white;
    margin: 0;
}

.ibr-rp-card-content {
    color: var(--ibr-mist-dim);
}

.ibr-rp-card-note {
    font-size: 0.875rem;
    margin-top: 16px;
    font-style: italic;
    color: var(--ibr-mist-dim);
}

/* Regional Preview Demo */
.ibr-rp-region-demo {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ibr-rp-region-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ibr-rp-region-name {
    min-width: 100px;
    font-weight: 500;
    color: white;
    font-size: 0.875rem;
}

.ibr-rp-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.ibr-rp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ibr-gold) 0%, var(--ibr-gold-light) 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ibr-rp-percentage {
    min-width: 45px;
    text-align: right;
    font-weight: 600;
    color: var(--ibr-gold);
    font-size: 0.875rem;
}

/* Chart Preview Demo */
.ibr-rp-chart-demo {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.ibr-rp-chart-placeholder {
    text-align: center;
    color: var(--ibr-mist-dim);
}

.ibr-rp-chart-placeholder i {
    color: var(--ibr-gold);
    margin-bottom: 12px;
}

.ibr-rp-chart-placeholder p {
    font-size: 0.875rem;
    margin: 0;
}

/* Haplogroup Preview Demo */
.ibr-rp-haplo-demo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ibr-rp-haplo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ibr-rp-haplo-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ibr-rp-haplo-badge.mtdna {
    background: rgba(255, 192, 203, 0.2);
    color: #ffc0cb;
}

.ibr-rp-haplo-badge.ydna {
    background: rgba(173, 216, 230, 0.2);
    color: #add8e6;
}

.ibr-rp-haplo-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: white;
    font-size: 0.9375rem;
}

.ibr-rp-haplo-count {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--ibr-gold);
}

/* Export Preview Demo */
.ibr-rp-export-demo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ibr-rp-export-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--ibr-mist-dim);
    transition: all var(--ibr-transition-fast);
}

.ibr-rp-export-btn:hover {
    background: rgba(201, 160, 48, 0.1);
    border-color: var(--ibr-gold);
    color: white;
}

.ibr-rp-export-btn i {
    color: var(--ibr-gold);
    width: 20px;
}

/* ========================================
   ANCESTORS SECTION (BENTO GRID)
   ======================================== */
.ibr-ancestors {
    background: linear-gradient(180deg, var(--ibr-terracotta) 0%, var(--ibr-deep) 100%);
}

.ibr-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 16px;
}

@media (max-width: 992px) {
    .ibr-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ibr-bento-grid {
        grid-template-columns: 1fr;
    }
}

.ibr-bento-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--ibr-transition-medium);
}

.ibr-bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ibr-bento-large {
    grid-column: span 2;
    min-height: 400px;
}

.ibr-bento-medium {
    grid-column: span 1;
    min-height: 300px;
}

.ibr-bento-small {
    grid-column: span 1;
    min-height: 250px;
}

.ibr-bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform var(--ibr-transition-slow);
}

.ibr-bento-card:hover .ibr-bento-img {
    transform: scale(1.05);
}

.ibr-bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(26, 15, 10, 0.8) 70%,
        rgba(26, 15, 10, 0.95) 100%
    );
}

.ibr-bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
}

.ibr-bento-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ibr-bento-era {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--ibr-gold);
    color: var(--ibr-deep);
}

.ibr-bento-era.mesolithic { background: #6B8E23; color: white; }
.ibr-bento-era.neolithic { background: #228B22; color: white; }
.ibr-bento-era.chalcolithic { background: #CD853F; color: white; }
.ibr-bento-era.bronze-age { background: #B8860B; color: white; }
.ibr-bento-era.iron-age { background: #4682B4; color: white; }
.ibr-bento-era.roman-medieval { background: #8B0000; color: white; }

.ibr-bento-haplo {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--ibr-mist-dim);
}

.ibr-bento-name {
    font-family: var(--ibr-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.ibr-bento-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--ibr-mist-dim);
    margin-bottom: 4px;
}

.ibr-bento-meta i {
    color: var(--ibr-gold);
}

.ibr-bento-locality {
    opacity: 0.7;
}

.ibr-bento-date {
    font-size: 0.75rem;
    color: var(--ibr-mist-dim);
}

.ibr-bento-date i {
    margin-right: 4px;
    color: var(--ibr-amber);
}

.ibr-ancestors-footer {
    text-align: center;
    margin-top: 48px;
}

.ibr-ancestors-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(201, 160, 48, 0.1);
    border: 1px solid rgba(201, 160, 48, 0.2);
    border-radius: 12px;
    margin-top: 16px;
}

.ibr-ancestors-note i {
    color: var(--ibr-gold);
}

/* ========================================
   SCIENCE SECTION
   ======================================== */
.ibr-science {
    background: var(--ibr-deep);
}

.ibr-science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.ibr-science-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all var(--ibr-transition-medium);
}

.ibr-science-card:hover {
    border-color: var(--ibr-amber);
}

.ibr-science-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184, 115, 51, 0.15);
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--ibr-amber);
    margin-bottom: 20px;
}

.ibr-science-card h3 {
    font-family: var(--ibr-font-display);
    font-size: 1.125rem;
    color: white;
    margin-bottom: 12px;
}

.ibr-science-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Trust Section */
.ibr-trust-section {
    text-align: center;
    padding: 60px;
    background: rgba(45, 24, 16, 0.5);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ibr-trust-section h3 {
    font-family: var(--ibr-font-display);
    font-size: 1.5rem;
    color: white;
    margin-bottom: 32px;
}

.ibr-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.ibr-trust-badge-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ibr-trust-badge-large i {
    font-size: 2rem;
    color: var(--ibr-gold);
    margin-bottom: 12px;
}

.ibr-trust-badge-large span {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.ibr-trust-badge-large p {
    font-size: 0.8rem;
    margin: 0;
}

/* ========================================
   PRICING (Cinematic partial)
   Full-width breakout so dark section extends edge-to-edge
   ======================================== */
.ibr-pricing-section {
    --rpc-bg: var(--ibr-deep);
    --rpc-overlay: rgba(26, 15, 10, 0.75);
    --rpc-text-primary: var(--ibr-mist);
    --rpc-text-secondary: rgba(255, 255, 255, 0.9);
    --rpc-text-muted: var(--ibr-mist-dim);
    --rpc-accent: var(--ibr-gold);
    --rpc-accent-dim: var(--ibr-gold-dark);
    --rpc-cta-bg: var(--ibr-gold);
    --rpc-cta-text: var(--ibr-deep);
    --rpc-cta-hover: var(--ibr-gold-dark);
    --rpc-border: rgba(255, 255, 255, 0.12);
    --rpc-font-display: var(--ibr-font-display);
    --rpc-font-body: var(--ibr-font-body);

    /* Full viewport width breakout for cinematic edge-to-edge dark block */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Ensure background image and overlay render with Iberian theme */
.ibr-pricing-section .rpc-pricing-bg img {
    opacity: 0.28;
    filter: grayscale(25%) sepia(15%);
}

.ibr-pricing-section .rpc-pricing-overlay {
    background:
        radial-gradient(ellipse at center, transparent 0%, var(--rpc-bg) 70%),
        linear-gradient(0deg, var(--rpc-bg) 0%, transparent 40%);
}

/* ========================================
   REMEMBER SECTION (FINAL CTA) - Legacy, replaced by cinematic partial
   ======================================== */
.ibr-remember {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ibr-section-padding) 0;
}

.ibr-remember-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ibr-remember-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.ibr-remember-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 15, 10, 0.9) 0%,
        rgba(26, 15, 10, 0.7) 50%,
        rgba(26, 15, 10, 0.95) 100%
    );
}

.ibr-remember-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.ibr-remember-title {
    font-family: var(--ibr-font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, var(--ibr-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ibr-remember-lead {
    font-size: 1.25rem;
    color: var(--ibr-mist-dim);
    margin-bottom: 40px;
    line-height: 1.8;
}

.ibr-remember-lead strong {
    color: white;
}

/* Final Price */
.ibr-final-price {
    display: inline-flex;
    flex-direction: column;
    padding: 24px 48px;
    background: rgba(45, 24, 16, 0.6);
    border: 1px solid rgba(201, 160, 48, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 32px;
}

.ibr-final-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ibr-mist-dim);
    margin-bottom: 8px;
}

.ibr-final-amount {
    font-family: var(--ibr-font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--ibr-gold);
}

.ibr-final-note {
    font-size: 0.8rem;
    color: var(--ibr-mist-dim);
    margin-top: 4px;
}

/* Final CTA */
.ibr-final-cta {
    margin-bottom: 32px;
}

/* Final Features */
.ibr-final-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.ibr-final-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--ibr-mist-dim);
}

.ibr-final-feature i {
    color: var(--ibr-gold);
}

/* Final Tagline */
.ibr-final-tagline {
    font-family: var(--ibr-font-display);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--ibr-gold-light);
}

/* ========================================
   RELATED PRODUCTS
   ======================================== */
.ibr-related-products {
    padding: 60px 0;
    background: var(--ibr-terracotta);
}

.ibr-related-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--ibr-mist);
    margin-bottom: 40px;
    font-family: var(--ibr-font-display);
    font-weight: 700;
}

.ibr-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .ibr-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .ibr-related-grid {
        grid-template-columns: 1fr;
    }
}

.ibr-related-card {
    background: var(--ibr-terracotta-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--ibr-transition-medium);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(201, 160, 48, 0.2);
}

.ibr-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--ibr-gold);
}

.ibr-related-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(201, 160, 48, 0.2);
}

.ibr-related-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ibr-related-content h4 {
    font-size: 1.2rem;
    color: var(--ibr-mist);
    margin-bottom: 8px;
    font-family: var(--ibr-font-body);
    font-weight: 600;
}

.ibr-related-content p {
    font-size: 0.95rem;
    color: var(--ibr-mist-dim);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.ibr-related-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ibr-gold);
    font-weight: 600;
    text-decoration: none;
    transition: var(--ibr-transition-fast);
    margin-top: auto;
}

.ibr-related-link:hover {
    color: var(--ibr-gold-light);
    text-decoration: underline;
}

.ibr-related-link i {
    transition: transform 0.2s ease;
}

.ibr-related-link:hover i {
    transform: translateX(4px);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .ibr-page-nav,
    .ibr-back-to-top,
    .ibr-scroll-progress,
    .ibr-scroll-indicator {
        display: none !important;
    }
}
