/* ==========================================
   RootConcordance2025.css
   IslamAwakened Root Concordance Pages
   Matches Hub + WFW + Ayah + Surah design
   ========================================== */

/* ==========================================
   BASE / RESET
   ========================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f8fafc;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* ==========================================
   SITE HEADER
   ========================================== */

.site-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
}

.site-header .logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-header .logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.site-header .primary-nav {
    display: flex;
    gap: 1.5rem;
}

.site-header .primary-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.site-header .primary-nav a:hover {
    color: white;
    text-decoration: none;
}

/* ==========================================
   BREADCRUMBS
   ========================================== */

.breadcrumbs {
    background: #f1f5f9;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.breadcrumbs .container {
    max-width: 1200px;
}

.breadcrumbs a {
    color: #2563eb;
}

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

.breadcrumbs .separator {
    color: #94a3b8;
    margin: 0 6px;
}

.breadcrumbs .current {
    color: #64748b;
    font-weight: 500;
}

/* ==========================================
   LANGUAGE SELECTOR BAR (matches WFW pattern)
   ========================================== */

.language-bar {
    background: #e2e8f0;
    padding: 8px 0;
    border-bottom: 1px solid #cbd5e1;
}

.language-bar .container {
    max-width: 1200px;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.lang-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.lang-option {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    background: white;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}

a.lang-option:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a8a;
    text-decoration: none;
}

.lang-option.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    font-weight: 700;
}

.lang-option.disabled {
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: default;
    opacity: 0.6;
}

/* ==========================================
   ROOT HERO (Arabic root display)
   ========================================== */

.root-hero {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    padding: 32px 0;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
}

.root-hero .root-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.4;
    margin-bottom: 8px;
}

.root-hero .root-translit {
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.root-hero .root-stats {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ==========================================
   ROOT SUMMARY
   ========================================== */

.root-summary {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.root-summary h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.root-summary .summary-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #374151;
}

/* ==========================================
   ROOT NAVIGATION
   ========================================== */

.root-nav {
    background: #f8fafc;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.root-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 1200px;
}

.root-nav a.rootNav,
.root-nav span.rootNav {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.root-nav a.rootNav {
    color: #2563eb;
    text-decoration: none;
}

.root-nav a.rootNav:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    text-decoration: none;
}

.root-nav span.rootNav.current {
    color: #1e3a8a;
    font-weight: 700;
    background: #dbeafe;
    border-color: #93c5fd;
}

.root-nav.bottom {
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
}

/* ==========================================
   WORD FORM CARDS
   ========================================== */

.word-forms-container {
    padding: 20px 0;
}

.word-form-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Word form header: Arabic word + transliteration + count */
.word-form-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #bfdbfe;
    flex-wrap: wrap;
}

/* Arabic word button (click to listen) */
.arabic-word-btn {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e3a8a;
    background: white;
    border: 2px solid #93c5fd;
    border-radius: 6px;
    padding: 4px 14px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.arabic-word-btn:hover {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

/* Arabic word without audio */
.arabic-word {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e3a8a;
}

.word-translit {
    font-size: 0.95rem;
    color: #475569;
    font-style: italic;
}

.word-eng-count {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: auto;
}

/* ==========================================
   ENGLISH MEANINGS (details/summary)
   Replaces Bootstrap accordion with native HTML
   ========================================== */

.meanings-list {
    padding: 0;
}

.meaning-item {
    border-bottom: 1px solid #f1f5f9;
}

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

/* Summary (the clickable header) */
.meaning-item summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1f2937;
    transition: background-color 0.15s;
    list-style: none; /* Remove default marker */
}

.meaning-item summary::-webkit-details-marker {
    display: none; /* Chrome/Safari */
}

/* Custom expand/collapse indicator */
.meaning-item summary::before {
    content: "\25B6"; /* right triangle */
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
    width: 12px;
}

.meaning-item[open] summary::before {
    transform: rotate(90deg);
}

.meaning-item summary:hover {
    background: #f8fafc;
}

.meaning-word {
    font-weight: 600;
    color: #1e3a8a;
}

.meaning-count {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==========================================
   CONCORDANCE ENTRIES
   ========================================== */

.concordance-list {
    padding: 6px 18px 14px 40px;
    background: #fafbfc;
}

.concordance-entry {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.7;
}

.concordance-entry:last-child {
    border-bottom: none;
}

.ayah-ref {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e3a8a;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    text-decoration: none;
    margin-right: 8px;
    transition: all 0.2s;
    vertical-align: middle;
}

.ayah-ref:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    text-decoration: none;
}

.ayah-text {
    color: #374151;
}

/* ==========================================
   DONATE BLOCK (shared blue style)
   ========================================== */

.donate-simple {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.donate-header {
    text-align: center;
    margin-bottom: 30px;
}

.donate-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
}

.donate-header p {
    font-size: 1.1rem;
    color: #666;
}

.support-option {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.support-option.primary {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #2563eb;
}

.support-option.secondary {
    background: #f9fafb;
}

.option-content {
    max-width: 600px;
    margin: 0 auto;
}

.option-badge {
    display: inline-block;
    background: #fbbf24;
    color: #78350f;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.support-option h3 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #1e3a8a;
}

.support-option p {
    color: #4b5563;
    line-height: 1.6;
    margin: 10px 0;
}

.option-benefits {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.option-benefits li {
    padding: 8px 0;
    color: #4b5563;
}

.donate-simple .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin: 10px 0;
}

.donate-simple .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.donate-simple .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    text-decoration: none;
}

.option-note {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 10px;
}

#paypal-donate-container {
    margin: 20px 0;
    text-align: center;
}

.donate-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    color: #6b7280;
}

.donate-footer strong {
    color: #1e3a8a;
}

/* ==========================================
   SITE FOOTER
   ========================================== */

.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer a {
    color: #93c5fd;
}

.site-footer a:hover {
    color: white;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .site-header .logo {
        font-size: 1.2rem;
    }

    .site-header .primary-nav {
        gap: 1rem;
    }

    .site-header .primary-nav a {
        font-size: 0.85rem;
    }

    .breadcrumbs {
        font-size: 0.8rem;
    }

    .root-hero .root-arabic {
        font-size: 2.2rem;
    }

    .root-hero .root-translit {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 12px;
    }

    .word-form-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .arabic-word-btn {
        font-size: 1.3rem;
    }

    .word-eng-count {
        margin-left: 0;
        width: 100%;
    }

    .meaning-item summary {
        padding: 10px 14px;
    }

    .concordance-list {
        padding: 6px 14px 14px 28px;
    }

    .root-nav a.rootNav,
    .root-nav span.rootNav {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .donate-simple {
        margin: 20px 10px;
    }
}

@media (max-width: 480px) {
    .root-hero .root-arabic {
        font-size: 1.8rem;
    }

    .word-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .concordance-list {
        padding-left: 18px;
    }

    .ayah-ref {
        display: block;
        margin-bottom: 4px;
        width: fit-content;
    }
}

/* ==========================================
   PRINT
   ========================================== */

@media print {
    .site-header,
    .breadcrumbs,
    .root-nav,
    .donate-simple,
    .site-footer {
        display: none;
    }

    .root-hero {
        background: white;
        border-bottom: 2px solid black;
    }

    .root-hero .root-arabic {
        color: black;
    }

    .word-form-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #999;
    }

    /* Open all details for print */
    .meaning-item {
        open: true;
    }

    .meaning-item[open] summary::before {
        display: none;
    }

    body {
        background: white;
    }
}