/* CSS Variables for Colors */
:root {
    --primary-color-start: #6B8E23; /* Lighter olive for gradients/hovers */
    --primary-color-end: #556B2F;   /* Dark olive green */
    --primary-color-solid: #556B2F; /* Dark olive green for solid fills */
    --primary-gradient: linear-gradient(to right, var(--primary-color-start), var(--primary-color-end));
    
    --secondary-color: #f8f9fa; /* Bootstrap light gray */
    --accent-color: #D4E1C3; /* Light, muted green for accents */
    --text-color: #212529;
    --light-gray: #dee2e6;
    --background-pattern: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20' 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23dde2e8' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary-color);
    background-image: var(--background-pattern);
    color: var(--text-color);
    overflow-x: hidden; /* Prevent horizontal scrollbar during animations */
    padding-bottom: 70px; /* Space for the floating action bar */
}

main {
    position: relative;
    overflow-x: hidden;
    min-height: 80vh; /* Prevents footer jump during view transitions */
}

/* =================================
   Animation Keyframes & Classes
   ================================= */
@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutToLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-50px); opacity: 0; }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes zoomOut {
    to { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Voice search listening animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.fade-in-up {
    opacity: 0; /* Initially hidden */
    animation-name: fadeInUp;
    animation-duration: 0.6s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

.stagger-item {
    opacity: 0; /* Hide items before animation starts */
}


/* =================================
   Bootstrap & Theme Overrides
   ================================= */
.btn-primary {
    background-color: var(--primary-color-solid);
    border-color: var(--primary-color-solid);
    --bs-btn-hover-bg: var(--primary-color-start);
    --bs-btn-hover-border-color: var(--primary-color-start);
    --bs-btn-active-bg: var(--primary-color-end);
    --bs-btn-active-border-color: var(--primary-color-end);
    --bs-btn-focus-shadow-rgb: 85, 107, 47; /* Corresponds to #556B2F */
}

.btn-outline-primary {
    color: var(--primary-color-solid);
    border-color: var(--primary-color-solid);
    --bs-btn-hover-bg: var(--primary-color-solid);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: var(--primary-color-solid);
    --bs-btn-active-bg: var(--primary-color-solid);
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: var(--primary-color-solid);
    --bs-btn-focus-shadow-rgb: 85, 107, 47;
}

.text-success {
    color: var(--primary-color-start) !important;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}
.modal.show .modal-dialog {
    transform: translateY(0);
}


/* RTL Specific Styles */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Amiri', serif; /* Use a font that supports Urdu better */
}

body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6, body.rtl .navbar-brand, body.rtl .display-4, body.rtl .display-5 {
    font-family: 'Amiri', serif;
}
body.rtl .navbar-nav {
    padding-right: 0; /* Reset bootstrap padding */
}
body.rtl .me-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}
body.rtl .ms-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}
body.rtl .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}
body.rtl .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}
body.rtl .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}
body.rtl .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}
body.rtl .text-end {
    text-align: left !important;
}
body.rtl .salah-name {
    text-align: left;
    padding-left: 1.5rem;
    padding-right: 0;
}
body.rtl .input-group > :not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--bs-border-radius);
    border-bottom-right-radius: var(--bs-border-radius);
}
body.rtl .input-group:not(.has-validation) > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--bs-border-radius);
    border-bottom-left-radius: var(--bs-border-radius);
}
body.rtl .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}
body.rtl .form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}
body.rtl .d-flex.gap-2 {
    flex-direction: row-reverse;
}
body.rtl .carousel-control-prev-icon, body.rtl .carousel-control-next-icon {
    transform: scaleX(-1);
}
body.rtl .dua-arabic-text {
    direction: rtl;
}
body.rtl .dua-translation-text.urdu {
    direction: rtl;
}
body.rtl .admin-sidebar-new {
    border-left: 1px solid #dee2e6;
    border-right: none;
    left: auto;
    right: 0;
}
body.rtl .admin-content {
    margin-left: 0;
    margin-right: 250px;
}
body.rtl.admin-sidebar-visible .admin-sidebar-new {
    right: 0;
}
body.rtl .admin-sidebar-new {
    right: -250px;
}
body.rtl .floating-action-bar {
    direction: ltr; /* Keep LTR for button layout */
}
body.rtl .mosque-card-footer {
    align-items: flex-start;
    padding-left: 0;
    padding-right: 0.5rem;
}
body.rtl .mosque-card-distance {
    text-align: left;
}


/* Header Styles */
h1, h2, h3, h4, h5, h6, .navbar-brand, .display-4, .display-5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.display-4, .display-5 {
    color: #343a40;
}

/* Navbar */
.navbar {
    background-image: var(--primary-gradient);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    transition: color 0.2s;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

@media (min-width: 992px) {
    /* Base style for all nav links on desktop */
    .navbar-dark .navbar-nav .nav-link {
        padding: 0.4rem 1rem;
        border-radius: 20px;
        margin: 0 0.25rem;
        border: 1px solid transparent;
        transition: color 0.2s, background-color 0.2s, border-color 0.2s;
    }

    /* Style for regular items (Home, Calendar) */
    .navbar-dark .navbar-nav .nav-item:not(.nav-item-special) .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-dark .navbar-nav .nav-item:not(.nav-item-special) .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
        font-weight: 500;
    }

    /* Style for prominent items (Dhikr, Dua, Zakat) */
    .nav-item-special .nav-link {
        font-weight: 500;
        border-color: rgba(255, 255, 255, 0.4);
    }

    .nav-item-special .nav-link:hover,
    .nav-item-special .nav-link.active {
        background-color: var(--accent-color);
        color: var(--primary-color-solid) !important;
        border-color: var(--accent-color);
    }
}


.navbar-toggler {
    border-color: rgba(255,255,255,0.1);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* NEW: Navbar Controls Styling */
.mobile-nav-controls-container {
    gap: 0.75rem;
}
.mobile-nav-controls-container .lang-switcher {
    padding: 0.375rem 0.75rem;
}
.mobile-nav-controls-container .lang-switcher i {
    width: 16px;
    vertical-align: text-bottom;
}
#auth-controls .btn {
    display: inline-flex;
    align-items: center;
}
#auth-controls .dropdown-toggle i {
    margin-right: 0.25rem;
}
body.rtl #auth-controls .dropdown-toggle i {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* =================================
   Mobile Navbar Adjustments
   ================================= */
@media (max-width: 991.98px) {
    .navbar-toggler {
        margin-left: 0.5rem;
    }
    .mobile-nav-controls-container {
        gap: 0.4rem;
    }
    /* Language Switcher */
    .mobile-nav-controls-container .lang-switcher {
        padding: 0.2rem 0.4rem;
    }
    .mobile-nav-controls-container .lang-switcher i {
        width: 14px;
        height: 14px;
    }
    /* Auth Controls */
    #auth-controls .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
    #auth-controls .dropdown-toggle i {
        margin-right: 0 !important;
    }
    body.rtl #auth-controls .dropdown-toggle i {
        margin-left: 0 !important;
    }
    #auth-controls .dropdown-toggle::after {
        display: none; /* Hide dropdown arrow to save space */
    }
}


/* Ad Scroller Styles */
@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scrollRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.ad-scroller-container {
    width: 100%;
    overflow: hidden;
    padding: 0.5rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.ad-scroller-wrapper {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scrollLeft 40s linear infinite;
}

body.rtl .ad-scroller-wrapper {
    animation-name: scrollRight;
}

.ad-scroller-container:hover .ad-scroller-wrapper {
    animation-play-state: paused;
}

.ad-card {
    width: 250px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ad-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Info Bar */
#info-bar {
    padding: 0.5rem 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

/* Main Search Bar */
.main-search-bar {
    border-radius: 0.75rem;
    overflow: hidden; /* To contain the border radius */
}
.main-search-bar .form-control {
    border: none;
    box-shadow: none !important; /* Override bootstrap focus glow */
    border-radius: 0.75rem 0 0 0.75rem;
}
.main-search-bar .btn {
    padding: 0 1.5rem;
}
#voice-search-btn,
#know-sr-voice-search-btn {
    border-radius: 0;
    border-left: 1px solid #dee2e6;
    border-right: none;
    color: #6c757d;
    box-shadow: none !important;
}
#voice-search-btn.listening,
#know-sr-voice-search-btn.listening {
    color: #dc3545;
    animation: pulse 1.5s infinite;
    border-radius: 50%;
}
.main-search-bar .btn[type="submit"] {
    border-radius: 0 0.75rem 0.75rem 0;
}
body.rtl .main-search-bar .form-control {
    border-radius: 0 0.75rem 0.75rem 0;
}
body.rtl .main-search-bar .btn {
    border-radius: 0.75rem 0 0 0.75rem;
}

/* NEW: Search and Filter Container */
.search-and-filter-container {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}
.search-and-filter-container .main-search-bar {
    flex-grow: 1;
}
#filter-controls {
    flex-shrink: 0;
}
#filter-controls .form-select, #filter-controls .searchable-dropdown input {
    min-width: 130px;
    background-color: #fff;
}
@media (max-width: 767.98px) {
    .search-and-filter-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .search-and-filter-container > .flex-grow-1 {
        width: 100%; /* Make search bar full width */
        margin-bottom: 0.25rem; /* Add space below it */
    }
    #filter-controls {
        flex-grow: 1;
        justify-content: space-between;
    }
    #filter-controls > div {
        flex-grow: 1;
    }
    #filter-controls .form-select, 
    #filter-controls .searchable-dropdown input,
    .main-search-bar .form-control-lg {
        height: 2.2rem; /* Adjusted from 2.3rem */
        font-size: 0.8rem; /* Adjusted from 0.85rem */
    }
    .main-search-bar .btn {
        padding: 0 0.8rem; /* Adjusted from 1rem */
    }
}

/* Searchable City Filter */
.searchable-dropdown {
    position: relative;
}
.searchable-dropdown-list-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050; /* Above most content */
    max-height: 250px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}
.searchable-dropdown.open .searchable-dropdown-list-container {
    display: block;
}
.searchable-dropdown .list-group-item {
    cursor: pointer;
    border-radius: 0;
    border-left: none;
    border-right: none;
}
.searchable-dropdown .list-group-item:hover, .searchable-dropdown .list-group-item.active {
    background-color: #f8f9fa;
}


/* Home Page Controls */
.nav-pills .nav-link {
    color: var(--text-color);
}

.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    color: #fff;
    background-color: var(--primary-color-solid);
}

.mobile-home-controls {
    display: grid;
    /* New: 3 columns, with the center one sized to its content */
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
}

.mobile-home-controls .btn {
    white-space: nowrap;
    padding: 0.5rem 0.4rem;
    font-size: 0.9rem;
    /* New: styles for better icon alignment */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.mobile-home-controls .btn i {
    width: 16px;
    height: 16px;
}



/* Main Content & Views */
.view {
    display: none;
    opacity: 1; /* Opacity is handled by animation */
}
.view.active {
    display: block;
}

/* View transition animations */
.view.view-is-entering {
    animation: slideInFromRight 0.4s forwards ease-out;
}
.view.view-is-leaving {
    animation: slideOutToLeft 0.4s forwards ease-out;
    /* Must be block to animate out */
    display: block !important; 
    /* Position absolute to remove from flow during transition */
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}


/* View Headers */
.view-header {
    position: relative;
    padding: 2.5rem 1.5rem; /* Reduced padding */
    margin-bottom: 2rem; /* Reduced margin */
    border-radius: 0.75rem;
    background-color: #e9ecef; /* Fallback color */
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    transform: scale(1.05); /* Start slightly zoomed in for animation */
    animation: zoomOut 1.2s ease-out forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Added card-like shadow */
}

.view-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.view-header > * {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.8s 0.2s ease-out forwards;
}

.view-header h1 {
    font-weight: 700;
    color: #fff;
    font-size: 2.2rem; /* Reduced from 3rem (display-5) */
}

.view-header .lead {
    font-size: 1rem; /* Reduced from 1.25rem */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f8f9fa;
}

/* Specific Backgrounds for View Headers - Now set by JS */
.calendar-header-bg {
    background-image: url('https://images.pexels.com/photos/733853/pexels-photo-733853.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2');
}
.dhikr-header-bg, .dua-header-bg, .zakat-header-bg, .feedback-header-bg {
    /* background-image is set via JS from admin settings */
}

/* Location Permission Alert */
#location-permission-alert {
    margin-bottom: 1.5rem;
}

/* --- Mosque Card Redesign --- */

/* Mobile First: 2-Column Grid Layout */
.mosque-card {
    display: flex;
    flex-direction: column; /* This is the key change for vertical layout */
    align-items: stretch;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}
.mosque-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.mosque-card-img {
    width: 100%;
    height: 120px; /* A good height for a mobile grid card */
    object-fit: cover;
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
}
.mosque-card-body {
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1; /* This is important for the card to fill the space */
    padding: 0.75rem;
    display: flex; /* Make sure it's a flex container */
}
.mosque-card-text {
    flex-grow: 1; /* This pushes the action button to the bottom */
    margin-bottom: 0.75rem;
    width: 100%;
}
.mosque-card-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    /* Let it wrap naturally */
}
.mosque-card-address {
    display: none; /* Keep hidden on mobile */
}
.mosque-card-location-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem; /* A bit less gap for mobile */
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}
.mosque-card-location-details span {
    display: inline-flex;
    align-items: center;
}
.mosque-card-location-details i {
    width: 12px; /* Smaller icons */
    height: 12px;
    margin-right: 0.25rem;
}
body.rtl .mosque-card-location-details i {
    margin-right: 0;
    margin-left: 0.25rem;
}
.mosque-card-action {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}
.mosque-card-action .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem; /* Smaller button text */
}
.mosque-card-action .btn i {
    width: 14px;
    height: 14px;
}

/* Desktop: Adjustments for larger screens */
@media (min-width: 992px) { /* Corresponds to -lg breakpoint */
    .mosque-card-img {
        height: 180px; /* Taller image on desktop */
    }
    .mosque-card-title {
        font-size: 1.1rem; /* Larger title */
    }
    .mosque-card-location-details {
        font-size: 0.8rem;
    }
    .mosque-card-action .btn {
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
    }
    .mosque-card-action .btn i {
        width: 16px;
        height: 16px;
    }
    .mosque-card-address {
        display: block; /* Show address on desktop */
        font-size: 0.8rem;
        color: #6c757d;
        margin: 0.25rem 0;
    }
}


/* Detail View */
.detail-image-block {
    position: relative;
    overflow: hidden;
    /* FIX: Add padding to create space for the button below the image */
    padding-bottom: 70px; 
}

#mosque-detail-view .detail-mosque-image {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: cover;
}

.detail-image-actions {
    position: absolute;
    bottom: 1rem; /* Sits inside the new padding area */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}


body.rtl .detail-image-actions {
    right: auto;
    left: 50%;
}

.detail-image-actions .btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.detail-image-actions #share-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(248, 249, 250, 0.9);
    border-color: rgba(248, 249, 250, 0.9);
}

.detail-image-actions #share-btn:hover {
    background-color: #fff;
}

.detail-image-actions #share-btn i {
    width: 16px;
    height: 16px;
}


.distance-detail {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color-solid);
}

#mosque-detail-view .btn-light {
    border-color: #dee2e6;
}

/* New Detail Page Layout (Mobile First Flex, Desktop Grid) */
.detail-layout-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Equivalent to Bootstrap's g-4 */
}

.detail-image-block { order: 1; }
.detail-salah-block { order: 2; }
.detail-about-block { order: 3; }

@media (min-width: 992px) {
    .detail-layout-container {
        display: grid;
        grid-template-columns: 5fr 7fr; /* Corresponds to col-lg-5 and col-lg-7 */
        grid-template-areas:
            "image about"
            "salah salah";
        gap: 1.5rem;
    }
    
    .detail-image-block { grid-area: image; order: 0; }
    .detail-about-block { grid-area: about; order: 0; }
    .detail-salah-block { grid-area: salah; order: 0; }
}


.mosque-details-list li {
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.mosque-details-list li:last-child {
    margin-bottom: 0;
}
.mosque-details-list i {
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}
body.rtl .mosque-details-list i {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Salah Time Table Styling */
.detail-salah-block .card-header {
    background-color: var(--primary-color-solid);
    color: white;
}

.salah-detail-table {
    --bs-table-hover-bg: #dceaf5; /* A neutral light blue for hover to complement both colors */
    margin-bottom: 0;
}

.salah-detail-table tbody tr:nth-child(odd) {
    background-color: #e8f5e9; /* Light Green */
}

.salah-detail-table tbody tr:nth-child(even) {
    background-color: #f3e5f5; /* Light Purple */
}

.salah-detail-table th, .salah-detail-table td {
    vertical-align: middle;
}

.salah-share-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: var(--primary-color-solid);
    border: none;
    transition: all 0.2s ease-in-out;
}

.salah-share-btn:hover, .salah-share-btn:focus {
    background-color: var(--primary-color-solid);
    color: #fff;
    transform: scale(1.1);
}


/* Special Prayer Filter Buttons */
#special-prayer-filters .btn.active {
    background-color: var(--primary-color-solid);
    color: white;
    border-color: var(--primary-color-solid);
}
#special-prayer-filters .btn {
    border-radius: 0.375rem !important; /* Override btn-group flattening */
}
.special-prayer-time {
    font-weight: 600;
    color: var(--primary-color-solid);
    background-color: #e6f7f2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

/* Special Prayer Modal List */
#special-prayer-modal-body .list-group-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#special-prayer-modal-body .masjid-image-sm {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
}

#special-prayer-modal-body .masjid-name {
    flex-grow: 1;
    font-weight: 600;
}

#special-prayer-modal-body .masjid-time {
    font-weight: 500;
    color: var(--primary-color-solid);
    min-width: 90px;
    text-align: right;
}

body.rtl #special-prayer-modal-body .masjid-time {
    text-align: left;
}


/* Mobile Breadcrumb */
.mobile-breadcrumb {
    background-color: #fff;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Auth Views */
.auth-view {
    /* Replaced flex centering with padding to remove large empty space at the top */
    padding: 3rem 1rem;
}

.auth-icon {
    width: 56px;
    height: 56px;
    color: var(--primary-color-solid);
    fill: currentColor;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    margin: 0 auto; /* Center the card horizontally */
}

.auth-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color-solid);
}

.auth-back-link {
    text-decoration: none;
    color: #6c757d;
    font-size: 0.9rem;
}
.auth-back-link:hover {
    color: var(--primary-color-solid);
}

.password-toggle-btn {
    border-left: 0;
}
.password-toggle-btn:focus {
    box-shadow: none;
}


/* City Suggestions for Main Search */
.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1060; /* Higher than modal z-index */
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}

.city-suggestions .list-group-item-action,
.city-suggestions .list-group-item {
    cursor: pointer;
    border-radius: 0;
}
.city-suggestions .list-group-item:hover {
    background-color: #f8f9fa;
}


/* Collapsible Containers in Dashboard */
.collapsible-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.collapsible-container.visible {
    max-height: 3000px; /* Large enough to fit content */
}

/* Dhikr View */
.dhikr-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dhikr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.dhikr-name {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.dhikr-counter {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color-solid);
    line-height: 1;
    margin-bottom: 1rem;
}

.dhikr-card .progress {
    height: 10px;
    background-color: #e9ecef;
}

.dhikr-card .progress-bar {
    background-color: var(--primary-color-solid);
    transition: width 0.3s ease-in-out;
}

.dhikr-target-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.dhikr-target-container .form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.dhikr-target-input {
    width: 90px;
    text-align: center;
}

.dhikr-controls {
    margin-top: 1.5rem;
}

.dhikr-controls .btn {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.dhikr-controls .reset-dhikr-btn {
    width: 45px;
    height: 45px;
}

.dhikr-card.celebrate {
    animation: target-reached 1.2s ease-in-out;
}

@keyframes target-reached {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    30% {
        transform: scale(1.05);
        box-shadow: 0 0 25px 8px var(--accent-color);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
}

/* Dua View */
.dua-tabs-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.dua-tabs-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.dua-tabs-container .nav-tabs {
    flex-wrap: nowrap;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 1rem;
}
.dua-tabs-container .nav-item {
    flex-shrink: 0;
}
.dua-tabs-container .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.dua-tabs-container .nav-link.active {
    color: var(--primary-color-solid);
    font-weight: 600;
    border-color: var(--primary-color-solid);
    background-color: transparent;
}
.dua-tabs-container .nav-link:hover {
    color: var(--primary-color-solid);
}

.dua-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dua-category-title {
    color: var(--primary-color-solid);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color-solid);
    margin-bottom: 1rem;
}
.dua-card {
    border: 1px solid var(--light-gray);
    border-left: 5px solid var(--primary-color-solid);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.dua-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.dua-card .card-body {
    position: relative;
    padding-right: 40px; /* Space for the button */
}
body.rtl .dua-card {
    border-left: none;
    border-right: 5px solid var(--primary-color-solid);
}
body.rtl .dua-card .card-body {
    padding-right: 1.25rem; /* Reset padding */
    padding-left: 40px;
}
.dua-arabic-text {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    text-align: right;
    margin-bottom: 1rem;
    line-height: 1.8;
}
.dua-translation-text {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: #555;
}
.dua-translation-text::before {
    content: attr(data-lang-label);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
    background-color: #6c757d;
    padding: 2px 6px;
    border-radius: 4px;
}
body.rtl .dua-translation-text {
    padding-left: 0;
    padding-right: 2rem;
}
body.rtl .dua-translation-text::before {
    left: auto;
    right: 0;
}
.speak-btn {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s, transform 0.2s;
}
.speak-btn:hover {
    color: var(--primary-color-solid);
    transform: scale(1.1);
}

/* Dua Card Bookmark Button */
.bookmark-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    z-index: 2;
}
body.rtl .bookmark-btn {
    right: auto;
    left: 10px;
}
.bookmark-btn:hover {
    background-color: #f0f0f0;
}
.bookmark-btn.active {
    color: #ffc107; /* Bootstrap warning color - yellow star */
}
.bookmark-btn.active .feather-bookmark {
    fill: #ffc107;
}


/* Calendar View */
.calendar-header #calendar-search-wrapper {
    min-width: 200px;
}
.calendar-header .input-group {
    width: auto;
}
.calendar-grid-header, .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}
.calendar-grid-header {
    font-weight: 600;
    padding: 0.75rem 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--light-gray);
}
.calendar-day {
    padding: 0.75rem 0.25rem;
    border: 1px solid #f0f0f0;
    min-height: 100px;
    position: relative;
    transition: background-color 0.2s;
}
.calendar-day:hover {
    background-color: #f8f9fa;
}
.calendar-day.other-month {
    color: #ccc;
    background-color: #fafafa;
}
.calendar-day.today {
    background-color: var(--accent-color);
    font-weight: bold;
}
.calendar-day.day-highlighted {
    border: 2px solid var(--primary-color-solid);
    background-color: #d1e7dd;
}
.calendar-day.event-day::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-color-solid);
    border-radius: 50%;
}

.day-primary {
    font-size: 1.25rem;
    font-weight: 500;
}
.day-secondary {
    font-size: 0.8rem;
    color: #888;
}

#event-search-results-list .list-group-item {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#event-search-results-list .list-group-item:hover {
    background-color: #f8f9fa;
}

.calendar-header .calendar-month-nav {
    flex-grow: 1;
    min-width: 250px;
}
.calendar-header .calendar-tools {
    flex-grow: 1;
    min-width: 300px;
}

@media (max-width: 991.98px) {
    .calendar-header {
        justify-content: center;
        flex-direction: column;
    }
    .calendar-header .calendar-month-nav {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }
    .calendar-header .calendar-tools {
        order: 2;
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 575.98px) {
    .calendar-header .calendar-tools {
        flex-direction: column;
        align-items: stretch;
    }
    #calendar-search-wrapper {
        min-width: 100%;
    }
    .calendar-header .calendar-sub-tools {
        justify-content: space-between;
        width: 100%;
    }
}


/* Zakat Calculator */
.zakat-card {
    border: 1px solid var(--light-gray);
}
.zakat-result-card {
    border-left: 5px solid var(--primary-color-solid);
    background-color: #f3fcf7;
}
body.rtl .zakat-result-card {
    border-left: none;
    border-right: 5px solid var(--primary-color-solid);
}
.zakat-summary-table td {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.zakat-final-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color-solid);
}

.info-box {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.info-icon {
    color: #6c757d;
}

/* Feedback View */
#issue-reporting-section {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}
#issue-reporting-section.visible {
    max-height: 1000px; /* Adjust as needed */
    opacity: 1;
}
.issue-entry {
    position: relative;
    background-color: #f8f9fa;
}
.issue-entry-header {
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.5rem;
}
.issue-entry-title {
    color: var(--primary-color-solid);
}


.star-rating-container {
    display: inline-flex;
    gap: 0.5rem;
}
.star-icon {
    cursor: pointer;
    color: #adb5bd; /* Default star color */
    transition: color 0.2s, transform 0.2s;
    width: 28px;
    height: 28px;
}
.star-icon:hover {
    transform: scale(1.2);
}
.star-icon.filled {
    color: #ffc107; /* Filled star color (Bootstrap yellow) */
}
.star-rating-container:hover .star-icon {
    color: #ffc107;
}
.star-rating-container .star-icon:hover ~ .star-icon {
    color: #adb5bd;
}


/* Reminder Modal & Dashboard */
.reminder-salah-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.reminder-salah-row:last-child {
    border-bottom: none;
}
.reminder-salah-row .salah-name {
    font-weight: 500;
    flex-grow: 1;
}
.reminder-offset-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.reminder-offset-input {
    width: 70px;
    text-align: center;
}
.reminder-salah-row .form-switch {
    padding-left: 2.5em;
    margin-left: 1rem;
}
body.rtl .reminder-salah-row {
    flex-direction: row-reverse;
}
body.rtl .reminder-offset-control {
    flex-direction: row-reverse;
}
body.rtl .reminder-salah-row .salah-name {
    text-align: right;
}
body.rtl .reminder-salah-row .form-switch {
    padding-left: 0;
    padding-right: 2.5em;
    margin-left: 0;
    margin-right: 1rem;
}

#dashboard-reminders-content .masjid-selection-display {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
#dashboard-reminders-content .masjid-selection-display strong {
    color: var(--primary-color-solid);
}

/* Reminder Modal Search */
.reminder-search-results {
    position: absolute;
    background: #fff;
    width: 100%;
    z-index: 1056; /* Above modal content */
    border: 1px solid #ddd;
    max-height: 150px;
    overflow-y: auto;
}


/* =================================
   NEW USER DASHBOARD STYLES
   ================================= */
.dashboard-layout {
    display: flex;
    flex-direction: column;
}

.dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;
}
.dashboard-sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
}
.dashboard-sidebar .list-group-item i {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
}
.dashboard-sidebar .list-group-item.active {
    background-color: var(--primary-color-solid);
    color: #fff;
}
.dashboard-sidebar .list-group-item:not(.active):hover {
    background-color: #f8f9fa;
}


.dashboard-content {
    flex-grow: 1;
}

.dashboard-pane {
    animation: fadeInUp 0.4s ease-out;
}

.dashboard-tabs {
    border-bottom: 1px solid var(--light-gray);
}
.dashboard-tabs .nav-link {
    color: #6c757d;
}
.dashboard-tabs .nav-link.active {
    font-weight: 600;
    color: var(--primary-color-solid);
    border-color: #dee2e6 #dee2e6 var(--primary-color-solid);
    border-bottom-width: 2px;
}


@media (min-width: 992px) {
    .dashboard-layout {
        flex-direction: row;
        gap: 2rem;
    }
}


/* =================================
   NEW ADMIN PANEL STYLES
   ================================= */
#admin-view .navbar, #admin-view .app-footer, #admin-view .d-lg-none.bg-dark {
    display: none !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar-new {
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-new .sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}
.admin-sidebar-new .admin-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color-solid);
    text-decoration: none;
}
.admin-sidebar-new .admin-nav-pills {
    padding: 1rem;
    flex-grow: 1;
}
.admin-sidebar-new .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #343a40;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
}
.admin-sidebar-new .nav-link:hover {
    background-color: #f8f9fa;
}
.admin-sidebar-new .nav-link.active {
    background-color: var(--primary-color-solid);
    color: #fff;
    font-weight: 500;
}
.admin-sidebar-new .nav-link i {
    width: 20px;
    height: 20px;
}

/* Sidebar Submenu */
.admin-sidebar-parent .feather-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.admin-sidebar-parent:not(.collapsed) .feather-chevron-down {
    transform: rotate(180deg);
}
.admin-submenu {
    padding-left: 2.5rem; /* Indent submenu items */
}
.admin-submenu .nav-link {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}
.admin-submenu .nav-link:hover {
    color: #212529;
}
.admin-submenu .nav-link.active {
    color: var(--primary-color-solid);
    background-color: transparent;
    font-weight: bold;
}

.admin-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    display: flex;
    flex-direction: column;
}
.admin-header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-header #admin-header-title {
    flex-grow: 1;
}

.admin-main-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: #f4f7f6;
}
.admin-main-content .card-body canvas {
    max-width: 100%;
    max-height: 350px;
}

.back-to-admin-dashboard-btn i {
    vertical-align: text-bottom;
}


.stat-box {
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-box i {
    width: 32px;
    height: 32px;
}
.stat-box span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}
.stat-box h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

/* Professional Admin Table Styles */
.admin-table {
    border-collapse: separate;
    border-spacing: 0 0.75rem;
    margin-top: -0.75rem; /* Counteract first row's spacing */
}

.admin-table thead th {
    border: none;
    border-bottom: 2px solid #e9ecef; /* subtle but clear separator */
    color: #495057; /* Slightly darker for better contrast */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem; /* More vertical and horizontal padding */
    vertical-align: bottom;
    text-align: left;
}

body.rtl .admin-table thead th {
    text-align: right;
}

.admin-table tbody tr {
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.admin-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-table tbody td {
    background: #fff;
    padding: 1rem;
    vertical-align: middle;
    border: none;
}

.admin-table tbody td:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.admin-table tbody td:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.admin-table .badge {
    font-size: 0.8rem;
    padding: 0.4em 0.7em;
    font-weight: 500;
}

.admin-table .btn-group .btn {
    padding: 0.3rem 0.6rem;
    line-height: 1;
}
.admin-table .btn-group .btn i {
    width: 16px;
    height: 16px;
}

.admin-table .banner-preview-img {
    width: 120px;
    height: 67.5px;
    object-fit: cover;
    border-radius: .375rem;
}


.header-image-form .header-image-preview {
    max-width: 300px;
    max-height: 169px;
    object-fit: cover;
    border-radius: .375rem;
    border: 1px solid var(--light-gray);
    display: block;
}


/* Responsive Admin Layout */
.admin-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.admin-sidebar-new, .admin-content {
    transition: all 0.3s ease-in-out;
}


@media (max-width: 991.98px) {
    .admin-sidebar-new {
        left: -250px;
    }
    body.rtl .admin-sidebar-new {
        left: auto;
        right: -250px;
    }
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
    body.rtl .admin-content {
        margin-right: 0;
    }

    body.admin-sidebar-visible .admin-sidebar-new {
        left: 0;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }
    body.rtl.admin-sidebar-visible .admin-sidebar-new {
        left: auto;
        right: 0;
    }

    body.admin-sidebar-visible .admin-sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

/* Desktop Collapsible Styles */
@media (min-width: 992px) {
    .admin-layout.admin-sidebar-collapsed .admin-sidebar-new {
        margin-left: -250px;
    }
    body.rtl .admin-layout.admin-sidebar-collapsed .admin-sidebar-new {
        margin-left: 0;
        margin-right: -250px;
    }
    .admin-layout.admin-sidebar-collapsed .admin-content {
        margin-left: 0;
        width: 100%;
    }
    body.rtl .admin-layout.admin-sidebar-collapsed .admin-content {
        margin-right: 0;
    }
}


/* Admin Panel */
.admin-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
.admin-list-item-content {
    flex-grow: 1;
    overflow: hidden;
}
.admin-list-item-content .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.admin-list-item-content .details {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Floating Action Bar */
.floating-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-image: var(--primary-gradient);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    z-index: 1030;
}

.floating-action-bar .action-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.floating-action-bar .action-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.floating-action-bar .action-btn svg {
    width: 28px;
    height: 28px;
}

/* Travel Mode Modal */
#dua-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color-solid);
}
body.rtl #dua-container {
    border-left: none;
    border-right: 4px solid var(--primary-color-solid);
}

.dua-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    direction: rtl;
}

.dua-transliteration {
    font-style: italic;
    color: #6c757d;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.dua-translation {
    text-align: center;
    font-weight: 500;
}

.mood-selection-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mood-btn {
    flex-grow: 1;
    background-color: #f0f3eb; /* Lighter version of accent color */
    background-image: none;
    color: var(--primary-color-solid);
    text-shadow: none; /* Removed shiny effect for white text */
    /* Golden border */
    border: 2px solid #DAA520; /* Goldenrod */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    /* Calligraphy font */
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem; /* Calligraphy fonts need to be larger */
    font-weight: 700;
    /* Removing uppercase to let the font shine */
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15), inset 0 0 10px rgba(218, 165, 32, 0.2); /* Adjusted shadows */
}

.mood-btn:hover,
.mood-btn:focus {
    background-color: var(--accent-color); /* Use the new accent color on hover */
    color: var(--primary-color-solid);
    transform: translateY(-2px);
    border-color: #FFD700; /* Brighter gold on hover */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2), 0 0 15px rgba(255, 215, 0, 0.5); /* Enhance outer shadow and golden glow */
}

/* Travel Mode Mic Button */
#travel-mic-btn {
    width: 70px;
    height: 70px;
}
#travel-mic-btn.listening {
    animation: pulse 1.5s infinite;
}


/* Playlist View */
.playlist-media-player {
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}
.playlist-media-player video,
.playlist-media-player audio {
    width: 100%;
    border-radius: 8px;
}
.playlist-item {
    cursor: pointer;
    transition: background-color 0.2s;
}
.playlist-item:hover {
    background-color: #f1f1f1;
}
.playlist-item.active {
    background-color: var(--accent-color);
    font-weight: 600;
}

/* Image Zoom Modal */
#image-zoom-modal .modal-dialog {
    max-width: 95vw;
}
#image-zoom-modal .btn-close {
    position: absolute;
    top: -25px;
    right: 0;
    z-index: 1060;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.7));
}

/* "Know SeedhiRaah" Page & Button */
#know-seedhiraah-btn {
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}
#know-seedhiraah-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

#know-seedhiraah-view {
    background-color: #f4f7f6; /* A very light green-gray */
}
.know-sr-header {
    background-color: #fff;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 1025; /* Above content, below navbar */
}
.vision-section {
    background: linear-gradient(to right, #eef4e8, #e6f0de);
}
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}
.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feature-icon i {
    width: 24px;
    height: 24px;
}
.feature-card-wrapper {
    transition: opacity 0.4s, transform 0.4s ease;
}
.know-sr-footer {
    background: linear-gradient(to left, var(--primary-color-start), var(--primary-color-end));
    color: white;
}
.know-sr-footer p {
     color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.app-footer, .know-sr-footer {
    background-image: var(--primary-gradient);
}
.know-sr-footer {
    background: linear-gradient(to left, var(--primary-color-start), var(--primary-color-end)); /* Specific override */
}
.app-footer p, .know-sr-footer p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}
.app-footer .youtube-link,
.know-sr-footer .youtube-link {
    color: #FF0000; /* Red for YouTube icon */
    background-color: white;
    border-radius: 8px;
    padding: 4px;
    line-height: 1; /* Fixes layout issues with inline-flex */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.app-footer .youtube-link:hover,
.know-sr-footer .youtube-link:hover {
    transform: scale(1.1);
}

.app-footer .youtube-link i,
.know-sr-footer .youtube-link i {
    width: 28px;
    height: 28px;
}
.app-footer .footer-link,
.know-sr-footer .footer-link {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.2s;
}
.app-footer .footer-link:hover,
.know-sr-footer .footer-link:hover {
    color: var(--accent-color); /* Accent color */
    text-decoration-style: solid;
}

.footer-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.footer-stats .stat-item i {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}
.footer-stats .stat-item span {
    font-weight: 600;
}


/* Mobile Responsiveness */

/* FIX: Global rule to hide main navbar on views with their own header */
body.detail-view-active .navbar,
body.know-sr-view-active .navbar {
    display: none !important;
}


@media (max-width: 991.98px) {
    body.detail-view-active .floating-action-bar,
    body.know-sr-view-active .floating-action-bar {
        display: none !important;
    }

    .salah-detail-table {
        font-size: 0.8rem;
    }
    .salah-detail-table th, .salah-detail-table td {
        padding: 0.6rem 0.3rem;
        white-space: nowrap;
    }
}

body.know-sr-view-active .app-footer {
    display: none !important;
}


@media (max-width: 767.98px) {
    .ad-card {
        width: 200px;
        height: 120px;
    }

    #mosque-list.row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    #info-bar {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    #info-bar i {
        width: 16px;
        height: 16px;
    }
    
    .home-title-container {
        padding-top: 0.5rem !important;
        padding-bottom: 0.75rem !important;
    }

    #know-seedhiraah-btn {
        font-size: 0.8rem;
        padding: 0.4rem 1.2rem;
    }

    .app-footer .container {
        gap: 0.75rem;
    }
    .footer-stats {
        order: -1; /* Move stats to the top on mobile */
    }
}

@media (max-width: 575.98px) {
    #special-prayer-filters .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    /* Floating Action Bar */
    .floating-action-bar {
        padding: 0.3rem 0;
    }

    .floating-action-bar .action-btn {
        width: 48px;
        height: 48px;
    }

    .floating-action-bar .action-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* =================================
   IMPROVED SALAH TIMINGS MODAL
   ================================= */
.salah-timings-modal-body {
    background-color: #f4f7f6; /* Light green-gray background */
}

.prayer-section .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color-solid);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.prayer-edit-row {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr; /* Name | Adhan | Salah */
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.prayer-section .prayer-edit-row:nth-child(odd) {
    background-color: #e8f5e9; /* Light Green */
}

.prayer-section .prayer-edit-row:nth-child(even) {
    background-color: #f3e5f5; /* Light Purple */
}

.prayer-edit-row .prayer-name-col {
    font-weight: 500;
    color: var(--text-color);
}

.prayer-edit-row .time-col {
    display: flex;
    flex-direction: column;
}

.prayer-edit-row .time-col > label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.time-picker-group {
    display: flex;
    gap: 0.5rem;
}

.time-picker-group .form-select {
    padding: 0.5rem;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}
.time-picker-group .form-select:focus {
    border-color: var(--primary-color-solid);
    box-shadow: 0 0 0 0.25rem rgba(85, 107, 47, 0.25);
}


/* Responsive adjustments for the modal */
@media (max-width: 767.98px) {
    .prayer-edit-row {
        grid-template-columns: 1fr; /* Stack everything on mobile */
        gap: 0.75rem;
    }
    .prayer-edit-row .prayer-name-col {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .prayer-edit-row .time-col {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .prayer-edit-row .time-col > label {
        margin-bottom: 0;
        flex-basis: 20%;
    }
    .prayer-edit-row .time-col > .time-picker-group {
        flex-basis: 75%;
    }
}