/* ========================================
   HERO SECTION
   ======================================== */
.tepetl-hero-section {
    position: relative;
    overflow: hidden;
}

.tepetl-hero-container {
    position: relative;
}

.tepetl-hero-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 500px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    background-color: var(--tepetl-bg-darker);
}

/* Parallax ONLY on hero image */
.tepetl-hero-image img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
}

/* Hero title: white text, aligned to 1000px */
/* Desktop version - overlays image */
.tepetl-hero-title-desktop {
    position: absolute;
    bottom: var(--space-2xl);
    left: 0;
    right: 0;
    padding: 0 var(--space-lg);
}

.tepetl-hero-title-desktop .tepetl-hero-title-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
}

.tepetl-hero-title {
    font-family: var(--font-display-hero);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: white;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Mobile version - below image, separate block */
.tepetl-hero-title-mobile {
    display: none;
    background: var(--tepetl-bg-darker);
    padding: var(--space-lg);
}

.tepetl-hero-title-mobile .tepetl-hero-title {
    color: white;
    text-shadow: none;
    font-size: clamp(1.25rem, 5vw, 1.5rem);
}

/* Mobile: Show mobile title, hide desktop title */
@media (max-width: 768px) {
    .tepetl-hero-title-desktop {
        display: none;
    }
    .tepetl-hero-title-mobile {
        display: block;
    }
}

/* ========================================
   BREADCRUMB BAR - NO PARALLAX, NO TRANSFORM
   Only class toggle for hide/show
   ======================================== */
.tepetl-breadcrumb-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--tepetl-bg-darker);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--space-lg);
    /* Slide animation - translate Y for slide in/out */
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}

/* Hidden state - slides UP out of view */
.tepetl-breadcrumb-bar.breadcrumb-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

.tepetl-breadcrumb-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap; /* Single row */
    gap: var(--space-sm) var(--space-xl);
    align-items: center;
    overflow-x: auto; /* Allow scroll if needed */
}

.tepetl-breadcrumb-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.tepetl-breadcrumb-icon {
    flex-shrink: 0;
    font-size: 0.85rem;
}

.tepetl-breadcrumb-row a {
    color: var(--tepetl-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.tepetl-breadcrumb-row a:hover {
    color: var(--tepetl-primary);
}

.tepetl-breadcrumb-sep {
    color: var(--tepetl-text-light);
    opacity: 0.5;
}

.tepetl-breadcrumb-land {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

@media (max-width: 768px) {
    .tepetl-breadcrumb-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
}

/* ========================================
   STATS SECTION (Section 3) - Auto-Height Design
   Header grows to accommodate difficulty breakdown
   ======================================== */
.tepetl-stats-section {
    position: relative;
    overflow: visible;
    background: var(--tepetl-bg-stats-header);
    padding-bottom: 0;
    margin-top: 0;
}

.tepetl-stats-header {
    position: relative;
    max-width: var(--tepetl-content-max);
    margin: 0 auto;
    min-height: 340px;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    overflow: visible;
    display: block; /* CRITICAL: restore vertical stacking */
}

.tepetl-stats-inner {
    position: relative;
    width: 100%;
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Side by side: grid | badge */
    flex-wrap: nowrap; /* DO NOT wrap - keep grid and badge on same row */
    gap: var(--space-lg);
    align-items: center; /* Vertical center */
    justify-content: space-between;
    min-height: 200px;
    z-index: 10; /* Above elevation profile */
}

.tepetl-stats-inner--with-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    min-height: 340px;
}

.tepetl-stats-inner--with-rail .tepetl-stats-grid {
    flex: 1;
    min-width: 0;
}


/* Stats Grid - flex child, centered content */
.tepetl-stats-grid {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg) var(--space-md);
    align-content: center;
}

/* Individual Stat Item with Icon */
.tepetl-stat {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-sm);
}

/* ICONS - Restored! */
.tepetl-stat-icon,
.tepetl-stat-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 4px;
}

.tepetl-stat-icon img,
.tepetl-stat-icon-svg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tepetl-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Label: Outfit font, 10px, SemiBold 600 */
.tepetl-stat-label {
    font-family: var(--font-stat-label);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tepetl-text-muted);
    order: -1;
    line-height: 1.3;
    margin-bottom: 6px; /* INCREASED spacing between label and value */
}

/* Value: Boldonse font - REDUCED SIZE */
.tepetl-stat-value {
    font-family: var(--font-stat-value);
    font-size: 26px !important;
    font-weight: 400;
    color: var(--tepetl-text-dark);
    line-height: 1;
    white-space: nowrap;
    margin-bottom: 3px;
}

.tepetl-stat-primary {
    white-space: nowrap;
}

/* Secondary: Now uses same font as value (Boldonse) */
.tepetl-stat-secondary {
    font-family: var(--font-stat-value);
    font-size: 13px; /* 14px → 13px */
    font-weight: 400;
    color: var(--tepetl-text-muted);
    margin-top: 0;
}

/* ----------------------------------------
   DIFFICULTY STAT - Hover Popup (CSS-only)
   Shows breakdown on hover/tap
   ---------------------------------------- */
.tepetl-stat-difficulty {
    position: relative;
    cursor: pointer;
}

.tepetl-stat-difficulty .tepetl-stat-value {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.tepetl-stat-difficulty .tepetl-difficulty-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: var(--tepetl-text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    padding: 0;
}

.tepetl-stat-difficulty:hover .tepetl-difficulty-trigger,
.tepetl-stat-difficulty:focus-within .tepetl-difficulty-trigger {
    background: var(--tepetl-primary);
}

/* ========================================
   DIFFICULTY BREAKDOWN - Animated Reveal
   Full width below stats row, PUSHES PAGE DOWN
   ======================================== */

/* Wrapper - sits below stats-inner, full width */
.tepetl-difficulty-wrapper {
    position: relative;
    overflow: visible;
    z-index: 2;
    height: 0;
    opacity: 0;
    transition: height 0.4s ease, opacity 0.3s ease;
}

/* The breakdown box itself */
.tepetl-difficulty-breakdown {
    width: 776px; /* Match stats grid width */
    max-width: 100%;
    height: 77px;
    background: rgba(229, 228, 226, 0.69); /* 69% transparent */
    border: none;
    border-radius: 0;
    padding: var(--space-sm) var(--space-lg);
    box-shadow: none;
    display: flex;
    align-items: center;
}

/* Ratings Info Link - OUTSIDE the box, right-aligned */
.tepetl-difficulty-footer {
    width: 776px;
    max-width: 100%;
    padding-top: var(--space-xs);
    text-align: right;
}

.tepetl-difficulty-footer a {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tepetl-primary);
    text-decoration: none;
}


/* Desktop panel offset - visual overlap */
#difficulty-breakdown,
.tepetl-difficulty-footer {
    position: relative;
    top: -44px;
    z-index: 2;
}

@media (min-width: 1024px) {
    .tepetl-difficulty-wrapper {
        width: 100%;
        max-width: var(--tepetl-content-main);
        margin-left: auto;
        margin-right: auto;
    }

    #difficulty-breakdown,
    .tepetl-difficulty-footer {
        width: 769px;
        max-width: 769px;
        margin-left: 0;
        margin-right: auto;
    }
}


/* Desktop rail: align difficulty-grid content to stats-grid columns */
@media (min-width: 1024px) {
    #difficulty-breakdown,
    .tepetl-difficulty-footer {
        left: -28px;
    }
    
    .tepetl-difficulty-wrapper--minimal #difficulty-breakdown,
    .tepetl-difficulty-wrapper--minimal .tepetl-difficulty-footer {
        left: 0;
    }
}

/* Bridge wide / 4-column: align difficulty-grid content to stats-grid columns */
@media (min-width: 768px) and (max-width: 1023px) {
    #difficulty-breakdown,
    .tepetl-difficulty-footer {
        left: -28px;
    }
    
    .tepetl-difficulty-wrapper--minimal #difficulty-breakdown,
    .tepetl-difficulty-wrapper--minimal .tepetl-difficulty-footer {
        left: 0;
    }
}



.tepetl-difficulty-footer a:hover {
    text-decoration: underline;
}

/* Mobile: tap to toggle */
@media (hover: none) and (pointer: coarse) {
    .tepetl-stat-difficulty {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Breakdown Grid - Bikepacking style: horizontal with number on left */
.tepetl-difficulty-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    width: 100%;
    height: 100%;
}

.tepetl-difficulty-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
}

/* Colored number circle */
.tepetl-difficulty-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    font-family: var(--font-stat-value);
    font-size: 1.1rem;
    font-weight: 400;
    color: white;
    background: var(--tepetl-primary);
    border-radius: 50%;
}

/* Dynamic colors based on number value */
.tepetl-difficulty-number[data-value="1"],
.tepetl-difficulty-number[data-value="2"] { background: var(--difficulty-1-2); color: #1a1a1a; }
.tepetl-difficulty-number[data-value="3"] { background: var(--difficulty-3); color: white; }
.tepetl-difficulty-number[data-value="4"],
.tepetl-difficulty-number[data-value="5"] { background: var(--difficulty-4-5); color: white; }
.tepetl-difficulty-number[data-value="6"] { background: var(--difficulty-6); color: #1a1a1a; }
.tepetl-difficulty-number[data-value="7"] { background: var(--difficulty-7); color: white; }
.tepetl-difficulty-number[data-value="8"] { background: var(--difficulty-8); color: white; }
.tepetl-difficulty-number[data-value="9"] { background: var(--difficulty-9); color: white; }
.tepetl-difficulty-number[data-value="10"] { background: var(--difficulty-10); color: white; }

.tepetl-difficulty-item-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.tepetl-difficulty-item-label {
    font-family: var(--font-stat-label);
    font-size: 0.55rem; /* Smaller to prevent wrap */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--tepetl-text-muted);
    line-height: 1.2;
    white-space: nowrap;
}

/* Value text color matches number circle */
.tepetl-difficulty-item-value {
    font-family: var(--font-stat-label);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--tepetl-primary);
    margin-top: 1px;
    white-space: nowrap;
}

.tepetl-difficulty-item[data-value="1"] .tepetl-difficulty-item-value,
.tepetl-difficulty-item[data-value="2"] .tepetl-difficulty-item-value { color: #228B22; }
.tepetl-difficulty-item[data-value="3"] .tepetl-difficulty-item-value { color: var(--difficulty-3); }
.tepetl-difficulty-item[data-value="4"] .tepetl-difficulty-item-value,
.tepetl-difficulty-item[data-value="5"] .tepetl-difficulty-item-value { color: var(--difficulty-4-5); }
.tepetl-difficulty-item[data-value="6"] .tepetl-difficulty-item-value { color: #B8860B; }
.tepetl-difficulty-item[data-value="7"] .tepetl-difficulty-item-value { color: var(--difficulty-7); }
.tepetl-difficulty-item[data-value="8"] .tepetl-difficulty-item-value { color: var(--difficulty-8); }
.tepetl-difficulty-item[data-value="9"] .tepetl-difficulty-item-value { color: var(--difficulty-9); }
.tepetl-difficulty-item[data-value="10"] .tepetl-difficulty-item-value { color: var(--difficulty-10); }

/* Responsive: Tablet - Contributor badge horizontal */
@media (max-width: 1024px) and (min-width: 769px) {
    .tepetl-stats-inner {
        flex-direction: column;
        align-items: center;
    }
    
    .tepetl-stats-grid {
        width: 100%;
        max-width: 776px;
    }
    
    /* Horizontal contributor badge on tablet */
    .tepetl-contributor-badge-area {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: var(--space-md) 0;
        gap: var(--space-lg);
    }
    
    .tepetl-contributor-badge {
        flex-direction: row;
        width: auto;
        gap: var(--space-md);
        text-align: left;
    }
    
    .tepetl-contributor-badge::before,
    .tepetl-contributor-badge::after {
        display: none;
    }
    
    .tepetl-contributor-badge .tepetl-contributor-photo {
        width: 80px;
        height: 80px;
        margin-top: 0;
    }
    
    .tepetl-contributor-badge .tepetl-contributor-name {
        font-size: 1rem;
    }
}

/* =========================================
   SECTION 12c: ACTION ROW + FORM PANELS
   Phase 2.1 Session 2 - Fluent Forms Integration
   ========================================= */

/* Full-width outer wrapper - dark infinite background beyond 1500px */
.tepetl-section12c-outer {
    width: 100%;
    background: var(--tepetl-bg-infinite); /* #121212 - infinite dark sides */
    margin: 0;
    padding: 0;
}

/* Inner container - light background within 1500px constraint */
.tepetl-section12c-inner {
    max-width: var(--tepetl-content-max); /* 1500px */
    margin: 0 auto;
    background: var(--tepetl-bg-content); /* #faf9f7 - light content area */
    padding-top: 0px; /* removed padding entirely, to get closer to tepetl-map-inner */
}

/* Action Row - Button Container */
.tepetl-map-action-row {
    width: 100%;
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    padding: 0 0 var(--space-md) 0; /* No top padding, small bottom */
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Action Buttons */
.tepetl-map-action {
    font-family: var(--font-stat-label);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.6);
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

/* Hover state - important to override theme link styles */
.tepetl-map-action:hover,
.tepetl-map-action:focus {
    color: #f54f4f !important;
    border-color: #f54f4f !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* Active state */
.tepetl-map-action.active,
.tepetl-map-action.active:hover {
    color: white !important;
    background: #f54f4f !important;
    border-color: #f54f4f !important;
}

/* Download button (link) - always available */
.tepetl-map-action-download {
    /* Inherits base styles */
}

/* Form Reveal Wrapper - follows difficulty-wrapper pattern */
.tepetl-section12-action-wrapper {
    width: 100%;
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    padding-bottom: 10px; /* spacing before Section 13 */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out, padding-bottom 0.4s ease-out;
    position: relative;
}

/* Expanded state - use max-height for variable form content */
.tepetl-section12-action-wrapper.active {
    max-height: 1200px; /* Large enough for typical form */
    opacity: 1;
    padding-bottom: 10px; /* spacing before Section 13 */
}

/* Internal Form Panels */
.tepetl-section12-panel {
    display: none;
    padding: var(--space-lg);
    background: #f0efed; /* Slightly darker than #faf9f7 */
    border-radius: 3px;
    position: relative;
}

/* Show active panel */
.tepetl-section12-panel.active {
    display: block;
}

/* Close button for each form - matches theme button style */
.tepetl-section12-panel-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    border: 2px solid #666;
    border-radius: 3px;
    background: transparent;
    color: #666;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.tepetl-section12-panel-close:hover {
    color: #f54f4f !important;
    border-color: #f54f4f !important;
    background: transparent !important;
}

/* Fluent Forms Success Message Styling */
.tepetl-section12-panel .ff-message-success,
.tepetl-section12-panel .fluentform .ff-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: var(--space-md);
    border-radius: 3px;
    margin: var(--space-md) 0;
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    /* Stats section mobile adjustments */
    .tepetl-stats-header {
        height: auto;
        max-height: none;
        padding-bottom: var(--space-lg);
    }
    
    .tepetl-stats-inner {
        flex-direction: column;
        height: auto;
        align-items: stretch;
    }
    
    .tepetl-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
    }
    
    .tepetl-stat-value {
        font-size: 22px;
    }
    
    /* Difficulty breakdown mobile - controlled by breakpoint */
    .tepetl-difficulty-wrapper {
        width: 100%;
        max-width: 100%;
        height: 0;
        opacity: 0;
        margin-top: 0;
    }
    
    .tepetl-difficulty-wrapper.active {
        height: 180px;
        opacity: 1;
    }
    
    .tepetl-difficulty-breakdown {
        height: auto;
        min-height: 130px;
        padding: var(--space-md);
    }
    
    .tepetl-difficulty-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .tepetl-difficulty-item {
        flex: none;
    }
}

/* ========================================
   ELEVATION PROFILE (Section 4)
   Positioned so BOTTOM aligns with stats-header bottom
   Profile extends UPWARD into the stats section
   ======================================== */
.tepetl-visual-profile-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: var(--tepetl-content-max);
    margin: 0 auto;
    height: 188px; /* +55px from original 133px */
    pointer-events: none;
    background: transparent !important;
    z-index: 1;
    overflow: visible;
}

.tepetl-visual-profile {
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: visible;
}

.tepetl-visual-profile svg {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
}

.tepetl-visual-profile .profile-fill {
    fill: rgba(245, 79, 79, 0.15);
}

.tepetl-visual-profile .profile-line {
    fill: none;
    stroke: #f3262e;
    stroke-width: 1;
}

/* ----------------------------------------
   CONTRIBUTOR BADGE - SECTION MOVED
   See Phase 3.4 section (~line 1785) for active styles
   ---------------------------------------- */

.tepetl-contributor-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 1.5rem;
}

/* ========================================
   QUOTE SECTION - Closer to stats header
   ======================================== */
.tepetl-quote-section {
    position: relative;
    padding: var(--space-lg) var(--space-lg) var(--space-2xl);
    background: var(--tepetl-bg-content);
    z-index: 1;
}

.tepetl-quote-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
}

.tepetl-quote {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tepetl-text-dark);
    line-height: 1.5;
    margin: 0;
    padding-left: var(--space-lg);
    border-left: 3px solid var(--tepetl-primary);
}

/* ========================================
   EDITORIAL CONTENT
   ======================================== */
.tepetl-editorial {
    padding: var(--space-xl) var(--space-lg);
}

.tepetl-editorial-inner {
    max-width: var(--tepetl-body-text);
    margin: 0 auto;
}

.tepetl-editorial-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--tepetl-text-body);
}

.tepetl-editorial-content p {
    margin: 0 0 var(--space-lg) 0;
}

.tepetl-editorial-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: var(--space-2xl) 0 var(--space-md) 0;
}

/* ========================================
   EDITORIAL BOXES
   ======================================== */
.tepetl-editorial-boxes {
    padding: var(--space-2xl) var(--space-lg);
}

.tepetl-editorial-boxes-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
}

.tepetl-editorial-boxes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 768px) {
    .tepetl-editorial-boxes-grid {
        grid-template-columns: 1fr;
    }
}

.tepetl-editorial-box {
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.tepetl-editorial-box-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: 0 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tepetl-editorial-box-content {
    font-size: 0.95rem;
    color: var(--tepetl-text-body);
    line-height: 1.6;
}

.tepetl-editorial-box-content p {
    margin: 0 0 var(--space-sm);
}

.tepetl-editorial-box-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   SAFETY BOX
   ======================================== */
.tepetl-safety-section {
    padding: 0 var(--space-lg) var(--space-2xl);
}

.tepetl-safety-inner {
    max-width: var(--tepetl-body-text);
    margin: 0 auto;
}

.tepetl-safety-box {
    background: #fef3c7;
    border-left: 4px solid var(--tepetl-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-lg);
}

.tepetl-safety-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 var(--space-md);
}

.tepetl-safety-content {
    color: #78350f;
    font-size: 0.95rem;
}

.tepetl-safety-content p {
    margin: 0 0 var(--space-sm);
}

/* ========================================
   GALLERY (Dark Section)
   ======================================== */
.tepetl-gallery-section {
    background: var(--tepetl-bg-gallery) !important;
    padding: var(--space-3xl) var(--space-lg);
    max-width: none !important;
    margin: 0 !important;
}

.tepetl-gallery-section__inner {
    max-width: var(--tepetl-map-width);
    margin: 0 auto;
}

.tepetl-gallery-section__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tepetl-text-light);
    margin: 0 0 var(--space-xl) 0;
    text-align: center;
}

.tepetl-gallery-swiper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.tepetl-gallery-swiper .swiper-slide {
    aspect-ratio: 3 / 2;
    background: #0a0a0a;
    position: relative;
    cursor: pointer;
}

.tepetl-gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tepetl-gallery-lightbox-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 10;
}

.tepetl-gallery-swiper .swiper-slide:hover .tepetl-gallery-lightbox-btn {
    opacity: 1;
}

.tepetl-gallery-swiper .swiper-button-prev,
.tepetl-gallery-swiper .swiper-button-next {
    color: white;
    background: rgba(0, 0, 0, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.tepetl-gallery-swiper .swiper-button-prev::after,
.tepetl-gallery-swiper .swiper-button-next::after {
    font-size: 1rem;
    font-weight: bold;
}

.tepetl-gallery-swiper .swiper-pagination-bullet {
    background: var(--tepetl-text-light);
}

.tepetl-gallery-swiper .swiper-pagination-bullet-active {
    background: var(--tepetl-primary);
}

/* ========================================
   LIGHTBOX
   ======================================== */
.tepetl-lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-lightbox);
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.tepetl-lightbox.active {
    display: flex;
}

.tepetl-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.tepetl-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.tepetl-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tepetl-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tepetl-lightbox-prev { left: -70px; }
.tepetl-lightbox-next { right: -70px; }

@media (max-width: 768px) {
    .tepetl-lightbox-prev { left: 10px; }
    .tepetl-lightbox-next { right: 10px; }
}

/* ========================================
   MAP SECTION - 600px height, dynamic sizing, padding
   ======================================== */
.tepetl-map-section {
    padding: var(--space-xl) var(--space-xl) var(--space-xl);
}

.tepetl-map-section__inner {
    max-width: var(--tepetl-map-width);
    margin: 0 auto;
    position: relative;
}

/* Map Section Title */
.tepetl-map-section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    text-align: center;
    margin: 0 0 var(--space-md) 0;
}

/* Map Header Bar with Stats */
.tepetl-map-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tepetl-map-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--tepetl-text-dark);
    margin: 0;
}

/* Map Stats Summary (in toolbar) */
.tepetl-map-stats {
    display: flex;
    gap: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--tepetl-text-muted);
}

.tepetl-map-stat {
    padding: var(--space-xs) var(--space-sm);
    background: var(--tepetl-bg-stats-header);
    border-radius: var(--radius-sm);
}

/* Unit Toggle */
.tepetl-unit-toggle {
    display: flex;
    background: var(--tepetl-bg-stats-header);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tepetl-unit-btn {
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    background: transparent;
    color: var(--tepetl-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tepetl-unit-btn.active {
    background: var(--tepetl-primary);
    color: white;
}

/* Layer Selector */
.tepetl-layer-select {
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
}

/* Download Button */
.tepetl-map-download {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--tepetl-primary);
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.tepetl-map-download:hover {
    background: var(--tepetl-primary-hover);
    color: white;
}

/* Map Container */
.tepetl-map-container {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    overflow: hidden;
}

/* Leaflet Map - 600px with dynamic sizing */
.tepetl-leaflet-map,
#tepetl-leaflet-map {
    width: 100%;
    height: 600px !important;
    min-height: 350px;
    max-height: 75vh;
    background: #1a1a1a;
}

@media (max-width: 1024px) {
    .tepetl-leaflet-map,
    #tepetl-leaflet-map {
        height: 500px !important;
    }
}

@media (max-width: 768px) {
    .tepetl-leaflet-map,
    #tepetl-leaflet-map {
        height: 400px !important;
    }
    .tepetl-map-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .tepetl-map-stats {
        flex-wrap: wrap;
    }
}

/* Selection Popup */
.tepetl-selection-popup {
    position: absolute;
    background: var(--tepetl-bg-paper);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    overflow: hidden;
    z-index: 1000;
}

.tepetl-selection-header {
    background: var(--tepetl-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tepetl-selection-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
}

.tepetl-selection-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.tepetl-selection-close:hover {
    opacity: 1;
}

.tepetl-selection-stats {
    padding: var(--space-md);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-sm);
}

.tepetl-selection-stat {
    text-align: center;
}

.tepetl-selection-stat-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--tepetl-text-dark);
}

.tepetl-selection-stat-value.positive { color: #ef4444; }
.tepetl-selection-stat-value.negative { color: #22c55e; }

.tepetl-selection-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--tepetl-text-muted);
}

.tepetl-selection-footer {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.tepetl-zoom-out-btn {
    color: var(--tepetl-primary);
    font-size: 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.tepetl-zoom-out-btn:hover {
    text-decoration: underline;
}

/* ========================================
   ELEVATION PROFILE (D3.js)
   ======================================== */
.tepetl-elevation-profile-container {
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: var(--space-md);
}

.tepetl-elevation-profile {
    width: 100%;
    height: 200px;
    position: relative;
    cursor: crosshair;
}

@media (max-width: 768px) {
    .tepetl-elevation-profile {
        height: 160px;
    }
}

.tepetl-elevation-profile svg {
    width: 100%;
    height: 100%;
}

/* Remove bottom elevation tick that extends past axis line */
.tepetl-elevation-profile .y-axis .tick:first-of-type {
    display: none;
}

.tepetl-profile-hint {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-md);
    font-size: 0.7rem;
    color: var(--tepetl-text-muted);
    font-style: italic;
}

.tepetl-profile-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    pointer-events: none;
    z-index: var(--z-tooltip);
    white-space: nowrap;
}

.tepetl-profile-tooltip .grade-positive { color: #ef4444; }
.tepetl-profile-tooltip .grade-negative { color: #22c55e; }

.tepetl-crosshair-v,
.tepetl-crosshair-h {
    stroke: var(--tepetl-text-dark);
    stroke-width: 1;
    stroke-dasharray: 4, 3;
    pointer-events: none;
}

.tepetl-crosshair-h {
    stroke: var(--tepetl-coral);
    stroke-width: 1.5;
    stroke-dasharray: none;
    opacity: 0.6;
}

.tepetl-map-marker {
    width: 12px;
    height: 12px;
    background: var(--tepetl-coral);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ========================================
   TABS SECTION
   ======================================== */
.tepetl-tabs-section {
    padding: var(--space-2xl) var(--space-lg);
}

.tepetl-tabs-inner {
    max-width: var(--tepetl-content-max);
    margin: 0 auto;
}

.tepetl-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
}

.tepetl-tab-btn {
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tepetl-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.tepetl-tab-btn:hover {
    color: var(--tepetl-text-dark);
}

.tepetl-tab-btn.active {
    color: var(--tepetl-primary);
}

.tepetl-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--tepetl-primary);
}

.tepetl-tab-content {
    display: none;
}

.tepetl-tab-content.active {
    display: block;
}

/* ========================================
   CONTRIBUTORS SECTION (Section 17)
   Uses same circular badge style as Section 3b
   ======================================== */
.tepetl-contributors-section {
    padding: var(--space-3xl) var(--space-lg);
    background: var(--tepetl-bg-content);
}

.tepetl-contributors-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
}

.tepetl-contributors-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: 0 0 var(--space-xl);
    text-align: center;
}

/* NEW: Section 17 Subsection titles (h4) */
.tepetl-contributors-subtitle {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tepetl-primary);
    margin: var(--space-xl) 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tepetl-contributors-subtitle:first-of-type {
    margin-top: 0;
}

/* NEW: Contributors in single column (rows) */
.tepetl-contributors-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ========================================
   SECTION 17: NEW HORIZONTAL CONTRIBUTOR CARD
   ======================================== */
.tepetl-contributor-card-horizontal {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    max-width: var(--tepetl-content-main);
    transition: box-shadow 0.2s ease;
}

.tepetl-contributor-card-horizontal:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Photo section (left) */
.tepetl-contributor-card-horizontal .tepetl-card-photo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--tepetl-primary);
    opacity: 0.9;
}

.tepetl-contributor-card-horizontal .tepetl-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.tepetl-contributor-card-horizontal .tepetl-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    font-size: 2rem;
    color: var(--tepetl-text-muted);
}

/* Content section (right) */
.tepetl-contributor-card-horizontal .tepetl-card-content {
    flex: 1;
    min-width: 0; /* Allow text to wrap properly */
}

/* Name - h4 style */
.tepetl-contributor-card-horizontal .tepetl-card-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--tepetl-text-dark);
    margin: 0 0 var(--space-xs);
}

/* Contributor name link styling */
.tepetl-contributor-card-horizontal .tepetl-card-name a,
.tepetl-card-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tepetl-contributor-card-horizontal .tepetl-card-name a:hover,
.tepetl-card-name a:hover {
    color: var(--tepetl-primary);
    text-decoration: underline;
}

.tepetl-contributor-card-horizontal .tepetl-card-name a:focus,
.tepetl-card-name a:focus {
    outline: 2px solid var(--tepetl-primary);
    outline-offset: 2px;
}

/* Location + Organization row */
.tepetl-contributor-card-horizontal .tepetl-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tepetl-contributor-card-horizontal .tepetl-card-location {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tepetl-text-muted);
}

.tepetl-contributor-card-horizontal .tepetl-card-org-link {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tepetl-primary);
    text-decoration: none;
}

.tepetl-contributor-card-horizontal .tepetl-card-org-link:hover {
    color: var(--tepetl-coral);
    text-decoration: underline;
}

.tepetl-contributor-card-horizontal .tepetl-card-separator {
    color: var(--tepetl-text-muted);
    opacity: 0.5;
}

/* Bio */
.tepetl-contributor-card-horizontal .tepetl-card-bio {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--tepetl-text-body);
    margin-bottom: var(--space-sm);
}

/* Professional Guide badge */
.tepetl-contributor-card-horizontal .tepetl-card-guide-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tepetl-bg-paper);
    background: var(--tepetl-primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

/* Profile link */
.tepetl-contributor-card-horizontal .tepetl-card-profile-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tepetl-primary);
    text-decoration: none;
    margin-top: var(--space-xs);
}

.tepetl-contributor-card-horizontal .tepetl-card-profile-link:hover {
    text-decoration: underline;
    color: var(--tepetl-coral);
}

/* Social links row */
.tepetl-contributor-card-horizontal .tepetl-card-socials {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tepetl-contributor-card-horizontal .tepetl-card-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    color: var(--tepetl-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tepetl-contributor-card-horizontal .tepetl-card-social-link:hover {
    background: var(--tepetl-primary);
    color: white;
}

.tepetl-contributor-card-horizontal .tepetl-card-social-link svg {
    width: 14px;
    height: 14px;
}

/* Contribution stats row */
.tepetl-contributor-card-horizontal .tepetl-card-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tepetl-contributor-card-horizontal .tepetl-card-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.7rem;
    color: var(--tepetl-text-muted);
}

.tepetl-contributor-card-horizontal .tepetl-card-stat-value {
    font-weight: 700;
    color: var(--tepetl-text-dark);
}

/* Organizations section - slightly different styling */
.tepetl-contributors-orgs .tepetl-contributor-card-horizontal {
    border-left: 3px solid var(--tepetl-primary);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .tepetl-contributor-card-horizontal {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .tepetl-contributor-card-horizontal .tepetl-card-meta {
        justify-content: center;
    }
    
    .tepetl-contributor-card-horizontal .tepetl-card-socials {
        justify-content: center;
    }
    
    .tepetl-contributor-card-horizontal .tepetl-card-stats {
        justify-content: center;
    }
}

/* OLD GRID STYLES - Keep for backwards compatibility but hide */
.tepetl-contributors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2xl); /* More gap for new layout */
}

/* Badge card in grid - use same seal style, adjusted for new layout */
.tepetl-contributor-card-seal {
    width: 200px;
    height: auto; /* Allow natural height */
    padding-top: var(--space-sm);
}

/* Override sizes for grid context */
.tepetl-contributor-card-seal .tepetl-contributor-badge {
    width: 185px;
    height: auto;
}

/* Circle alignment for Section 17 - matched to 130px photo */
.tepetl-contributor-card-seal .tepetl-contributor-badge::before {
    top: 10px;
    width: 142px; /* 130px + border spacing */
    height: 142px;
}

.tepetl-contributor-card-seal .tepetl-contributor-badge::after {
    top: 15px;
    width: 132px;
    height: 132px;
}

/* Title positioning in grid */
.tepetl-contributor-card-seal .tepetl-contributor-badge-title {
    top: -5px;
}

/* Photo in grid */
.tepetl-contributor-card-seal .tepetl-contributor-photo {
    width: 130px;
    height: 130px;
    margin-top: 15px;
}

/* NAME in grid - capitals, no bounding box */
.tepetl-contributor-card-seal .tepetl-contributor-name {
    text-transform: uppercase;
    background: transparent;
    border: none;
    padding: 0;
}

/* Info box in grid - no border */
.tepetl-contributor-card-seal .tepetl-contributor-info {
    background: transparent;
    border: none;
    margin-top: var(--space-xs);
}
}

/* Keep old card styles for backwards compatibility */
.tepetl-contributor-card {
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.tepetl-contributor-card-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.tepetl-contributor-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tepetl-contributor-card-info {
    flex: 1;
}

.tepetl-contributor-card-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--tepetl-text-dark);
    margin: 0 0 var(--space-xs);
}

.tepetl-contributor-card-role {
    font-size: 0.8rem;
    color: var(--tepetl-text-muted);
    margin: 0 0 var(--space-sm);
}

.tepetl-contributor-card-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tepetl-primary);
    text-decoration: none;
}

.tepetl-contributor-card-link:hover {
    text-decoration: underline;
}

/* ========================================
   PHASE 2.1.2: CONTRIBUTOR IDENTITY SYSTEM
   Expanded Rail, Bridge Card, Minimal Card
   ======================================== */

/* === EXPANDED RAIL COMPONENT === */

/* Outer slot wrapper - 240px fixed width */
.tepetl-contributor-rail-slot {
    width: 240px;
    flex-shrink: 0;
}

/* Rail card wrapper */
.tepetl-contributor-rail {
    width: 100%;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Rail inner wrapper - add top padding for breathing room */
.tepetl-contributor-rail-inner {
    width: 100%;
    max-width: 208px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-top: 12px;
}

/* Group A: Identity Heading */
.tepetl-contributor-rail-eyebrow {
    font-family: var(--font-display);
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--tepetl-text-muted);
    margin-bottom: 3px;
}

.tepetl-contributor-rail-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: 0 0 8px 0;
}

.tepetl-contributor-rail-role {
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--tepetl-text-body);
    margin-bottom: 6px;
}

/* Group B: Portrait Anchor */
.tepetl-contributor-rail-photo {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tepetl-contributor-rail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Group C: Quick Identity Context - Location matches Section 17 card style */
.tepetl-contributor-rail-location {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 6px;
}

.tepetl-contributor-shorttext {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
    color: rgba(0, 0, 0, 0.55);
    margin-bottom: 6px;
}

.tepetl-contributor-shorttext p {
    margin: 0;
}

/* Group D: Affiliation */
.tepetl-contributor-orgs {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--tepetl-text-body);
    margin-bottom: 6px;
}

.tepetl-contributor-orgs a {
    color: var(--tepetl-primary);
    text-decoration: none;
}

.tepetl-contributor-orgs a:hover {
    text-decoration: underline;
}

.tepetl-org-sep {
    margin: 0 4px;
    color: var(--tepetl-text-muted);
}

/* Group E: Utility Row - horizontal single line */
.tepetl-contributor-utility-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tepetl-contributor-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #1fcf1f;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 2px 6px;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.tepetl-guide-icon,
.tepetl-guide-text {
    background: transparent;
    color: inherit;
    border-radius: 0;
    padding: 0;
    display: inline;
    font-size: inherit;
    line-height: inherit;
}

.tepetl-contributor-contributions {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tepetl-text-muted);
}

.tepetl-contributor-contributions a {
    color: var(--tepetl-text-muted);
    text-decoration: none;
}

.tepetl-contributor-contributions a:hover {
    color: var(--tepetl-primary);
}

/* Group F: Action */
.tepetl-contributor-cta {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--tepetl-primary);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tepetl-contributor-rail:hover .tepetl-contributor-cta {
    opacity: 1;
}

.tepetl-contributor-cta:hover {
    color: var(--tepetl-text-dark);
}

/* === BRIDGE CARD COMPONENT === */

.tepetl-contributor-bridge-container {
    background: var(--tepetl-bg-content);
    padding: var(--space-lg) var(--space-md);
    display: none; /* Hidden by default, shown at breakpoint */
}

.tepetl-contributor-bridge {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 1px;
    align-items: start;
    align-content: start;
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    padding: 16px 18px 8px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.tepetl-contributor-bridge-photo,
.tepetl-contributor-bridge-content {
    align-self: start;
}


.tepetl-contributor-bridge-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.06);
    grid-row: span 5;
}

.tepetl-contributor-bridge-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tepetl-contributor-bridge-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tepetl-contributor-bridge-eyebrow {
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tepetl-text-muted);
}

.tepetl-contributor-bridge-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: 0;
}

.tepetl-contributor-bridge-role {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tepetl-text-body);
}

.tepetl-contributor-bridge-location {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.65);
}

.tepetl-contributor-bridge-text {
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--tepetl-text-body);
}

.tepetl-contributor-bridge-text p {
    margin: 0;
}

.tepetl-contributor-bridge-orgs {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-body);
    margin-top: 0;
}

.tepetl-contributor-bridge-orgs a {
    color: var(--tepetl-primary);
    text-decoration: none;
}

.tepetl-contributor-bridge-orgs a:hover {
    text-decoration: underline;
}

.tepetl-contributor-bridge-utility {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0;
}

.tepetl-contributor-bridge-contributions {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tepetl-text-muted);
    text-decoration: none;
}

.tepetl-contributor-bridge-contributions:hover {
    color: var(--tepetl-primary);
}

.tepetl-contributor-bridge-guide {
    background: #1fcf1f;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 2px 6px;
}

.tepetl-contributor-bridge-cta {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tepetl-primary);
    text-decoration: none;
    margin-top: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tepetl-contributor-bridge:hover .tepetl-contributor-bridge-cta,
.tepetl-contributor-bridge-container:hover .tepetl-contributor-bridge-cta {
    opacity: 1;
}

.tepetl-contributor-bridge-cta:hover {
    color: var(--tepetl-text-dark);
}


/* === MINIMAL CARD COMPONENT === */

.tepetl-contributor-minimal {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 250px;
    width: 250px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin-top: 0;
    flex-shrink: 0;
}

/* Section A: Header - two columns (photo + info stack) */
.tepetl-contributor-minimal-header {
    display: grid;
    grid-template-columns: 96px 1fr;
    column-gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.tepetl-contributor-minimal-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.06);
}

.tepetl-contributor-minimal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tepetl-contributor-minimal-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tepetl-contributor-minimal-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.tepetl-contributor-minimal-name a {
    color: var(--tepetl-text-dark);
    text-decoration: none;
}

.tepetl-contributor-minimal-name a:hover {
    color: var(--tepetl-primary);
}

.tepetl-contributor-minimal-role {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--tepetl-text-body);
    line-height: 1.2;
    margin-bottom: 4px;
}

.tepetl-contributor-minimal-location {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 4px;
}

.tepetl-contributor-minimal-utility {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.tepetl-contributor-minimal-contributions {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tepetl-text-muted);
    text-decoration: none;
}

.tepetl-contributor-minimal-contributions:hover {
    color: var(--tepetl-primary);
}

.tepetl-contributor-minimal-guide {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 700;
    background: #1fcf1f;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 2px 6px;
}

.tepetl-contributor-minimal-orgs {
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-body);
}

.tepetl-contributor-minimal-orgs a {
    color: var(--tepetl-primary);
    text-decoration: none;
}

.tepetl-contributor-minimal-orgs a:hover {
    text-decoration: underline;
}

/* Section B: Full-width text block - centered container, justified text */
.tepetl-contributor-minimal-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--tepetl-text-body);
    text-align: center;
}

.tepetl-contributor-minimal-text p {
    margin: 0;
    text-align: justify;
}

/* PHASE 2.1.2: Quote section with minimal card - flex row layout */
.tepetl-quote-section--with-minimal .tepetl-quote-inner,
.tepetl-quote-inner--with-minimal {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
}

.tepetl-quote-section--with-minimal .tepetl-quote,
.tepetl-quote-inner--with-minimal .tepetl-quote {
    flex: 1;
    max-width: 715px;
}

/* ========================================
   LOCATION SECTION (Section 15 - Dark Theme)
   ======================================== */
.tepetl-location-section {
    padding: 0;
    max-width: none !important;
    margin: 0 !important;
}

.tepetl-location-inner {
    max-width: var(--tepetl-body-text);
    margin: 0 auto;
}

.tepetl-location-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-light);
    margin: 0 0 var(--space-sm) 0;
}

.tepetl-location-subtitle {
    font-size: 1rem;
    color: var(--tepetl-text-muted);
    margin: 0 0 var(--space-2xl) 0;
}

.tepetl-location-group {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tepetl-location-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tepetl-location-header {
    margin-bottom: var(--space-md);
}

.tepetl-location-header h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tepetl-text-light);
    margin: 0 0 var(--space-xs) 0;
}

.tepetl-location-subtext {
    font-size: 0.75rem;
    color: var(--tepetl-text-muted);
    margin: 0;
}

.tepetl-location-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-wrap: wrap;
}

.tepetl-location-breadcrumb a {
    color: var(--tepetl-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.tepetl-location-breadcrumb a:hover {
    color: var(--tepetl-primary);
}

/* ========================================
   RELATED SECTION
   ======================================== */
.tepetl-related-section {
    padding: var(--space-3xl) var(--space-lg);
}

.tepetl-related-inner {
    max-width: var(--tepetl-content-max);
    margin: 0 auto;
}

.tepetl-related-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tepetl-text-dark);
    margin: 0 0 var(--space-xl) 0;
}

.tepetl-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

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

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

.tepetl-card {
    background: var(--tepetl-bg-paper);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.tepetl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tepetl-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.tepetl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tepetl-card-content {
    padding: var(--space-md);
}

.tepetl-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm) 0;
}

.tepetl-card-title a {
    color: var(--tepetl-text-dark);
    text-decoration: none;
}

.tepetl-card-title a:hover {
    color: var(--tepetl-primary);
}

.tepetl-card-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--tepetl-text-muted);
}



/* MAP TOGGLE (Session 3) */
.tepetl-map-section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.tepetl-map-toggle-switch {
    position: absolute;
    right: 17px;
    display: inline-flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
}

.tepetl-map-toggle-btn {
    font-family: var(--font-stat-label);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    background: transparent;
    border: none;
    border-right: 1px solid #ddd;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tepetl-map-toggle-btn:last-child {
    border-right: none;
}

.tepetl-map-toggle-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.tepetl-map-toggle-btn.active {
    background: #e8e8e8;
    color: #333;
}

.tepetl-rwgps-section {
    padding: var(--space-xl);
}

.tepetl-hidden-gpx-loader {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* SECTION 20 */
.tepetl-discussion-section-outer {
    width: 100%;
    background: var(--tepetl-bg-infinite);
}

.tepetl-discussion-section {
    max-width: var(--tepetl-content-max);
    margin: 0 auto;
    background: var(--tepetl-bg-content);
    padding: var(--space-2xl) 0;
}

.tepetl-discussion-inner {
    max-width: var(--tepetl-content-main);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.tepetl-discussion-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-xl) 0;
    text-align: center;
}

.tepetl-discussion-placeholder {
    background: linear-gradient(135deg, rgba(247, 247, 247, 0.8) 0%, rgba(240, 239, 237, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid #f54f4f;
    border-radius: 3px;
    padding: var(--space-2xl);
    text-align: center;
    position: relative;
}

.tepetl-discussion-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    color: rgba(0, 0, 0, 0.3);
    stroke-width: 1.5;
}

.tepetl-discussion-placeholder-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin: 0 0 var(--space-md) 0;
}

.tepetl-discussion-placeholder-text {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin: 0 auto var(--space-lg) auto;
    max-width: 600px;
}

.tepetl-discussion-context {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.tepetl-discussion-context-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-stat-label);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #888;
}

.tepetl-discussion-context-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}


/* ========================================

/* ========================================
   PHASE 2.1.2 V4: STAT SIZING & SHELL STABILITY
   ======================================== */

/* Stat value sizing - increased specificity */
.tepetl-stat .tepetl-stat-value {
    font-size: 28px;
    margin-bottom: 4px;
}

/* Stat label spacing */
.tepetl-stat .tepetl-stat-label {
    margin-bottom: 6px;
}

/* Icon vertical centering */
.tepetl-stat .tepetl-stat-icon,
.tepetl-stat .tepetl-stat-icon-svg {
    margin-top: 2px;
}



