/* ============================================
   STRUCTURE PAGE ENHANCEMENTS
   Path: /assets/css/structure-styles.css
   Purpose: Enhanced styling for Hosea structure page
   Specifically targets chapters 4-11 text density
   Version: 1.0.0
   Dependencies: global-v2.css
   ============================================ */

/* ============================================
   ENHANCED VERSE GROUP STYLING
   Integrates with global-v2.css variables
   ============================================ */

/* Base verse group enhancements */
.verse-group {
    margin: 2rem 0;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--panel) 0%, var(--bg) 100%);
    border-left: 4px solid var(--accent-gold);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInSlide 0.5s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Alternating colors for visual rhythm */
.verse-group:nth-child(even) {
    background: linear-gradient(135deg, rgba(114, 9, 183, 0.03) 0%, var(--bg) 100%);
    border-left-color: var(--accent-purple);
}

.verse-group:nth-child(3n) {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.03) 0%, var(--bg) 100%);
    border-left-color: var(--accent-blue);
}

.verse-group:nth-child(5n) {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.03) 0%, var(--bg) 100%);
    border-left-color: var(--accent-gold);
}

/* Hover effect for verse groups */
.verse-group:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Major section styling (for important breaks) */
.verse-group.major-section {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, var(--bg) 100%);
    border-left: 6px solid var(--accent-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

/* ============================================
   ENHANCED VERSE REFERENCE BADGES
   Using global-v2.css tag styles as base
   ============================================ */

.verse-ref {
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    min-width: 85px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(114, 9, 183, 0.2);
    margin-right: 0.75rem;
    transition: all 0.3s ease;
}

.verse-ref:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 5px 15px rgba(114, 9, 183, 0.3);
}

/* Different badge styles for different content types */
.verse-group.judgment .verse-ref {
    background: linear-gradient(135deg, var(--accent-rose), #ef4444);
}

.verse-group.restoration .verse-ref {
    background: linear-gradient(135deg, var(--accent-green), #34d399);
}

.verse-group.prophecy .verse-ref {
    background: linear-gradient(135deg, var(--accent-gold), #fbbf24);
    color: var(--primary-dark);
}

.verse-group.divine-speech .verse-ref {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* ============================================
   ENHANCED VERSE CONTENT
   ============================================ */

.verse-content {
    display: block;
    margin: 0.5rem 0 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.15rem;
    line-height: 1.5;
}

/* ============================================
   SUB-POINTS WITH VISUAL HIERARCHY
   ============================================ */

.sub-point {
    margin-left: 2rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.8;
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.2s ease;
}

/* Custom bullet points */
.sub-point::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.sub-point:hover {
    color: var(--primary-dark);
    padding-left: 1.75rem;
}

.sub-point:hover::before {
    transform: translateX(3px);
}

/* Numbered sub-points for lists */
.sub-point.numbered {
    counter-increment: sub-counter;
}

.sub-point.numbered::before {
    content: counter(sub-counter) '.';
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1rem;
}

/* Color-coded content types */
.sub-point.judgment {
    border-left: 3px solid var(--accent-rose);
    padding-left: 1rem;
    margin-left: 2.5rem;
    background: linear-gradient(90deg, rgba(225, 29, 72, 0.05) 0%, transparent 10%);
}

.sub-point.promise {
    border-left: 3px solid var(--accent-green);
    padding-left: 1rem;
    margin-left: 2.5rem;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 10%);
}

.sub-point.historical {
    border-left: 3px solid var(--accent-blue);
    padding-left: 1rem;
    margin-left: 2.5rem;
    background: linear-gradient(90deg, rgba(0, 180, 216, 0.05) 0%, transparent 10%);
}

/* ============================================
   THEME NOTES WITH ICONS
   Matches key-insight from global-v2.css
   ============================================ */

.theme-note {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 4px solid var(--accent-green);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    position: relative;
    font-style: italic;
    color: var(--primary-dark);
    line-height: 1.7;
}

.theme-note::before {
    content: '💡';
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.3rem;
}

.theme-note strong {
    color: var(--accent-green);
    font-style: normal;
}

/* ============================================
   VISUAL SEPARATORS FOR LONG CHAPTERS
   ============================================ */

.chapter-divider {
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-purple) 20%, 
        var(--accent-blue) 50%, 
        var(--accent-purple) 80%, 
        transparent);
    margin: 3rem auto;
    opacity: 0.3;
    border-radius: 2px;
}

/* ============================================
   KEY VERSES HIGHLIGHTING
   ============================================ */

.key-verse {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.08));
    border: 2px solid var(--accent-gold);
    padding: 1.75rem;
    margin: 2rem 0;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    position: relative;
}

.key-verse::before {
    content: '⭐';
    position: absolute;
    top: -12px;
    right: 20px;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.3rem;
}

.key-verse .verse-ref {
    background: linear-gradient(135deg, var(--accent-gold), #fbbf24);
    color: var(--primary-dark);
}

/* ============================================
   HEBREW TEXT ENHANCEMENT
   ============================================ */

.hebrew-inline {
    display: inline-block;
    font-family: 'SBL Hebrew', 'Ezra SIL', serif;
    direction: rtl;
    unicode-bidi: embed;
    color: #8b4513;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.08), rgba(212, 175, 55, 0.08));
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    margin: 0 0.4rem;
    font-size: 1.15em;
    cursor: help;
    position: relative;
    border: 1px solid rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.hebrew-inline:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

/* Tooltip for Hebrew translations */
.hebrew-inline[data-translation]:hover::after {
    content: attr(data-translation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.85rem;
    margin-bottom: 5px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: ltr;
    font-style: normal;
}

.hebrew-inline[data-translation]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primary-dark);
    margin-bottom: -5px;
    z-index: 11;
}

/* ============================================
   CHAPTER NAVIGATION FOR LONG SECTIONS
   ============================================ */

.chapter-nav {
    position: sticky;
    top: 80px;
    float: right;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    z-index: 5;
    max-width: 180px;
    border: 1px solid var(--border-light);
}

.chapter-nav h5 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.chapter-nav-item {
    display: block;
    padding: 0.4rem 0.6rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0.2rem 0;
}

.chapter-nav-item:hover {
    color: var(--accent-purple);
    background: rgba(114, 9, 183, 0.05);
    padding-left: 1rem;
}

.chapter-nav-item.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

/* ============================================
   COLLAPSIBLE SUBSECTIONS
   ============================================ */

.verse-subsection {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(114, 9, 183, 0.03), rgba(0, 180, 216, 0.03));
    border-left: 3px solid var(--accent-purple);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.verse-subsection h5 {
    color: var(--accent-purple);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.verse-subsection h5::before {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.verse-subsection.collapsed h5::before {
    transform: rotate(-90deg);
}

.verse-subsection.collapsed .sub-point {
    display: none;
}

.verse-subsection h5:hover {
    color: var(--accent-blue);
}

/* ============================================
   SPECIAL STYLING FOR CHAPTERS 4-11
   ============================================ */

/* Add visual breathing room for dense chapters */
#chapter-4 .verse-group,
#chapter-5 .verse-group,
#chapter-6 .verse-group,
#chapter-7 .verse-group,
#chapter-8 .verse-group,
#chapter-9 .verse-group,
#chapter-10 .verse-group,
#chapter-11 .verse-group,
.chapter-section:nth-child(n+7):nth-child(-n+14) .verse-group {
    padding: 2rem;
}

/* Progress indicator for long chapters */
.chapter-progress {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--accent-purple) var(--progress, 0%), 
        transparent var(--progress, 0%));
    margin-bottom: 1rem;
    z-index: 10;
    border-radius: 2px;
}

/* Dense content marker */
.dense-content {
    position: relative;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .chapter-nav {
        display: none;
    }
    
    .verse-group {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }
    
    .sub-point {
        margin-left: 1rem;
        padding-left: 1rem;
        font-size: 0.9rem;
    }
    
    .verse-ref {
        min-width: 70px;
        padding: 0.3rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .chapter-divider {
        width: 80%;
        margin: 2rem auto;
    }
    
    .verse-subsection {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .verse-content {
        font-size: 1rem;
    }
    
    .hebrew-inline {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }
    
    .hebrew-inline[data-translation]:hover::after,
    .hebrew-inline[data-translation]:hover::before {
        display: none;
    }
    
    .verse-group {
        padding: 1rem;
        border-left-width: 3px;
    }
    
    .theme-note {
        padding: 1rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .chapter-nav,
    .chapter-progress {
        display: none;
    }
    
    .verse-group {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 1rem 0;
    }
    
    .verse-subsection.collapsed .sub-point {
        display: block !important;
    }
    
    .hebrew-inline[data-translation]::after {
        content: ' (' attr(data-translation) ')';
        position: static;
        background: none;
        color: var(--text-gray);
        font-size: 0.9em;
    }
    
    .chapter-divider {
        display: none;
    }
}

/* =============================================
   STRUCTURE MAP STYLES - MOBILE OPTIMIZED
   ============================================= */

.structure-map-container {
  margin: 2rem 0;
}

.map-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.map-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent-purple);
  background: white;
  color: var(--accent-purple);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.map-btn:hover {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.1), rgba(0, 180, 216, 0.1));
}

.map-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
}

.map-view {
  display: none;
}

.map-view.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

/* =============================================
   CHIASTIC VIEW
   ============================================= */

.chiasm-visual {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border-radius: 16px;
}

.part-section {
  margin: 3rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.part-label {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent-gold);
}

.block-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

.block-item {
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--accent-purple);
  background: white;
  transition: all 0.3s ease;
}

.block-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(114, 9, 183, 0.2);
  border-color: var(--accent-blue);
}

.block-item.left {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.05), transparent);
}

.block-item.right {
  background: linear-gradient(135deg, transparent, rgba(0, 180, 216, 0.05));
}

.block-item.center {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.05), rgba(0, 180, 216, 0.05));
  margin: 2rem auto;
  max-width: 600px;
}

.block-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.block-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.block-ref {
  font-size: 0.9rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.block-theme {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 80px;
}

.arrow-line {
  /* Remove the horizontal line - no longer needed */
  position: relative;
  display: flex;
  justify-content: center;
}

.arrow-line::after {
  content: '↔';
  /* Remove absolute positioning */
  position: static;
  font-size: 1.2rem;
  color: var(--accent-purple);
}

/* Different arrow for anticipates relationship */
.connector[data-type="anticipates"] .arrow-line::after {
  content: '→';
  color: var(--accent-blue);
}

.connection-label {
  font-size: 0.8rem;
  color: var(--accent-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Update label color for anticipates too */
.connector[data-type="anticipates"] .connection-label {
  color: var(--accent-blue);
}

/* Descending blocks */
.block-descending {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
}

.block-item.descent {
  max-width: 600px;
  width: 100%;
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.03), rgba(220, 38, 38, 0.03));
  margin: 0.5rem 0;
}

.descent-arrow {
  font-size: 2rem;
  color: var(--accent-purple);
  margin: 0.5rem 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.6; transform: translateY(5px); }
}

/* Center Block */
.center-block {
  margin: 3rem 0;
  display: flex;
  justify-content: center;
}

.block-item.center-highlight {
  max-width: 700px;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.1), rgba(0, 180, 216, 0.1));
  border: 3px solid var(--accent-gold);
  box-shadow: 0 10px 40px rgba(114, 9, 183, 0.3);
  position: relative;
}

.center-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(114, 9, 183, 0.4);
  white-space: nowrap;
}

.center-quote {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--accent-gold);
  text-align: center;
  font-style: italic;
  color: #555;
}

.center-quote .hebrew {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--accent-purple);
}

/* =============================================
   LINEAR TIMELINE VIEW
   ============================================= */

.linear-timeline {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border-radius: 16px;
}

.timeline-section {
  margin: 3rem 0;
  position: relative;
}

.timeline-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.timeline-blocks {
  position: relative;
  padding-left: 3rem;
}

.timeline-blocks::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-blue));
}

.timeline-block {
  position: relative;
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.block-dot {
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid var(--accent-purple);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(114, 9, 183, 0.3);
}

.timeline-block.center-mark .block-dot {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
  border: 4px solid var(--accent-gold);
  animation: pulse-center 2s infinite;
}

@keyframes pulse-center {
  0%, 100% { box-shadow: 0 0 0 0 rgba(114, 9, 183, 0.7); }
  50% { box-shadow: 0 0 0 15px rgba(114, 9, 183, 0); }
}

.block-mini {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent-purple);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.block-mini:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(114, 9, 183, 0.15);
}

.block-mini.center-mini {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.05), rgba(0, 180, 216, 0.05));
  border-left-color: var(--accent-gold);
  border-left-width: 5px;
}

.center-indicator {
  margin-top: 0.5rem;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  letter-spacing: 1px;
}

/* =============================================
   THEMATIC CLUSTERS VIEW
   ============================================= */

.thematic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
}

.theme-cluster {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--accent-purple);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.theme-cluster:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(114, 9, 183, 0.2);
}

.theme-cluster.center-theme {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.1), rgba(0, 180, 216, 0.1));
  border-color: var(--accent-gold);
  border-width: 3px;
}

.theme-cluster h4 {
  color: var(--accent-purple);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-gold);
}

.cluster-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cluster-item {
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.05), transparent);
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--accent-purple);
  transition: all 0.2s ease;
}

.cluster-item:hover {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.1), rgba(0, 180, 216, 0.1));
  transform: translateX(5px);
}

.cluster-item.center {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.15), rgba(0, 180, 216, 0.15));
  border-left-color: var(--accent-gold);
  border-left-width: 5px;
  font-weight: 600;
}

.cluster-theme {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  line-height: 1.5;
}

/* =============================================
   MAP LEGEND
   ============================================= */

.map-legend {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.05), rgba(0, 180, 216, 0.05));
  border-radius: 12px;
  border: 2px solid var(--accent-purple);
}

.map-legend h4 {
  color: var(--accent-purple);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.legend-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.legend-icon.mirror {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.1), rgba(0, 180, 216, 0.1));
  border: 2px solid var(--accent-purple);
}

.legend-icon.mirror::before {
  content: '↔';
  color: var(--accent-purple);
}

.legend-icon.center {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
}

.legend-icon.center::before {
  content: '★';
  color: white;
}

.legend-icon.descent {
  background: linear-gradient(180deg, rgba(114, 9, 183, 0.1), rgba(220, 38, 38, 0.1));
  border: 2px solid var(--accent-purple);
}

.legend-icon.descent::before {
  content: '↓';
  color: var(--accent-purple);
}

.legend-icon.resolution {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(34, 197, 94, 0.1));
  border: 2px solid var(--accent-blue);
}

.legend-icon.resolution::before {
  content: '✓';
  color: var(--accent-blue);
}

.legend-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
}

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

/* =============================================
   MOBILE RESPONSIVE - COMPREHENSIVE
   ============================================= */

@media (max-width: 768px) {
  /* Controls */
  .map-controls {
    gap: 0.5rem;
  }
  
  .map-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }
  
  /* Chiastic View - Stack Vertically */
  .block-pair {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .connector {
    flex-direction: row;
    justify-content: center;
    margin: 0.5rem 0;
    min-width: unset;
    width: 100%;
  }
  
  .arrow-line {
    width: 2px;
    height: 40px;
  }
  
  .arrow-line::after {
    content: '↕';
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .connection-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-left: 0.5rem;
  }
  
  /* Part sections */
  .part-section {
    padding: 1rem;
  }
  
  .part-label {
    font-size: 1.1rem;
  }
  
  /* Block items */
  .block-item {
    padding: 1.25rem;
  }
  
  .block-title {
    font-size: 1rem;
  }
  
  .block-ref {
    font-size: 0.85rem;
  }
  
  .block-theme {
    font-size: 0.85rem;
  }
  
  /* Center block */
  .block-item.center-highlight {
    padding: 2rem 1.25rem;
  }
  
  .center-badge {
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
  }
  
  .center-quote .hebrew {
    font-size: 1.1rem;
  }
  
  /* Timeline */
  .timeline-blocks {
    padding-left: 2.5rem;
  }
  
  .timeline-label {
    font-size: 1.1rem;
    padding-left: 1rem;
  }
  
  .block-mini {
    padding: 1rem;
  }
  
  /* Thematic grid */
  .thematic-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .theme-cluster.center-theme {
    grid-column: 1;
  }
  
  /* Legend */
  .legend-grid {
    grid-template-columns: 1fr;
  }
  
  .legend-item {
    gap: 0.75rem;
  }
  
  .legend-icon {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
  
  .legend-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .chiasm-visual,
  .linear-timeline {
    padding: 1rem 0.5rem;
  }
  
  .map-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .part-section {
    padding: 0.75rem;
    margin: 2rem 0;
  }
  
  .block-item {
    padding: 1rem;
  }
  
  .block-title {
    font-size: 0.95rem;
  }
  
  .center-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.75rem;
  }
  /* ============================================
   USAGE NOTES & GUARDRAILS
   Integrates with global-v2.css variables
   ============================================ */

.usage-note {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--accent-blue);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    line-height: 1.7;
}

.usage-note strong {
    color: #0c4a6e;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.usage-note ul {
    margin: 0.5rem 0 0 1.25rem;
    line-height: 1.8;
}

.usage-note li {
    margin: 0.25rem 0;
}

.usage-note[role="note"][aria-label*="guardrail"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}

.usage-note[role="note"][aria-label*="guardrail"] strong {
    color: #92400e;
}

/* Tempo and sequencing notes */
.usage-note[aria-label*="tempo"],
.usage-note[aria-label*="Sequencing"] {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left-color: var(--accent-purple);
}

.usage-note[aria-label*="tempo"] strong,
.usage-note[aria-label*="Sequencing"] strong {
    color: #7e22ce;
}

/* ============================================
   QUICK NAVIGATION PILLS
   ============================================ */

.quick-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid var(--border-light);
}

.quick-link {
    padding: 0.6rem 1.25rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.quick-link:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 9, 183, 0.3);
    border-color: transparent;
}

.quick-link:active {
    transform: translateY(0);
}

/* ============================================
   METHODOLOGY CONNECTION BOX
   ============================================ */

.methodology-connection {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.methodology-connection:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.methodology-connection .icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.methodology-connection .content {
    flex: 1;
}

.methodology-connection h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.methodology-connection p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.methodology-connection a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.methodology-connection a:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    transform: translateX(5px);
}

/* ============================================
   RESOURCE LABELS & BEST FOR
   ============================================ */

.resource-best-for {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: #059669;
    font-weight: 500;
}

.resource-best-for::before {
    content: '✓ ';
    font-weight: 700;
}

/* When used in cards */
.phase-box .resource-best-for,
.training-card .resource-best-for,
.observation-card .resource-best-for {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    padding-top: 0.75rem;
}

/* ============================================
   PATTERN CONFIDENCE METER
   ============================================ */

.pattern-confidence {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.pc-label {
    font-weight: 700;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.pc-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-light);
    background: white;
    transition: all 0.2s ease;
}

.pc-clear {
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.pc-developing {
    border-color: rgba(245, 158, 11, 0.45);
    color: #d97706;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), transparent);
}

.pc-subtle {
    border-color: rgba(59, 130, 246, 0.35);
    color: #2563eb;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent);
}

.pc-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   PHASE-SPECIFIC ENHANCEMENTS
   ============================================ */

/* How to Use Phase boxes */
.phase-usage {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid var(--accent-green);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem 0;
    border-radius: 0 8px 8px 0;
}

.phase-usage strong {
    color: #065f46;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.phase-usage ul {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.8;
}

.phase-usage li {
    margin: 0.5rem 0;
}

.phase-usage li strong {
    display: inline;
    color: #047857;
    margin-bottom: 0;
    font-size: inherit;
}

/* Phase number enhancements */
.phase-number-large {
    position: relative;
}

.phase-number-large::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-rose));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.phase-box:hover .phase-number-large::after {
    opacity: 0.1;
}

/* ============================================
   GUARDRAILS SECTION
   ============================================ */

.guardrails-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
}

.guardrails-section .section-icon {
    font-size: 2rem;
}

.guardrails-section h2 {
    color: #92400e;
    margin-bottom: 1rem;
}

.guardrails-section ul {
    margin-left: 1.5rem;
    line-height: 1.9;
}

.guardrails-section li {
    margin: 0.75rem 0;
}

.guardrails-section li strong {
    color: #78350f;
}

/* ============================================
   SCOPE NOTES & CLARIFICATIONS
   ============================================ */

.scope-note {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left: 4px solid var(--accent-purple);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.scope-note strong {
    color: #7e22ce;
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   INTERPRETIVE KEYS
   ============================================ */

.interpretive-key {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.interpretive-key::before {
    content: '🔑';
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.3rem;
}

.interpretive-key strong {
    color: #1e40af;
    display: block;
    margin-bottom: 0.5rem;
}

.interpretive-key p {
    margin: 0;
    color: #1e3a8a;
    line-height: 1.7;
}

/* ============================================
   WORKED EXAMPLE ENHANCEMENTS
   ============================================ */

/* Best for labels in worked examples */
.example-best-for {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #059669;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #065f46;
    margin-top: 1rem;
}

.example-best-for::before {
    content: '✓';
    font-weight: 700;
    color: #059669;
}

/* Step indicators */
.step-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 0.75rem;
}

/* ============================================
   HUB LINK PATTERNS
   ============================================ */

.hub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 50px;
    text-decoration: none;
    color: #0c4a6e;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

.hub-link:hover {
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.hub-link::after {
    content: '→';
    font-weight: 700;
}

/* ============================================
   PATTERN CARDS (for Design Patterns page)
   ============================================ */

.pattern-card-enhanced {
    position: relative;
}

.pattern-type-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-rose));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
}

.pattern-fulfillment-note {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left: 4px solid var(--success);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.pattern-fulfillment-note strong {
    color: #065f46;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .methodology-connection {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .methodology-connection .icon {
        font-size: 2rem;
    }
    
    .quick-links {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .quick-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .usage-note {
        padding: 1rem;
    }
    
    .phase-usage {
        padding: 1rem;
    }
    
    .guardrails-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pattern-confidence {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .methodology-connection h3 {
        font-size: 1.1rem;
    }
    
    .methodology-connection p {
        font-size: 0.9rem;
    }
    
    .interpretive-key {
        padding: 1.25rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .quick-links,
    .methodology-connection,
    .hub-link {
        display: none;
    }
    
    .usage-note,
    .phase-usage,
    .guardrails-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .pattern-confidence {
        display: none;
    }
}
}