/* assets/css/custom.css - TOAFL Exam Styling */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #1e5e59;
    --primary-hover: #164642;
    --primary-light: #e8f3f2;
    --secondary-color: #c9933e;
    --bg-page: #f4f7f6;
    --card-border: #e2e8f0;
    --arabic-font: 'Amiri', 'Traditional Arabic', serif;
    --ui-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --cairo-font: 'Cairo', sans-serif;
}

body {
    font-family: var(--ui-font);
    background-color: var(--bg-page);
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Arabic typography */
.arabic-text, [dir="rtl"] {
    font-family: var(--arabic-font);
    direction: rtl;
    text-align: right;
    line-height: 2.1;
    font-size: 1.25rem;
}

.arabic-title {
    font-family: var(--cairo-font);
    direction: rtl;
    text-align: right;
    font-weight: 700;
}

/* Navbar & Header */
.exam-navbar {
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.brand-badge {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Timer Badge */
.timer-container {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.08);
}

.timer-container.timer-warning {
    background: #ef4444;
    color: #ffffff;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Question Cards */
.soal-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.soal-card:hover {
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.08);
}

.soal-card.active-question {
    border: 2px solid var(--primary-color);
}

.soal-card.unanswered-warning {
    border: 2px solid #ef4444;
    background-color: #fffaf0;
}

.soal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.soal-number-badge {
    background: var(--primary-color);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.soal-body {
    padding: 1.5rem;
}

/* Radio Choice Styling */
.option-label {
    display: flex;
    align-items: flex-start;
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.6rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    text-align: right;
    user-select: none;
}

.option-label:hover {
    background: var(--primary-light);
    border-color: #99d2cc;
}

.option-label input[type="radio"] {
    margin-left: 1rem;
    margin-top: 0.4rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.option-label.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.option-text {
    flex-grow: 1;
    font-family: var(--arabic-font);
    font-size: 1.2rem;
    line-height: 1.9;
}

/* Passage / Reading Card */
.passage-card {
    background: #fefcf6;
    border-right: 5px solid var(--secondary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.passage-title {
    font-family: var(--cairo-font);
    color: #855812;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.passage-content {
    font-family: var(--arabic-font);
    font-size: 1.35rem;
    line-height: 2.3;
    color: #2c251b;
}

/* Question Navigator Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding: 6px;
}

.nav-item-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.nav-item-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.nav-item-btn.answered {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.nav-item-btn.current {
    box-shadow: 0 0 0 3px rgba(201, 147, 62, 0.45);
    border-color: var(--secondary-color);
}

/* Audio Player Card */
.audio-card {
    background: linear-gradient(135deg, #1e5e59 0%, #133e3b 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(30, 94, 89, 0.25);
}

.audio-card audio {
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 30px;
}

/* Font Size Classes */
.font-size-default .option-text,
.font-size-default .arabic-text { font-size: 1.2rem; }

.font-size-20px .option-text,
.font-size-20px .arabic-text { font-size: 1.35rem; }

.font-size-25px .option-text,
.font-size-25px .arabic-text { font-size: 1.55rem; }

.font-size-30px .option-text,
.font-size-30px .arabic-text { font-size: 1.85rem; }

/* Sticky Question Navigator Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 85px;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .sticky-sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
    .nav-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* Test Selector Cards */
.test-choice-card {
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
    overflow: hidden;
}

.test-choice-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12) !important;
}

.test-choice-toafl {
    border-color: #1e5e59;
}

.test-choice-toefl {
    border-color: #2563eb;
}

/* English / LTR Options for TOEFL */
.option-label-ltr {
    display: flex;
    align-items: flex-start;
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.6rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: ltr;
    text-align: left;
    user-select: none;
}

.option-label-ltr:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.option-label-ltr input[type="radio"] {
    margin-right: 1rem;
    margin-top: 0.35rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #2563eb;
    cursor: pointer;
}

.option-label-ltr.selected {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.option-text-ltr {
    flex-grow: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #1e293b;
}

/* English Passage Card */
.passage-card-en {
    background: #f8fafc;
    border-left: 5px solid #2563eb;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    direction: ltr;
    text-align: left;
}

.passage-content-en {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}
