/* =====================================================
   PARIMAH THEME - SERVICE PAGE
   -----------------------------------------------------
   Shared template of every sub-service
   (pages/service-detail.php, template-parts/service/*)

   01. Page & Header Band
   02. Layout
   03. Main Content (featured image + editor text)
   04. Sidebar
   05. Call To Action
   06. Responsive
===================================================== */


/* =====================================================
   01. PAGE & HEADER BAND
===================================================== */

.service-page {
    --service-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    background: #FCF9F3;
    color: #26344A;
    direction: rtl;
}

.service-page .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Band starts at the top of the page, under the floating header.
   --service-header-space is measured by service.js. */

.service-header {
    position: relative;
    isolation: isolate;
    margin-top: calc(-1 * var(--service-header-space, 109px));
    padding: calc(var(--service-header-space, 109px) + 26px) 20px 70px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 30%, rgba(217, 182, 111, 0.22) 0, rgba(217, 182, 111, 0) 38%),
        linear-gradient(180deg, #F3E8D6 0%, #F8F1E6 100%);
}

/* Decorative gold ring */
.service-header::after {
    content: "";
    position: absolute;
    top: 40%;
    left: -90px;
    z-index: -1;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(198, 160, 82, 0.28);
    border-radius: 50%;
}

.service-header__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    text-align: right;
}

.service-header .parimah-breadcrumbs {
    margin: 0 0 14px;
    padding: 0;
    background: none;
    border: 0;
}

.service-header .parimah-breadcrumbs__inner {
    max-width: none;
    margin: 0;
    padding: 0;
}

.service-header__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #B18A50;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.service-header__title {
    margin: 0;
    color: #142B45;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.5;
}

.service-header__excerpt {
    max-width: 640px;
    margin: 8px 0 0;
    color: #4A5566;
    font-size: 14px;
    line-height: 2;
}

.service-header__divider {
    display: block;
    width: 120px;
    height: 3px;
    margin-top: 16px;
    border-radius: 3px;
    background: linear-gradient(270deg, #C6A052, rgba(198, 160, 82, 0));
}


/* =====================================================
   02. LAYOUT
===================================================== */

.service-page__layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 28px;
    width: 100%;
    max-width: 1280px;
    margin: -40px auto 0;
    padding: 0 20px 56px;
}

.service-page__main {
    min-width: 0;
}

/* The sidebar column stretches to the content height, so the
   consultation form inside it can stay sticky (see 04. Sidebar).
   The whole sidebar is not sticky: it is taller than most screens. */
.service-page__sidebar {
    align-self: stretch;
}


/* =====================================================
   03. MAIN CONTENT
===================================================== */

/* min-height keeps the white box in shape while a page is still empty */
.service-content {
    min-height: 360px;
    overflow: hidden;
    border: 1px solid #EDE5D8;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(20, 43, 69, 0.06);
}

.service-content__media {
    margin: 0;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: #F2E5CB;
}

.service-content__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content__body {
    padding: 30px 34px 32px;
    color: #3A4659;
    font-size: 15px;
    line-height: 2.1;
}

/* Typography for editor content */

.service-content__body > *:first-child {
    margin-top: 0;
}

.service-content__body h2,
.service-content__body h3,
.service-content__body h4 {
    margin: 26px 0 10px;
    color: #142B45;
    font-weight: 800;
    line-height: 1.7;
}

.service-content__body h2 {
    position: relative;
    padding-right: 14px;
    font-size: 21px;
}

/* Small gold bar next to h2 titles */
.service-content__body h2::before {
    content: "";
    position: absolute;
    top: 0.45em;
    right: 0;
    width: 4px;
    height: 0.95em;
    border-radius: 4px;
    background: #C6A052;
}

.service-content__body h3 {
    font-size: 17px;
}

.service-content__body h4 {
    font-size: 15px;
}

.service-content__body p {
    margin: 0 0 14px;
}

.service-content__body ul,
.service-content__body ol {
    margin: 0 0 16px;
    padding-right: 22px;
}

.service-content__body li {
    margin-bottom: 6px;
}

.service-content__body li::marker {
    color: #C6A052;
}

.service-content__body a {
    color: #A98135;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.service-content__body strong {
    color: #142B45;
}

.service-content__body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.service-content__body figure {
    margin: 20px 0;
}

.service-content__body blockquote {
    margin: 20px 0;
    padding: 14px 18px;
    border-right: 4px solid #C6A052;
    border-radius: 12px;
    background: #FBF6EC;
    color: #142B45;
}

.service-content__body table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.service-content__body th,
.service-content__body td {
    padding: 10px 12px;
    border: 1px solid #EDE5D8;
    text-align: right;
}

.service-content__body th {
    background: #F8F1E6;
    color: #142B45;
}

/* =====================================================
   04. SIDEBAR
===================================================== */

.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Order: services > phone card > form (last, sticky) */
.service-sidebar__box--services {
    order: 1;
}

.service-sidebar__box--call {
    order: 2;
}

.service-sidebar__box--form {
    position: sticky;
    top: 120px;
    order: 3;
}

.service-sidebar__box {
    overflow: hidden;
    border: 1px solid #EDE5D8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(20, 43, 69, 0.06);
}

/* Related services */

.service-sidebar__box--services {
    padding: 18px 16px 14px;
}

.service-sidebar__title {
    position: relative;
    margin: 0 0 10px;
    padding: 0 4px 10px;
    border-bottom: 1px solid #F0E9DE;
    color: #142B45;
    font-size: 16px;
    font-weight: 800;
}

.service-sidebar__list {
    max-height: 420px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: #E3D3B4 transparent;
}

.service-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    color: #3A4659;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition:
        background-color 0.35s var(--service-ease),
        color 0.35s var(--service-ease),
        padding 0.35s var(--service-ease);
}

.service-sidebar__link svg {
    flex: none;
    width: 15px;
    height: 15px;
    color: #C6A052;
    opacity: 0.6;
    transition:
        transform 0.35s var(--service-ease),
        opacity 0.35s var(--service-ease);
}

.service-sidebar__link:hover {
    padding-right: 16px;
    background: #F8F1E6;
    color: #142B45;
}

.service-sidebar__link:hover svg {
    opacity: 1;
    transform: translateX(-3px);
}

.service-sidebar__link--active,
.service-sidebar__link--active:hover {
    padding-right: 12px;
    background: #142B45;
    color: #ffffff;
    font-weight: 700;
}

.service-sidebar__link--active svg {
    color: #EAD6A8;
    opacity: 1;
}

.service-sidebar__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed #D6C19A;
    border-radius: 12px;
    color: #A98135;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 0.35s var(--service-ease),
        color 0.35s var(--service-ease);
}

.service-sidebar__more:hover {
    background: #FBF6EC;
    color: #142B45;
}

/* Consultation form */

.service-sidebar__form-header {
    padding: 16px 18px 14px;
    background: #142B45;
    text-align: center;
}

.service-sidebar__form-title {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.service-sidebar__form-text {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.service-sidebar__notice {
    margin: 14px 16px 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.8;
}

.service-sidebar__notice--success {
    background: rgba(57, 132, 91, 0.1);
    color: #2E6E4B;
}

.service-sidebar__notice--error {
    background: rgba(198, 74, 74, 0.1);
    color: #A33A3A;
}

.service-sidebar__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.service-sidebar__field {
    display: block;
}

.service-sidebar__input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #E4DCCF;
    border-radius: 11px;
    background: #FAF7F1;
    color: #142B45;
    font-family: inherit;
    font-size: 13.5px;
    transition:
        border-color 0.3s var(--service-ease),
        background-color 0.3s var(--service-ease);
}

.service-sidebar__input:focus {
    border-color: #C6A052;
    background: #ffffff;
    outline: none;
}

/* Hidden anti-spam field (clipped, not pushed off-screen: in RTL a
   large negative offset would make the page scroll sideways) */
.service-sidebar__honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.service-sidebar__submit {
    height: 46px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #D9B66F 0%, #C6A052 45%, #A98135 100%);
    box-shadow: 0 8px 20px rgba(198, 160, 82, 0.28);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.35s var(--service-ease),
        box-shadow 0.35s var(--service-ease);
}

.service-sidebar__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(198, 160, 82, 0.38);
}

/* Phone card */

.service-sidebar__box--call {
    padding: 20px 18px;
    border: 0;
    background: linear-gradient(135deg, #F3E3C3 0%, #E6C987 100%);
    text-align: center;
}

.service-sidebar__call-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: #ffffff;
    color: #142B45;
}

.service-sidebar__call-icon svg {
    width: 24px;
    height: 24px;
}

.service-sidebar__call-text {
    margin: 0 0 8px;
    color: #142B45;
    font-size: 13px;
    font-weight: 600;
}

.service-sidebar__call-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #142B45;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
    direction: ltr;
}

.service-sidebar__call-number svg {
    width: 20px;
    height: 20px;
}


/* =====================================================
   05. CALL TO ACTION
===================================================== */

.service-cta {
    padding: 0 20px 56px;
}

.service-cta__container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 34px;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 50%, rgba(217, 182, 111, 0.25) 0, rgba(217, 182, 111, 0) 40%),
        #142B45;
}

.service-cta__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #D9B66F;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.service-cta__title {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.6;
}

.service-cta__text {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.service-cta__button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 14px;
    background: linear-gradient(135deg, #E6C987 0%, #C6A052 45%, #A98135 100%);
    box-shadow: 0 8px 22px rgba(198, 160, 82, 0.35);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.35s var(--service-ease),
        box-shadow 0.35s var(--service-ease);
}

.service-cta__button svg {
    width: 16px;
    height: 16px;
}

.service-cta__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(198, 160, 82, 0.45);
    color: #ffffff;
}


/* =====================================================
   06. RESPONSIVE
===================================================== */

/* Tablet: sidebar moves under the content */

@media (max-width: 1024px) {

    .service-page__layout {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        height: auto;
    }

    .service-sidebar__box--form {
        position: static;
    }

    .service-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .service-sidebar__box--services {
        grid-row: span 2;
    }
}

/* Mobile */

@media (max-width: 767px) {

    .service-header {
        padding: calc(var(--service-header-space, 109px) + 16px) 16px 56px;
    }

    .service-header__title {
        font-size: 26px;
    }

    .service-header__excerpt {
        font-size: 13px;
    }

    .service-page__layout {
        margin-top: -32px;
        padding: 0 16px 40px;
        gap: 16px;
    }

    .service-content__body {
        padding: 20px 18px 22px;
        font-size: 14px;
    }

    .service-content__body h2 {
        font-size: 18px;
    }

    /* Back to one column: boxes full width */
    .service-sidebar {
        display: flex;
        align-items: stretch;
    }

    .service-cta {
        padding: 0 16px 40px;
    }

    .service-cta__container {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }

    .service-cta__title {
        font-size: 18px;
    }

    .service-cta__button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .service-page * {
        transition: none !important;
    }
}
