/* Expertise / company content pages + homepage Explore IPSC block */

/* ─── Page shell ─── */
.ipsc-xpage {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 72px;
}

.ipsc-x-lead {
    background: linear-gradient(135deg, #fff 0%, #faf7f0 100%);
    border: 1px solid #e8e2d4;
    border-inline-start: 4px solid #d6a146;
    border-radius: 0 14px 14px 0;
    padding: 22px 26px;
    margin: 0 0 40px;
    font-size: 17px;
    line-height: 1.75;
    color: #3a3a3a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    text-align: start;
}

[dir="rtl"] .ipsc-x-lead {
    border-radius: 14px 0 0 14px;
    background: linear-gradient(225deg, #fff 0%, #faf7f0 100%);
    line-height: 1.85;
}

.ipsc-x-lead strong {
    color: #1a1a1a;
}

/* Section heading above grids */
.ipsc-x-section-title {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    text-align: center;
    letter-spacing: -0.02em;
}

.ipsc-x-section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    background: #d6a146;
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ─── Card grid (expertise topics) ─── */
.ipsc-x-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 40px;
}

@media (min-width: 992px) {
    .ipsc-x-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .ipsc-x-grid {
        grid-template-columns: 1fr;
    }
}

.ipsc-x-card {
    background: #fff;
    border-radius: 16px;
    padding: 26px 24px 28px;
    border: 1px solid #ebe6dc;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.ipsc-x-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d6a146, #e8c066);
    opacity: 0.95;
}

[dir="rtl"] .ipsc-x-card::before {
    background: linear-gradient(270deg, #d6a146, #e8c066);
}

.ipsc-x-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
    border-color: #d6a146;
}

.ipsc-x-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f5efe3 0%, #ebe4d4 100%);
    color: #8a6d2f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}

.ipsc-x-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.3;
}

.ipsc-x-card__text {
    font-size: 15px;
    line-height: 1.72;
    color: #4a4a4a;
    margin: 0;
}

.ipsc-x-card__text a {
    color: #8a6d2f;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(138, 109, 47, 0.35);
}

.ipsc-x-card__text a:hover {
    color: #5c4a22;
    border-bottom-color: #5c4a22;
}

/* Industry / list variant — compact icon row */
.ipsc-x-card--compact .ipsc-x-card__icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
    margin-bottom: 10px;
}

.ipsc-x-card--compact .ipsc-x-card__title {
    font-size: 16px;
}

.ipsc-x-card--compact .ipsc-x-card__text {
    font-size: 14px;
}

/* ─── Process timeline ─── */
.ipsc-x-timeline {
    max-width: 760px;
    margin: 0 auto 40px;
    position: relative;
    padding-inline-start: 8px;
    /* Line centered on .ipsc-x-step__num circle (pad + half diameter − half line width) */
    --ipsc-timeline-pad: 8px;
    --ipsc-timeline-num-size: 48px;
    --ipsc-timeline-line-w: 3px;
}

.ipsc-x-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    inset-inline-start: calc(
        var(--ipsc-timeline-pad) + var(--ipsc-timeline-num-size) / 2 - var(--ipsc-timeline-line-w) / 2
    );
    width: var(--ipsc-timeline-line-w);
    border-radius: 3px;
    background: linear-gradient(180deg, #d6a146 0%, rgba(214, 161, 70, 0.25) 100%);
}

.ipsc-x-step {
    position: relative;
    padding-inline-start: 64px;
    margin-bottom: 32px;
}

.ipsc-x-step:last-child {
    margin-bottom: 0;
}

.ipsc-x-step__num {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d6a146, #c4932e);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(214, 161, 70, 0.45);
    z-index: 1;
}

.ipsc-x-step__body {
    background: #fff;
    border: 1px solid #ebe6dc;
    border-radius: 14px;
    padding: 20px 22px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ipsc-x-step__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.ipsc-x-step__text {
    font-size: 15px;
    line-height: 1.72;
    color: #444;
    margin: 0;
}

.ipsc-x-step__text a {
    color: #8a6d2f;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(138, 109, 47, 0.35);
}

.ipsc-x-step__text a:hover {
    color: #5c4a22;
}

/* ─── FAQ accordion ─── */
.ipsc-x-faq {
    max-width: 800px;
    margin: 0 auto 40px;
}

.ipsc-x-faq__item {
    background: #fff;
    border: 1px solid #e5e0d6;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ipsc-x-faq__item[open] {
    border-color: #d6a146;
    box-shadow: 0 6px 24px rgba(214, 161, 70, 0.12);
}

.ipsc-x-faq__item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    padding-inline-end: 48px; /* room for +/- control on the “end” side (right in LTR, left in RTL) */
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    position: relative;
    user-select: none;
    text-align: start;
}

.ipsc-x-faq__item summary::-webkit-details-marker {
    display: none;
}

.ipsc-x-faq__item summary::after {
    content: "+";
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 8px;
    background: #f5efe3;
    color: #8a6d2f;
    font-weight: 700;
    font-size: 18px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ipsc-x-faq__item[open] summary::after {
    content: "−";
    background: #d6a146;
    color: #1a1a1a;
}

.ipsc-x-faq__item summary:hover {
    background: #faf8f4;
}

.ipsc-x-faq__answer {
    padding: 20px 0;
    padding-inline: 22px;
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    border-top: 1px solid #f0ebe0;
    text-align: start;
}

.ipsc-x-faq__answer a {
    color: #8a6d2f;
    font-weight: 600;
}

/* ─── Related links bar ─── */
.ipsc-x-related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 24px;
    background: #f7f4ed;
    border-radius: 14px;
    border: 1px dashed #d6c9a8;
}

.ipsc-x-related a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e0d8c8;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #3a3220;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ipsc-x-related a:hover {
    border-color: #d6a146;
    background: #fffdf8;
    color: #1a1a1a;
}

/* ─── Homepage: Explore IPSC ─── */
.ipsc-explore {
    background: linear-gradient(180deg, #f7f4ec 0%, #faf9f6 45%, #fff 100%);
    padding: 48px 0 56px;
    border-bottom: 1px solid #e8e2d6;
    position: relative;
}

.ipsc-explore::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #d6a146, #e8c066, #d6a146, transparent);
    opacity: 0.85;
}

/*.ipsc-explore .container {
    max-width: 1140px;
}*/

.ipsc-explore__header {
    /* mainstyle.css targets all <header> tags; override for this section */
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    padding: 0;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 6px;
}

.ipsc-explore .ipsc-explore__header,
.ipsc-explore .ipsc-explore__eyebrow,
.ipsc-explore .ipsc-explore__title,
.ipsc-explore .ipsc-explore__lead {
    text-align: center !important;
}

.ipsc-explore__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a6d2f;
    margin: 0 0 10px;
    width: 100%;
    text-align: center;
    display: block;
}

/* Note: avoid relying on text-wrap support; control wrapping with max-width instead */

/* RTL typography tweaks for centered headers */
[dir="rtl"] .ipsc-explore__eyebrow {
    letter-spacing: 0.02em;
    text-transform: none;
}

.ipsc-explore__title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.02em;
    width: 100%;
    text-align: center;
    display: block;
}

.ipsc-explore__lead {
    text-align: center;
    color: #555;
    font-size: 16px;
    max-width: 560px;
    margin: 14px auto 36px;
    line-height: 1.65;
    padding: 0 12px;
}

.ipsc-explore__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 991px) {
    .ipsc-explore__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .ipsc-explore__cards {
        grid-template-columns: 1fr;
    }
}

.ipsc-explore__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 24px 22px 22px;
    background: #fff;
    border: 1px solid #e5dfd3;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ipsc-explore__card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d6a146, #e8c066);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

[dir="rtl"] .ipsc-explore__card::after {
    transform-origin: right;
}

.ipsc-explore__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
    border-color: #d6a146;
}

.ipsc-explore__card:hover::after {
    transform: scaleX(1);
}

.ipsc-explore__card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, #f3ecde, #e8dcc4);
    color: #6b5a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

/* Font Awesome in explore tiles (BI 1.10 lacks bi-building / bi-leaf) */
.ipsc-explore__card-icon .fa {
    line-height: 1;
}

.ipsc-explore__card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ipsc-explore__card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #5c5c5c;
    margin: 0 0 14px;
    flex: 1;
}

.ipsc-explore__card-more {
    font-size: 13px;
    font-weight: 700;
    color: #8a6d2f;
    letter-spacing: 0.02em;
}

.ipsc-explore__card:hover .ipsc-explore__card-more {
    color: #5c4a22;
}

@media (max-width: 767px) {
    .ipsc-xpage {
        padding: 28px 16px 56px;
    }

    .ipsc-x-lead {
        padding: 18px 18px;
        font-size: 16px;
    }

    .ipsc-x-timeline {
        --ipsc-timeline-num-size: 42px;
    }

    .ipsc-x-step {
        padding-inline-start: 56px;
    }

    .ipsc-x-step__num {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* ─── RTL: Arabic alignment & readability ─── */
[dir="rtl"] .ipsc-xpage {
    text-align: start;
}

[dir="rtl"] .ipsc-x-card__title,
[dir="rtl"] .ipsc-x-card__text {
    text-align: start;
    line-height: 1.85;
}

[dir="rtl"] .ipsc-x-card--compact .ipsc-x-card__text {
    line-height: 1.8;
}

[dir="rtl"] .ipsc-x-step__title,
[dir="rtl"] .ipsc-x-step__text {
    text-align: start;
    line-height: 1.85;
}

[dir="rtl"] .ipsc-x-related {
    direction: rtl;
}

[dir="rtl"] .ipsc-explore__card {
    align-items: flex-start;
    text-align: start;
}

[dir="rtl"] .ipsc-explore__card-title,
[dir="rtl"] .ipsc-explore__card-desc,
[dir="rtl"] .ipsc-explore__card-more {
    text-align: start;
}
