/* General Styles */
body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Main Navigation Bar */
.main-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-home, .nav-switch {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-home:hover, .nav-switch:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.nav-title {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background-color: #e9ecef;
    padding: 10px 20px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
    margin-bottom: 0;
}

.breadcrumb.hidden {
    display: none !important;
}

.breadcrumb.hidden * {
    display: none !important;
}

.breadcrumb-item {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-item:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6c757d;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: bold;
}

header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.section {
    margin-bottom: 30px;
}

.section.hidden {
    display: none;
}

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
}

.filter-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.language-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.language-filter label {
    font-weight: bold;
    color: #555;
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    width: 250px;
}

.searchable-dropdown input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    cursor: text;
}

.searchable-dropdown input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item.selected {
    background-color: #007bff;
    color: white;
}

/* Navigation Header */
.navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.chapter-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.chapter-navigation h2 {
    margin: 0;
    color: #333;
}

/* Back Navigation Buttons - Orange Theme */
.back-button {
    background-color: #fd7e14;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #e8650e;
}

.back-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Chapter Navigation Buttons - Green Theme */
.nav-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #1e7e34;
}

.nav-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Control Buttons - Purple Theme */
.control-button {
    background-color: #6f42c1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: background-color 0.3s ease;
}

.control-button:hover {
    background-color: #5a32a3;
}

/* Verse Controls */
.verse-controls {
    margin-bottom: 20px;
    text-align: center;
}

/* Translation Cards Grid */
.translations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.translation-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.translation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.translation-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
}

.translation-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-label {
    font-weight: bold;
    color: #555;
    font-size: 0.9rem;
}

.info-value {
    color: #333;
    font-weight: normal;
}

.language-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.book-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #28a745;
}

.book-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.book-title {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.book-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chapters-count {
    color: #555;
    font-size: 0.9rem;
}

.open-book-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.open-book-btn:hover {
    background-color: #138496;
}

/* Chapters Grid */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.chapter-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: #6f42c1;
    background-color: #f8f9fa;
}

.chapter-card h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

/* Chapter Content */
.chapter-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.verse-container {
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.verse-header {
    background-color: #f8f9fa;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.verse-header:hover {
    background-color: #e9ecef;
}

.verse-number {
    font-weight: bold;
    color: #495057;
}

.verse-toggle {
    font-size: 18px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.verse-content {
    padding: 15px;
    line-height: 1.8;
    display: none;
    background-color: white;
}

.verse-content.expanded {
    display: block;
}

.verse-container.expanded .verse-toggle {
    transform: rotate(180deg);
}

.verse-text {
    color: #333;
    font-size: 16px;
}

.heading {
    font-weight: bold;
    color: #495057;
    margin: 10px 0;
    font-size: 1.1rem;
}

.hebrew-subtitle {
    font-style: italic;
    color: #6c757d;
    margin: 10px 0;
    font-size: 0.9rem;
}

.words-of-jesus {
    color: #dc3545;
    font-weight: 500;
}

.poem {
    margin-left: 20px;
    font-style: italic;
}

.poem-2 {
    margin-left: 40px;
}

.poem-3 {
    margin-left: 60px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.error.hidden {
    display: none;
}

.error h3 {
    margin: 0 0 15px 0;
    color: #721c24;
}

.retry-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-title {
        font-size: 1.2rem;
    }
    
    .nav-home, .nav-switch {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .navigation-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chapter-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .translations-grid,
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .translation-info {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .verse-controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}