/* ===== ISLAMIC STUDIES CENTER - MAIN STYLESHEET ===== */

/* CSS Variables */
:root {
    --primary-color: #1e4d2b;
    --secondary-color: #a97c50;
    --accent-color: #8b4513;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --white: #ffffff;
    --gold: #a97c50;
    --green-light: #27ae60;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Typography */
.urdu-text {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.1em;
    line-height: 1.8;
    unicode-bidi: bidi-override;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga", "kern";
    font-feature-settings: "liga", "kern";
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.english-text {
    font-family: 'Poppins', sans-serif;
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: bidi-override;
}

/* Mixed Content Handling */
.urdu-text .english-number,
.urdu-text .english-word {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
}

/* RTL Container Fix */
.rtl-container {
    direction: rtl !important;
    text-align: right !important;
}

.rtl-container * {
    direction: rtl !important;
    text-align: right !important;
}

.rtl-container .english-text {
    direction: ltr !important;
    text-align: left !important;
    display: inline-block;
    unicode-bidi: embed;
}

/* Specific Urdu Text Fixes */
.urdu-text p,
.urdu-text h1,
.urdu-text h2,
.urdu-text h3,
.urdu-text h4,
.urdu-text h5,
.urdu-text h6,
.urdu-text div,
.urdu-text span,
.urdu-text li {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override;
}

/* Navigation Urdu Text */
.navbar .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Hero Section Urdu Text */
.hero-subtitle.urdu-text {
    direction: rtl !important;
    text-align: right !important;
    padding-left: 1rem;
    padding-right: 0;
    unicode-bidi: bidi-override;
}

/* Introduction Section Urdu Text */
.intro-content.urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.intro-content.urdu-text h3,
.intro-content.urdu-text p,
.intro-content.urdu-text div {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override;
}

/* Study Instructions Urdu Text */
.study-instructions-section .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.study-instructions-section .col-md-6:last-child {
    direction: rtl !important;
}

.study-instructions-section .col-md-6:last-child * {
    direction: rtl !important;
    text-align: right !important;
}

.study-instructions-section .col-md-6:last-child .english-text {
    direction: ltr !important;
    text-align: left !important;
    display: inline-block;
    unicode-bidi: embed;
}

/* FAQ Section Urdu Text */
.faq-section .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override;
}

.accordion-button .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    flex: 1;
}

.accordion-body .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

/* Contact Form Urdu Text */
.contact-section .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

/* Footer Urdu Text */
.footer-section .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.footer-brand .urdu-text {
    direction: rtl !important;
    text-align: center !important;
}

/* WhatsApp Section Urdu Text */
.whatsapp-section .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.whatsapp-title .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    margin-right: 0.75rem;
    margin-left: 0;
}

.whatsapp-description .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    display: block;
    margin-top: 0.5rem;
}

.whatsapp-features .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.qr-scan-text .urdu-text {
    direction: rtl !important;
    text-align: center !important;
}

/* Table Urdu Content */
.timetable-table .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

/* Button Urdu Text */
.btn .urdu-text {
    direction: rtl !important;
    text-align: center !important;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Form Label Urdu Text */
.form-label .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    display: block;
    margin-top: 0.25rem;
}

/* Modal Urdu Text */
.modal .urdu-text,
.modal-header .urdu-text,
.modal-body .urdu-text,
.modal-footer .urdu-text,
.modal-title .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Noto Nastaliq Urdu', serif !important;
    unicode-bidi: bidi-override !important;
    display: inline-block !important;
    font-weight: normal !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-feature-settings: "liga", "kern" !important;
    font-feature-settings: "liga", "kern" !important;
}

/* Force font loading for modals */
.modal-content {
    font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif !important;
}

/* Specific modal title Urdu text */
.modal-title .urdu-text {
    text-align: center !important;
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Modal body Urdu text alignment */
.modal-body .urdu-text {
    text-align: center !important;
    width: auto !important;
}

/* Button Urdu text in modals */
.modal .btn .urdu-text {
    text-align: center !important;
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Arabic Greeting in Modal */
.modal .arabic-greeting {
    font-family: 'Noto Nastaliq Urdu', serif !important;
    font-size: 1.1rem;
    color: var(--primary-color);
    direction: rtl !important;
    text-align: center !important;
    unicode-bidi: bidi-override !important;
}

/* Pagination Urdu Text */
.pagination .urdu-text {
    direction: rtl !important;
    text-align: center !important;
    margin-right: 0.5rem;
}

/* Mixed Content Specific Fixes */
.urdu-mixed-content {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override;
}

.urdu-mixed-content .english-inline {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
    margin: 0 0.2rem;
    font-family: 'Poppins', sans-serif !important;
}

/* Responsive Urdu Text Fixes */
@media (max-width: 767px) {
    .hero-subtitle.urdu-text {
        direction: rtl !important;
        text-align: center !important;
        padding: 0;
    }
    
    .study-instructions-section .col-md-6:last-child {
        direction: rtl !important;
        text-align: center !important;
    }
    
    .whatsapp-content {
        direction: ltr !important;
    }
    
    .whatsapp-content .urdu-text {
        direction: rtl !important;
        text-align: center !important;
    }
}

/* Flexbox RTL Fixes */
.d-flex.rtl-flex {
    direction: rtl !important;
}

.d-flex.rtl-flex .urdu-text {
    direction: rtl !important;
    text-align: right !important;
}

.d-flex.rtl-flex .english-text {
    direction: ltr !important;
    text-align: left !important;
}

/* Brand Text Urdu */
.brand-text-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.2rem;
    margin-left: 10px;
    direction: rtl !important;
    text-align: right !important;
}

.brand-text {
    font-family: 'Poppins', sans-serif;
}

.brand-text-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.2rem;
    margin-left: 10px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.title-decoration {
    text-align: center;
    margin-bottom: 3rem;
}

.title-decoration i {
    font-size: 2rem;
    color: var(--secondary-color);
    background: linear-gradient(45deg, var(--secondary-color), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #2d5a3d);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
}

.navbar-brand i {
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a3d 50%, #1e4d2b 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: patternFloat 20s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 77, 43, 0.8) 0%, rgba(45, 90, 61, 0.6) 100%);
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

/* Opening Animation */
.opening-animation {
    margin-bottom: 3rem;
    opacity: 0;
    animation: openingFadeIn 2s ease-out 0.5s forwards;
}

.arabic-text {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffd700 0%, #fff8dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 16px #ffd700, 0 0 8px #fff8dc;
    margin-bottom: 1rem;
    transform: scale(0.8);
    animation: arabicScale 1.5s ease-out 1s forwards;
    direction: rtl !important;
    text-align: center !important;
    unicode-bidi: bidi-override;
}

.arabic-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    opacity: 0;
    animation: subtitleFadeIn 1s ease-out 2s forwards;
    direction: rtl !important;
    text-align: center !important;
}

@keyframes openingFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes arabicScale {
    to {
        transform: scale(1);
    }
}

@keyframes subtitleFadeIn {
    to {
        opacity: 1;
    }
}

/* Hero Main Content */
.hero-main {
    opacity: 0;
    animation: mainFadeIn 1.5s ease-out 2.5s forwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.title-line {
    display: block;
    background: linear-gradient(45deg, var(--white), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: titleLineSlide 0.8s ease-out forwards;
}

.title-line:nth-child(1) { animation-delay: 3s; }
.title-line:nth-child(2) { animation-delay: 3.3s; }
.title-line:nth-child(3) { animation-delay: 3.6s; }

@keyframes titleLineSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle-container {
    margin-bottom: 3rem;
    opacity: 0;
    animation: subtitleSlide 1s ease-out 4s forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle.english-text {
    text-align: left;
    padding-right: 1rem;
}

.hero-subtitle.urdu-text {
    text-align: right;
    padding-left: 1rem;
    direction: rtl;
}

@keyframes subtitleSlide {
    to {
        opacity: 0.9;
    }
}

/* Responsive adjustments for subtitle */
@media (max-width: 767px) {
    .hero-subtitle-container .row {
        flex-direction: column;
    }
    
    .hero-subtitle.english-text,
    .hero-subtitle.urdu-text {
        text-align: center;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle.urdu-text {
        direction: rtl;
        margin-bottom: 0;
    }
}

.hero-cta {
    opacity: 0;
    animation: ctaFadeIn 1s ease-out 4.5s forwards;
}

.hero-cta .btn {
    padding: 1.2rem 3rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1.1rem;
    background: linear-gradient(45deg, var(--secondary-color), #e6c200);
    border: none;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.hero-cta .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
}

.hero-cta .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero-cta .btn:hover::before {
    left: 100%;
}

@keyframes mainFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes ctaFadeIn {
    to {
        opacity: 1;
    }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    animation: floating 6s ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
    animation-fill-mode: both;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 10%;
}

.floating-icon:nth-child(2) {
    top: 60%;
    right: 15%;
}

.floating-icon:nth-child(3) {
    bottom: 30%;
    left: 20%;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    animation: scrollBounce 2s ease-in-out infinite;
    animation-delay: 5s;
    opacity: 0;
    animation-fill-mode: both;
}

@keyframes scrollBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0);
        opacity: 0.7;
    }
    50% { 
        transform: translateX(-50%) translateY(-10px);
        opacity: 1;
    }
}

.scroll-arrow {
    color: var(--secondary-color);
    font-size: 2rem;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .arabic-text {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .arabic-text {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .floating-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .arabic-text {
        font-size: 1.5rem;
    }
    
    .floating-elements {
        display: none;
    }
}

/* Introduction Section */
.introduction-section {
    background: var(--bg-light);
    padding: 5rem 0;
}

.intro-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.intro-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.arabic-header {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.arabic-greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    direction: rtl !important;
    unicode-bidi: bidi-override;
    font-family: 'Noto Nastaliq Urdu', serif !important;
}

.intro-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.intro-content p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.intro-content.urdu-text {
    direction: rtl;
    text-align: right;
}

.intro-content.urdu-text h3,
.intro-content.urdu-text p {
    text-align: right;
}

.intro-content.english-text {
    text-align: left;
}

.intro-content.english-text h3,
.intro-content.english-text p {
    text-align: left;
}

.signature {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.signature p {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.intro-content.urdu-text .signature {
    text-align: center;
}

.intro-content.english-text .signature {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 991px) {
    .intro-content {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .arabic-header {
        font-size: 1.8rem;
    }
    
    .intro-content h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .intro-content {
        padding: 1.5rem;
    }
    
    .arabic-header {
        font-size: 1.5rem;
    }
    
    .arabic-greeting {
        font-size: 1rem;
        direction: rtl !important;
        text-align: center !important;
        unicode-bidi: bidi-override;
    }
    
    .intro-content h3 {
        font-size: 1.4rem;
    }
    
    .intro-content p {
        font-size: 0.95rem;
    }
}

/* Time Table Section */
.timetable-section {
    background: var(--white);
    padding: 5rem 0;
}

/* Filter Styles */
.filter-container {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-label i {
    color: var(--secondary-color);
}

.filter-container .form-control,
.filter-container .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.filter-container .form-control:focus,
.filter-container .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.filter-container .btn {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.filter-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Results Info */
.results-info {
    background: var(--bg-light);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.results-info .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.timetable-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.timetable-table {
    margin: 0;
}

.timetable-table thead th {
    background: linear-gradient(45deg, var(--primary-color), #2d5a3d);
    color: var(--white);
    border: none;
    padding: 1.5rem 1rem;
    font-weight: 600;
    text-align: center;
}

.timetable-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.timetable-table tbody tr:hover {
    background: rgba(30, 77, 43, 0.05);
}

.download-btn {
    background: var(--green-light);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.download-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.video-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.video-btn:hover {
    background: linear-gradient(135deg, #cc0000, #ff0000);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Video Modal Styles */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal customization */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #2d5a3d);
    color: var(--white);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--white) !important;
}

.modal-title i {
    color: var(--secondary-color);
}

.modal-title .english-text,
.modal-title .urdu-text {
    color: var(--white) !important;
}

.modal-body {
    padding: 0;
}

.modal-footer {
    border-top: none;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0 0 15px 15px;
}

.btn-close {
    filter: invert(1);
}

@media (max-width: 768px) {
    .video-player {
        height: 250px;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Pagination Styles */
.pagination-container {
    padding: 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.pagination {
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    background: var(--white);
    border: 2px solid var(--border-color);
    margin: 0 0.25rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

/* Button styling for pagination */
.pagination .page-link {
    background: none;
    border: none;
    color: var(--primary-color);
    background: var(--white);
    border: 2px solid var(--border-color);
    margin: 0 0.25rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.page-link:hover {
    color: var(--white);
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 77, 43, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

.page-item.active .page-link {
    background: linear-gradient(45deg, var(--primary-color), #2d5a3d);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    background: var(--bg-light);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    color: var(--text-light);
    background: var(--bg-light);
    border-color: var(--border-color);
}

/* Pagination Info */
.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-light);
    padding: 5rem 0;
}

.faq-column {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: 100%;
    margin-bottom: 2rem;
}

.faq-column-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 1rem;
}

.faq-column-title i {
    color: var(--secondary-color);
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.accordion-button {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    padding: 1.5rem;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(45deg, var(--primary-color), #2d5a3d);
    color: var(--white);
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    background: var(--white);
    padding: 1.5rem;
    color: var(--text-light);
}

/* Contact Section */
.contact-section {
    background: var(--white);
    padding: 5rem 0;
}

.contact-form-container {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    direction: ltr !important;
}

.contact-form .row {
    direction: ltr !important;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    direction: ltr !important;
}

/* Form Control RTL Support */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    direction: ltr !important;
    text-align: left !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Button RTL Support */
.contact-form .btn {
    direction: ltr !important;
}

.contact-form .btn .urdu-text {
    direction: rtl !important;
    text-align: center !important;
    margin-right: 0.5rem;
}

/* Form Validation Styling */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Footer Section */
.footer-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a3d 50%, #1e4d2b 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.footer-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    opacity: 0.3;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 77, 43, 0.9) 0%, rgba(45, 90, 61, 0.8) 100%);
}

.footer-section .container {
    position: relative;
    z-index: 2;
    padding: 4rem 0 2rem;
}

.footer-widget {
    margin-bottom: 2rem;
}

.footer-title {
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.footer-title i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.footer-content {
    color: rgba(255, 255, 255, 0.9);
}

/* Contact Information */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 1rem;
    margin-top: 0.2rem;
    min-width: 20px;
}

.contact-text {
    flex: 1;
}

.contact-text span {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.contact-text div {
    color: var(--white);
    font-weight: 500;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.footer-links a:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--secondary-color);
    color: var(--white);
    transform: translateX(5px);
    text-decoration: none;
}

.footer-links a i {
    color: var(--secondary-color);
    margin-right: 0.75rem;
    min-width: 20px;
}

/* QR Scanner Section */
.qr-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qr-code {
    flex-shrink: 0;
}

.qr-image {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.qr-info {
    flex: 1;
}

.qr-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.qr-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-tag {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.feature-tag i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    text-decoration: none;
}

.social-link i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .footer-section .container {
        padding: 3rem 0 1.5rem;
    }
    
    .qr-container {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-image {
        width: 100px;
        height: 100px;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .footer-section .container {
        padding: 2rem 0 1rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .contact-item,
    .footer-links a {
        padding: 0.5rem;
    }
    
    .qr-container {
        padding: 1rem;
    }
    
    .qr-image {
        width: 80px;
        height: 80px;
    }
    
    .qr-text {
        font-size: 0.9rem;
    }
    
    .feature-tag {
        font-size: 0.8rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link i {
        font-size: 1rem;
    }
    
    .copyright {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .qr-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .qr-image {
        width: 70px;
        height: 70px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Account for fixed navbar with extra spacing */
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error Messages */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--green-light);
    border-left: 4px solid var(--green-light);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* Smooth scrolling for navigation links */
.navbar-nav .nav-link {
    scroll-margin-top: 100px;
}

/* Responsive FAQ columns */
@media (max-width: 991px) {
    .faq-column {
        margin-bottom: 2rem;
    }
}

/* Footer Brand Section */
.footer-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--secondary-color), #e6c200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.brand-title {
    color: var(--secondary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.brand-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: justify;
}

/* WhatsApp Section */
.whatsapp-section {
    margin-top: 3rem;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.whatsapp-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.whatsapp-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.whatsapp-info {
    flex: 1;
}

.whatsapp-title {
    color: #25D366;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.whatsapp-title i {
    color: #25D366;
    margin-right: 0.75rem;
    font-size: 2rem;
}

.whatsapp-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.whatsapp-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.whatsapp-features .feature-tag {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.whatsapp-features .feature-tag:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: translateY(-2px);
}

.whatsapp-features .feature-tag i {
    color: #25D366;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.whatsapp-qr {
    flex-shrink: 0;
    text-align: center;
}

.qr-code-large {
    margin-bottom: 1rem;
}

.qr-image-large {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    border: 4px solid #25D366;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.qr-image-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

/* QR Codes Container for Multiple QR Codes */
.qr-codes-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    min-width: 140px;
}

.qr-code-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.qr-code-item .qr-code-large {
    margin-bottom: 0;
}

.qr-code-item .qr-image-large {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 3px solid #25D366;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.qr-code-item .qr-image-large:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.qr-code-item .qr-scan-text {
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.qr-code-item .qr-scan-text i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.qr-code-item .qr-scan-text .english-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #25D366;
}

.qr-code-item .qr-scan-text .urdu-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Telegram specific styling */
.qr-code-item:nth-child(2) .qr-image-large {
    border-color: #0088cc;
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.3);
}

.qr-code-item:nth-child(2) .qr-image-large:hover {
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.qr-code-item:nth-child(2) .qr-scan-text .english-text {
    color: #0088cc;
}

.qr-scan-text {
    color: #25D366;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qr-scan-text i {
    font-size: 1.2rem;
}

/* Responsive Design for WhatsApp Section */
@media (max-width: 991px) {
    .whatsapp-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .whatsapp-features {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .whatsapp-container {
        padding: 2rem;
    }
    
    .qr-image-large {
        width: 120px;
        height: 120px;
    }
    
    .qr-codes-container {
        gap: 1.5rem;
    }
    
    .qr-code-item {
        padding: 1rem;
        min-width: 120px;
    }
    
    .qr-code-item .qr-image-large {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .whatsapp-section {
        margin-top: 2rem;
        padding: 2rem 0;
    }
    
    .whatsapp-container {
        padding: 1.5rem;
    }
    
    .whatsapp-title {
        font-size: 1.5rem;
    }
    
    .whatsapp-description {
        font-size: 1rem;
    }
    
    .qr-image-large {
        width: 100px;
        height: 100px;
    }
    
    .qr-codes-container {
        gap: 1rem;
    }
    
    .qr-code-item {
        padding: 0.75rem;
        min-width: 100px;
    }
    
    .qr-code-item .qr-image-large {
        width: 80px;
        height: 80px;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .whatsapp-features {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-features .feature-tag {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .qr-image-large {
        width: 80px;
        height: 80px;
    }
    
    .qr-codes-container {
        gap: 0.75rem;
    }
    
    .qr-code-item {
        padding: 0.5rem;
        min-width: 80px;
    }
    
    .qr-code-item .qr-image-large {
        width: 60px;
        height: 60px;
    }
    
    .qr-code-item .qr-scan-text {
        font-size: 0.75rem;
    }
    
    .qr-code-item .qr-scan-text .english-text {
        font-size: 0.7rem;
    }
    
    .qr-code-item .qr-scan-text .urdu-text {
        font-size: 0.65rem;
    }
}

/* Enhanced Mixed Content Handling */
.urdu-mixed-content .english-inline {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
    margin: 0 0.2rem;
    font-family: 'Poppins', sans-serif !important;
}

/* Arabic Text Specific Styling */
.arabic-text,
.arabic-greeting,
.arabic-subtitle {
    direction: rtl !important;
    text-align: center !important;
}

/* Enhanced Arabic Greeting */
.arabic-greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    direction: rtl !important;
    unicode-bidi: bidi-override;
    font-family: 'Noto Nastaliq Urdu', serif !important;
}

/* Enhanced Mixed Content Handling */
.urdu-mixed-content .english-inline {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
    margin: 0 0.2rem;
    font-family: 'Poppins', sans-serif !important;
}

/* ===== FAQ SECTION RTL FIXES ===== */
.faq-section .faq-column {
    direction: ltr !important;
}

.faq-section .accordion-item {
    direction: ltr !important;
}

/* FAQ Accordion Button RTL Support */
.accordion-button {
    direction: ltr !important;
    text-align: left !important;
}

.accordion-button .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    display: block !important;
    unicode-bidi: bidi-override !important;
}

/* FAQ Accordion Body RTL Support */
.accordion-body {
    direction: ltr !important;
}

.accordion-body .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    display: block !important;
    unicode-bidi: bidi-override !important;
    line-height: 1.8 !important;
    font-family: 'Noto Nastaliq Urdu', serif !important;
}

.accordion-body .urdu-text.urdu-mixed-content {
    direction: rtl !important;
    text-align: right !important;
}

/* Fix for multi-line Urdu text in FAQ */
.accordion-body .urdu-text p {
    direction: rtl !important;
    text-align: right !important;
    margin: 0 !important;
    width: 100% !important;
}

/* ===== STUDY INSTRUCTIONS SECTION FIXES ===== */
.study-instructions-section {
    direction: ltr !important;
}

.study-instructions-section .rtl-container {
    direction: rtl !important;
    text-align: right !important;
}

.study-instructions-section .rtl-container h4,
.study-instructions-section .rtl-container ul,
.study-instructions-section .rtl-container li,
.study-instructions-section .rtl-container div {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override !important;
}

/* Fix bullet points for Urdu lists */
.study-instructions-section .rtl-container ul {
    list-style: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

.study-instructions-section .rtl-container li {
    position: relative !important;
    padding-right: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

.study-instructions-section .rtl-container li::before {
    content: "•" !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    color: var(--primary-color) !important;
    font-size: 1rem !important;
    line-height: inherit !important;
}

/* ===== FOOTER SECTION RTL FIXES ===== */
.footer-section .footer-widget {
    direction: ltr !important;
}

/* Footer Brand Description RTL Fix */
.footer-brand .brand-description .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    display: block !important;
    margin-top: 0.5rem !important;
    unicode-bidi: bidi-override !important;
    line-height: 1.6 !important;
}

/* Footer Links RTL Fix */
.footer-links {
    direction: ltr !important;
    list-style: none !important;
    padding: 0 !important;
}

.footer-links li {
    direction: ltr !important;
    margin-bottom: 0.75rem !important;
}

.footer-links li a {
    direction: ltr !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
}

.footer-links li a .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    margin-right: 0.5rem !important;
    margin-left: auto !important;
    flex: 1 !important;
}

.footer-links li a .english-text {
    direction: ltr !important;
    text-align: left !important;
    margin-right: 0.5rem !important;
}

.footer-links li a i {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
    order: -1 !important;
}

/* ===== ENHANCED RTL TYPOGRAPHY ===== */
/* Arabic Text Specific Styling */
.arabic-text,
.arabic-greeting,
.arabic-subtitle {
    direction: rtl !important;
    text-align: center !important;
}

/* Enhanced Arabic Greeting */
.arabic-greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    direction: rtl !important;
    unicode-bidi: bidi-override;
    font-family: 'Noto Nastaliq Urdu', serif !important;
}

/* Enhanced Mixed Content Handling */
.urdu-mixed-content .english-inline {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
    margin: 0 0.2rem;
    font-family: 'Poppins', sans-serif !important;
}

/* ===== SMALL QR CODES STYLING FOR STUDY INSTRUCTIONS ===== */
.qr-codes-container-small {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.qr-code-item-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    min-width: 80px;
}

.qr-code-item-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.qr-image-small {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #25D366;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.qr-code-item-small:nth-child(2) .qr-image-small {
    border-color: #0088cc;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.qr-image-small:hover {
    transform: scale(1.05);
}

.qr-label-small {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qr-label-small i {
    font-size: 0.875rem;
}

.qr-label-small .urdu-text {
    direction: rtl !important;
    text-align: center !important;
    font-size: 0.75rem;
}

/* ===== RESPONSIVE RTL FIXES ===== */
@media (max-width: 991px) {
    .study-instructions-section .rtl-container {
        direction: rtl !important;
        text-align: center !important;
    }
    
    .study-instructions-section .rtl-container .d-flex {
        justify-content: center !important;
        flex-direction: column !important;
    }
    
    .footer-links li a {
        justify-content: center !important;
    }
    
    .footer-links li a .urdu-text {
        text-align: center !important;
        margin: 0 !important;
    }
}

@media (max-width: 768px) {
    .hero-subtitle.urdu-text {
        direction: rtl !important;
        text-align: center !important;
        padding: 0;
        margin-bottom: 1rem;
    }

    .intro-content.urdu-text {
        direction: rtl !important;
        text-align: center !important;
    }

    .intro-content.urdu-text h3,
    .intro-content.urdu-text p {
        direction: rtl !important;
        text-align: center !important;
    }
    
    .accordion-body .urdu-text {
        text-align: right !important;
        direction: rtl !important;
    }
    
    .footer-brand .brand-description .urdu-text {
        text-align: center !important;
    }
    
    .qr-codes-container-small {
        gap: 0.5rem;
    }
    
    .qr-image-small {
        width: 50px;
        height: 50px;
    }
    
    .qr-label-small {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .urdu-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .urdu-mixed-content .english-inline {
        margin: 0 0.1rem;
        font-size: 0.95em;
    }
    
    .arabic-greeting {
        font-size: 1rem;
        direction: rtl !important;
        text-align: center !important;
        unicode-bidi: bidi-override;
    }
    
    .accordion-body .urdu-text {
        font-size: 0.95rem;
        line-height: 1.7 !important;
    }
    
    .qr-codes-container-small {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .qr-code-item-small {
        min-width: 70px;
        padding: 0.375rem;
    }
    
    .qr-image-small {
        width: 45px;
        height: 45px;
    }
    
    .qr-label-small {
        font-size: 0.65rem;
    }
    
    .qr-label-small .urdu-text {
        font-size: 0.65rem;
    }
}

/* ===== CONTACT FORM RTL FIXES ===== */
.contact-section .form-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-section .form-label .english-text {
    direction: ltr !important;
    text-align: left !important;
    order: 1;
}

.contact-section .form-label .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--secondary-color) !important;
    order: 2;
    align-self: flex-end;
}

/* Enhanced Contact Form Styling */
.contact-form-container {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    direction: ltr !important;
}

.contact-form .row {
    direction: ltr !important;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    direction: ltr !important;
}

/* Form Control RTL Support */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    direction: ltr !important;
    text-align: left !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Button RTL Support */
.contact-form .btn {
    direction: ltr !important;
}

.contact-form .btn .urdu-text {
    direction: rtl !important;
    text-align: center !important;
    margin-right: 0.5rem;
}

/* Form Validation Styling */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Form Label Enhanced Styling */
.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-label .english-text {
    direction: ltr !important;
    text-align: left !important;
    order: 1;
    font-size: 1rem;
}

.form-label .urdu-text {
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--secondary-color) !important;
    order: 2;
    align-self: flex-end;
}

/* Custom Notification Styling */
.custom-notification {
    animation: slideInRight 0.5s ease-out;
    border: none;
    border-left: 4px solid;
}

.custom-notification.alert-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
}

.custom-notification.alert-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Success Modal Styling */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-header.bg-success {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
}

.arabic-greeting {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.1rem;
    color: var(--primary-color);
    direction: rtl;
    text-align: center;
}