/* ==========================================================================
   RSD Oman - Custom Unified Card Styles & Enforced Static Dimensions
   Services, Blogs, Events, Products
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Carousel Slide Equal-Height Enforcement (Card Carousels Only)
      Strictly scoped so Hero (.hero-layout1) and Testimonials (.testimonial-layout1)
      retain their native theme layouts without any flex bleeding.
   -------------------------------------------------------------------------- */
#featured-services-container.slick-initialized .slick-track,
#home-featured-products-container.slick-initialized .slick-track,
#recent-blogs-container.slick-initialized .slick-track,
#recent-events-container.slick-initialized .slick-track,
section.service .vs-carousel.slick-initialized .slick-track,
.card-carousel.slick-initialized .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

#featured-services-container.slick-initialized .slick-slide,
#home-featured-products-container.slick-initialized .slick-slide,
#recent-blogs-container.slick-initialized .slick-slide,
#recent-events-container.slick-initialized .slick-slide,
section.service .vs-carousel.slick-initialized .slick-slide,
.card-carousel.slick-initialized .slick-slide {
    height: auto !important;
    display: flex !important;
}

#featured-services-container.slick-initialized .slick-slide > div,
#home-featured-products-container.slick-initialized .slick-slide > div,
#recent-blogs-container.slick-initialized .slick-slide > div,
#recent-events-container.slick-initialized .slick-slide > div,
section.service .vs-carousel.slick-initialized .slick-slide > div,
.card-carousel.slick-initialized .slick-slide > div {
    display: flex !important;
    flex: 1 1 100% !important;
    height: 100% !important;
    width: 100% !important;
    padding: 12px 14px;
}

@media (max-width: 576px) {
    #featured-services-container.slick-initialized .slick-slide > div,
    #home-featured-products-container.slick-initialized .slick-slide > div,
    #recent-blogs-container.slick-initialized .slick-slide > div,
    #recent-events-container.slick-initialized .slick-slide > div,
    section.service .vs-carousel.slick-initialized .slick-slide > div,
    .card-carousel.slick-initialized .slick-slide > div {
        padding: 8px 6px;
    }
}

/* --------------------------------------------------------------------------
   2. Home Page: Services Cards (.home-service-card)
   -------------------------------------------------------------------------- */
.home-service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(48, 53, 131, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
}

.home-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(48, 53, 131, 0.12);
    border-color: rgba(48, 53, 131, 0.25);
}

.home-service-card .service-card-img-wrap {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.home-service-card .service-card-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.home-service-card .service-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-service-card:hover .service-card-img {
    transform: scale(1.08);
}

.home-service-card .service-card-icon-badge {
    position: absolute;
    bottom: -22px;
    inset-inline-start: 24px;
    width: 56px;
    height: 56px;
    background: var(--theme-color, #303583);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(48, 53, 131, 0.3);
    z-index: 3;
    border: 3px solid #ffffff;
    transition: transform 0.3s ease;
}

.home-service-card:hover .service-card-icon-badge {
    transform: scale(1.08);
}

.home-service-card .service-card-icon-badge img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    display: block;
}

.home-service-card .service-card-body {
    padding: 32px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: start;
}

.home-service-card .service-card-title {
    font-size: 19px;
    line-height: 27px;
    font-weight: 700;
    color: var(--title-color, #010f30);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
    height: 54px;
}

.home-service-card .service-card-title a {
    color: inherit;
    transition: color 0.25s ease;
}

.home-service-card .service-card-title a:hover {
    color: var(--theme-color, #303583);
}

.home-service-card .service-card-text {
    font-size: 14px;
    line-height: 24px;
    color: #64748b;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 72px;
    height: 72px;
}

.home-service-card .service-card-btn-wrap {
    margin-top: auto;
    padding-top: 10px;
}

.home-service-card .service-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--theme-color, #303583);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.home-service-card .service-card-btn:hover {
    background: var(--theme-color, #303583);
    color: #ffffff;
    border-color: var(--theme-color, #303583);
}

/* --------------------------------------------------------------------------
   3. Home Page & Blogs: Static Unified Blog Card (.static-blog-card)
   -------------------------------------------------------------------------- */
.static-blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(48, 53, 131, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
}

.static-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(48, 53, 131, 0.12);
    border-color: rgba(48, 53, 131, 0.25);
}

.static-blog-card .blog-img {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.static-blog-card .blog-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.static-blog-card .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.static-blog-card:hover .blog-img img {
    transform: scale(1.08);
}

.static-blog-card .blog-meta2 {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    background: var(--theme-color, #303583);
    color: #ffffff;
    border-radius: 10px;
    padding: 6px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    min-width: 58px;
}

.static-blog-card .blog-meta2 .day {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
}

.static-blog-card .blog-meta2 .month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.static-blog-card .blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: start;
}

.static-blog-card .blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.static-blog-card .blog-meta a {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.static-blog-card .blog-meta a i {
    color: var(--theme-color, #303583);
}

.static-blog-card .blog-title {
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 78px;
    height: 78px;
}

.static-blog-card .blog-title a {
    color: var(--title-color, #010f30);
    transition: color 0.25s ease;
}

.static-blog-card .blog-title a:hover {
    color: var(--theme-color, #303583);
}

.static-blog-card .blog-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.static-blog-card .blog-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color, #303583);
    transition: gap 0.25s ease, color 0.25s ease;
}

.static-blog-card .blog-readmore-btn:hover {
    color: var(--secondary-color, #27aae1);
    gap: 12px;
}

/* --------------------------------------------------------------------------
   4. Home Page: Events Card (.home-event-card)
   -------------------------------------------------------------------------- */
.home-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(48, 53, 131, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
}

.home-event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(48, 53, 131, 0.12);
    border-color: rgba(48, 53, 131, 0.25);
}

.home-event-card .event-card-img-wrap {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.home-event-card .event-card-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.home-event-card .event-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-event-card:hover .event-card-img {
    transform: scale(1.08);
}

.home-event-card .event-date-badge {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    background: var(--theme-color, #303583);
    color: #ffffff;
    border-radius: 10px;
    padding: 6px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    min-width: 58px;
}

.home-event-card .event-date-badge .day {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
}

.home-event-card .event-date-badge .month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.home-event-card .event-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: start;
}

.home-event-card .event-meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.home-event-card .event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-event-card .event-meta-item i {
    color: var(--theme-color, #303583);
}

.home-event-card .event-card-title {
    font-size: 19px;
    line-height: 27px;
    font-weight: 700;
    color: var(--title-color, #010f30);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
    height: 54px;
}

.home-event-card .event-card-title a {
    color: inherit;
    transition: color 0.25s ease;
}

.home-event-card .event-card-title a:hover {
    color: var(--theme-color, #303583);
}

.home-event-card .event-card-text {
    font-size: 14px;
    line-height: 24px;
    color: #64748b;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    height: 48px;
}

.home-event-card .event-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-event-card .event-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color, #303583);
    transition: gap 0.25s ease, color 0.25s ease;
}

.home-event-card .event-readmore-btn:hover {
    color: var(--secondary-color, #27aae1);
    gap: 12px;
}

/* --------------------------------------------------------------------------
   5. Products Page: Filter Bar & Catalog Product Cards (.catalog-product-card)
   -------------------------------------------------------------------------- */
.product-filter-wrapper {
    margin-bottom: 30px;
}

.product-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 4px;
}

.product-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    border-radius: 50px;
    padding: 9px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.product-filter-btn:hover {
    border-color: var(--theme-color, #303583);
    color: var(--theme-color, #303583);
    background: #f8faff;
    transform: translateY(-1px);
}

.product-filter-btn.active {
    background: var(--theme-color, #303583);
    color: #ffffff;
    border-color: var(--theme-color, #303583);
    box-shadow: 0 4px 14px rgba(48, 53, 131, 0.25);
}

.product-filter-btn .filter-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    filter: grayscale(1);
    opacity: 0.8;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.product-filter-btn:hover .filter-icon,
.product-filter-btn.active .filter-icon {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* Category Status Bar */
.product-status-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 22px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.product-status-bar .status-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
}

.product-status-bar .status-category-tag {
    background: var(--theme-color, #303583);
    color: #ffffff;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.product-status-bar .status-count {
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
}

.product-status-bar .status-count strong {
    color: var(--theme-color, #303583);
}

/* Product Card */
.catalog-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
}

.catalog-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(48, 53, 131, 0.1);
    border-color: rgba(48, 53, 131, 0.22);
}

.catalog-product-card .product-img-wrap {
    height: 230px;
    width: 100%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 18px;
    flex-shrink: 0;
}

.catalog-product-card .product-img-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.catalog-product-card .product-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.catalog-product-card:hover .product-img {
    transform: scale(1.06);
}

.catalog-product-card .product-category-tag {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-color, #303583);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    z-index: 2;
}

.catalog-product-card .product-category-tag img {
    width: 14px;
    height: 14px;
    display: inline-block;
}

.catalog-product-card .product-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: start;
}

.catalog-product-card .product-card-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--title-color, #010f30);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    height: 48px;
}

.catalog-product-card .product-card-title a {
    color: inherit;
    transition: color 0.25s ease;
}

.catalog-product-card .product-card-title a:hover {
    color: var(--theme-color, #303583);
}

.catalog-product-card .product-card-text {
    font-size: 13.5px;
    line-height: 22px;
    color: #64748b;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 66px;
    height: 66px;
}

.catalog-product-card .product-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-product-card .product-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color, #303583);
    transition: gap 0.25s ease, color 0.25s ease;
}

.catalog-product-card .product-readmore-btn:hover {
    color: var(--secondary-color, #27aae1);
    gap: 12px;
}

/* Loading / Empty States */
.records-grid-wrap {
    min-height: 300px;
    position: relative;
    transition: opacity 0.3s ease;
}

.records-grid-wrap.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.products-empty-state {
    padding: 60px 20px;
    text-align: center;
    width: 100%;
}

.products-empty-state i {
    font-size: 52px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.products-empty-state h4 {
    font-size: 20px;
    color: var(--title-color, #010f30);
    margin-bottom: 8px;
}

.products-empty-state p {
    color: #64748b;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   6. RTL Directional Flip for Icons & Badges
   -------------------------------------------------------------------------- */
[dir="rtl"] i.fa-arrow-right,
[dir="rtl"] .product-readmore-btn i,
[dir="rtl"] .blog-readmore-btn i,
[dir="rtl"] .event-readmore-btn i,
[dir="rtl"] .service-card-btn i {
    transform: scaleX(-1);
    display: inline-block;
}

/* --------------------------------------------------------------------------
   7. Home Featured Products Carousel (.shop-layout1)
   -------------------------------------------------------------------------- */
.shop-layout1 #home-featured-products-container .catalog-product-card {
    box-shadow: 0 10px 30px rgba(1, 15, 48, 0.12);
}

.shop-layout1 .slick-prev,
.shop-layout1 .slick-next {
    background: #ffffff !important;
    color: var(--theme-color, #303583) !important;
    border: 2px solid var(--theme-color, #303583) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.shop-layout1 .slick-prev i,
.shop-layout1 .slick-next i {
    font-size: 18px;
    line-height: 1;
}

.shop-layout1 .slick-prev:hover,
.shop-layout1 .slick-next:hover {
    background: var(--theme-color, #303583) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.shop-layout1 .slick-dots li button {
    background: rgba(255, 255, 255, 0.5) !important;
}

.shop-layout1 .slick-dots li.slick-active button {
    background: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Mobile: the theme places carousel arrows 100px outside the carousel
   (--pos-x: -100px). Even when hidden they widen the page, which shifts the
   whole layout sideways on phones (most visible in Arabic / RTL).
   Swiping works on touch screens, so hide the arrows below 992px.
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .card-carousel .slick-arrow {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   The theme hides every .media-body below 1400px (meant only for the header's
   "Call Now" block). That also hid the About "how we work" steps, the blog
   recent-post titles and the side-menu articles. Show them again and keep the
   rule only for the header.
   -------------------------------------------------------------------------- */
@media (max-width: 1399px) {
    .media-body {
        display: block;
    }

    .header-info .media-body {
        display: none;
    }
}
