/* Indie Bookstore Aesthetic - Warm, Playful, Asymmetric */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #faf8f3;
    color: #2d2520;
    line-height: 1.6;
}

.header {
    background: #f7d794;
    border-bottom: 4px solid #e0a76f;
    padding: 30px 20px 35px 20px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #e0a76f 0px,
        #e0a76f 10px,
        transparent 10px,
        transparent 20px
    );
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: baseline;
    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.site-name {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 1.5em;
    color: #2d2520;
    transform: rotate(-2deg);
    display: inline-block;
}

.page-title-area {
    flex: 1;
    padding: 15px 30px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-left: 4px solid #e0a76f;
}

.header h1 {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 2.2em;
    margin-bottom: 8px;
    color: #2d2520;
    transform: rotate(-1deg);
    margin: 0;
}

.header .subtitle {
    font-family: Georgia, serif;
    font-size: 1em;
    font-style: italic;
    color: #5d4e3a;
    margin: 8px 0 0;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .site-name {
        font-size: 1.5em;
    }

    .header h1 {
        font-size: 1.8em;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timeline {
    background: #fff9e6;
    padding: 25px;
    margin-bottom: 35px;
    border: 3px solid #e0a76f;
    border-left-width: 8px;
    position: relative;
}

.timeline-header {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #2d2520;
}

.timeline-header-ref {
    display: inline-block;
    margin-left: 8px;
}

.timeline-header-ref .source-ref {
    font-size: 0.5em;
    vertical-align: middle;
}

.timeline-path {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto;
    padding: 10px 0;
    gap: 15px;
}

.timeline-step {
    text-align: center;
    flex: 1;
    min-width: 100px;
    cursor: pointer;
    padding: 12px;
    background: white;
    border: 2px solid #e0a76f;
    transition: all 0.2s;
}

.timeline-step:nth-child(odd) {
    transform: rotate(-1deg);
}

.timeline-step:nth-child(even) {
    transform: rotate(1deg);
}

.timeline-step:hover {
    background: #fef3d4;
    transform: rotate(0deg) scale(1.05);
}

.timeline-icon {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.timeline-label {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 0.85em;
    font-weight: 600;
    color: #5d4e3a;
    line-height: 1.3;
}

.timeline-arrow {
    font-size: 1.5em;
    color: #e0a76f;
    flex-shrink: 0;
}

.phase {
    background: white;
    padding: 30px;
    margin-bottom: 40px;
    border: 3px solid #e0a76f;
    border-left-width: 8px;
    position: relative;
}

.phase-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px dashed #e0a76f;
}

.phase-icon {
    font-size: 2.2em;
    margin-right: 15px;
}

.phase-title h2 {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    color: #2d2520;
    font-size: 1.6em;
    margin-bottom: 5px;
}

.phase-age {
    color: #5d4e3a;
    font-size: 0.9em;
    font-style: italic;
}

.phase-description {
    color: #5d4e3a;
    margin-bottom: 20px;
    font-style: italic;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* Book cards styled like actual books on a shelf */
.book {
    background: white;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    box-shadow: 2px 3px 8px rgba(45, 37, 32, 0.12);
}

.book:nth-child(3n+1) {
    transform: rotate(-0.5deg);
}

.book:nth-child(3n+2) {
    transform: rotate(0.5deg);
}

.book:hover {
    transform: rotate(0deg) translateY(-8px);
    box-shadow: 4px 8px 16px rgba(45, 37, 32, 0.2);
}

.book-cover {
    width: 100%;
    height: 200px;
    background: #f7d794;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #faf8f3;
}

.book-cover.loading {
    background: repeating-linear-gradient(
        45deg,
        #f7d794,
        #f7d794 10px,
        #fae5b8 10px,
        #fae5b8 20px
    );
}

.book-cover .placeholder {
    font-size: 2.5em;
}

.book-content {
    padding: 16px;
    background: #fffef8;
}

.book-title {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 1.05em;
    font-weight: 600;
    color: #2d2520;
    margin-bottom: 6px;
    line-height: 1.3;
}

.book-author {
    color: #5d4e3a;
    margin-bottom: 8px;
    font-size: 0.85em;
    font-style: italic;
}

.book-links {
    font-size: 0.75em;
    margin-bottom: 10px;
}

.book-links a {
    color: #7a5c42;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    transition: border-color 0.2s;
}

.book-links a:hover {
    border-bottom-color: #7a5c42;
}

.book-why {
    color: #5d4e3a;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.85em;
}

.badge-note {
    background: #fff9e6;
    color: #856404;
    margin-top: 8px;
    display: block;
    padding: 8px 12px;
    border: 2px dashed #e0a76f;
    font-size: 0.85em;
}

/* Source references - colorful tabs */
.source-ref {
    display: inline-block;
    color: white;
    font-size: 0.65em;
    padding: 3px 7px;
    margin-left: 4px;
    font-family: monospace;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid rgba(0,0,0,0.1);
    background: #6c757d; /* Default gray background */
}

/* New display categories */
.source-ref.education { background: #81ecec; }
.source-ref.blog { background: #74b9ff; }
.source-ref.library { background: #fd79a8; }
.source-ref.community { background: #fdcb6e; color: #2d2520; }

/* Legacy categories (kept for backwards compatibility) */
.source-ref.librarian { background: #a29bfe; }
.source-ref.parent_blog { background: #74b9ff; }
.source-ref.educational { background: #81ecec; }
.source-ref.research { background: #a29bfe; color: white; }

.source-ref:hover {
    transform: scale(1.1);
}

/* Readiness box */
.readiness-box {
    background: #fff9e6;
    padding: 25px;
    margin: 40px 0;
    border: 3px solid #e0a76f;
    border-left-width: 8px;
}

.readiness-box h2 {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    color: #2d2520;
    margin-bottom: 15px;
}

.readiness-list {
    list-style: none;
    padding-left: 0;
}

.readiness-list li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: #5d4e3a;
}

.readiness-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #e0a76f;
    font-weight: bold;
    font-size: 1.2em;
}

/* Parent resources */
.parent-resources {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid #e0a76f;
    border-left-width: 8px;
}

.parent-resources h2 {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    color: #2d2520;
    margin-bottom: 20px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* Sources section */
.sources-section {
    background: white;
    padding: 30px;
    margin-top: 40px;
    border: 3px solid #e0a76f;
    border-left-width: 8px;
}

.sources-section h2 {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    color: #2d2520;
    margin-bottom: 20px;
}

.sources-list {
    list-style: none;
    padding: 0;
}

.sources-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #e0a76f;
}

.sources-list li:last-child {
    border-bottom: none;
}

.source-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #f7d794;
    border: 2px solid #e0a76f;
    text-align: center;
    line-height: 26px;
    font-weight: bold;
    margin-right: 10px;
    font-family: monospace;
}

.source-name {
    font-weight: 600;
    color: #2d2520;
}

.source-url {
    color: #5d4e3a;
    text-decoration: none;
    font-size: 0.9em;
}

.source-url:hover {
    text-decoration: underline;
    color: #e0a76f;
}
