/* ================= GLOBAL CSS ================= */

/* --- Fonts --- */
@font-face { font-family: Uthman; src: url('../Fonts/UthmanTN.ttf') format('truetype'); }
@font-face { font-family: Neiziri; src: url('../Fonts/Neirizi.ttf') format('truetype'); }
@font-face { font-family: Amiri; src: url('../Fonts/Amiri-Regular.ttf') format('truetype'); }
@font-face { font-family: Hafs; src: url('../Fonts/Hafs.ttf') format('truetype'); }
@font-face { font-family: Thuluth; src: url('../Fonts/AM_Thulth_Regular.ttf') format('truetype'); }
@font-face { font-family: Titles; src: url('../Fonts/Titles.otf') format('opentype'); }
@font-face { font-family: Quran-Hafs; src: url('../Fonts/original-hafs.otf') format('opentype'); }

/* --- Root Variables --- */
/* :root {
    --primary-color: #f8f9fa; 
    --secondary-color: #343a40; 
    --text-color: #212529; 
    --accent-color: #007bff; 
    --footer-bg: #222; 
    --footer-text: #bbb;
    --red-color: #dc3545;
  
} */


:root {
    --primary-color: #faf4e8;
    --secondary-color: #0d3b26;
    --text-color: #2b2b2b;
    --accent-color: #8c6239;
    --footer-bg: #18332f;
    --footer-text: #e5e5d5;
    --red-color: #b52121;
    --blue-color: #0056b3;
    --highlight-color: #77a4d5;
}


svg {
  width: 9em;
  
  vertical-align: middle;
  fill: currentColor;
}






/* --- Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

.page-title {
    font-family: 'Playfair Display';
    font-weight: 700;
    margin-bottom: 50px;
}

body {
    font-family: Calibri, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    text-align: center;
    transition: 0.3s;
}

header object {
    width: 80px;
    
}

/* --- Navbar --- */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    padding: 1.2rem 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--footer-bg);
    z-index: 1000;
    
}



.navbar {
    display: flex;
    gap: 20px;
}

.navbar a {
    color: var(--primary-color);
    border: .1rem solid transparent;
    padding: .3rem 0.5rem;
}

.navbar a:hover {
    color: var(--accent-color);
}


header .navbar a.active,
header .navbar a:hover {
    
    border: .1rem solid var(--accent-color);
}

/* --- Footer --- */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px;
    text-align: center;
    font-size: 14px;
    
}


.footer a {
    color: var(--accent-color);
    text-decoration: none;
}

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

.social-links {
    margin-top: 10px;
}


.social-links a {
    color: var(--footer-text);
    font-size: 20px;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}





/* ================= HOME PAGE SPECIFIC CSS ================= */


main section {
    margin-top: 30px;
}

.home-title {
    font-size: 2.5rem;
    font-weight: normal;
    margin-top: 70px;
}

.poem-title {
    font-family: Titles;
    font-size: 1rem;
    margin: 40px 0;
}



.poem-title a {
    text-decoration: none;
    color: var(--text-color);
}

.poem-title a:hover {
    color: var(--accent-color);
}



a {
    text-decoration: none; /* No underline */
    color: inherit; /* Use the text color of the parent */
}

/* Style the poem links */
.poem {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--text-color); /* Border around the title */
    border-radius: 8px; /* Rounded corners */
    margin: 10px 0;
    transition: all 0.3s ease;
}

/* Hover effect */
.poem:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    cursor: pointer;
}





html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Pushes the footer to the bottom */
    margin-top: 100px;
    
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
}



/* ================= DONATION POPUP STYLES ================= */

/* Popup Background */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark transparent background */
    z-index: 2000; /* Above everything */
    align-items: center;
    justify-content: center;
    
}

/* Popup Content */
.popup-content {
    background: var(--primary-color);
    color: var(--text-color);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 25px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-color);
}

/* Popup Text */
.popup-content h2 {
    font-size: 1.8rem;
    font-family: Titles;
    margin-bottom: 15px;
}

.popup-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Buttons */
#donateButton, #cancelButton {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 10px 5px;
    transition: background 0.3s ease;
}

#donateButton:hover {
    background: #0056b3; /* Darker shade on hover */
}

#cancelButton {
    background: var(--secondary-color);
}

#cancelButton:hover {
    background: #23272b; /* Darker grey */
}



/* Sidebar styling */
.sidebar {
    width: 250px;
    background: var(--secondary-color);
    color: white;
    position: fixed;
    top: 0;
    right: 0; /* Move sidebar to the right */
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(100%); /* Hide sidebar initially */
    transition: transform 0.3s ease-in-out;
}

.sidebar.active {
    transform: translateX(0); /* Show sidebar when active */
}

.sidebar-section {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid white;
}

.sidebar-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar-section label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.fa-gear {
    cursor: pointer;
   
    right: 20px; /* Adjust position to align with sidebar */
    top: 20px;
    color: white;
    transition: transform 0.3s ease-in-out;
}

.fa-gear:hover {
    transform: rotate(90deg);
}

.poem-title {
    font-feature-settings: "liga", "calt"; /* Enables standard ligatures */
    font-variant-ligatures: normal; /* Ensures ligatures are active */
    direction: rtl; /* Right-to-left text direction */
}


.extra-space {

    height: 200px;
}


#menu-bars {
    display: none; /* Hidden on larger screens */
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

#menu-bars:hover {
    color: var(--accent-color);
}

main .thuluth-title {
    font-family: Thuluth;
    font-size: 1.9rem;
}




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

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

/* Navbar: Adjustments for tablets */


/* Navbar: Adjustments for mobile screens */
@media only screen and (max-width: 768px) {
    .navbar {
        padding: 15px 20px; /* Reduce padding */
        flex-direction: row; /* Keep logo and bars aligned */
        justify-content: space-between; /* Ensure space between logo and menu */
    }



    /* Show bars icon on mobile */


    /* Rotate bars icon when menu is active */
    .fa-bars.active {
        transform: rotate(90deg);
    }
}

/* Footer: Center align and reduce padding */
@media only screen and (max-width: 768px) {
    .footer {
        padding: 15px;
        font-size: 12px;
    }

    .social-links a {
        font-size: 18px; /* Reduce icon size */
        margin: 0 5px;
    }
}

/* Poem Section: Stack elements vertically on small screens */
@media only screen and (max-width: 768px) {
    .poems-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .poem {
        width: 90%;
        padding: 10px 15
    }

}

@media only screen and (max-width: 768px) {
    /* Ensure nav-links are positioned right under the navbar */
    header {
        padding: 0.9rem 5%;
    }

    .poem-title {
        font-family: Thuluth;
    }

    header .navbar {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-color);
        text-align: center;
        padding: 1rem 0;

    }

    .navbar a {
        display: block;
        padding: 1rem;
    }

    #menu-bars {
        display: block;
    }

}
