
/* =========================================================
   IQRANIX — TRANSLATION & TAFSIR
   Premium Midnight Sapphire + Champagne Gold
========================================================= */

:root {
    --navy: #071a2e;
    --navy-light: #0d2942;
    --navy-card: #102b43;
    --navy-soft: #18364e;

    --gold: #d9b878;
    --gold-light: #f0d9a5;
    --gold-dark: #a98548;

    --cream: #f4eee2;
    --muted: #a8b5c0;

    --page-bg: #071a2e;
    --card-bg: #102b43;
    --card-border: rgba(217,184,120,0.18);

    --text-main: #f4eee2;
    --text-secondary: #a8b5c0;

    --reading-bg: #0c2439;
    --reading-text: #f4eee2;

    --danger: #e58d82;
    --success: #8dc8a6;

    --radius: 18px;
    --radius-small: 12px;

    --reading-font-size: 18px;

    color-scheme: dark;
}


/* =========================================================
   THEMES
========================================================= */

:root[data-theme="sapphire"] {
    --page-bg: #071a2e;
    --card-bg: #102b43;
    --card-border: rgba(217,184,120,0.18);
    --text-main: #f4eee2;
    --text-secondary: #a8b5c0;
    --reading-bg: #0c2439;
    --reading-text: #f4eee2;
    color-scheme: dark;
}

:root[data-theme="emerald"] {
    --page-bg: #071f1a;
    --card-bg: #10372d;
    --card-border: rgba(205,177,117,0.2);
    --text-main: #f4eee2;
    --text-secondary: #a9c2b7;
    --reading-bg: #0c2c23;
    --reading-text: #f4eee2;
    color-scheme: dark;
}

:root[data-theme="white"] {
    --page-bg: #f2f0eb;
    --card-bg: #ffffff;
    --card-border: rgba(30,45,55,0.12);
    --text-main: #172a3b;
    --text-secondary: #687785;
    --reading-bg: #ffffff;
    --reading-text: #25394a;
    color-scheme: light;
}

:root[data-theme="black"] {
    --page-bg: #090909;
    --card-bg: #171717;
    --card-border: rgba(217,184,120,0.16);
    --text-main: #f3eee5;
    --text-secondary: #a6a6a6;
    --reading-bg: #111111;
    --reading-text: #f3eee5;
    color-scheme: dark;
}


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

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

html {
    scroll-behavior: smooth;
    background: var(--page-bg);
}

body {
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: "DM Sans", sans-serif;
    transition: background 0.25s ease, color 0.25s ease;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.tafsir-page {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    min-height: 100vh;
    overflow: hidden;
}


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

.top-header {
    height: 76px;
    padding: 0 24px;

    display: flex;
    align-items: center;
    gap: 18px;

    background: var(--page-bg);
}

.back-button {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border: 1px solid var(--card-border);
    border-radius: 13px;

    color: var(--gold);
    font-size: 24px;

    transition: 0.2s ease;
}

.back-button:hover {
    background: var(--card-bg);
    transform: translateX(-2px);
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
}

.brand-subtitle {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.header-spacer {
    flex: 1;
}


/* =========================================================
   HERO BANNER
========================================================= */

.hero-banner {
    position: relative;
    width: calc(100% - 40px);
    margin: 0 auto;

    aspect-ratio: 4 / 3;
    max-height: 390px;

    overflow: hidden;
    border-radius: 22px;

    background: #0b2741;
    border: 1px solid var(--card-border);
}

.hero-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(4,17,32,0.05),
        rgba(4,17,32,0.18) 50%,
        rgba(4,17,32,0.7)
    );
}

.hero-content {
    position: absolute;
    right: 5%;
    bottom: 10%;

    width: 53%;
    text-align: center;

    z-index: 2;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: var(--gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero-content h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(22px, 4vw, 43px);
    line-height: 1.15;
    color: #fff2d8;
    font-weight: 600;
}

.hero-content h1 span {
    color: var(--gold);
}

.hero-content p {
    margin-top: 12px;
    color: #f0e5d2;
    font-size: clamp(10px, 1.5vw, 14px);
}


/* =========================================================
   INTRODUCTION
========================================================= */

.intro-section {
    padding: 43px 30px 30px;
    text-align: center;
}

.section-kicker {
    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.intro-section h2 {
    margin-top: 12px;

    font-family: "Playfair Display", serif;
    font-size: clamp(25px, 4vw, 36px);
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-main);
}

.intro-section p {
    max-width: 520px;
    margin: 13px auto 0;

    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}


/* =========================================================
   MAIN READING AREA
========================================================= */

.reading-area {
    padding: 0 24px 40px;
}


/* =========================================================
   CONTROL PANEL
========================================================= */

.control-panel {
    position: relative;

    padding: 25px;
    background: var(--card-bg);

    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}

.control-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 23px;
}

.control-heading h2 {
    margin-top: 5px;
    font-family: "Playfair Display", serif;
    font-size: 23px;
    font-weight: 500;
}

.quran-mark {
    color: var(--gold);
    font-family: serif;
    font-size: 31px;
}

.field-group {
    margin-bottom: 17px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;

    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.field-group select,
.search-wrapper {
    width: 100%;
    height: 49px;

    border: 1px solid var(--card-border);
    border-radius: var(--radius-small);

    background: var(--reading-bg);
    color: var(--text-main);
}

.field-group select {
    padding: 0 14px;
    outline: none;
    cursor: pointer;
}

.field-group select:focus,
.search-wrapper:focus-within {
    border-color: var(--gold);
}

.field-group select option {
    background: var(--card-bg);
    color: var(--text-main);
}


/* =========================================================
   SEARCH
========================================================= */

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
}

.search-icon {
    color: var(--gold);
    font-size: 22px;
}

.search-wrapper input {
    width: 100%;
    min-width: 0;

    background: transparent;
    border: none;
    outline: none;

    color: var(--text-main);
    font-size: 12px;
}

.search-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-wrapper button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
}


/* =========================================================
   TAFSIR SELECTION
========================================================= */

.tafsir-selection {
    position: relative;
    margin-top: 25px;
}

.selection-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.selection-note {
    color: var(--text-secondary);
    font-size: 10px;
}

.selected-tafsir {
    width: 100%;
    min-height: 68px;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 12px 15px;

    border: 1px solid rgba(217,184,120,0.35);
    border-radius: 13px;

    background: linear-gradient(
        120deg,
        rgba(217,184,120,0.10),
        rgba(217,184,120,0.025)
    );

    color: var(--text-main);
    text-align: left;
}

.selected-tafsir-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 12px;
    background: rgba(217,184,120,0.13);

    color: var(--gold);
    font-size: 19px;
}

.selected-tafsir-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.selected-tafsir-details strong {
    font-size: 12px;
    font-weight: 700;
}

.selected-tafsir-details small {
    font-size: 10px;
    color: var(--gold);
}

.selector-arrow {
    color: var(--gold);
    font-size: 21px;
}


/* =========================================================
   TAFSIR PICKER
========================================================= */

.tafsir-picker {
    position: absolute;
    z-index: 30;

    top: calc(100% + 9px);
    left: 0;
    right: 0;

    padding: 17px;

    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;

    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 15px;
}

.picker-header strong {
    font-family: "Playfair Display", serif;
    font-size: 17px;
}

.picker-header p {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 10px;
}

.picker-header > button {
    width: 30px;
    height: 30px;

    border: 1px solid var(--card-border);
    border-radius: 9px;

    background: transparent;
    color: var(--text-main);
    font-size: 20px;
}

.language-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;

    border-radius: 10px;
    background: var(--reading-bg);
    margin-bottom: 13px;
}

.language-tab {
    flex: 1;
    height: 38px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.language-tab.active {
    background: var(--gold);
    color: #172536;
}

.tafsir-source-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 290px;
    overflow-y: auto;
}

.tafsir-option {
    width: 100%;
    min-height: 61px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px;

    border: 1px solid var(--card-border);
    border-radius: 11px;

    background: var(--reading-bg);
    color: var(--text-main);
    text-align: left;
}

.tafsir-option.selected {
    border-color: var(--gold);
    background: rgba(217,184,120,0.09);
}

.tafsir-option-number {
    width: 29px;
    height: 29px;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    border-radius: 9px;
    background: rgba(217,184,120,0.12);

    color: var(--gold);
    font-size: 11px;
}

.tafsir-option-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.tafsir-option-info strong {
    font-size: 11px;
}

.tafsir-option-info small {
    color: var(--text-secondary);
    font-size: 9px;
}

.tafsir-option-check {
    color: var(--gold);
    font-size: 17px;
}

.tafsir-no-options,
.picker-loading {
    padding: 17px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 11px;
}


/* =========================================================
   APPEARANCE PANEL
========================================================= */

.appearance-panel {
    margin-top: 17px;
    padding: 20px 22px;

    border: 1px solid var(--card-border);
    border-radius: var(--radius);

    background: var(--card-bg);
}

.appearance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.appearance-heading h3 {
    margin-top: 5px;
    font-family: "Playfair Display", serif;
    font-size: 17px;
    font-weight: 500;
}

.font-controls {
    display: flex;
    gap: 6px;
}

.font-controls button {
    width: 37px;
    height: 34px;

    border: 1px solid var(--card-border);
    border-radius: 9px;

    background: var(--reading-bg);
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
}

.theme-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 17px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 8px 11px;

    border: 1px solid var(--card-border);
    border-radius: 30px;

    background: transparent;
    color: var(--text-secondary);

    font-size: 10px;
}

.theme-option.active {
    border-color: var(--gold);
    color: var(--text-main);
    background: rgba(217,184,120,0.08);
}

.theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(128,128,128,0.3);
}

.sapphire-dot {
    background: #0b2944;
}

.emerald-dot {
    background: #104b39;
}

.white-dot {
    background: #fff;
}

.black-dot {
    background: #090909;
}


/* =========================================================
   SURAH INFORMATION
========================================================= */

.surah-information {
    margin-top: 20px;
    padding: 24px;

    border: 1px solid var(--card-border);
    border-radius: var(--radius);

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(217,184,120,0.10),
            transparent 40%
        ),
        var(--card-bg);
}

.surah-info-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.surah-number {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    border: 1px solid var(--gold-dark);
    border-radius: 13px;

    color: var(--gold);
    font-family: "Playfair Display", serif;
    font-size: 18px;
}

.surah-names {
    flex: 1;
    min-width: 0;
}

.surah-names h2 {
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 500;
}

.surah-names p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 10px;
}

.surah-arabic {
    color: var(--gold);
    font-family: serif;
    font-size: 27px;
    direction: rtl;
}

.surah-divider {
    height: 1px;
    margin: 19px 0 13px;
    background: var(--card-border);
}

.surah-meta {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--text-secondary);
    font-size: 10px;
}

.meta-separator {
    color: var(--gold);
}


/* =========================================================
   READING STATUS
========================================================= */

.reading-status {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 21px 4px 12px;

    color: var(--text-secondary);
    font-size: 10px;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}


/* =========================================================
   VERSE CARDS
========================================================= */

.verses-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.verse-card {
    padding: 22px;

    border: 1px solid var(--card-border);
    border-radius: 16px;

    background: var(--card-bg);
    transition: border-color 0.2s ease;
}

.verse-card:hover {
    border-color: rgba(217,184,120,0.48);
}

.verse-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.verse-reference {
    padding: 7px 10px;

    border-radius: 8px;
    background: rgba(217,184,120,0.11);

    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
}

.open-tafsir-button {
    padding: 8px 13px;

    border: 1px solid rgba(217,184,120,0.4);
    border-radius: 9px;

    background: transparent;
    color: var(--gold);

    font-size: 10px;
    font-weight: 600;

    transition: 0.2s ease;
}

.open-tafsir-button:hover {
    background: var(--gold);
    color: #172536;
}

.verse-arabic {
    margin: 27px 0 22px;

    color: var(--text-main);
    font-family: serif;
    font-size: var(--reading-font-size);
    line-height: 2.1;
    text-align: right;
}

.verse-translation {
    padding-top: 18px;

    border-top: 1px solid var(--card-border);

    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.9;
}

.verse-translation.unavailable {
    font-style: italic;
    opacity: 0.7;
}


/* =========================================================
   LOADING / ERROR / EMPTY
========================================================= */

.loading-state,
.error-state,
.empty-state {
    padding: 45px 20px;
    text-align: center;

    border: 1px solid var(--card-border);
    border-radius: 16px;

    background: var(--card-bg);
}

.loading-state h3,
.error-state h3,
.empty-state h3 {
    margin-top: 16px;
    font-family: "Playfair Display", serif;
    font-size: 19px;
    font-weight: 500;
}

.loading-state p,
.error-state p,
.empty-state p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.7;
}

.loading-spinner {
    width: 32px;
    height: 32px;

    margin: 0 auto;

    border: 3px solid var(--card-border);
    border-top-color: var(--gold);
    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.state-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    margin: 0 auto;

    border-radius: 50%;
    background: rgba(217,184,120,0.12);

    color: var(--gold);
    font-size: 20px;
}

.error-state .state-icon {
    color: var(--danger);
    background: rgba(229,141,130,0.12);
}

.error-state button,
.modal-error button {
    margin-top: 18px;
    padding: 11px 20px;

    border: none;
    border-radius: 9px;

    background: var(--gold);
    color: #172536;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   SURAH NAVIGATION
========================================================= */

.surah-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-top: 25px;
}

.surah-navigation button {
    min-height: 48px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    gap: 9px;

    border: 1px solid var(--card-border);
    border-radius: 11px;

    background: var(--card-bg);
    color: var(--text-main);

    font-size: 10px;
    font-weight: 600;
}

.surah-navigation button span:first-child {
    color: var(--gold);
    font-size: 17px;
}


/* =========================================================
   TAFSIR MODAL
========================================================= */

.modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(7px);
}

.tafsir-modal {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;

    overflow-y: auto;

    padding: 25px;

    border: 1px solid var(--card-border);
    border-radius: 19px;

    background: var(--page-bg);
    color: var(--text-main);

    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.modal-header h2 {
    margin-top: 5px;
    font-family: "Playfair Display", serif;
    font-size: 25px;
    font-weight: 500;
}

.modal-reference {
    display: inline-block;
    margin-top: 7px;
    color: var(--gold);
    font-size: 10px;
}

.modal-close {
    width: 38px;
    height: 38px;

    border: 1px solid var(--card-border);
    border-radius: 10px;

    background: var(--card-bg);
    color: var(--text-main);
    font-size: 23px;
}

.modal-source {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 23px;
    padding: 13px;

    border: 1px solid var(--card-border);
    border-radius: 12px;

    background: var(--card-bg);
}

.source-symbol {
    color: var(--gold);
    font-size: 21px;
}

.modal-source div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-source strong {
    font-size: 11px;
}

.modal-source small {
    color: var(--text-secondary);
    font-size: 9px;
}

.modal-verse {
    margin-top: 17px;
    padding: 23px;

    border: 1px solid var(--card-border);
    border-radius: 13px;

    background: var(--reading-bg);
}

.modal-verse p {
    color: var(--text-main);
    font-family: serif;
    font-size: 25px;
    line-height: 2;
    text-align: right;
}

.modal-loading {
    padding: 35px 15px;
    text-align: center;
}

.modal-loading p {
    margin-top: 13px;
    color: var(--text-secondary);
    font-size: 11px;
}

.modal-error {
    padding: 25px 10px;
    text-align: center;
}

.modal-error h3 {
    font-family: "Playfair Display", serif;
    font-size: 19px;
}

.modal-error p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}

.tafsir-reading-text {
    padding: 23px 3px;

    color: var(--text-main);
    font-size: var(--reading-font-size);
    line-height: 1.95;

    overflow-wrap: anywhere;
}

.tafsir-reading-text p {
    margin-bottom: 17px;
}

.tafsir-reading-text h1,
.tafsir-reading-text h2,
.tafsir-reading-text h3,
.tafsir-reading-text h4 {
    margin: 20px 0 10px;
    font-family: "Playfair Display", serif;
    color: var(--gold);
}

.tafsir-reading-text strong {
    color: var(--gold);
}

.tafsir-reading-text img {
    max-width: 100%;
    height: auto;
}

.modal-footer {
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

.modal-footer button {
    width: 100%;
    min-height: 45px;

    border: 1px solid var(--card-border);
    border-radius: 10px;

    background: var(--card-bg);
    color: var(--gold);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   TOAST
========================================================= */

.tafsir-toast {
    position: fixed;
    z-index: 2000;

    left: 50%;
    bottom: 25px;

    transform: translate(-50%, 20px);

    max-width: calc(100% - 35px);
    padding: 12px 19px;

    border: 1px solid var(--gold-dark);
    border-radius: 10px;

    background: var(--card-bg);
    color: var(--text-main);

    font-size: 11px;
    text-align: center;

    opacity: 0;
    pointer-events: none;

    transition: 0.25s ease;
}

.tafsir-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


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

.page-footer {
    padding: 28px 20px 35px;
    text-align: center;

    border-top: 1px solid var(--card-border);
}

.page-footer span {
    font-family: "Playfair Display", serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold);
}

.page-footer p {
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 10px;
}


/* =========================================================
   WHITE THEME OVERRIDES
========================================================= */

:root[data-theme="white"] .hero-overlay {
    background: linear-gradient(
        90deg,
        rgba(4,17,32,0.05),
        rgba(4,17,32,0.25) 50%,
        rgba(4,17,32,0.72)
    );
}

:root[data-theme="white"] .selected-tafsir {
    background: #f8f5ee;
}

:root[data-theme="white"] .verse-reference {
    background: #f4ecdb;
}

:root[data-theme="white"] .theme-option.active {
    background: #f5eddf;
}

:root[data-theme="white"] .selected-tafsir-icon {
    background: #f1e7d3;
}

:root[data-theme="white"] .tafsir-option.selected {
    background: #f7f1e6;
}

:root[data-theme="white"] .modal-verse {
    background: #f8f6f1;
}

:root[data-theme="white"] .open-tafsir-button:hover {
    color: #172536;
}


/* =========================================================
   MOBILE RESPONSIVENESS
========================================================= */

@media (max-width: 650px) {

    .top-header {
        height: 65px;
        padding: 0 16px;
    }

    .hero-banner {
        width: calc(100% - 24px);
        aspect-ratio: 4 / 3;
        max-height: 300px;
        border-radius: 15px;
    }

    .hero-content {
        right: 3%;
        bottom: 7%;
        width: 59%;
    }

    .hero-eyebrow {
        font-size: 8px;
        letter-spacing: 1.8px;
        margin-bottom: 5px;
    }

    .hero-content h1 {
        font-size: clamp(17px, 5vw, 27px);
    }

    .hero-content p {
        margin-top: 6px;
        font-size: 9px;
    }

    .intro-section {
        padding: 32px 20px 24px;
    }

    .intro-section h2 {
        font-size: 27px;
    }

    .intro-section p {
        font-size: 12px;
    }

    .reading-area {
        padding: 0 13px 30px;
    }

    .control-panel {
        padding: 19px 15px;
        border-radius: 15px;
    }

    .control-heading h2 {
        font-size: 21px;
    }

    .appearance-panel {
        padding: 17px 14px;
    }

    .theme-selector {
        gap: 6px;
    }

    .theme-option {
        padding: 7px 9px;
        font-size: 9px;
    }

    .surah-information {
        padding: 19px 15px;
    }

    .surah-names h2 {
        font-size: 18px;
    }

    .surah-arabic {
        font-size: 23px;
    }

    .verse-card {
        padding: 17px 14px;
    }

    .verse-arabic {
        margin: 22px 0 17px;
        line-height: 2;
    }

    .verse-translation {
        font-size: 12px;
    }

    .tafsir-modal {
        padding: 19px 15px;
        max-height: 92vh;
        border-radius: 15px;
    }

    .modal-verse {
        padding: 17px 13px;
    }

    .modal-verse p {
        font-size: 22px;
    }

    .tafsir-reading-text {
        font-size: 16px;
    }

    .surah-navigation button {
        padding: 0 10px;
        font-size: 9px;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .hero-content {
        width: 62%;
    }

    .hero-content h1 {
        font-size: 17px;
    }

    .hero-content p {
        font-size: 8px;
    }

    .section-kicker {
        font-size: 8px;
    }

    .theme-option {
        gap: 5px;
        padding: 7px;
    }

    .surah-arabic {
        font-size: 20px;
    }

    .surah-navigation button {
        gap: 5px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
