:root {
    --mbd-teal: #02594F;
    --mbd-green: #095A4C;
    --mbd-gold: #B47D26;
    --mbd-bg: #F6FBFA;
    --mbd-white: #FEFEFE;
}

/* HEADER STYLE */
.mbd-custom-header {
    background: linear-gradient(180deg, var(--mbd-teal) 0%, var(--mbd-green) 100%);
    border-top: 3px solid var(--mbd-gold);
    border-bottom: 3px solid var(--mbd-gold);
    color: white;
    padding: 90px 20px;
    text-align: center;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 60px;
    margin-top: -30px;
}

/* HIDE DEFAULT THEME TITLES to fix gap */
.single-muslim_business .entry-title,
.single-muslim_business .page-title,
.single-muslim_business .elementor-widget-theme-post-title,
.single-muslim_business .ast-single-post-order {
    display: none !important;
}

/* Header Title */
.mbd-header-title {
    font-size: 48px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    color: #ffffff !important;
    text-transform: capitalize;
}

.mbd-breadcrumbs {
    font-size: 15px;
    color: #ffffff !important;
    margin-top: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.mbd-custom-header .mbd-breadcrumbs a,
.mbd-custom-header .mbd-breadcrumbs a:visited,
.mbd-custom-header .mbd-breadcrumbs a:link {
    color: #ffffff !important;
    text-decoration: none;
    transition: 0.3s;
}

.mbd-custom-header .mbd-breadcrumbs a:hover {
    color: var(--mbd-gold) !important;
}

.mbd-breadcrumbs .separator {
    margin: 0 10px;
    opacity: 0.7;
}

.mbd-breadcrumbs .current-item {
    color: var(--mbd-gold);
    font-weight: bold;
    border-bottom: 1px dotted var(--mbd-gold);
}

/* LISTING CARDS */
.mbd-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.mbd-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    border: 1px solid #eaeaea;
    height: auto;
    /* Changed from 100% to auto to fix stretching */
    min-height: 100%;
    /* Fill the grid cell if needed, but don't force overflow? No, min-height 100% acts like height 100% in grid. */
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.mbd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.mbd-image-wrap {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.mbd-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.mbd-card:hover .mbd-image-wrap img {
    transform: scale(1.05);
}

.mbd-tag-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #E91E63;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.mbd-like-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E91E63;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.mbd-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mbd-content h3 {
    color: #222;
    margin: 0 0 10px 0;
    font-size: 18px;
    /* Reduced slightly */
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 50px;
    /* Ensure consistency */
}

.mbd-stars {
    color: #FFB400;
    font-size: 14px;
    margin-bottom: 12px;
}

.mbd-meta-row {
    display: flex;
    align-items: start;
    gap: 10px;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.mbd-meta-icon {
    min-width: 16px;
    text-align: center;
    color: #999;
}

.mbd-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    font-size: 14px;
    color: #555;
}

.mbd-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mbd-cat-box {
    background: #f3f3f4;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* FORM & SINGLE PAGE PREMIUM DESIGN */
.mbd-form-card,
.mbd-single-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.mbd-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--mbd-teal), var(--mbd-gold));
}

.mbd-form-title {
    font-size: 28px;
    color: var(--mbd-teal);
    margin-bottom: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.mbd-field-group {
    margin-bottom: 25px;
}

.mbd-label,
label {
    color: var(--mbd-teal);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.mbd-input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #e0e0e0;
    background: #f9fbfb;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #333;
    font-family: inherit;
}

.mbd-input:focus {
    background: #fff;
    border-color: var(--mbd-teal);
    box-shadow: 0 0 0 4px rgba(2, 89, 79, 0.1);
    outline: none;
}

.mbd-input::placeholder {
    color: #aaa;
}

/* File Input Styling */
input[type="file"] {
    position: relative;
    padding: 15px;
    background: #f9fbfb;
    border: 1px dashed #2222;
    border-radius: 10px;
    width: 100%;
    cursor: pointer;
    color: #555;
}

input[type="file"]::file-selector-button {
    background: #e0e0e0;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    color: #333;
    font-weight: 600;
    margin-right: 15px;
    cursor: pointer;
    transition: 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: #d0d0d0;
}

/* Buttons */
.mbd-submit-btn,
.mbd-call-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--mbd-teal) 0%, var(--mbd-green) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    margin-top: 20px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(2, 89, 79, 0.15);
}

.mbd-submit-btn:hover,
.mbd-call-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(2, 89, 79, 0.25);
}



.mbd-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media(max-width: 600px) {
    .mbd-grid-2 {
        grid-template-columns: 1fr;
    }

    .mbd-header-title {
        font-size: 32px;
    }
}

/* SUCCESS MESSAGE */
/* SUCCESS MESSAGE */
.mbd-success-msg {
    background: #e6fffa;
    border: 1px solid #b2f5ea;
    border-left: 5px solid var(--mbd-teal);
    color: var(--mbd-teal);
    padding: 20px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

.mbd-success-msg::before {
    content: '\2713';
    /* Checkmark Unicode */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--mbd-teal);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* Pagination Styles */
.mbd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

html body #mbd-directory-wrapper .mbd-page-btn {
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #555 !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    min-width: 40px !important;
    /* Ensure click target size */
}

html body #mbd-directory-wrapper .mbd-page-btn:hover:not(:disabled) {
    border-color: var(--mbd-teal) !important;
    color: var(--mbd-teal) !important;
    background: #f9fdfd !important;
}

html body #mbd-directory-wrapper .mbd-page-btn.active {
    background: var(--mbd-teal) !important;
    color: #fff !important;
    border-color: var(--mbd-teal) !important;
}

html body #mbd-directory-wrapper .mbd-page-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #f5f5f5 !important;
}

html body #mbd-directory-wrapper .mbd-page-btn.prev,
html body #mbd-directory-wrapper .mbd-page-btn.next {
    font-weight: bold !important;
    color: var(--mbd-gold) !important;
    border-color: var(--mbd-gold) !important;
}

html body #mbd-directory-wrapper .mbd-page-btn.prev:hover:not(:disabled),
html body #mbd-directory-wrapper .mbd-page-btn.next:hover:not(:disabled) {
    background: var(--mbd-gold) !important;
    color: #fff !important;
}

/* Slider Styles */
.mbd-slider-nav {
    display: flex;
    gap: 10px;
}

.mbd-swiper-prev,
.mbd-swiper-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--mbd-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.mbd-swiper-prev:hover,
.mbd-swiper-next:hover {
    background: var(--mbd-gold);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.mbd-swiper-prev.swiper-button-disabled,
.mbd-swiper-next.swiper-button-disabled {
    opacity: 0.5;
    cursor: default;
    background: #fcfcfc;
    color: #ccc;
    box-shadow: none;
    transform: none;
}

.mbd-related-slider {
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
    /* Critical to prevent footer overflow */
    width: 100%;
    display: block;
}

/* Force horizontal layout even if JS fails */
.mbd-related-slider .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.swiper-slide {
    height: auto;
    flex-shrink: 0;
    /* Prevent shrinking */
    display: flex;
    flex-direction: column;
}

.swiper-slide .mbd-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure images don't break layout */
.mbd-image-wrap img {
    height: 100%;
    object-fit: cover;
}

/* SINGLE PAGE RESPONSIVENESS */
.mbd-single-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

html,
body {
    overflow-x: hidden !important;
}

@media(max-width: 900px) {
    .mbd-single-grid {
        grid-template-columns: 1fr;
    }

    .mbd-custom-header {
        width: 100vw;
        position: relative;
        left: 50%;
        margin-left: -50vw;
        padding: 60px 20px;
        margin-bottom: 40px;
        margin-top: 0;
        box-sizing: border-box;
    }

    .mbd-header-title {
        font-size: 30px;
    }

    .mbd-breadcrumbs {
        font-size: 13px;
    }

    .mbd-single-box,
    .mbd-form-card {
        padding: 20px;
    }
}