/**
 * River Island Wildlife Single Widget Styles
 */

/* River Island Brand Color Palette */
:root {
    /* Brand Colors */
    --riew-dark-green: #2a5434;
    --riew-orange: #f7941e;
    
    /* Extended Palette */
    --riew-forest: #1e3d29;
    --riew-moss: #3a6444;
    --riew-sage: #4a7454;
    --riew-mint: #5a8464;
    --riew-leaf: #6a9474;
    
    --riew-amber: #faa834;
    --riew-gold: #fdb94e;
    --riew-honey: #ffca68;
    
    /* Gradients */
    --riew-gradient-primary: linear-gradient(135deg, #2a5434 0%, #4a7454 100%);
    --riew-gradient-accent: linear-gradient(135deg, #f7941e 0%, #fdb94e 100%);
    --riew-gradient-nature: linear-gradient(135deg, #2a5434 0%, #3a6444 50%, #4a7454 100%);
    --riew-gradient-sunset: linear-gradient(135deg, #f7941e 0%, #faa834 50%, #fdb94e 100%);
    --riew-gradient-hero: linear-gradient(180deg, rgba(42,84,52,0.95) 0%, rgba(42,84,52,0.7) 50%, rgba(42,84,52,0.4) 100%);
    
    /* Status Colors */
    --riew-danger: #d32f2f;
    --riew-warning: #f7941e;
    --riew-success: #2a5434;
    --riew-info: #4a7454;
    --riew-border: #e0e6df;
}

/* Container */
.riew-wildlife-single {
    position: relative;
    background: #F0F4F0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Hero Section - New Layout */
.riew-wildlife-single__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    background: #F0F4F0;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(42,84,52,0.1);
}

.riew-wildlife-single__hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.riew-wildlife-single__hero-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
    background: white;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.riew-wildlife-single__hero-info {
    padding: 1.5rem;
    background: var(--riew-gradient-primary);
    color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(42,84,52,0.2);
}

.riew-wildlife-single__hero-right {
    display: flex;
    flex-direction: column;
}

.riew-wildlife-single__hero-info .riew-wildlife-single__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: white !important;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.riew-wildlife-single__hero-info .riew-wildlife-single__scientific {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: white !important;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
    font-style: italic;
}

/* Header (when no hero image) */
.riew-wildlife-single__header {
    padding: 2rem 0;
    border-bottom: 2px solid var(--riew-border);
    margin-bottom: 2rem;
}

.riew-wildlife-single__header .riew-wildlife-single__title {
    color: var(--riew-dark-green);
}

.riew-wildlife-single__header .riew-wildlife-single__scientific {
    color: var(--riew-moss);
    font-style: italic;
}

/* Badges in Hero Info */
.riew-wildlife-single__hero-info .riew-wildlife-single__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.riew-wildlife-single__badges .riew-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.riew-wildlife-single__badges .riew-badge:hover {
    transform: translateY(-2px);
}

.riew-wildlife-single__badges .riew-badge--endangered {
    background: linear-gradient(135deg, #d32f2f 0%, #ef5350 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.riew-wildlife-single__badges .riew-badge--dangerous {
    background: var(--riew-gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(247, 148, 30, 0.3);
}

.riew-wildlife-single__badges .riew-badge--invasive {
    background: linear-gradient(135deg, #8e24aa 0%, #ab47bc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(142, 36, 170, 0.3);
}

/* Conservation status badges */
.riew-wildlife-single__badges .riew-conservation-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.riew-wildlife-single__badges .riew-conservation-badge:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments for hero section */
@media (max-width: 768px) {
    .riew-wildlife-single__hero {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.75rem;
        margin-bottom: 0;
    }
    
    .riew-wildlife-single__hero-image {
        max-height: 250px;
        border-radius: 8px;
    }
    
    .riew-wildlife-single__hero-info {
        padding: 0.75rem;
    }
    
    .riew-wildlife-single__hero-info .riew-wildlife-single__title {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }
    
    .riew-wildlife-single__hero-info .riew-wildlife-single__scientific {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Fix Quick Facts on mobile - ensure it doesn't overlap */
    .riew-wildlife-single__hero-right {
        margin-top: 0.75rem;
        order: 3; /* Place after image and info */
    }
    
    .riew-wildlife-single__hero-right .riew-quick-facts {
        position: relative;
        z-index: 1;
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* Ensure tabs container is below quick facts */
    .riew-wildlife-single__body {
        position: relative;
        z-index: 2;
        margin-top: 0.5rem;
    }
    
    /* Fix fact items for mobile */
    .riew-fact-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .riew-fact-label {
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .riew-fact-value {
        font-size: 0.85rem;
    }
}

/* Body Layout - Removed sidebar since Quick Facts moved to hero */
.riew-wildlife-single__body {
    display: block;
    margin-top: 3rem;
    position: relative;
    clear: both; /* Ensure it clears any floated elements */
}

/* Mobile specific fix to prevent overlap */
@media (max-width: 768px) {
    .riew-wildlife-single__body {
        margin-top: 0;
        padding-top: 0.5rem;
        border-top: 1px solid var(--riew-border);
    }
    
    .riew-wildlife-single__body .riew-tabs {
        margin-top: 0;
    }
}

/* Quick Facts in Hero */
.riew-wildlife-single__hero-right .riew-quick-facts {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 5px 15px rgba(42,84,52,0.1);
    border: 1px solid var(--riew-border);
}

.riew-quick-facts__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid;
    border-image: var(--riew-gradient-success);
    border-image-slice: 1;
    color: var(--riew-dark-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.riew-quick-facts__title::before {
    content: "📊";
    font-size: 1.2rem;
}

.riew-fact-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #F0F4F0;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 3px solid var(--riew-dark-green);
}

.riew-fact-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.1);
}

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

.riew-fact-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--riew-dark-green);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.riew-fact-value {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Download Button - Enhanced */
.riew-fact-download {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed rgba(46, 125, 50, 0.2);
}

.riew-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 14px 20px;
    background: var(--riew-gradient-accent);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    position: relative;
    overflow: hidden;
}

.riew-download-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(240,244,240,0.2);
    transition: left 0.5s ease;
}

.riew-download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 148, 30, 0.4);
}

.riew-download-button:hover::before {
    left: 100%;
}

.riew-download-button svg {
    fill: currentColor;
}

/* Content Area */
.riew-wildlife-single__content {
    min-width: 0; /* Prevent overflow */
}

/* Tabs Layout - Enhanced */
/* Tabs Container - Side by Side Layout */
.riew-tabs {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: #F0F4F0;
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
}

.riew-tabs__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.riew-tab-button {
    padding: 14px 20px;
    background: white;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-align: left;
    width: 100%;
}

.riew-tab-button:hover {
    color: var(--riew-dark-green);
    background: rgba(42, 84, 52, 0.05);
}

.riew-tab-button.active {
    color: white !important;
    background: var(--riew-gradient-primary);
    box-shadow: 0 4px 15px rgba(42, 84, 52, 0.3);
}

.riew-tabs__content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    min-height: 400px;
}

.riew-tab-pane {
    display: none;
    animation: fadeInUp 0.4s;
}

.riew-tab-pane.active {
    display: block;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accordion Layout */
.riew-accordion-item {
    border: 1px solid var(--riew-border);
    border-radius: var(--riew-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.riew-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #f8f8f8;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.riew-accordion-header:hover {
    background: #f0f0f0;
}

.riew-accordion-header.active {
    background: var(--riew-primary);
    color: white;
}

.riew-accordion-icon {
    transition: transform 0.3s;
    fill: currentColor;
}

.riew-accordion-header.active .riew-accordion-icon {
    transform: rotate(180deg);
}

.riew-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.riew-accordion-content.active {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.riew-accordion-inner {
    padding: 1.5rem;
}

/* Sections Layout - Enhanced */
.riew-section {
    margin-bottom: 3.5rem;
    padding: 2.5rem;
    background: #F0F4F0;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.riew-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--riew-gradient-accent);
}

.riew-section:last-child {
    margin-bottom: 0;
}

.riew-section-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--riew-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(247, 148, 30, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.riew-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(247,148,30,0.2) 0%, transparent 100%);
}

.riew-subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 1rem;
}

/* Section Content Styles - Enhanced */
.riew-field-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #F0F4F0;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.riew-field-group:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.riew-field-label {
    font-weight: 700;
    color: var(--riew-dark-green);
    margin-bottom: 1rem;
    display: block;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    position: relative;
    padding-left: 25px;
}

.riew-field-label::before {
    content: '🌿';
    position: absolute;
    left: 0;
    top: 0;
}

.riew-field-value {
    color: #2c3e50;
    line-height: 1.8;
    font-size: 1.05rem;
}

.riew-classification-hierarchy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: var(--riew-radius);
    font-family: monospace;
}

.riew-classification-level {
    padding: 4px 8px;
    background: #F0F4F0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.riew-classification-arrow {
    color: var(--riew-primary);
    font-weight: bold;
}

/* Section Titles */
.riew-section-title {
    color: var(--riew-dark-green);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.riew-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--riew-gradient-accent);
    border-radius: 2px;
}

/* Gallery - Enhanced */
.riew-gallery {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #F0F4F0;
    border-radius: 15px;
    border: 1px solid #e0e6df;
}

.riew-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.riew-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.riew-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.riew-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.riew-gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }

.riew-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
    box-shadow: 0 4px 12px rgba(42,84,52,0.15);
    transition: all 0.3s ease;
    background: white;
    border: 2px solid transparent;
}

.riew-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42,84,52,0.25);
    border-color: var(--riew-dark-green);
}

.riew-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.riew-gallery-item a::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    background: var(--riew-dark-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(42,84,52,0.3);
}

.riew-gallery-item:hover a::after {
    transform: translate(-50%, -50%) scale(1);
}

.riew-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.riew-gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.95);
}

/* Media Sections */
.riew-media-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f8f8;
    border-radius: var(--riew-radius);
}

.riew-audio-player {
    width: 100%;
    margin-top: 1rem;
}

.riew-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--riew-radius);
    margin-top: 1rem;
}

.riew-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.riew-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: var(--riew-gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(42,84,52,0.2);
}

.riew-video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(42,84,52,0.3);
    color: white;
}

/* Observations */
.riew-observations-list {
    display: grid;
    gap: 1rem;
}

.riew-observation-item {
    padding: 1rem;
    background: #f8f8f8;
    border-radius: var(--riew-radius);
    border-left: 4px solid var(--riew-primary);
}

.riew-observation-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.riew-observation-date {
    font-weight: 600;
}

.riew-observation-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.riew-observation-location svg {
    fill: currentColor;
}

.riew-observation-observer {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.riew-observation-notes {
    color: #333;
    line-height: 1.6;
}

/* Info Cards - Enhanced */
.riew-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.riew-info-card {
    padding: 1.5rem;
    background: #F0F4F0;
    border-radius: 15px;
    border-left: 4px solid;
    border-image: var(--riew-gradient-success);
    border-image-slice: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.riew-info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(46,125,50,0.05) 0%, transparent 70%);
    transition: all 0.5s ease;
}

.riew-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.riew-info-card:hover::before {
    top: -30%;
    right: -30%;
}

.riew-info-card__title {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--riew-dark-green);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.riew-info-card__title::before {
    content: '📌';
    font-size: 1rem;
}

.riew-info-card__content {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.riew-info-card--warning {
    border-image: var(--riew-gradient-warning);
    border-image-slice: 1;
}

.riew-info-card--warning .riew-info-card__title {
    color: var(--riew-sunset-orange);
}

/* Empty State - Enhanced */
.riew-empty-state {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: 20px;
    color: #999;
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    border: 2px dashed rgba(0,0,0,0.1);
}

.riew-empty-state::before {
    content: '🔍';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Editor Notice */
.riew-editor-notice {
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--riew-radius);
    color: #856404;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .riew-wildlife-single__body.riew-has-sidebar,
    .riew-wildlife-single__body.riew-sidebar-left {
        grid-template-columns: 1fr;
    }
    
    .riew-quick-facts {
        position: static;
    }
}

@media (max-width: 768px) {
    .riew-wildlife-single__hero {
        height: auto;
        min-height: 200px;
    }
    
    .riew-wildlife-single__title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .riew-gallery-cols-3,
    .riew-gallery-cols-4,
    .riew-gallery-cols-5,
    .riew-gallery-cols-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .riew-info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Hide regular tabs on mobile, dropdown will be shown via JS */
    .riew-tabs__nav {
        display: none;
    }
    
    /* Ensure dropdown container space */
    .riew-mobile-tab-dropdown-container {
        display: block;
    }
    
    /* Tighten up tabs padding */
    .riew-tabs {
        padding: 0.75rem;
    }
    
    .riew-tabs__content {
        padding: 1rem;
    }
    
    /* Reduce gallery padding */
    .riew-gallery {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    /* Reduce conservation badge spacing */
    .riew-wildlife-single__status {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Custom Mobile Dropdown Styles */
.riew-mobile-tab-dropdown-container {
    display: none; /* Hidden by default, shown via JS on mobile */
    margin-bottom: 0.75rem;
    position: relative;
}

.riew-custom-dropdown {
    position: relative;
    width: 100%;
    user-select: none;
}

.riew-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--riew-dark-green) 0%, #3a6b47 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(42,84,52,0.15);
    border: 2px solid transparent;
}

.riew-dropdown-selected:hover {
    background: linear-gradient(135deg, #3a6b47 0%, var(--riew-dark-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42,84,52,0.25);
}

.riew-custom-dropdown.open .riew-dropdown-selected {
    border-radius: 12px 12px 0 0;
    border-color: var(--riew-accent-orange);
    box-shadow: 0 6px 20px rgba(247,148,30,0.25);
}

.riew-dropdown-text {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.riew-dropdown-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.riew-custom-dropdown.open .riew-dropdown-arrow {
    transform: rotate(180deg);
}

.riew-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--riew-accent-orange);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(42,84,52,0.15);
}

.riew-custom-dropdown.open .riew-dropdown-options {
    max-height: 300px;
    overflow-y: auto;
}

.riew-dropdown-option {
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--riew-dark-green);
    font-weight: 500;
    border-left: 3px solid transparent;
}

.riew-dropdown-option:hover {
    background: #F0F4F0;
    padding-left: 1.25rem;
    border-left-color: var(--riew-accent-orange);
}

.riew-dropdown-option.active {
    background: linear-gradient(90deg, rgba(247,148,30,0.1) 0%, transparent 100%);
    color: var(--riew-dark-green);
    font-weight: 600;
    border-left-color: var(--riew-accent-orange);
}

.riew-dropdown-option:last-child {
    border-radius: 0 0 10px 10px;
}

/* Custom scrollbar for dropdown options */
.riew-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.riew-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.riew-dropdown-options::-webkit-scrollbar-thumb {
    background: var(--riew-dark-green);
    border-radius: 10px;
}

.riew-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #3a6b47;
}

@media (max-width: 480px) {
    .riew-tabs__nav {
        flex-direction: column;
        gap: 0.25rem;
        display: none; /* Will be hidden on mobile via JS */
    }
    
    .riew-tab-button {
        width: 100%;
        text-align: left;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Ensure content sections don't overlap on small screens */
    .riew-tabs {
        padding: 0.5rem;
    }
    
    .riew-tabs__content {
        padding: 0.75rem;
        margin-top: 0.5rem;
    }
    
    /* Fix quick facts title on mobile */
    .riew-quick-facts__title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Tighten up section spacing */
    .riew-section-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .riew-section-content {
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .riew-section-content p {
        margin-bottom: 0.5rem;
    }
}

/* Additional Responsive Rules for New Layout */
@media (max-width: 991px) {
    .riew-tabs {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .riew-tabs__nav {
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .riew-tab-button {
        width: auto;
        flex: 1 1 auto;
        min-width: 120px;
        margin: 0;
    }
    
    .riew-tabs__content {
        padding: 1.5rem;
    }
}
