/* Import Arabic fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Amiri:wght@400;700&display=swap');

/* Global Arabic text styling */
.arabic-text {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    font-size: 1.8em;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    margin-bottom: 20px;
    padding: 10px;
}

/* For inline Arabic text */
.arabic-inline {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    font-size: 1.4em;
    direction: rtl;
    display: inline-block;
    margin: 0 5px;
}

/* For Arabic headings */
.arabic-heading {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    font-size: 2em;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    margin-bottom: 20px;
}

/* For Arabic quotes or emphasized text */
.arabic-quote {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    font-size: 1.6em;
    font-style: italic;
    direction: rtl;
    text-align: right;
    margin: 20px 0;
    padding: 10px 20px;
    border-right: 3px solid #4CAF50;
    background-color: #f8f9fa;
}

/* Specific styling for hadith page */
.hadith {
    margin: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Specific styling for Quran text */
.quran-text {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 1.6em;
    line-height: 2.2;
    text-align: right;
    direction: rtl;
    margin: 25px 0;
    color: #1a1a1a;
    font-weight: 700;
}

/* Specific styling for Hadith text */
.hadith-text {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 1.4em;
    line-height: 2;
    text-align: right;
    direction: rtl;
    margin: 20px 0;
    color: #2a2a2a;
    font-weight: 500;
}

/* English translation styling */
.translation-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.2em;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 10px;
}

.reference-text {
    font-size: 1em;
    color: #666;
    text-align: right;
    font-style: italic;
}

/* Container for Arabic-English pairs */
.text-container {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Dynamic Image Responsiveness */
.dynamic-image {
    display: block;
    margin: 0 auto;
    height: auto;
    max-width: 100%;
}

.image-wrapper {
    position: relative;
    width: 100%;
    margin: 1em auto;
}

/* Logo specific styling */
.logo-image {
    max-width: 150px;
    width: 150px;
    height: 150px;
    object-fit: contain;
}

/* Banner image styling */
.banner-image-container {
    width: 100%;
    margin: 2em 0;
    text-align: center;
}

.banner-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin: 0 auto;
}

/* Content image styling */
.content-image {
    width: 100%;
    max-width: 800px;
    object-fit: contain;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .arabic-text {
        font-size: 1.6em;
    }
    
    .arabic-inline {
        font-size: 1.2em;
    }
    
    .arabic-heading {
        font-size: 1.8em;
    }
    
    .arabic-quote {
        font-size: 1.4em;
    }
}

/* Media Queries for Responsive Images */
@media screen and (max-width: 1280px) {
    .content-image {
        max-width: 700px;
    }
}

@media screen and (max-width: 980px) {
    .content-image {
        max-width: 600px;
    }
    .logo-image {
        max-width: 120px;
        width: 120px;
        height: 120px;
    }
    .banner-image {
        max-height: 250px;
    }
    .banner-image-container {
        margin: 1.5em 0;
    }
}

@media screen and (max-width: 736px) {
    .content-image {
        max-width: 100%;
        margin: 1em 0;
    }
    .logo-image {
        max-width: 100px;
        width: 100px;
        height: 100px;
    }
    .banner-image {
        max-height: 200px;
    }
    .banner-image-container {
        margin: 1em 0;
    }
    .image-wrapper {
        margin: 0.5em auto;
    }
}

@media screen and (max-width: 480px) {
    .logo-image {
        max-width: 80px;
        width: 80px;
        height: 80px;
    }
    .banner-image {
        max-height: 150px;
    }
}

/* Mobile adjustments */
@media only screen and (max-width: 736px) {
    .hadith-books-container {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
    
    .logo-container {
        position: absolute !important;
        right: 20px !important;
        left: auto !important;
        transform: none !important;
        top: 80px !important;
        margin-top: 0 !important;
        z-index: 1000 !important;
    }
    
    .logo-container img {
        width: 80px !important;
        height: 80px !important;
    }
}

@media only screen and (max-device-width: 736px) {
    .hadith-books-container {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
    
    .logo-container {
        position: absolute !important;
        right: 20px !important;
        left: auto !important;
        transform: none !important;
        top: 80px !important;
        margin-top: 0 !important;
        z-index: 1000 !important;
    }
    
    .logo-container img {
        width: 80px !important;
        height: 80px !important;
    }
}

@media screen and (max-width: 736px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    img[src*="sj_logo"] {
        width: 100px !important;
        height: 100px !important;
    }
}

@media screen and (max-width: 480px) {
    img[src*="sj_logo"] {
        width: 80px !important;
        height: 80px !important;
    }
}
