/* Quran Spanish Plugin Styles */

.quran-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: ltr;
    text-align: left;
    unicode-bidi: normal;
}

/* Ensure all text is LTR */
.quran-container * {
    direction: ltr;
    text-align: left;
}

.quran-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5em;

    font-weight: 300;

}

/* Chapters Grid */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.chapter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9c88ff);
}

.chapter-number {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 6px;
}

.chapter-name {
    font-size: 1em;
    font-weight: 600;
    color: #34495e;
    text-align: center;
    margin-bottom: 4px;
    direction: ltr;
}

.chapter-translation {
    font-size: 0.8em;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 6px;
    font-style: italic;
}

.chapter-verse-count {
    font-size: 0.7em;
    color: #95a5a6;
    text-align: center;
    background: #f0f0ff;
    padding: 3px 6px;
    border-radius: 10px;
    display: inline-block;
    margin: 0 auto;
}

/* Chapter Content Styles */
.chapter-content {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-btn {
    background: linear-gradient(135deg, #9c88ff, #8a7cff);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0;
    box-shadow: 0 2px 8px rgba(156, 136, 255, 0.3);
    white-space: nowrap;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 136, 255, 0.4);
}

.chapter-header {
    background: linear-gradient(135deg, #e2dff2, #d1c7e8);
    color: #2c3e50;
    padding: 20px 30px;
    text-align: left;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #9c88ff, #8a7cff);
}

#chapter-title {
    font-size: 1.8em;
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

#chapter-info {
    font-size: 0.9em;
    color: #5a6c7d;
    margin-top: 5px;
}

.chapter-title-section {
    flex: 1;
}

/* Verses Container */
.verses-container {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fafafa;
    direction: ltr;
}

/* Continuous Text Format */
.continuous-text {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #e2dff2;
    font-size: 1.2em;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
    direction: ltr;
    text-align-last: left;
    unicode-bidi: normal;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.continuous-text sup {
    color: #9c88ff;
    font-weight: bold;
    font-size: 0.8em;
    margin-left: 2px;
    margin-right: 2px;
}

.continuous-text sup:hover {
    color: #8a7cff;
    cursor: pointer;
}

/* Individual verse styling (for hover effects) */
.verse {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-right: 4px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
}

.verse:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.verse-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #9c88ff;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.arabic-text {
    font-size: 1.4em;
    line-height: 2;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: right;
    font-family: 'Amiri', 'Times New Roman', serif;
}

.spanish-translation {
    font-size: 1.1em;
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 10px;
    text-align: left;
    direction: ltr;
}

.transliteration {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
    text-align: left;
    direction: ltr;
}

/* Navigation Buttons */
.navigation-buttons {
    padding: 20px 30px;
    background: #ecf0f1;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #bdc3c7;
}

.nav-btn {
    background: linear-gradient(135deg, #9c88ff, #8a7cff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(156, 136, 255, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 136, 255, 0.4);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #9c88ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quran-container {
        padding: 10px;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chapter-card {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .verses-container {
        padding: 20px;
    }
    
    .verse {
        padding: 15px;
    }
    
    .arabic-text {
        font-size: 1.2em;
    }
    
    .spanish-translation {
        font-size: 1em;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .chapter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .back-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .quran-title {
        font-size: 2em;
    }
    
    .chapter-number {
        font-size: 1.5em;
    }
    
    .chapter-name {
        font-size: 1.1em;
    }
    
    #modal-chapter-name {
        font-size: 1.8em;
    }
    
    .verse {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .arabic-text {
        font-size: 1.1em;
        line-height: 1.8;
    }
}

/* Custom Scrollbar */
.verses-container::-webkit-scrollbar {
    width: 8px;
}

.verses-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.verses-container::-webkit-scrollbar-thumb {
    background: #9c88ff;
    border-radius: 4px;
}

.page-id-9140 .page-header {
    display: none !important;
}

#post-9140 .isopad {
    padding-top: 0 !important;

}
.page-id-9140 #tw-target-text {
    display: none !important;
}

.verses-container::-webkit-scrollbar-thumb:hover {
    background: #8a7cff;
}

/* Print Styles */
@media print {
    .chapter-modal {
        display: block !important;
        position: static;
        background: none;
    }
    
    .modal-content {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .close-modal,
    .navigation-buttons {
        display: none;
    }
    
    .verses-container {
        max-height: none;
        overflow: visible;
    }
}
