/* Chapter Index Navigation Styles */
/* Shared across all pages */

.chapter-index {
    background: #0a0a0a;
    padding: 1.5rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.chapter-index-intro {
    font-family: 'Cardo', Georgia, serif;
    font-size: 2rem;
    font-weight: normal;
    font-style: italic;
    color: rgba(255,255,255,0.8);
    margin: 0 0 2.5rem;
}

.chapter-index-container {
    max-width: 500px;
    width: 100%;
    background: linear-gradient(145deg, #111 0%, #0d0d0d 100%);
    border: 1px solid rgba(82, 183, 136, 0.2);
    border-radius: 4px;
    padding: 2.5rem 3rem 2.5rem 2rem;
    position: relative;
    overflow: visible !important;
}

.chapter-index-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    border-radius: 4px;
}

.chapter-index-title {
    font-family: 'Cardo', Georgia, serif;
    font-size: 1.5rem;
    font-weight: normal;
    text-align: center;
    margin: 0 0 2rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.chapter-link {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    width: 100%;
}

.chapter-number {
    font-family: 'Cardo', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: rgba(255,255,255,0.5);
    min-width: 100px;
    transition: color 0.3s ease;
}

.chapter-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(255,255,255,0.2);
    margin: 0 1rem 0.3rem;
    transition: border-color 0.3s ease;
}

.chapter-title {
    font-family: 'Cardo', Georgia, serif;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    transition: color 0.3s ease;
}

.chapter-link:hover .chapter-number {
    color: rgba(255,255,255,0.7);
}

.chapter-link:hover .chapter-dots {
    border-color: rgba(82, 183, 136, 0.4);
}

.chapter-link:hover .chapter-title {
    color: #52b788;
}

.chapter-preview {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    font-style: italic;
    color: #52b788;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.chapter-link:hover .chapter-preview {
    opacity: 1;
}

/* Current chapter tab bookmark indicator */
.chapter-link.current {
    position: relative;
}

.current-indicator {
    position: absolute;
    right: -120px;
    top: 0;
    height: 100%;
    width: 100px;
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.95) 0%, rgba(254, 230, 100, 0.9) 100%);
    border-radius: 0 4px 4px 0;
    z-index: 100;
    border-left: 4px solid rgba(202, 160, 50, 0.9);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
}

/* Page-specific rotations for natural feel */
.chapter-link.current[data-page="index"] .current-indicator {
    transform: rotate(0.5deg);
}
.chapter-link.current[data-page="vision"] .current-indicator {
    transform: rotate(-0.3deg);
}
.chapter-link.current[data-page="evidence"] .current-indicator {
    transform: rotate(0.8deg);
}
.chapter-link.current[data-page="laboratories"] .current-indicator {
    transform: rotate(-0.5deg);
}
.chapter-link.current[data-page="studios"] .current-indicator {
    transform: rotate(0.4deg);
}
.chapter-link.current[data-page="about"] .current-indicator {
    transform: rotate(-0.7deg);
}
.chapter-link.current[data-page="ethics"] .current-indicator {
    transform: rotate(0.6deg);
}
.chapter-link.current[data-page="faq"] .current-indicator {
    transform: rotate(-0.4deg);
}

/* Active state styling for current chapter link */
.chapter-link.current .chapter-number {
    color: #52b788;
}

.chapter-link.current .chapter-dots {
    border-color: rgba(82, 183, 136, 0.5);
}

.chapter-link.current .chapter-title {
    color: #52b788;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .current-indicator {
        right: -2.5rem;
        width: 80px;
    }
}

@media (max-width: 600px) {
    .chapter-index-container {
        padding: 2rem 1.5rem;
    }

    .chapter-number {
        min-width: 80px;
        font-size: 0.9rem;
    }

    .chapter-title {
        font-size: 1rem;
    }

    .current-indicator {
        right: -1.5rem;
        width: 50px;
    }
}
