/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Public demo reports catalog (/demo) styling.
 * Dark cinematic theme (obsidian background, warm gold accents) consistent with
 * Views/Home/ProductAncestryReport.cshtml and Views/Home/ProductSharedRoots.cshtml.
 * Every report card uses the report's own header photo as its background image.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --demo-gold: #C4956A;
    --demo-gold-light: #D4B896;
    --demo-gold-dark: #8B6D4F;
    --demo-obsidian: #0d1117;
    --demo-obsidian-light: #161b22;
    --demo-text-primary: rgba(255, 255, 255, 0.92);
    --demo-text-secondary: rgba(255, 255, 255, 0.7);
    --demo-text-muted: rgba(255, 255, 255, 0.5);
    --demo-gold-gradient: linear-gradient(135deg, #8B6D4F 0%, #C4956A 100%);
}

/* ========================================
   Base
   ======================================== */
body:has(.demo-index-page) {
    background-color: var(--demo-obsidian) !important;
    background-image: none !important;
}

body:has(.demo-index-page) #wrapper,
body:has(.demo-index-page) #content-wrapper,
body:has(.demo-index-page) #content-fluid {
    background: transparent !important;
}

body:has(.demo-index-page) footer {
    background-color: #0a0d12 !important;
}

.demo-index-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--demo-text-primary);
    line-height: 1.7;
    background-color: var(--demo-obsidian);
}

/* ========================================
   Hero
   ======================================== */
.demo-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 62vh;
    padding: 160px 24px 90px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.82) 100%),
        url('/img/ui/backgrounds/home-hero-2025.webp') center/cover no-repeat;
}

.demo-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(196, 149, 106, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(212, 184, 150, 0.07) 0%, transparent 55%),
        linear-gradient(180deg, transparent 0%, var(--demo-obsidian) 100%);
    z-index: 1;
}

.demo-hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
}

.demo-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(196, 149, 106, 0.12);
    border: 1px solid rgba(196, 149, 106, 0.35);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--demo-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.demo-hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

.demo-hero-lead {
    font-size: 1.125rem;
    color: var(--demo-text-secondary);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto;
}

/* ========================================
   Chapter-style category headers
   ======================================== */
.demo-index-content {
    position: relative;
    padding: 80px 0 40px;
}

.demo-index-category {
    margin-bottom: 88px;
}

.demo-index-category:last-child {
    margin-bottom: 40px;
}

.demo-category-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.demo-chapter-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.875rem;
    font-style: italic;
    color: var(--demo-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.demo-chapter-label .dna-icon {
    width: 18px;
    height: 18px;
}

.demo-category-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    color: #fff;
    margin: 0;
    position: relative;
    padding-bottom: 16px;
}

.demo-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: var(--demo-gold-gradient);
}

/* ========================================
   Report cards (image background)
   ======================================== */
.demo-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.demo-report-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.demo-report-card:hover {
    transform: translateY(-6px);
    border-color: rgba(196, 149, 106, 0.35);
    box-shadow: 0 20px 50px rgba(196, 149, 106, 0.18);
}

.demo-report-card-image {
    position: relative;
    height: 190px;
    overflow: hidden;
    background-color: var(--demo-obsidian-light);
}

.demo-report-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.05) 0%, rgba(13, 17, 23, 0.85) 100%);
}

.demo-report-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.demo-report-card:hover .demo-report-card-image img {
    transform: scale(1.08);
}

.demo-report-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--demo-gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(196, 149, 106, 0.35);
    z-index: 2;
}

.demo-report-card-badge .dna-icon {
    width: 22px;
    height: 22px;
    color: var(--demo-obsidian);
}

.demo-report-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.demo-report-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.demo-report-card-description {
    font-size: 0.9rem;
    color: var(--demo-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    min-height: 3rem;
}

.demo-report-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.demo-btn-primary,
.demo-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.demo-btn-primary {
    background: var(--demo-gold-gradient);
    color: var(--demo-obsidian);
    box-shadow: 0 6px 20px rgba(196, 149, 106, 0.25);
}

.demo-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(196, 149, 106, 0.35);
    color: var(--demo-obsidian);
    text-decoration: none;
}

.demo-btn-secondary {
    background: transparent;
    color: var(--demo-gold);
    border: 1px solid rgba(196, 149, 106, 0.35);
}

.demo-btn-secondary:hover {
    background: rgba(196, 149, 106, 0.12);
    border-color: var(--demo-gold);
    color: var(--demo-gold-light);
    text-decoration: none;
}

.demo-btn-primary .dna-icon,
.demo-btn-secondary .dna-icon {
    width: 16px;
    height: 16px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .demo-hero {
        min-height: 52vh;
        padding: 120px 20px 64px;
    }

    .demo-index-content {
        padding: 56px 0 24px;
    }

    .demo-index-category {
        margin-bottom: 56px;
    }

    .demo-reports-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .demo-report-card-image {
        height: 170px;
    }
}
