/*
 * FishZone 2.0 — Entity V2 Styles (Redesign based on mockup 1)
 */

:root {
    --hero-bg: #ffffff;
    --hero-text: #0f172a;
    --hero-text-dim: #64748b;
}

/* ═══════════════════════════════════════════════
   HERO AREA (Light Theme, Full Bleed Image)
═══════════════════════════════════════════════ */

.hero-wrapper {
    background: var(--hero-bg);
    color: var(--hero-text);
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.entity-hero {
    position: relative;
    padding: 2.5rem 0 3rem;
}

.hero-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

@media (min-width: 1024px) {
    .hero-layout-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
}

.hero-breadcrumb {
    font-size: 0.8rem;
    color: var(--hero-text-dim);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-breadcrumb a {
    color: var(--hero-text-dim);
    text-decoration: none;
}
.hero-breadcrumb a:hover { color: #3b82f6; }
.hero-breadcrumb span { color: #334155; }

.hero-title {
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--hero-text);
}

@media (min-width: 768px) {
    .hero-title { font-size: 3.5rem; }
}

.hero-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.tag-type { color: #3b82f6; }
.tag-difficulty { color: #f59e0b; }
.tag-temperament { color: #10b981; }

/* Quick Answer Metric Responsive Classes */
.qa-always { display: flex; }
.qa-desktop-only { display: none; }
.qa-mobile-only { display: flex; }

@media (min-width: 768px) {
    .qa-desktop-only { display: flex; }
    .qa-mobile-only { display: none; }
}

/* Quick Answer INSIDE Hero */
.quick-answer-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--text-primary, #0f172a);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

.quick-answer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.quick-answer-header h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3b82f6;
    margin: 0;
}
.qa-icon { color: #3b82f6; width: 1.2rem; height: 1.2rem; }

.quick-answer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary, #334155);
    margin-bottom: 1.5rem;
}

.qa-metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-top: 1px solid var(--border, #e5e7eb);
    padding-top: 1rem;
}

.qa-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qa-metric-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    color: #64748b;
}
.qa-metric-icon svg { width: 1.1rem; height: 1.1rem; }

.qa-metric-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.qa-metric-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

/* Hero Image Right Side */
.hero-image-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-full {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    object-fit: cover;
    aspect-ratio: 16/10;
}


/* ═══════════════════════════════════════════════
   GRID LAYOUTS
═══════════════════════════════════════════════ */

/* 3-Column Top Section */
.grid-layout-3col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .grid-layout-3col {
        grid-template-columns: 3fr 4fr 3fr;
        gap: 2rem;
    }
}

/* 2-Column Main Section */
.grid-layout-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .grid-layout-2col {
        grid-template-columns: 7fr 3fr;
        gap: 2rem;
    }
}

/* ═══════════════════════════════════════════════
   COMMON CARD STYLES
═══════════════════════════════════════════════ */

.card {
    background: #ffffff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.card-body {
    padding: 1.25rem;
}

/* ═══════════════════════════════════════════════
   QUICK FACTS TABLE (Left Column)
═══════════════════════════════════════════════ */

.quick-facts-table {
    width: 100%;
    border-collapse: collapse;
}

.quick-facts-table th,
.quick-facts-table td {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border, #f1f5f9);
    text-align: left;
}
.quick-facts-table tr:last-child th,
.quick-facts-table tr:last-child td { border-bottom: none; }

.quick-facts-table th {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
    font-weight: 600;
}

@media (min-width: 1024px) {
    .quick-facts-table th {
        white-space: nowrap;
    }
}

.qf-icon {
    color: #3b82f6;
    display: flex;
}

.quick-facts-table td {
    color: #0f172a;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════
   KEY TAKEAWAYS (Middle Column)
═══════════════════════════════════════════════ */

.takeaways-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    margin: 0;
    list-style: none;
}

.takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.takeaway-icon {
    color: #10b981; /* Green check */
    background: #d1fae5;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.takeaway-icon svg { width: 1rem; height: 1rem; }

/* ═══════════════════════════════════════════════
   SIDEBAR WIDGETS (Right Column)
═══════════════════════════════════════════════ */

.feature-card-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
}

.feature-card .card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #0f172a;
}
.feature-card .card-body p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem;
}
.feature-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
}

/* Icon Links Card */
.icon-links-list {
    display: flex;
    flex-direction: column;
}
.icon-link-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid var(--border, #f1f5f9);
    transition: background 0.15s;
}
.icon-link-item:last-child { border-bottom: none; }
.icon-link-item:hover { background: #f8fafc; }

.icon-link-svg {
    color: #3b82f6;
}

.icon-link-text h4 {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    color: #0f172a;
}
.icon-link-text p {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════
   STICKY TABS
═══════════════════════════════════════════════ */

.sticky-tabs-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 1.5rem;
}

.sticky-tabs-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.sticky-tabs-inner::-webkit-scrollbar { display: none; }

.sticky-tab-link {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.sticky-tab-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* ═══════════════════════════════════════════════
   PROSE / CONTENT (Main Column)
═══════════════════════════════════════════════ */

.content-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.prose h2, .prose h3 {
    margin-top: 0;
    color: #0f172a;
}
.prose p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 1.2rem;
}

/* ═══════════════════════════════════════════════
   FAQ (Right Column bottom)
═══════════════════════════════════════════════ */

.faq-list {
    display: flex;
    flex-direction: column;
}
.faq-item {
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none; /* Hide default arrow */
}
.faq-question::-webkit-details-marker { display: none; }
.faq-answer {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
}

/* ═══════════════════════════════════════════════
   RELATIONSHIP COLLECTION
   Generic Knowledge Graph carousel / grid
═══════════════════════════════════════════════ */

.relationship-collection {
    margin-bottom: 2rem;
}

/* Section header row */
.rel-collection-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.rel-collection-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.rel-view-all-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.rel-view-all-link:hover { text-decoration: underline; }

/* ── Shared card ─────────────────────────────── */
.relationship-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
.relationship-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #93c5fd;
}
.relationship-card:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Card image */
.rel-card-img-wrap {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f5f9;
}
.rel-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.relationship-card:hover .rel-card-img { transform: scale(1.04); }

/* Card body */
.rel-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 1rem 1rem;
    flex: 1;
}

.rel-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.rel-card-sci {
    font-size: 0.75rem;
    font-style: italic;
    color: #64748b;
    margin: 0;
}

/* Compatibility Badge */
.rel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    margin: 0.15rem 0 0.1rem;
    width: fit-content;
}
.rel-badge-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}
.rel-badge-excellent { background: #d1fae5; color: #065f46; }
.rel-badge-good      { background: #dbeafe; color: #1e40af; }
.rel-badge-moderate  { background: #fef9c3; color: #854d0e; }
.rel-badge-fair      { background: #f1f5f9; color: #475569; }

/* Chips */
.rel-card-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.2rem 0;
    line-height: 1.2;
}
.chip-dot {
    opacity: 0.5;
    font-size: 0.85rem;
}

.rel-card-reason {
    font-size: 0.8rem;
    color: #475569;
    margin: 0;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rel-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ── Desktop Grid ────────────────────────────── */
.relationship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

/* Hide mobile carousel on desktop */
.relationship-carousel { display: none; }

/* ── Mobile Swipe Carousel ───────────────────── */
@media (max-width: 767px) {
    /* Hide grid on mobile */
    .relationship-grid { display: none; }

    .relationship-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0.85rem;
        padding: 0.25rem 0 1rem;
        /* Hide scrollbar on all browsers */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .relationship-carousel::-webkit-scrollbar { display: none; }

    /* Each card in the carousel */
    .relationship-carousel .relationship-card {
        flex: 0 0 72vw;
        max-width: 280px;
        scroll-snap-align: center;
    }

    /* "View all" trailing card in carousel */
    .rel-carousel-view-all {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-width: 120px;
        padding: 1rem;
        border: 1px dashed #93c5fd;
        border-radius: 1rem;
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600;
        color: #3b82f6;
        scroll-snap-align: center;
        text-align: center;
    }
    .rel-carousel-view-all:hover { background: #eff6ff; }

    /* Slightly pad the first card to allow centering near the left edge */
    .relationship-carousel .relationship-card:first-child { margin-left: 0.25rem; }
    .rel-carousel-view-all { margin-right: 0.25rem; }
}

