/* =============================================================================
   Aradel — Careers Accordion
   Shortcode: [ar_careers_accordion]
   Scope: .ar-cacc-section
   ============================================================================= */

/* ── Section wrapper ──────────────────────────────────────────────────────── */

.ar-cacc-section {
    padding-top: 90px;
    padding-bottom: 90px;
    background: transparent;
    --ar-cacc-motion-duration: 350ms;
    --ar-cacc-motion-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1024px) {
    .ar-cacc-section {
        padding-top: 72px;
        padding-bottom: 72px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }
}

/* ── Inner container ──────────────────────────────────────────────────────── */

.ar-cacc-inner {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 112px;
    padding-right: 112px;
}

@media (max-width: 1024px) {
    .ar-cacc-inner {
        padding-left: 64px;
        padding-right: 64px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-inner {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ── Optional section heading ─────────────────────────────────────────────── */

.ar-cacc-section-heading {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 64px;
    letter-spacing: 0.014px;
    color: #000;
    margin: 0 0 56px;
}

@media (max-width: 1024px) {
    .ar-cacc-section-heading {
        font-size: 40px;
        line-height: 52px;
        margin-bottom: 40px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-section-heading {
        font-size: 32px;
        line-height: 42px;
        margin-bottom: 32px;
    }
}

/* ── Card stack ───────────────────────────────────────────────────────────── */

.ar-cacc-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 600px) {
    .ar-cacc-stack {
        gap: 24px;
    }
}

/* ── Box-sizing reset scoped to module ────────────────────────────────────── */
/* Ensures padding never pushes elements outside card boundary */

.ar-cacc-section *,
.ar-cacc-section *::before,
.ar-cacc-section *::after {
    box-sizing: border-box;
}

/* ── Single card ──────────────────────────────────────────────────────────── */

.ar-cacc-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.ar-cacc-card:hover {
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
}

/* ── Trigger button ───────────────────────────────────────────────────────── */

.ar-cacc-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: 40px 48px 44px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1024px) {
    .ar-cacc-trigger {
        padding: 32px 36px 36px;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-trigger {
        padding: 24px 24px 28px;
        gap: 16px;
    }
}

.ar-cacc-trigger:focus-visible {
    outline: 2px solid #C1000F;
    outline-offset: -2px;
    border-radius: 20px;
}

/* ── Trigger content wrapper (title + first divider + preview stacked) ──────── */

.ar-cacc-trigger-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0; /* spacing controlled by divider and preview margins */
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.ar-cacc-title {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: 0.006px;
    color: #C1000F;
    display: block;
    margin-bottom: 14px;
}

@media (max-width: 1024px) {
    .ar-cacc-title {
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 12px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-title {
        font-size: 18px;
        line-height: 26px;
        margin-bottom: 10px;
    }
}

/* ── First divider — always visible, full-width rule under the title ───────── */
/*
 * Full-width 1px rule, always present in both closed and open states.
 * Matches the reference: horizontal separator between title and preview paragraph.
 * Uses brand red at reduced opacity so it reads as a separator, not a title underline.
 */

.ar-cacc-divider-title {
    width: 100%;
    height: 1px;
    background: rgba(193, 0, 15, 0.35);
    margin-bottom: 20px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ar-cacc-divider-title {
        margin-bottom: 16px;
    }
}

/* ── Preview text — always visible ───────────────────────────────────────── */

.ar-cacc-preview p {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #000;
    margin: 0;
    text-align: left;
}

@media (max-width: 600px) {
    .ar-cacc-preview p {
        font-size: 16px;
        line-height: 25px;
    }
}

/* ── Chevron icon ─────────────────────────────────────────────────────────── */

.ar-cacc-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: 4px; /* align with title cap-height */
    color: #C1000F;
}

.ar-cacc-icon-chevron {
    display: block;
    transition: transform var(--ar-cacc-motion-duration) var(--ar-cacc-motion-ease);
}

.ar-cacc-card.is-open .ar-cacc-icon-chevron {
    transform: rotate(180deg);
}

/* ── Second divider — between preview block and expanded panel ──────────────── */
/*
 * Full-width neutral grey rule. Hidden when closed, fades in when open.
 * Sits outside the trigger, separating the preview area from the expanded content.
 * Neutral colour so it doesn't compete with the title divider above.
 */

.ar-cacc-divider-expand {
    height: 1px;
    background: #e0e0e0;
    margin: 0 48px;
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
    transition: transform var(--ar-cacc-motion-duration) var(--ar-cacc-motion-ease),
                opacity   var(--ar-cacc-motion-duration) var(--ar-cacc-motion-ease);
}

.ar-cacc-card.is-open .ar-cacc-divider-expand {
    transform: scaleX(1);
    opacity: 1;
}

@media (max-width: 1024px) {
    .ar-cacc-divider-expand {
        margin: 0 36px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-divider-expand {
        margin: 0 24px;
    }
}

/* ── Expanded panel — JS controls height ─────────────────────────────────── */
/*
 * height is set and animated entirely by JS (measured-height technique).
 * CSS only: overflow hidden, opacity transition, and accessibility hidden state.
 * No max-height hack — eliminates the choppy timing mismatch.
 */

.ar-cacc-panel {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height var(--ar-cacc-motion-duration) var(--ar-cacc-motion-ease),
                opacity var(--ar-cacc-motion-duration) var(--ar-cacc-motion-ease);
}

/* Bricks strips browser default [hidden] — override so block layout is preserved */
.ar-cacc-panel[hidden] {
    display: block !important;
    visibility: hidden;
    height: 0 !important;
    pointer-events: none;
}

.ar-cacc-panel:not([hidden]) {
    visibility: visible;
    pointer-events: auto;
}

.ar-cacc-card.is-open .ar-cacc-panel:not([hidden]) {
    opacity: 1;
}

/* ── Panel inner wrapper — JS measures scrollHeight here ─────────────────── */

.ar-cacc-panel-inner {
    /* No padding here — padding lives in .ar-cacc-expanded */
}

/* ── Expanded content ─────────────────────────────────────────────────────── */

.ar-cacc-expanded {
    padding: 40px 48px 52px;
    /* Width constrained by readable-width wrapper below */
}

@media (max-width: 1024px) {
    .ar-cacc-expanded {
        padding: 32px 36px 44px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-expanded {
        padding: 24px 24px 36px;
    }
}

.ar-cacc-expanded p {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #000;
    margin: 0 0 20px;
}

.ar-cacc-expanded p:last-child {
    margin-bottom: 0;
}

.ar-cacc-expanded ul,
.ar-cacc-expanded ol {
    padding-left: 0;
    margin: 0 0 24px;
    list-style: none;
}

.ar-cacc-expanded li {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #000;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

/* Red bullet marker */
.ar-cacc-expanded li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px; /* vertically centre on cap-height */
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C1000F;
    flex-shrink: 0;
}

.ar-cacc-expanded a {
    color: #C1000F;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ar-cacc-expanded a:hover {
    color: #01303A;
}

.ar-cacc-expanded strong {
    font-weight: 700;
}

/* ── Subheadings inside expanded content (h4 from wysiwyg) ───────────────── */

.ar-cacc-expanded h4 {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 30px;
    letter-spacing: 0.004px;
    color: #000;
    margin: 32px 0 12px;
}

.ar-cacc-expanded h4:first-child {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .ar-cacc-expanded h4 {
        font-size: 22px;
        line-height: 28px;
        margin: 28px 0 10px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-expanded h4 {
        font-size: 20px;
        line-height: 26px;
        margin: 24px 0 8px;
    }
}

/* h3 support — if client uses heading 3 in wysiwyg */
.ar-cacc-expanded h3 {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 32px;
    color: #000;
    margin: 32px 0 12px;
}

.ar-cacc-expanded h3:first-child {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .ar-cacc-expanded h3 {
        font-size: 24px;
        line-height: 30px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-expanded h3 {
        font-size: 21px;
        line-height: 28px;
    }
}

@media (max-width: 600px) {
    .ar-cacc-expanded p,
    .ar-cacc-expanded li {
        font-size: 16px;
        line-height: 25px;
    }

    .ar-cacc-expanded li::before {
        top: 9px;
    }
}

/* ── Optional CTA ─────────────────────────────────────────────────────────── */

.ar-cacc-cta {
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ar-cacc-icon-chevron,
    .ar-cacc-divider-expand,
    .ar-cacc-panel,
    .ar-cacc-card {
        transition: none !important;
    }
}
