/* Guide-specific styles */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-secondary-alpha: rgba(248, 249, 250, 0.5);
    --text-primary: #212529;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --accent-primary-alpha: rgba(116, 172, 223, 0.1);
    --accent-secondary-alpha: rgba(114, 47, 55, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-secondary-alpha: rgba(45, 45, 45, 0.5);
    --text-primary: #f8f9fa;
    --text-muted: #adb5bd;
    --border-color: #495057;
    --accent-primary-alpha: rgba(143, 165, 196, 0.1);
    --accent-secondary-alpha: rgba(167, 112, 119, 0.1);
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
/* Navigation Menu Toggle */
/* Menu toggle button */
.nav-menu-toggle {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 1002;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    padding: 0;
}
 
[data-theme="dark"] .nav-menu-toggle {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
 
.nav-menu-toggle:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
 
.nav-menu-toggle.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
 
/* Menu icon animation */
.menu-icon {
    width: 20px;
    height: 20px;
}
 
.menu-icon path {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    stroke: var(--text-primary);
}
 
[data-theme="dark"] .menu-icon path {
    stroke: var(--text-primary);
}
 
.nav-menu-toggle.active .menu-icon path {
    stroke: white !important;
}
 
.nav-menu-toggle.active .menu-line-top {
    transform: translateY(4px) translateX(-4px) rotate(45deg);
}
 
.nav-menu-toggle.active .menu-line-middle {
    opacity: 0;
    transform: scaleX(0);
}
 
.nav-menu-toggle.active .menu-line-bottom {
    transform: translateY(-4px) translateX(-4px) rotate(-45deg);
}
 
/* Navigation menu overlay */
.nav-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
 
.nav-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
 
/* Navigation menu panel */
.nav-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-elevated);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
 
[data-theme="dark"] .nav-menu {
    background: var(--bg-secondary);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}
 
.nav-menu.active {
    transform: translateX(-400px);
}
 
/* Menu header */
.nav-menu-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--bg-secondary);
}
 
[data-theme="dark"] .nav-menu-header {
    background: var(--bg-elevated);
}
 
.nav-menu-header h3 {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
 
/* Menu sections with custom scrollbar */
.nav-menu-sections {
    flex: 1;
    padding: var(--space-sm) 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}
 
.nav-menu-sections::-webkit-scrollbar {
    width: 4px;
}
 
.nav-menu-sections::-webkit-scrollbar-track {
    background: transparent;
}
 
.nav-menu-sections::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}
 
.nav-menu-sections::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-primary);
}
 
[data-theme="dark"] .nav-menu-sections {
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
 
[data-theme="dark"] .nav-menu-sections::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
}
 
/* Menu items */
.nav-menu-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
    margin: 2px 0;
}
 
.nav-menu-item:hover {
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.08) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
    padding-left: calc(var(--space-xl) + 4px);
}
 
[data-theme="dark"] .nav-menu-item:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08) 0%, transparent 100%);
}
 
.nav-menu-item.active {
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.12) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
}
 
[data-theme="dark"] .nav-menu-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, transparent 100%);
}
 
.nav-menu-number {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-right: var(--space-lg);
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    opacity: 0.7;
    transition: all 0.2s ease;
}
 
.nav-menu-item:hover .nav-menu-number,
.nav-menu-item.active .nav-menu-number {
    opacity: 1;
    color: var(--accent-primary);
}
 
.nav-menu-text {
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}
 
.nav-menu-item.active .nav-menu-text {
    font-weight: 500;
}
 
/* Menu footer */
.nav-menu-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--bg-secondary);
}
 
[data-theme="dark"] .nav-menu-footer {
    background: var(--bg-elevated);
}
 
.theme-toggle-menu {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
 
.theme-toggle-menu:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: white;
}
 
.theme-toggle-menu:hover .theme-icon {
    fill: white;
}
 
.theme-toggle-menu .theme-icon {
    width: 18px;
    height: 18px;
    fill: var(--text-primary);
    transition: all 0.3s ease;
}
 
.theme-toggle-text {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: color 0.3s ease;
}
 
.theme-toggle-menu:hover .theme-toggle-text {
    color: white;
}
 
/* Menu animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
 
.nav-menu.active .nav-menu-item {
    animation: slideInRight 0.3s ease forwards;
}
 
/* .nav-menu.active .nav-menu-item:nth-child(1) { animation-delay: 0.05s; }
.nav-menu.active .nav-menu-item:nth-child(2) { animation-delay: 0.1s; }
.nav-menu.active .nav-menu-item:nth-child(3) { animation-delay: 0.15s; }
.nav-menu.active .nav-menu-item:nth-child(4) { animation-delay: 0.2s; }
.nav-menu.active .nav-menu-item:nth-child(5) { animation-delay: 0.25s; }
.nav-menu.active .nav-menu-item:nth-child(6) { animation-delay: 0.3s; }
.nav-menu.active .nav-menu-item:nth-child(7) { animation-delay: 0.35s; }
.nav-menu.active .nav-menu-item:nth-child(8) { animation-delay: 0.4s; }
.nav-menu.active .nav-menu-item:nth-child(9) { animation-delay: 0.45s; }
.nav-menu.active .nav-menu-item:nth-child(10) { animation-delay: 0.5s; } */


/* Header */
.guide-header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-top: 3rem;
}

.back-button {
    position: fixed;
    top: var(--space-xl);
    left: var(--space-xl);
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    padding: 0;
    cursor: pointer;
}
 
[data-theme="dark"] .back-button {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
 
.back-button:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
 
.back-arrow {
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    display: block;
    margin: 0;
    padding: 0;
    transform: translateY(-2px);
}

.guide-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sections */
.guide-section {
    margin-bottom: 4rem;
}

.guide-section h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    position: relative;
}

.guide-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
}

.region-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.overview-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.overview-header {
    position: relative;
    padding-left: 0;
    margin-bottom: 1rem;
}

.overview-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
}

.overview-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding-left: 12px;
}

.overview-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.overview-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--border-color);
}

.overview-item:last-child {
    border-bottom: none;
}

.overview-item strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.overview-item span {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: right;
}

.overview-item.highlight {
    background: var(--accent-primary-alpha);
    padding: 0.5rem;
    border-radius: 6px;
    margin: 0 -0.5rem;
    border: none;
}

/* Evolution Timeline */
.evolution-timeline {
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }

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

.timeline-year {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: right;
    width: 2.5rem;
    letter-spacing: -0.02em;
}

.timeline-content {
    padding-left: 1rem;
    border-left: 2px solid var(--accent-primary-alpha);
    padding-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Stats Showcase */
.stats-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Increased from 140px */
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    min-height: 120px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    z-index: -1;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--bg-secondary), var(--accent-primary-alpha));
    border-color: var(--accent-primary);
}

.stat-number {
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.2; /* Increased line height */
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    word-wrap: break-word; /* Allow text to wrap */
    overflow-wrap: break-word; /* Modern property for text wrapping */
    hyphens: auto; /* Allow hyphenation if needed */
    min-height: 2rem; /* Ensure consistent height */
}

.stat-card.highlight .stat-number {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Region Cards */
.region-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.region-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.region-card.compact {
    padding: 1.5rem;
}

.region-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.region-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.region-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 100px;
    margin-left: 0.5rem;
}

.region-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.region-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.region-stats .stat-item {
    text-align: center;
    padding: 0.5rem;
}

.region-stats .stat-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.region-stats .stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.region-details {
    display: grid;
    gap: 2rem;
}

.detail-section {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.detail-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-item {
    padding: 0.5rem 0;
}

.detail-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.producer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.producer-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.producer-item:hover {
    transform: translateX(4px);
}

.producer-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.producer-item span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.region-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.highlight-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--border-color);
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-label {
    font-weight: 600;
    color: var(--text-primary);
    flex: 0 0 120px;
    font-size: 0.875rem;
}

.highlight-item span:last-child {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Wine Showcase */
.wines-showcase {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.showcase-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-primary-alpha);
}

.wine-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.wine-card {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.wine-card:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.wine-type {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.wine-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.wine-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

/* Producer Cards */
.producers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.producer-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.producer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.producer-card:hover::before {
    opacity: 1;
}

.producer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--accent-primary-alpha);
}

.producer-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.producer-title h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.producer-type {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    opacity: 0.8;
}

.producer-details {
    margin: 1.5rem 0;
    display: grid;
    gap: 0.75rem;
}

.producer-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--border-color);
}

.producer-stat:last-child {
    border-bottom: none;
}

.producer-stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.producer-stat .stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.producer-info {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.producer-info p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.producer-info p:last-child {
    margin-bottom: 0;
}

.producer-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Grape Cards */
.grape-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.grape-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.grape-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.grape-card p {
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.grape-card ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.grape-card li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Altitude Spectrum */
.altitude-spectrum {
    margin-top: 1rem;
}

.spectrum-tier {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.spectrum-tier:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spectrum-tier.highlight {
    background: linear-gradient(135deg, var(--accent-primary-alpha), var(--bg-secondary));
    border-left-color: var(--accent-secondary);
}

.spectrum-elevation {
    flex: 0 0 100px;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.875rem;
}

.spectrum-style {
    flex: 1;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.spectrum-style strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.spectrum-style span {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Pairing Section */
.pairing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pairing-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.pairing-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-primary-alpha);
}

.pairing-grid {
    display: grid;
    gap: 0.75rem;
}

.pairing-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pairing-item:hover {
    transform: translateX(4px);
}

.dish-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.wine-rec {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: right;
}

/* Climate Grid */
.climate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.climate-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.climate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
}

.climate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.climate-card h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.climate-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.climate-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Investment Wines Section */
/* Investment Wines Section */
.investment-wines {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.investment-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-primary-alpha);
}

.investment-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.investment-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.investment-grid {
    display: grid;
    gap: 1rem;
}

.investment-wine {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.investment-wine:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.investment-rank {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.investment-details {
    flex: 1;
}

.investment-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.investment-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.investment-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

/* Top 10 Wines List */
.top-wines-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.top-wines-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-primary-alpha);
}

.top-wines-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.top-wines-list {
    display: grid;
    gap: 0.75rem;
}

.top-wine-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.top-wine-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.top-wine-item:hover::before {
    transform: scaleY(1);
}

.top-wine-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wine-number {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.top-wine-item:nth-child(1) .wine-number,
.top-wine-item:nth-child(2) .wine-number,
.top-wine-item:nth-child(3) .wine-number {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.wine-content {
    flex: 1;
}

.wine-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.wine-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Tables */
.guide-table-container {
    position: relative;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.guide-table thead {
    background: var(--bg-secondary);
}

.guide-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

.guide-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.guide-table tbody tr {
    transition: background-color 0.3s ease;
}

.guide-table tbody tr:hover {
    background: var(--bg-secondary-alpha);
}

.price {
    color: var(--accent-secondary);
    font-weight: 600;
}

.price-range {
    font-weight: 600;
    color: var(--accent-secondary);
    white-space: nowrap;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile Table Improvements */
@media (max-width: 768px) {
    .guide-table-container.is-scrollable {
        position: relative;
    }
    
    .guide-table-container.is-scrollable::before {
        content: '›';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        color: var(--accent-primary);
        opacity: 0.5;
        z-index: 2;
        pointer-events: none;
        animation: slideHint 2s ease-in-out infinite;
    }
    
    @keyframes slideHint {
        0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.3; }
        50% { transform: translateY(-50%) translateX(3px); opacity: 0.8; }
    }
    
    .guide-table {
        min-width: 500px;
        font-size: 0.875rem;
    }
    
    .guide-table th,
    .guide-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .guide-table tbody tr:nth-child(even) {
        background-color: var(--bg-secondary-alpha);
    }
        /* Apply to tables with sticky-column class */
        .guide-table.sticky-column {
            position: relative;
        }
        
        .guide-table.sticky-column thead th:first-child,
        .guide-table.sticky-column tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--bg-secondary);
        font-weight: 600;
        min-width: 120px; /* Ensure minimum width */
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        }
        
        /* Dark mode support */
        [data-theme="dark"] .guide-table.sticky-column thead th:first-child,
        [data-theme="dark"] .guide-table.sticky-column tbody td:first-child {
            background: var(--bg-primary);
            box-shadow: 2px 0 4px rgba(0,0,0,0.3);
        }
        
        /* Add border to separate sticky column */
        .guide-table.sticky-column thead th:first-child::after,
        .guide-table.sticky-column tbody td:first-child::after {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 1px;
            background: var(--border-color);
        }
        
        /* Ensure proper stacking for header */
        .guide-table.sticky-column thead th:first-child {
            z-index: 3;
        }
        .guide-table.sticky-column tbody td:first-child {
            background: linear-gradient(90deg, 
                var(--bg-secondary) 0%, 
                var(--bg-secondary) calc(100% - 3px), 
                rgba(0,0,0,0.05) 100%
            );
        }
        .stats-showcase {
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        }
        
        .stat-number {
            font-size: 1.25rem; /* Even smaller on mobile */
        }
}

@media (max-width: 480px) {
    .guide-table.mobile-cards {
        display: none !important;
    }
    
    .mobile-table-cards {
        display: block;
    }
    
    .mobile-table-card {
        background: var(--bg-secondary);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
    }
    
    .mobile-table-card-header {
        font-weight: 600;
        color: var(--accent-primary);
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 0.25rem 0;
        font-size: 0.875rem;
    }
    
    .mobile-table-card-label {
        color: var(--text-muted);
        flex: 0 0 40%;
    }
    
    .mobile-table-card-value {
        flex: 0 0 60%;
        text-align: right;
        font-weight: 500;
    }
    
    .mobile-table-card-value .price {
        color: var(--accent-secondary);
        font-weight: 600;
    }
}

@media (min-width: 481px) {
    .mobile-table-cards {
        display: none !important;
    }
    
    .guide-table-container.has-mobile-cards {
        display: block !important;
    }
    
    .guide-table.mobile-cards {
        display: table !important;
    }
}

/* Other Elements */
.wine-details {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.wine-details p,
.wine-details li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.wine-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .guide-header h1 {
        font-size: 2rem;
    }
    
    .guide-subtitle {
        font-size: 1rem;
    }
    
    .guide-section h2 {
        font-size: 1.75rem;
    }
    
    .overview-grid,
    .producers-grid {
        grid-template-columns: 1fr;
    }
    
    .region-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .climate-value {
        font-size: 1.5rem;
    }
    
    .spectrum-tier {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .spectrum-elevation {
        margin-bottom: 0.5rem;
    }
    
    .spectrum-style {
        padding-left: 0;
        padding-top: 0.5rem;
        border-left: none;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }
    
    .investment-wine {
        grid-template-columns: 1fr;
    }
    
    .top-wine-item {
        grid-template-columns: auto 1fr;
    }
    
    .top-wine-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .wine-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}