/* Base styles */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #4f46e5;
    --accent-color: #facc15;
    --text-color: #1f2937;
    --background-color: #f9fafb;
    --card-color: #ffffff;
    --border-color: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.mlcontainer {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

    .mlcontainer h2 {
        color: #4f46e5; /* This sets the text color to match your secondary-color */
    }

a {
    color: var(--primary-color);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

    .btn:hover {
        background-color: var(--secondary-color);
        text-decoration: none;
    }

/* Header styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

    header h1 {
        margin-bottom: 0.5rem;
    }

    header nav {
        margin-top: 1rem;
    }

    header .btn {
        background-color: white;
        color: var(--primary-color);
        margin-right: 0.5rem;
    }

        header .btn:hover {
            background-color: var(--accent-color);
        }

/* Grid layouts */
.languages-grid,
.translations-grid,
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.language-card,
.translation-card,
.chapter-card {
    background-color: var(--card-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .language-card:hover,
    .translation-card:hover,
    .chapter-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .language-card h3,
    .translation-card h3,
    .chapter-card h3 {
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }

.native-name,
.translator,
.arabic-name {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.chapter-card .chapter-number {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    margin-bottom: 0.5rem;
}

/* Verse styles */
.verse-list {
    margin: 1rem 0; 
}


.verse-mlcontainer {
    background-color: var(--card-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;;
    margin-bottom: 0.75rem;
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.verse-number {
    display: inline-flex;  /* Better vertical alignment */
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    height: 1.75rem;  /* Slightly smaller */
    width: auto;
    min-width: 2rem;
    padding: 0 0.5rem;
    margin-right: 0.75rem;
    line-height: 1;  /* Remove extra line height */
}

.verse-arabic {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
    font-family: 'Traditional Arabic', 'Scheherazade', serif;
}

.verse-translation {
    line-height: 1.4;  /* Tightened from 1.8 */
}

.compare-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Verse comparison page */
.verse-comparison {
    background-color: var(--card-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.translations-list {
    margin-top: 2rem;
}

.translation-item {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

    .translation-item:first-child {
        border-top: none;
        padding-top: 0;
    }

.translation-text {
    margin: 1rem 0;
    line-height: 1.8;
}

.missing-translation {
    font-style: italic;
    color: #6b7280;
}

/* Chapter navigation */
.chapter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .languages-grid,
    .translations-grid,
    .chapters-grid {
        grid-template-columns: 1fr;
    }

    .chapter-info {
        flex-direction: column;
        align-items: flex-start;
    }

        .chapter-info p {
            margin-bottom: 1rem;
        }
}

/* RTL language support */
[dir="rtl"] .btn {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .verse-arabic {
    text-align: right;
}

/* Language group alternating colors */
.translations-list .translation-item.language-group-even {
    background-color: #caede7; /* Very light green */
}

.translations-list .translation-item.language-group-odd {
    background-color: #fefefe; /* Off-white */
}