@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

@font-face {
    font-family: fontArab;
    src: url('../fonts/lpmq.ttf');
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fafafa;
    unicode-bidi: bidi-override !important;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}


.dropdown-toggle { outline: 0; }

.btn-toggle {
  padding: .25rem .5rem;
  font-weight: 600;
  color: var(--bs-emphasis-color);
  background-color: transparent;
}
.btn-toggle:hover,
.btn-toggle:focus {
  color: rgba(var(--bs-emphasis-color-rgb), .85);
  background-color: var(--bs-tertiary-bg);
}

.btn-toggle::before {
  width: 1.25em;
  line-height: 0;
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
  transition: transform .35s ease;
  transform-origin: .5em 50%;
}

[data-bs-theme="dark"] .btn-toggle::before {
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
}

.btn-toggle[aria-expanded="true"] {
  color: rgba(var(--bs-emphasis-color-rgb), .85);
}
.btn-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.btn-toggle-nav a {
  padding: .1875rem .5rem;
  margin-top: .125rem;
  margin-left: 1.25rem;
}
.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
  background-color: var(--bs-tertiary-bg);
}

.scrollarea {
  overflow-y: auto;
}


a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.navbar {
    padding: 15px 10px;
    background-color: #08f482 !important;
    border: none;
    border-radius: 0;
    margin-bottom: 40px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 40px 0;
}

/* ---------------------------------------------------
SIDEBAR STYLE
----------------------------------------------------- */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
     background: #08f482;  /*#7386D5; */
    color: #fff;
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #08f482;
}

/* Style for Chapters and Names list */
.chapter-list, .names-list {
    background-color: #08f482 !important; /* Ensure these lists have the same background */
    padding-left: 20px;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid #47748b;
}

#sidebar ul p {
    color: #fff; 
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
}

#sidebar ul li a:hover {
    color: #7386D5;
    background: #fff;
}

/* Additional styles for better readability */
.chapter-list li, .names-list li {
    /* padding: 8px 0;
    font-size: 1em;
    color: #fff; */
    background-color: #6d7fcc; /* Hover effect for better interaction */
}

.chapter-list li:hover, .names-list li:hover {
    background-color: #7386D5;
}

/* Sidebar link styles */
#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
    color: #fff;
}

#sidebar ul li a:hover {
    background: #fff;
    color: #7386D5;
}

#sidebar ul li.active>a,
a[aria-expanded="true"] {
    color: #fff;
    background: #8a2be2;
}

a[data-toggle="collapse"] {
    position: relative;
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

ul ul a {
    font-size: 0.9em !important;
    padding-left: 30px !important;
    background: #8a2be2;
}

ul.CTAs {
    padding: 20px;
}

ul.CTAs a {
    text-align: center;
    font-size: 0.9em !important;
    display: block;
    border-radius: 5px;
    margin-bottom: 5px;
}

a.download {
    background: #8a2be2;
    color:  #fff;
}

a.article,
a.article:hover {
    background: #6d7fcc !important;
    color: #fff !important;
}

/* ---------------------------------------------------
CONTENT STYLE
----------------------------------------------------- */

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* -----------------------------------------------
ARABIC AND ENGLISH TEXT
------------------------------------------------------*/

/* Base (mobile-first) */
.arabic {
    font-family: 'Amiri', serif !important;
    font-size: 1.6em;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    color: #333;
}

.arabic-verse {
    margin-bottom: 12px;
}


/* 📱 Small devices (≥ 480px) */
@media (min-width: 480px) {
    .arabic {
        font-size: 1.6em;
    }
}


/* 📱 Tablets (≥ 768px) */
@media (min-width: 768px) {
    .arabic {
        font-size: 2.1em;
    }
}


/* 💻 Desktop (≥ 1024px) */
@media (min-width: 1024px) {
    .arabic {
        font-size: 2.5em;
    }
}


/* -----------------------------------------------
NORMAL AND STATES LINK COLOR
------------------------------------------------------*/


/* Normal link color */
.quran-link {
    color: #0d0d0d; /* Change this to any color you want for the normal state */
    text-decoration: none; /* Optional: Removes underline */
}

/* Link color when it is visited (clicked) */
.quran-link:visited {
    color: #8a2be2; /* Change this to the color you want for the visited state */
}

/* Optional: Change link color when hovered over */
.quran-link:hover {
    color: #ff6347; /* Change this to any color you want for the hover state */
}

/* Optional: Change link color when clicked (active state) */
.quran-link:active {
    color: #d2691e; /* Change this to any color you want for the active state */
}




/* ---------------------------------------------------
MEDIAQUERIES
----------------------------------------------------- */

@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #sidebarCollapse span {
        display: none;
    }
}

.list-surat {
    margin: 0;
    padding: 0;

}

.list-surat h4 {
    margin: 0;
    padding: 10px 20px;
    font-size: 16px;
        background-color: #8a2be2;

}


.list-surat ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    max-height: 200px;
    overflow: auto;

}

.list-surat ul li {
    margin: 0;
    padding: 0;

}

.list-surat ul li a {
    padding: 5px 10px;
    background-color: #08f482;

}

.ayat-item {
    border-bottom: 1px solid #CCCCCC;
    padding-bottom: 10px;
    margin-bottom: 5px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: auto; /* Improves touch responsiveness */

}

.ayat-item audio {
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}


/*new*/
/* Your existing highlight for verses */
.ayat-item.highlight-verse,
.ayat-item:active {
    background-color: #FFE4B5;
    transition: background-color 0.2s ease;
}

/* Override when menu is open */
body.menu-open .ayat-item:active {
    background-color: transparent;
}

/* Style for the verse that triggered the menu */
.ayat-item.menu-triggered {
    background-color: #E8C9A0;
    position: relative;
}

.ayat-item.menu-triggered::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 69, 19, 0.1);
    pointer-events: none;
}
/*new end*/


.list-unstyled {
    padding: 0;
}

#sidebar ul.components {
    padding: 0;
}


.arab {
    direction: rtl;
    font-size: 16px;
    line-height: 185%;
    font-family: fontArab, "Traditional Arabic", Tahoma, sans-serif;
    font-weight: normal;
    text-align: right;
    padding: 10px 0px 5px 0px;
    /*text-align-last: justify;*/
}


.stanza {
    direction: rtl;             /* Arabic flow */
    unicode-bidi: bidi-override;
    text-align: justify;        /* Justify each stanza */
    font-family: "Amiri", "Scheherazade", serif;
    margin-bottom: 5px;        /* Space between stanzas */
  /*  text-align:justify;*/
  text-align-last:justify;
}

.gap {
    display: inline-block;
    width: 50px;                /* Adjustable gap */
}


.translation {
    line-height: 150%;
    padding: 10px 0px;
    font-size: 16px;
    font-family: fontArab, "Traditional Arabic", Tahoma, sans-serif;

}

.translation em {
    background-color: yellow;
    font-style: normal;
}


.search-form {
    position: relative;
}

.search-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 60px 10px 15px;
    font-size: 14px;
    border: 1px solid #CCCCCC;
}

.search-form input[type="text"]:focus {
    outline: none;
}

.search-form input[type="submit"] {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 3px 10px;
    font-size: 14px;
}

.link-surat {
    padding: 5px 0 0 0;
}

#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
}

.main-content{
    padding: 10px 0px 20px 0px;
}

/* =========================== */
.poem{
    font-family:'Amiri', serif;
    font-size:26px;
    direction:rtl;
    line-height:2;
    max-width:900px;
    margin:auto;
}


/* side-by-side */
.poem.row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* stacked (mobile-friendly) */
.poem.stack {
    display: block;
    line-height: 1.8;
}

.line{
    display:flex;
    align-items:center;
}

.half{
    width:45%;
}

.right{
    text-align:right;
}

.left{
    text-align:left;
}

.verse{
    width:10%;
    text-align:center;
    font-weight:bold;
}



/*
========================================
CSS Custom Properties (Corporate Theme)
========================================
*/
:root {
    --color-background: #b39142;
    /*--color-text-primary: #1f2d3d;*/
    --color-text-primary: #ffffff;
    --color-text-secondary: #8492a6;
    --color-primary-brand: #3b82f6;
    --color-border: #e2e8f0;
    --color-top-bar-bg: #000000;
    --font-family-sans-serif: "Open Sans", -apple-system, sans-serif;
    --main-nav-height: 80px;
    --container-width: 1200px;
    --navbar-padding: 1rem;
    --transition-speed: 0.2s;
}

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-family-sans-serif); line-height: 1.6; }
.content { height: 200vh; max-width: var(--container-width); margin: 0 auto; padding: 2rem; }
ul { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; }

/* The sticky header unit */
.site-header { position: sticky; top: 0; z-index: 1000; background-color: var(--color-background); }

/* Utility class applied directly to header elements */
.header-container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 var(--navbar-padding); }

/* --- Top Bar (Tier 1) --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    background-color: var(--color-top-bar-bg);
    padding-top: 0.5rem; padding-bottom: 0.5rem;
    font-size: 0.875rem; color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.top-bar a { color: inherit; transition: color var(--transition-speed) ease; }
.top-bar a:hover { color: var(--color-primary-brand); }
.contact-info, .social-links { display: flex; align-items: center; gap: 1rem; }
.social-links .icon { width: 1.25em; height: 1.25em; }

.social-links a {
  color: white; /* makes currentColor = white */
}
.social-links .icon {
  fill: currentColor; /* ensures SVG uses the link color */
  width: 1.25em;
  height: 1.25em;
}


/* --- Main Navigation (Tier 2) --- */
.main-nav {
  display: flex;
  justify-content: space-between; /* brand stays left, nav stays right */
  align-items: center;
  height: var(--main-nav-height);
}

.main-nav__brand { font-size: 1.75rem; font-weight: 600; color: var(--color-text-primary); }

/* Mobile Menu styles */
.main-nav__toggle { display: block; border: 1px solid var(--color-border); border-radius: 4px; padding: 0.25rem 0.75rem; background: transparent; cursor: pointer; }
/*.main-nav__toggle .bar { display: block; width: 22px; height: 2px; margin: 6px 0; background-color: var(--color-text-primary); transition: transform var(--transition-speed) ease; }*/
.main-nav__toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.main-nav__toggle.is-active .bar:nth-child(2) { opacity: 0; }
.main-nav__toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.main-nav__menu { display: none; position: absolute; z-index:100;top: 100%; right: 0; width: 40%; background-color: var(--color-background); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
  
.main-nav__menu.is-active { display: block; }
.main-nav__item:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.main-nav__link { display: block; padding: 1rem 1.5rem; font-weight: 600; color: var(--color-text-primary); }


/*.main-nav__toggle .bar { */
/*    display: block; */
/*    width: 22px; */
/*    height: 2px; */
/*    margin: 6px 0; */
/*    background-color: var(--color-text-primary); */
/*    transition: transform var(--transition-speed) ease;*/
/*    }*/

.main-nav__toggle .dot {
    display: block;
    width: 4px;  /* smaller width for dots */
    height: 4px; /* same as width to make it circular */
    margin: 4px auto; /* centers and spaces the dots */
    background-color: var(--color-text-primary);
    border-radius: 50%; /* makes them circular */
    transition: transform var(--transition-speed) ease;
}


@media (max-width: 576px) { .contact-info__text { display: none; } }

@media (min-width: 992px) {
    .main-nav__toggle { display: none; }
    
    .main-nav__menu { display: flex; align-items: center; position: static; width: auto; background: none; box-shadow: none; }
    

    
    .main-nav__list { display: flex; align-items: center; gap: 2rem; }
    .main-nav__item:not(:last-child) { border-bottom: none; }
    .main-nav__link { padding: 0.5rem; }
    .main-nav__link:hover { color: var(--color-primary-brand); }
}

.brand {
  display: flex;
  flex-direction: column;   /* stack brand-main + subtitle */
  line-height: 1.1;
  align-items: flex-start;  /* keep subtitle under brand only */
}

.brand-main {
  display: flex;
  flex-direction: row;      /* arrow + brand inline */
  align-items: center;
}

.back-button {
  margin-right: 20px;        /* spacing between arrow and brand */
  font-size: 1.5rem;
  color: #ffffff;
  text-decoration: none;
}

.back-button:hover {
  color: #ccc;
}

.brand-text {
  display: flex;
  flex-direction: column;   /* brand + subtitle stacked */
  align-items: flex-start;  /* subtitle aligns under brand only */
}

.brand-subtitle {
  font-size: 0.85rem;
  color: #ffffff;
  margin-top: 2px;          /* small gap below brand */
}





/*
========================================
For the index file
========================================
*/

.qasida-item {
        position: relative; /* needed for absolute link */
        /*background: #28a745 #0da9ac #06ed81 url('https://www.transparenttextures.com/patterns/asfalt-dark.png');*/
        background: #ae9456 url('https://www.transparenttextures.com/patterns/brick-wall-dark.png');
        background-size: cover;
        color: #fff;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        transition: transform 0.2s, box-shadow 0.2s;
        cursor: pointer;
        overflow: hidden; /* ensures link doesn't overflow */
    }

.qasida-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* full clickable link */
.qasida-item a.full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
    color: inherit;
}

/* text above the clickable link */
.qasida-item h4,
.qasida-item p {
    position: relative;
    z-index: 2;
    margin: 0;
}

.qasida-item p.excerpt {
    font-weight: 1000;       /* Bold */
    color: #fff5ee;         /* Deep black */
    margin: 0;
}

.qasida-item h3 a {
    text-decoration: none;
    color: #007bff;
}

.qasida-item h3 a:hover {
    text-decoration: underline;
}



/*
========================================
For the verses file
========================================
*/


/* Qasida list styling */
.verse-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.verse-list-item {
    border-bottom: 1px solid #8B4513;
    padding: 15px 0;
}

.verse-list-item:last-child {
    border-bottom: none;
}

.verse-list-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.verse-list-item h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.verse-list-item .excerpt {
    margin: 0;
    color: #666;
}


.qasida-row {
  border-bottom: 1px solid #8B4513;
  padding: 1px 0;
  margin-bottom: 25px;
}
.qasida-meta {
  font-size: 0.9em;
  color: #666;
}

.qasida-link:active {
    background-color: #d4a574 !important;
}
.qasida-link div {
    transition: background-color 0.2s ease;
}

/* Disable highlight on verses when context menu is open */
body.menu-open .ayat-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Optional: Add a semi-transparent overlay effect */
body.menu-open .ayat-item {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

body.menu-open .ayat-item:active {
    background-color: transparent;
}


@media (max-width: 768px) {
    .main-content h2 {
        font-size: 1.5rem;
    }

    .qasida-item p {
        font-size: 0.9rem;
    }
}

/* Back to top button */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* hidden initially */
    z-index: 999;
}

/*
============================================
For the context menu - share/copy/bookmark
============================================
*/

  /*#contextMenu {*/
  /*  position: absolute;*/
  /*  background: #fff;*/
  /*  border: 1px solid #ccc;*/
  /*  padding: 6px;*/
  /*  border-radius: 6px;*/
  /*  box-shadow: 0 2px 6px rgba(0,0,0,0.2);*/
  /*  z-index: 1000;*/
  /*}*/
  /*.hidden { display: none; }*/
  /*#contextMenu button {*/
  /*  display: block;*/
  /*  width: 100%;*/
  /*  margin: 4px 0;*/
  /*  background: none;*/
  /*  border: none;*/
  /*  text-align: left;*/
  /*  padding: 4px;*/
  /*}*/
  

/*#contextMenu {*/
/*    position: fixed;*/
/*    background: white;*/
/*    border: 1px solid #ccc;*/
/*    border-radius: 8px;*/
/*    box-shadow: 0 4px 15px rgba(0,0,0,0.2);*/
/*    padding: 8px 0;*/
/*    z-index: 99999;*/
/*    min-width: 150px;*/
/*}*/


/*#contextMenu button {*/
/*    display: block;*/
/*    width: 100%;*/
/*    padding: 12px 20px;*/
/*    border: none;*/
/*    background: none;*/
/*    text-align: left;*/
/*    font-size: 16px;*/
/*    cursor: pointer;*/
/*}*/

/*#contextMenu button:active {*/
/*    background-color: #f0f0f0;*/
/*}*/

#contextMenu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 100000;
    display: flex;
    flex-direction: row; /* Force horizontal */
    align-items: center;
    min-width: 150px;
}

#contextMenu button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    margin-right: 4px;
    /*padding: 8px;*/
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
}

#contextMenu button:first-child {
    margin-left: 0;
}

#contextMenu button:last-child {
    margin-right: 0;
}


#contextMenu.hidden {
    display: none;
}

/*new*/

#contextMenu button:hover,
#contextMenu button:active {
    background-color: #8B4513;
    color: white;
}

#contextMenu button:hover svg,
#contextMenu button:active svg {
    stroke: white;
}



/*
========================================
For the explanation.php
========================================
*/

.container {
    max-width: 900px;
    margin: 10px auto;
    background-color: #ffffff;
    padding: 25px 30px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
}

/* Heading */
h1 {
    text-align: center;
    font-size: 2.2em;
    color: #8B4513; /* deep green */
    margin-bottom: 25px;
    font-family: "Amiri", serif;
}


/* Endnote / Explanation */
.explanation {
    background-color: #cebfa5;
    border-left: 5px solid #8B4513;
    padding: 18px 20px;
    margin-top: 30px;
    font-size: 1em;
    line-height: 1.6;
    border-radius: 8px;
    color: #2e7d32;
}

.explanation h2 {
    margin-top: 0;
    color: #8B4513;
}

.explanation p {
    margin-top: 0;
    color: #8B4513;
}

/* Floating verse navigation */


.verse-nav a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    background: #cebfa5; /* same as endnote */
    color: #8B4513;
    opacity: 50%;

    border-radius: 50%;
    text-decoration: none;

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

    transition: all 0.25s ease;
}


.verse-nav a:active {
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.verse-nav {
    position: fixed;
    top: 65%;
    transform: translateY(-50%);
    z-index: 999;
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}


/* Mobile adjustments */

@media (max-width:768px){
    .verse-nav a {
        width: 70px;
        height: 70px;
    }

    .verse-nav svg {
        width: 32px;
        height: 32px;
    }
}


/*
========================================
For displaying reciters name
=======================================
*/

.reciter-fab{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
    transition: all 0.3s ease; /*--uncomment to hide menu */
}



.reciter-fab.active{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* Visible state */
.reciter-fab.active{
    opacity: 1;
    transform: translateY(0);
}

.reciter-trigger{
    width: 95%;
    max-width: 500px;
    background: #8B4513;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    justify-content: space-between;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}

/* Drag handle (nice UX touch) */
.reciter-menu::before{
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 8px auto;
}

/* Bottom sheet */
.reciter-menu{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.3);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    display: none;
    max-height: 1000%;
    overflow-y: auto;
    transition: all 0.25s ease;
}

/* Items */
.reciter-menu li{
    padding: 16px;
    text-align: center;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.reciter-menu li:hover{
    background: #f5f5f5;
}

/* Open state */
.reciter-menu.open{
    /*display: block; -- uncomment for hide*/
    transform: translateY(0);
}



/* Show when active */
.reciter-fab.active{
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 420px) {
  #reciterFab.reciter-fab { left: 10px; bottom: 10px; }
}

#btn-back-to-top {
  right: 16px;
  bottom: 80px; /* change to 80px if you move reciter to right side */

}


/*
========================================
For New Header
========================================
*/


header {
    background: #8B4513;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(6px);
    }

/* Hidden state */
header.hide{
    transform: translateY(-100%);
}

/* Optional: add shadow when visible */
header.scrolled{
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
    

.nav-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }
.icon-btn {
      background: none;
      border: none;
      color: white;
      font-size: 22px;
      cursor: pointer;
    }
    .menu-btn {
      font-size: 24px;
    }
.dropdown {
      position: relative;
      display: inline-block;
    }
.dropdown-content {
      display: none;
      position: absolute;
      right: 0;
      background-color: #f9f9f9;
      min-width: 180px;
      box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
      z-index: 1;
    }
.dropdown-content a {
      color: black;
      padding: 10px 14px;
      text-decoration: none;
      display: block;
    }
.dropdown-content a:hover {
      background-color: #ddd;
    }
.show {
      display: block;
    }
    
 #searchContainer{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #8B4513;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    transform: translateY(-100%);
    transition: 0.3s ease;
}

#searchContainer.show{
    transform: translateY(0);
}

  #searchBox {
    width: 80%;
    height: 40%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .back-btn {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
  }
  
.icon-btn svg{
    width: 22px;
    height: 22px;
    stroke: white;
}




/*
========================================
For poem in table cells
========================================
*/

* {
	font-family: 'DroidArabicKufiRegular', 'Droid Kufi Noto', 'tradional arabic'; 
}

h1 {
  text-align: center;
}

table.poem{
  margin-right:0;
  width:100%;
  border-collapse:separate;
  border-spacing:1px 0;   /* reduced spacing */
  float:right;
  margin-bottom:20px;
  text-align:justify;
  text-align-last:justify;
}




/*table.poem {*/
/*  border-collapse: separate;*/
/*  border-spacing: 50px 0;*/
/*  float: right;         forces table to right side */
/*  margin-bottom: 20px;*/
/*      text-align: justify;*/
/*    text-align-last: justify;*/
/*}*/


table.poem{border-collapse:separate; border-spacing:1px 0;margin-left:auto;margin-right:0; margin-bottom:20px;}
table.poem tr td{padding-left:0;padding-right:0; border:0;}


/*
========================================
Reset and Base Styles
========================================
*/



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f7;
    color: #1c1c1e;
    line-height: 1.4;
    min-height: 100vh;
}

/* Header */
.settings-header {
    background-color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9e9ed;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

.back-button {
    font-size: 24px;
    color: #007aff;
    text-decoration: none;
    padding: 4px 8px;
}

.settings-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.placeholder {
    width: 40px;
}


/* Settings Container */
.settings-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.section-icon {
    font-size: 18px;
}

.section-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #6c6c70;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Settings Card */
.settings-card {
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Setting Options */
.setting-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.setting-option:hover {
    background-color: #f8f8fa;
}

.option-info {
    flex: 1;
}

.option-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.option-description {
    display: block;
    font-size: 13px;
    color: #8e8e93;
}

/* Radio Buttons */
.radio-container {
    position: relative;
    width: 24px;
    height: 24px;
}

.radio-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.radio-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #c6c6c8;
    border-radius: 50%;
    transition: all 0.2s;
}

.radio-input:checked + .radio-custom {
    border-color: #007aff;
    background-color: #007aff;
    box-shadow: inset 0 0 0 5px white;
}

/* Border Top */
.border-top {
    border-top: 1px solid #e9e9ed;
}

/* Preview Card */
.preview-card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #6c6c70;
}

.preview-badge {
    font-size: 12px;
    padding: 4px 8px;
    background-color: #f2f2f7;
    border-radius: 12px;
    color: #8e8e93;
}

/* Poem Preview Styles */
.preview-content {
    padding: 8px 0;
}

.poem-line {
    margin-bottom: 12px;
    line-height: 1.6;
}

.poem-line.arabic {
    font-size: 18px;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    font-family: 'Amiri', 'Traditional Arabic', serif;
}

.poem-line.english {
    font-size: 15px;
    color: #3a3a3c;
    border-left: 3px solid #007aff;
    padding-left: 12px;
    margin-left: 8px;
}

/* Hide/Show Preview Based on Selection */
.arabic-only-preview,
.arabic-english-preview {
    display: none;
}

.arabic-only-preview.active,
.arabic-english-preview.active {
    display: block;
}

/* Setting Items (for other settings) */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
}

.setting-item-info {
    flex: 1;
}

.setting-item-title {
    font-size: 16px;
    font-weight: 500;
}

.setting-item-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8e8e93;
}

.font-size-value {
    font-size: 15px;
}

.chevron {
    font-size: 18px;
    color: #c6c6c8;
}

.version-number {
    font-size: 15px;
    color: #8e8e93;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 51px;
    height: 31px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9e9ed;
    transition: 0.3s;
    border-radius: 31px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #34c759;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* RTL Support for Arabic Names */
[dir="rtl"] .poem-line.arabic {
    text-align: right;
}

[dir="rtl"] .poem-line.english {
    border-left: none;
    border-right: 3px solid #007aff;
    padding-left: 0;
    padding-right: 12px;
    margin-left: 0;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 380px) {
    .settings-container {
        padding: 12px;
    }
    
    .poem-line.arabic {
        font-size: 16px;
    }
    
    .poem-line.english {
        font-size: 14px;
    }
}

/*
========================================
Read Explanation Button
========================================
*/

.verse-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.explain-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #8B4513;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.explain-btn:hover {
  background: #6f3610;
}


