/* Study Helps Styles */

/* Study Helps Landing Page */
.study-helps-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.study-helps-page .hero {
    text-align: center;
    margin-bottom: 3rem;
}

.study-helps-page .hero h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.study-helps-page .subtitle {
    font-size: 1.2rem;
    color: var(--light-text);
}

.study-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.tool-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.tool-description {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.tool-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.tool-card .btn {
    width: 100%;
}

.about-tools {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-tools h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-tools p {
    color: var(--dark-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Topical Guide & Bible Dictionary Pages */
.topical-guide-page,
.bible-dictionary-page {
    background: var(--light-bg);
    min-height: 100vh;
}

.page-header {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
}

.page-header h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.search-section {
    background: var(--white);
    padding: 1.5rem;
    margin: 0 2rem 2rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-count {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

.content-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 0 2rem 2rem 2rem;
    align-items: start;
}

/* Alphabetical Navigation */
.alphabetical-nav {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 2rem;
}

.alphabetical-nav h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.alphabet-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alphabet-btn {
    padding: 0.5rem;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.alphabet-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.alphabet-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

#show-all-btn {
    width: 100%;
    font-size: 0.9rem;
}

/* Topic/Entry Lists */
.topic-list-section,
.entry-list-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 400px;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--light-text);
}

.topic-list,
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topic-item,
.entry-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.topic-item:hover,
.entry-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topic-item.expanded,
.entry-item.expanded {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topic-header,
.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--light-bg);
    cursor: pointer;
    transition: background-color 0.3s;
}

.topic-header:hover,
.entry-header:hover {
    background-color: #dfe4e8;
}

.topic-title,
.entry-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin: 0;
}

.expand-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.topic-item.expanded .expand-btn,
.entry-item.expanded .expand-btn {
    transform: rotate(45deg);
}

.topic-content,
.entry-content {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Topic References */
.loading-references,
.loading-entry {
    text-align: center;
    padding: 2rem;
    color: var(--light-text);
}

.see-also-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 4px;
}

.see-also-section h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

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

.see-also-list li {
    padding: 0.25rem 0;
    color: var(--dark-text);
}

.collection-section {
    margin-bottom: 2rem;
}

.collection-section h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.scripture-reference {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--light-bg);
    border-radius: 4px;
    line-height: 1.6;
}

.reference-text {
    color: var(--dark-text);
}

.reference-citation {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Bible Dictionary Entry Content */
.entry-body {
    line-height: 1.8;
}

.entry-body p {
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.no-content,
.no-references,
.error {
    text-align: center;
    padding: 2rem;
    color: var(--light-text);
}

.error {
    color: var(--danger-color);
}

/* Loading Spinner */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
        padding: 0 1rem 1rem 1rem;
    }

    .alphabetical-nav {
        position: static;
    }

    .alphabet-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .study-tools {
        grid-template-columns: 1fr;
    }

    .search-section {
        margin: 0 1rem 1rem 1rem;
    }

    .page-header {
        padding: 1.5rem 1rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .topic-title,
    .entry-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .study-helps-page,
    .topical-guide-page,
    .bible-dictionary-page {
        padding: 1rem;
    }

    .alphabet-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .alphabet-btn {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
}
