html,
body,
body:has(#page-content.masjid-detail-page) {
    background: #f6f7f8;
}

#page-content.masjid-detail-page {
    background: #f6f7f8;
    color: #151b2d;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
}

.masjid-detail-page * {
    box-sizing: border-box;
}

.masjid-detail-page [x-cloak] {
    display: none !important;
}

.masjid-shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 0 22px;
    position: relative;
    width: 100%;
    z-index: 2;
}

.masjid-hero {
    background: #164729;
    isolation: isolate;
    min-height: 370px;
    overflow: hidden;
    padding: 18px 0 22px;
    position: relative;
}

.masjid-hero-image,
.masjid-hero-shade {
    inset: 0;
    position: absolute;
}

.masjid-hero-image {
    background: #164729;
    backface-visibility: hidden;
    display: block;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    width: 100%;
    z-index: 0;
}

.masjid-hero-shade {
    background: linear-gradient(180deg, rgba(4, 9, 20, 0.2), rgba(4, 9, 20, 0.42) 45%, rgba(3, 6, 12, 0.86));
    pointer-events: none;
    z-index: 1;
}

.masjid-back,
.masjid-action-btn,
.masjid-direction-btn,
.masjid-mini-btn,
.restaurant-write-review {
    align-items: center;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    font-family: 'Poppins', sans-serif;
    gap: 8px;
    justify-content: center;
    text-decoration: none;
}

.masjid-back {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(8, 18, 26, 0.16);
    color: #202b3c;
    font-size: 14px;
    font-weight: 800;
    min-height: 40px;
    padding: 0 16px;
}

.masjid-hero-content {
    align-items: flex-end;
    bottom: 24px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    left: max(22px, calc((100vw - 1120px) / 2 + 22px));
    position: absolute;
    right: max(22px, calc((100vw - 1120px) / 2 + 22px));
    z-index: 2;
}

.masjid-badges,
.masjid-rating-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.masjid-pill {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    gap: 5px;
    min-height: 28px;
    padding: 0 11px;
}

.masjid-pill.green {
    background: #1b6b3f;
}

.masjid-pill.purple {
    background: #a33df0;
}

.masjid-hero h1 {
    color: #fff;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.06;
    margin: 12px 0 10px;
}

.masjid-stars,
.restaurant-stars {
    color: #f5a91a;
}

.masjid-rating-line {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.masjid-direction-btn {
    background: #f0a51e;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    min-height: 44px;
    padding: 0 22px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.masjid-direction-btn:hover {
    box-shadow: 0 14px 30px rgba(240, 165, 30, 0.35);
    color: #fff;
    transform: translateY(-2px);
}

.masjid-body {
    padding: 24px 0 60px;
}

.masjid-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.masjid-meta-panel,
.masjid-panel,
.masjid-side-card {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 14px;
    box-shadow: 0 2px 7px rgba(20, 28, 42, 0.08);
}

.masjid-meta-panel {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 14px 16px;
}

.masjid-meta-list {
    align-items: center;
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.masjid-meta-list span,
.masjid-contact-row {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.masjid-meta-list ion-icon,
.masjid-contact-row ion-icon {
    color: #1d633a;
}

.masjid-actions {
    display: flex;
    gap: 8px;
}

.masjid-action-btn {
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    color: #39455a;
    font-size: 14px;
    font-weight: 700;
    min-height: 40px;
    padding: 0 14px;
}

.masjid-prayer-card {
    background: linear-gradient(135deg, #0c3a1c 0%, #165b2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(12, 58, 28, 0.2);
    color: #fff;
    margin-bottom: 22px;
    padding: 22px 24px;
}

.masjid-prayer-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.masjid-prayer-head h2 {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    gap: 10px;
    margin: 0;
}

.masjid-prayer-head h2 ion-icon {
    font-size: 18px;
}

.masjid-prayer-head span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.masjid-prayer-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.masjid-prayer-time {
    border-radius: 14px;
    min-height: 88px;
    padding: 13px 10px 12px;
    text-align: center;
}

.masjid-prayer-time h3 {
    font-size: 11px;
    font-weight: 900;
    margin: 0 0 3px;
}

.masjid-prayer-time strong {
    color: #273348;
    display: block;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.masjid-prayer-time span {
    color: #8992a2;
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 4px;
}

.masjid-prayer-time.fajr {
    background: #e9efff;
}

.masjid-prayer-time.fajr h3 {
    color: #4734c9;
}

.masjid-prayer-time.dhuhr {
    background: #fff9df;
}

.masjid-prayer-time.dhuhr h3 {
    color: #9a4b0d;
}

.masjid-prayer-time.asr {
    background: #fff4e8;
}

.masjid-prayer-time.asr h3 {
    color: #bb3f14;
}

.masjid-prayer-time.maghrib {
    background: #fff0ef;
}

.masjid-prayer-time.maghrib h3 {
    color: #b1193c;
}

.masjid-prayer-time.isha {
    background: #edf9f1;
}

.masjid-prayer-time.isha h3 {
    color: #115b30;
}
.masjid-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.masjid-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    color: #6d7789;
    cursor: pointer;
    font-weight: 900;
    min-height: 54px;
    transition: color 0.22s ease, border-color 0.22s ease;
}

.masjid-tabs button.active {
    border-bottom-color: #1d633a;
    color: #1d633a;
}

.masjid-tab-content {
    animation: masjidFadeUp 0.3s ease both;
    padding: 24px;
}

@keyframes masjidFadeUp {
    from {
opacity: 0;
transform: translateY(10px);
    }

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

.masjid-section-title {
    color: #151b2d;
    font-size: 17px;
    font-weight: 900;
    margin: 0 0 12px;
}

.masjid-copy {
    color: #556173;
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 24px;
}

.masjid-facility-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 28px;
}

.masjid-facility {
    align-items: center;
    background: #eaf6ec;
    border-radius: 12px;
    color: #24643d;
    display: flex;
    font-size: 14px;
    font-weight: 800;
    gap: 10px;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
}

.masjid-event,
.masjid-contact-row {
    background: #f8f9fa;
    border-radius: 14px;
    color: #151b2d;
    margin-top: 12px;
    padding: 14px;
}

.masjid-event {
    align-items: center;
    display: flex;
    gap: 14px;
}

.masjid-event-icon,
.masjid-side-icon,
.masjid-map-pin {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
}

.masjid-event-icon {
    background: #e4f3e7;
    color: #1d633a;
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
}

.masjid-muted {
    color: #758093;
    font-size: 13px;
    margin: 0;
}

.masjid-contact-row {
    color: #1d633a;
    font-weight: 800;
}

.masjid-map {
    align-items: center;
    background:
linear-gradient(#d9efdd 1px, transparent 1px),
linear-gradient(90deg, #d9efdd 1px, transparent 1px),
#eaf8ec;
    background-size: 48px 34px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    min-height: 170px;
    text-align: center;
}

.masjid-map-pin {
    background: #1d633a;
    box-shadow: 0 10px 22px rgba(29, 99, 58, 0.25);
    color: #fff;
    height: 44px;
    width: 44px;
}

.masjid-map-label {
    background: #fff;
    border-radius: 12px;
    color: #536072;
    padding: 8px 14px;
}

.masjid-map-label strong {
    color: #354058;
    display: block;
}

.masjid-mini-btn {
    background: #1d633a;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    min-height: 34px;
    padding: 0 14px;
}

.masjid-side-stack {
    display: grid;
    gap: 20px;
}

.masjid-side-card {
    padding: 20px;
}

.masjid-side-card h2 {
    color: #151b2d;
    font-size: 16px;
    font-weight: 900;
    margin: 0 0 18px;
}

.masjid-quick-item {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}

.masjid-side-icon {
    background: #eaf8ed;
    color: #17643a;
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
}

.masjid-side-icon.gold {
    background: #fff6e6;
    color: #f59f18;
}

.masjid-contact-label {
    color: #98a2b3;
    font-size: 12px;
    font-weight: 700;
}

.masjid-contact-value {
    color: #17643a;
    font-weight: 900;
    line-height: 1.35;
}

.masjid-facility-card {
    background: linear-gradient(155deg, #14552f, #1b683b);
    border: 0;
    color: #d7f8df;
}

.masjid-facility-head {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.masjid-facility-card h3,
.masjid-facility-card p {
    margin: 0;
}

.masjid-facility-row {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
}

.masjid-facility-row strong {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 6px;
}

.masjid-facility-row strong::before {
    background: #10d5a0;
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 12px;
    width: 12px;
}

.masjid-facility-row strong.no {
    color: #ffb3a7;
}

.masjid-facility-row strong.no::before {
    background: #ff7b6f;
}

.nearby-masjid {
    align-items: center;
    color: inherit;
    display: grid;
    gap: 10px;
    grid-template-columns: 50px 1fr 14px;
    margin-bottom: 14px;
    text-decoration: none;
}

.nearby-masjid img {
    border-radius: 10px;
    height: 50px;
    object-fit: cover;
    width: 50px;
}

.nearby-masjid h3 {
    color: #151b2d;
    font-size: 14px;
    font-weight: 900;
    margin: 0 0 3px;
}

.nearby-masjid span {
    color: #98a2b3;
    font-size: 12px;
}

.masjid-report {
    color: #98a3b5;
    display: block;
    font-size: 12px;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
}

.restaurant-reviews-summary {
    align-items: center;
    display: grid;
    gap: 38px;
    grid-template-columns: 135px 1fr;
    margin: 8px 0 34px;
}

.restaurant-review-score {
    text-align: left;
}

.restaurant-review-score strong {
    color: #17643a;
    display: block;
    font-size: 58px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: .9;
}

.restaurant-review-score .restaurant-stars {
    display: block;
    font-size: 20px;
    margin: 8px 0 4px;
}

.restaurant-muted {
    color: #667085;
    font-size: 13px;
    margin: 0;
}

.restaurant-rating-breakdown {
    display: grid;
    gap: 12px;
}

.restaurant-rating-line {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 24px 1fr 18px;
}

.restaurant-rating-line-label {
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.restaurant-rating-line-label span {
    color: #f8b400;
}

.restaurant-rating-track {
    background: #f1f3f5;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.restaurant-rating-fill {
    background: #f5a91a;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.restaurant-rating-count {
    color: #98a2b3;
    font-size: 13px;
    text-align: right;
}

.restaurant-review-prompt {
    align-items: center;
    border: 1px solid #eceff3;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 18px;
}

.restaurant-review-prompt h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 3px;
}

.restaurant-review-prompt p {
    color: #667085;
    font-size: 13px;
    margin: 0;
}

.restaurant-write-review {
    background: #17643a;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    min-width: 174px;
    padding: 15px 20px;
}

.restaurant-review-card {
    border-bottom: 1px solid #eef0f2;
    display: grid;
    gap: 14px;
    grid-template-columns: 42px 1fr;
    padding: 24px 0;
}

.restaurant-review-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.restaurant-review-avatar {
    align-items: center;
    background: #17643a;
    border-radius: 999px;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.restaurant-review-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.restaurant-review-head strong {
    color: #111827;
    display: block;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 3px;
}

.restaurant-review-head .restaurant-stars {
    font-size: 15px;
    letter-spacing: 1px;
}

.restaurant-review-date {
    color: #98a2b3;
    font-size: 13px;
    white-space: nowrap;
}

.restaurant-review-card p {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 12px;
}

.restaurant-review-actions {
    align-items: center;
    color: #98a2b3;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 18px;
}

.restaurant-review-actions span {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

@media (max-width: 1100px) {
    .masjid-prayer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 980px) {
    .masjid-grid {
grid-template-columns: minmax(0, 1fr);
    }

    .masjid-hero-content {
align-items: flex-start;
flex-direction: column;
    }
}

@media (max-width: 680px) {
    .masjid-hero {
min-height: 470px;
    }

    .masjid-meta-panel,
    .masjid-event,
    .restaurant-review-head,
    .restaurant-review-prompt {
align-items: flex-start;
flex-direction: column;
    }

    .masjid-prayer-head {
align-items: flex-start;
flex-direction: column;
gap: 8px;
    }

    .masjid-prayer-grid {
grid-template-columns: minmax(0, 1fr);
    }
    .masjid-facility-grid,
    .restaurant-review-card,
    .restaurant-reviews-summary {
grid-template-columns: minmax(0, 1fr);
    }
}

/* Smooth client-side masjid detail tabs */
.masjid-tabs {
    background: #fff;
    overflow: hidden;
    position: relative;
}

.masjid-tabs button {
    overflow: hidden;
    position: relative;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.masjid-tabs button::after {
    background: #1d633a;
    border-radius: 999px 999px 0 0;
    bottom: 0;
    content: "";
    height: 3px;
    left: 22%;
    opacity: 0;
    position: absolute;
    right: 22%;
    transform: scaleX(0.45);
    transform-origin: center;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.masjid-tabs button:hover {
    background: #f8faf9;
    color: #1d633a;
}

.masjid-tabs button.active {
    background: #f7fbf8;
    border-bottom-color: transparent;
    color: #1d633a;
}

.masjid-tabs button.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.masjid-tab-panel {
    animation: masjidTabPanelIn 0.28s ease both;
    will-change: opacity, transform;
}

.masjid-tab-panel .masjid-facility,
.masjid-tab-panel .masjid-event,
.masjid-tab-panel .masjid-contact-row,
.masjid-tab-panel .restaurant-reviews-summary,
.masjid-tab-panel .restaurant-review-prompt,
.masjid-tab-panel .restaurant-review-card {
    animation: masjidDetailItemIn 0.34s ease both;
}

.masjid-tab-panel .masjid-facility:nth-child(2),
.masjid-tab-panel .restaurant-review-card:nth-child(2) {
    animation-delay: 0.04s;
}

.masjid-tab-panel .masjid-facility:nth-child(3),
.masjid-tab-panel .restaurant-review-card:nth-child(3) {
    animation-delay: 0.08s;
}

.masjid-tab-panel .masjid-facility:nth-child(4),
.masjid-tab-panel .restaurant-review-card:nth-child(4) {
    animation-delay: 0.12s;
}

.masjid-facility,
.masjid-event,
.masjid-contact-row {
    transition: background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.masjid-facility:hover,
.masjid-event:hover,
.masjid-contact-row:hover {
    background: #f1f8f3;
    box-shadow: 0 10px 24px rgba(29, 99, 58, 0.08);
    transform: translateY(-2px);
}

@keyframes masjidTabPanelIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes masjidDetailItemIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@media (prefers-reduced-motion: reduce) {
    .masjid-tabs button,
    .masjid-tabs button::after,
    .masjid-tab-panel,
    .masjid-tab-panel .masjid-facility,
    .masjid-tab-panel .masjid-event,
    .masjid-tab-panel .masjid-contact-row,
    .masjid-tab-panel .restaurant-reviews-summary,
    .masjid-tab-panel .restaurant-review-prompt,
    .masjid-tab-panel .restaurant-review-card,
    .masjid-facility,
    .masjid-event,
    .masjid-contact-row {
        animation: none !important;
        transition: none !important;
    }
}

/* Detail page loading feedback */
.masjid-detail-loader {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 233, 239, 0.95);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(20, 28, 42, 0.14);
    color: #1d633a;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 9px;
    left: 50%;
    min-height: 42px;
    padding: 0 16px;
    pointer-events: none;
    position: fixed;
    top: 18px;
    transform: translateX(-50%);
    z-index: 1200;
}

.masjid-detail-loader-spinner {
    animation: masjidDetailLoaderSpin 0.75s linear infinite;
    border: 2px solid rgba(29, 99, 58, 0.18);
    border-top-color: #1d633a;
    border-radius: 50%;
    height: 16px;
    width: 16px;
}

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

@media (prefers-reduced-motion: reduce) {
    .masjid-detail-loader-spinner {
        animation: none !important;
    }
}

