/* Pivot custom front-end styles. All new CSS goes here (no inline or <style> blocks). */

/* ── Arabic / RTL ── */
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select, html[dir="rtl"] button,
html[dir="rtl"] .btn {
    font-family: "Cairo", sans-serif;
}

/* ── Language switcher (header) ── */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 20px;
    font-weight: 600;
}

.lang-switcher i {
    font-size: 16px;
}

/* ── Blog (moved from inline styles) ── */
.blog-card-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.blog-detail-image {
    width: 100%;
    max-width: 100%;
    height: 400px;
    object-fit: cover;
}

.blog-thumb-image {
    height: 80px;
    width: 100%;
    object-fit: cover;
}

/* ── CMS pages (/pages/{slug}) ── */
.cms-page-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: top; /* crop from the bottom: keep the top of the photo visible */
    border-radius: 5px;
    margin-block-end: 30px;
}

.cms-page-content {
    line-height: 1.8;
}

/* Page content typography (headings, lists, fact tables, FAQ questions). Colors: Homepage :root vars. */
.cms-page-content h2 {
    font-size: 26px;
    margin-block: 40px 15px;
    color: var(--pv-dark, #1C1E1D);
}

.cms-page-content > h2:first-child {
    margin-block-start: 0;
}

.cms-page-content h3 {
    font-size: 19px;
    margin-block: 25px 8px;
    color: var(--pv-blue, #15499C);
}

.cms-page-content ul {
    padding-inline-start: 22px;
    margin-block-end: 15px;
}

.cms-page-content li {
    margin-block-end: 6px;
}

.cms-page-content a {
    color: var(--pv-blue, #15499C);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cms-page-content a:hover {
    color: var(--pv-blue-dark, #0e3471);
}

/* Fact tables written in the editor (e.g. "Pivot at a glance") */
.cms-page-content > table {
    width: 100%;
    margin-block: 10px 25px;
    border-collapse: collapse;
}

.cms-page-content > table th,
.cms-page-content > table td {
    padding: 10px 14px;
    border: 1px solid var(--pv-border, #e6e9ef);
    vertical-align: top;
    text-align: start;
}

.cms-page-content > table th {
    width: 30%;
    background: var(--pv-blue-soft, #eef3fb);
    color: var(--pv-dark, #1C1E1D);
    font-weight: 600;
}

/* ── Price tables ([pricing:...] placeholders, pricingmodule::front.table) ── */
.pricing-table-wrap {
    overflow-x: auto;
    margin-block: 15px 25px;
}

.pricing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--pv-border, #e6e9ef);
    border-radius: var(--pv-radius, 12px);
    overflow: hidden;
    background: #fff;
}

.pricing-table caption {
    caption-side: top;
    padding-block: 0 8px;
    color: var(--pv-text, #554955);
    font-size: 14px;
    text-align: start;
}

.pricing-table th,
.pricing-table td {
    padding: 12px 16px;
    text-align: start;
    vertical-align: top;
    border-block-end: 1px solid var(--pv-border, #e6e9ef);
}

.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td {
    border-block-end: 0;
}

.pricing-table thead th {
    background: var(--pv-blue, #15499C);
    color: #fff;
    font-weight: 600;
}

.pricing-table tbody th {
    color: var(--pv-dark, #1C1E1D);
    font-weight: 600;
}

.pricing-table tbody tr:nth-child(even) {
    background: var(--pv-blue-soft, #eef3fb);
}

.pricing-table__price {
    white-space: nowrap;
}

.pricing-table__price strong {
    font-size: 18px;
    color: var(--pv-blue, #15499C);
}

.pricing-table__period {
    display: block;
    font-size: 13px;
    color: var(--pv-text, #554955);
}

.pricing-table td ul {
    margin: 0;
    padding-inline-start: 18px;
}

.pricing-table td li {
    margin-block-end: 4px;
}

@media (max-width: 575px) {
    .pricing-table th,
    .pricing-table td {
        padding: 10px;
        font-size: 14px;
    }

    .cms-page-content > table th {
        width: 40%;
    }
}

/* ── Navbar: menu at the start, language switcher at the end ──
   (LTR: menu left / switcher right; RTL mirrors: menu right / switcher left) */
.zash-nav .navbar .navbar-nav {
    margin-left: 0;
    margin-right: 0;
    margin-inline-start: 50px; /* space between the logo and the menu (left in EN, right in AR) */
    flex-grow: 1;
}

@media only screen and (max-width: 1199px) {
    .zash-nav .navbar .navbar-nav {
        margin-inline-start: 25px;
    }
}

.zash-nav .navbar .navbar-nav .nav-item.lang-switcher-item {
    margin-inline-start: auto;
}

.zash-nav .navbar .others-option {
    margin-left: 0;
    margin-right: 0;
    margin-inline-start: 25px;
}

/* ── Navbar dropdowns in Arabic (RTL): open toward the left, mirrored hover effect ── */
html[dir="rtl"] .zash-nav .navbar .navbar-nav .nav-item .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

html[dir="rtl"] .zash-nav .navbar .navbar-nav .nav-item .dropdown-menu li a::before {
    left: auto;
    right: -5px;
}

html[dir="rtl"] .zash-nav .navbar .navbar-nav .nav-item .dropdown-menu li a:hover,
html[dir="rtl"] .zash-nav .navbar .navbar-nav .nav-item .dropdown-menu li a:focus,
html[dir="rtl"] .zash-nav .navbar .navbar-nav .nav-item .dropdown-menu li a.active {
    padding-left: 15px;
    padding-right: 26px;
}

/* ── Mobile menu button in Arabic: meanmenu pins it to the right with an inline style
   (over the logo in RTL); move it to the left. !important is needed to beat the inline style. ── */
html[dir="rtl"] .mean-container a.meanmenu-reveal {
    right: auto !important;
    left: 0 !important;
}

/* ── Navbar: dropdown parents are not links ── */
.zash-nav .navbar .navbar-nav .nav-item .nav-link.nav-parent {
    cursor: pointer;
}

/* Gap between the parent's text and its dropdown arrow (logical: works in LTR and RTL) */
.zash-nav .navbar .navbar-nav .nav-item .nav-link.nav-parent i {
    display: inline-block;
    margin-inline-start: 6px;
}

/* ══════════════════════════════════════════════════════════════
   Homepage (layoutmodule::front.home + front/home_sections/*)
   Logical properties only, so the same rules work in LTR and RTL.
   ══════════════════════════════════════════════════════════════ */
:root {
    --pv-blue: #15499C;
    --pv-blue-dark: #0e3471;
    --pv-blue-soft: #eef3fb;
    --pv-dark: #1C1E1D;
    --pv-text: #554955;
    --pv-border: #e6e9ef;
    --pv-whatsapp: #1f9d55;
    --pv-radius: 12px;
    --pv-shadow: 0 10px 30px rgba(21, 73, 156, 0.08);
}

.home-section {
    padding-block: 100px;
}

.home-heading {
    max-width: 720px;
    margin-inline: auto;
    margin-block-end: 50px;
    text-align: center;
}

.home-heading p {
    font-size: 17px;
    margin-block: 12px 0;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-block-end: 12px;
    color: var(--pv-blue);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html[dir="rtl"] .home-eyebrow {
    letter-spacing: 0;
    text-transform: none;
}

.home-eyebrow--light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 6px 16px;
}

.home-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    margin-block-end: 18px;
}

.home-lead {
    font-size: 17px;
}

.home-section h3 {
    font-size: 20px;
    font-weight: 600;
}

/* Buttons and links (default-btn comes from the theme) */
.home-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-block-start: 30px;
}

.home-actions .default-btn i {
    margin-inline-end: 6px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

html[dir="rtl"] .home-btn,
html[dir="rtl"] .default-btn {
    text-transform: none;
}

.home-btn--outline {
    color: var(--pv-blue);
    border-color: var(--pv-blue);
}

.home-btn--outline:hover,
.home-btn--outline:focus {
    color: #ffffff;
    background-color: var(--pv-blue);
}

.home-btn--outline-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.8);
}

.home-btn--outline-light:hover,
.home-btn--outline-light:focus {
    color: var(--pv-dark);
    background-color: #ffffff;
}

.home-btn--light {
    color: var(--pv-blue);
    background-color: #ffffff;
}

.home-btn--light:hover,
.home-btn--light:focus {
    color: #ffffff;
    background-color: var(--pv-dark);
}

.home-btn--whatsapp {
    color: #ffffff;
    background-color: var(--pv-whatsapp);
}

.home-btn--whatsapp:hover,
.home-btn--whatsapp:focus {
    color: #ffffff;
    background-color: #17804a;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pv-blue);
    font-weight: 600;
}

.home-link:hover,
.home-link:focus {
    color: var(--pv-dark);
}

.home-link .home-dir-icon {
    font-size: 13px;
    transition: transform 0.3s;
}

.home-link:hover .home-dir-icon {
    transform: translateX(4px);
}

/* Directional icons point the other way in Arabic */
html[dir="rtl"] .home-dir-icon {
    transform: scaleX(-1);
}

html[dir="rtl"] .home-link:hover .home-dir-icon {
    transform: scaleX(-1) translateX(4px);
}

.home-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-block-start: 24px;
}

.home-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--pv-blue);
    background-color: var(--pv-blue-soft);
    font-size: 20px;
}

.home-card {
    height: 100%;
    background-color: #ffffff;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    transition: box-shadow 0.3s, transform 0.3s;
}

.home-card:hover {
    box-shadow: var(--pv-shadow);
    transform: translateY(-4px);
}

/* 1. Hero */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 780px;
    padding-block: 230px 130px;
    overflow: hidden;
    color: #ffffff;
    isolation: isolate;
}

.home-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, rgba(14, 33, 66, 0.92) 0%, rgba(14, 33, 66, 0.75) 50%, rgba(14, 33, 66, 0.35) 100%);
}

html[dir="rtl"] .home-hero::after {
    background: linear-gradient(to left, rgba(14, 33, 66, 0.92) 0%, rgba(14, 33, 66, 0.75) 50%, rgba(14, 33, 66, 0.35) 100%);
}

.home-hero__content {
    max-width: 700px;
}

.home-hero h1 {
    color: #ffffff;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    margin-block: 18px 22px;
}

.home-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 400;
    margin: 0;
}

/* 2. Intro */
.home-intro {
    padding-block-end: 60px;
}

.home-intro__label {
    color: var(--pv-dark);
    font-weight: 600;
    margin-block: 20px 12px;
}

.home-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.home-chips li {
    padding: 7px 16px;
    border-radius: 50px;
    color: var(--pv-blue);
    background-color: var(--pv-blue-soft);
    font-size: 15px;
    font-weight: 500;
}

/* 3. Services */
.home-services {
    background-color: #f7f9fc;
}

.home-service-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.home-service-card__media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: var(--pv-blue-soft);
}

.home-service-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.home-service-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 28px 28px;
}

.home-service-card__body h3 {
    margin-block-end: 10px;
}

.home-service-card__body h3 a:hover {
    color: var(--pv-blue);
}

.home-service-card__body p {
    flex: 1;
}

.home-services__pricing {
    margin-block: 45px 0;
    text-align: center;
    color: var(--pv-dark);
    font-weight: 400;
}

.home-services__pricing .home-link {
    margin-inline-start: 6px;
}

/* 4. Why choose Pivot */
.home-why__image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--pv-radius);
}

.home-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 30px;
    padding: 0;
    margin-block: 30px;
    list-style: none;
}

.home-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.home-benefits h3 {
    font-size: 18px;
    margin-block: 4px 6px;
}

.home-benefits p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
}

/* 5. Who we serve */
.home-audiences {
    background-color: #f7f9fc;
}

.home-audience-card {
    padding: 30px 24px;
    text-align: center;
}

.home-audience-card .home-icon {
    width: 64px;
    height: 64px;
    margin-block-end: 18px;
    font-size: 24px;
}

.home-audience-card h3 {
    font-size: 18px;
    margin-block-end: 10px;
}

.home-audience-card p {
    margin: 0;
    font-size: 15px;
}

/* 6. Discover Pivot: heading row + photo grid (first photo featured on large screens) */
.home-discover__head {
    margin-block-end: 40px;
}

.home-discover__actions {
    justify-content: flex-end;
    margin-block-start: 0;
}

.home-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* 5 photos: featured tile 2×2 + four tiles in a 4-column grid */
@media only screen and (min-width: 992px) {
    .home-gallery--5 {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 230px;
    }

    .home-gallery--5 .home-gallery__item:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }

    .home-gallery--5 .home-gallery__item img {
        height: 100%;
        aspect-ratio: auto;
    }
}

.home-gallery--1 {
    grid-template-columns: 1fr;
}

/* Below 992px (2 columns): an odd number of photos → the first one spans the full row */
.home-gallery--3 .home-gallery__item:first-child {
    grid-column: 1 / -1;
}

@media only screen and (max-width: 991px) {
    .home-gallery--5 .home-gallery__item:first-child {
        grid-column: 1 / -1;
    }
}

.home-gallery__item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--pv-radius);
    background-color: var(--pv-blue-soft);
}

.home-gallery__item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.5s;
}

.home-gallery__item:hover img {
    transform: scale(1.04);
}

.home-gallery__item figcaption {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    padding: 30px 18px 14px;
    color: #ffffff;
    background: linear-gradient(to top, rgba(14, 33, 66, 0.8), transparent);
    font-size: 15px;
    font-weight: 500;
}

/* 7. Testimonials */
.home-testimonial {
    margin: 0;
    padding: 32px 28px;
}

.home-testimonial__mark {
    color: var(--pv-blue);
    font-size: 26px;
    opacity: 0.4;
}

.home-testimonial blockquote {
    margin-block: 14px 20px;
    color: var(--pv-text);
    font-size: 16px;
    line-height: 1.8;
}

.home-testimonial figcaption span {
    display: block;
    color: var(--pv-text);
    font-size: 14px;
}

/* 8. Location & contact */
.home-contact {
    background-color: #f7f9fc;
}

.home-contact__card {
    margin: 0;
    padding: 36px;
    font-style: normal;
}

.home-contact__card:hover {
    transform: none;
}

.home-contact__card h3 {
    margin-block-end: 24px;
}

.home-contact__card ul {
    display: grid;
    gap: 22px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.home-contact__card li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: var(--pv-dark);
}

.home-contact__card li > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.home-contact__label {
    color: var(--pv-text);
    font-size: 14px;
}

.home-contact__card a[dir="ltr"] {
    font-size: 18px;
    font-weight: 600;
}

.home-contact__card a[dir="ltr"]:hover {
    color: var(--pv-blue);
}

/* 9. Final CTA */
.home-cta {
    padding-block: 0 100px;
    background: linear-gradient(to bottom, #f7f9fc 50%, #ffffff 50%);
}

.home-cta__inner {
    max-width: 960px;
    margin-inline: auto;
    padding: 64px 40px;
    border-radius: 20px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pv-blue) 0%, var(--pv-blue-dark) 100%);
}

.home-cta__inner h2 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin-block-end: 14px;
}

.home-cta__inner p {
    max-width: 640px;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

/* Responsive */
@media only screen and (max-width: 1199px) {
    .home-hero h1 {
        font-size: 46px;
    }
}

@media only screen and (max-width: 991px) {
    .home-section {
        padding-block: 70px;
    }

    .home-title {
        font-size: 32px;
    }

    .home-hero {
        min-height: 0;
        padding-block: 160px 90px;
    }

    .home-hero::after,
    html[dir="rtl"] .home-hero::after {
        background: rgba(14, 33, 66, 0.78);
    }

    .home-hero h1 {
        font-size: 40px;
    }

    .home-why__image img {
        aspect-ratio: 16 / 10;
    }

    .home-discover__actions {
        justify-content: flex-start;
    }

    .home-cta {
        padding-block-end: 70px;
    }
}

@media only screen and (max-width: 767px) {
    .home-section {
        padding-block: 55px;
    }

    .home-heading {
        margin-block-end: 35px;
    }

    .home-title {
        font-size: 27px;
    }

    .home-lead,
    .home-heading p,
    .home-hero p {
        font-size: 16px;
    }

    .home-hero {
        padding-block: 130px 70px;
    }

    .home-hero h1 {
        font-size: 32px;
    }

    .home-actions > a {
        flex: 1 1 100%;
        justify-content: center;
    }

    .home-benefits {
        grid-template-columns: 1fr;
    }

    .home-gallery {
        gap: 10px;
    }

    .home-gallery__item figcaption {
        padding: 24px 12px 10px;
        font-size: 13px;
    }

    .home-contact__card {
        padding: 26px 22px;
    }

    .home-cta {
        padding-block-end: 55px;
    }

    .home-cta__inner {
        padding: 44px 22px;
    }

    .home-cta__inner h2 {
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-service-card__media img,
    .home-gallery__item img,
    .home-link .home-dir-icon {
        transition: none;
    }

    .home-card:hover,
    .home-gallery__item:hover img,
    .home-service-card:hover .home-service-card__media img {
        transform: none;
    }
}

/* ── Footer logo (was an inline style in front/footer) ── */
.footer-area .single-footer-widget .logo .footer-logo {
    width: 114px;
}
