/* ============================================================
   Portal Agency — Hero Toggle Widget
   assets/css/widget-hero-toggle.css
   ============================================================ */

/* ── Hero wrapper ─────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    direction: rtl;

    /* opacity: 0 افتراضي — الـ JS يعمل visible بعد التصحيح */
    opacity: 0;
    transition: opacity 0.45s ease, background-color 0.45s ease;
}

/* بعد ما الـ JS يصحح الـ mode → يظهر بـ fade in */
.portal-widget--hero-toggle .pht-hero.pht-hero--visible {
    opacity: 1;
}

/* لما بنعمل navigate → fade out */
.portal-widget--hero-toggle .pht-hero.pht-hero--leaving {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.portal-widget--hero-toggle .pht-hero.pht-mode-apply {
    background-color: transparent !important;
}

/* ── Decorative elements ──────────────────────────────────────── */
.portal-widget--hero-toggle .pht-deco {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.portal-widget--hero-toggle .pht-deco--circle-1 {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    bottom: -80px;
    right: -60px;
    background: rgba(0, 0, 0, 0.08);
}

.portal-widget--hero-toggle .pht-deco--circle-2 {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    bottom: 60px;
    left: 60px;
}

.portal-widget--hero-toggle .pht-deco--arrow {
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 90px;
    color: rgba(255, 255, 255, 0.25);
}

.portal-widget--hero-toggle .pht-hero.pht-mode-hire.pht-mode-hire {
    background-color: #D2E9FF !important;
}

.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-deco--arrow {
    color: rgba(0, 0, 0, 0.15);
}

.portal-widget--hero-toggle .pht-deco--cross {
    font-size: 22px;
    font-weight: 300;
    bottom: 120px;
    left: 200px;
    color: rgba(255, 255, 255, 0.2);
}

.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-deco--cross {
    color: rgba(0, 0, 0, 0.12);
}

/* ── Content ──────────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1140px;
    padding: 60px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   TOGGLE PILL
   الشكل:
   hire mode  → [ قدّم ]  [●white bg●]  [ وظّف | white bg ]
   apply mode → [ قدّم | white bg ]  [●white bg●]  [ وظّف ]

   العنصر الـ active (اللي انت فيه) بياخد خلفية بيضاء
   والعنصر التاني بيبقى شفاف dim
   ═══════════════════════════════════════════════════════════════ */

.portal-widget--hero-toggle .pht-toggle-wrap {
    margin-bottom: 52px;
}

/* الـ pill الخارجي */
.portal-widget--hero-toggle .pht-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    padding: 6px;
    cursor: pointer;
    outline: none;
    min-width: 300px;
    transition: background 0.3s, border-color 0.3s;
    position: relative;
}

/* hire mode على خلفية فاتحة */
.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-toggle,
.portal-widget--hero-toggle .pht-hero.pht-mode-apply .pht-toggle {
    background: rgba(155, 185, 213, 0.40);
    border-color: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    gap: 0;
    min-width: fit-content;
    font-family: comfortaa;
}

/* ── Labels ─────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-toggle__label {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 100px;
    transition: all 0.35s ease;
    color: rgba(0, 0, 0, 0.35);
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 1;
}


/* hire mode: فاتح — labels داكنة شوية */
.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-toggle__label {
    color: rgba(0, 0, 0, 0.35);
    padding: 8px 30px;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.2;
}

/* ─ Active label (اللي انت فيه دلوقتي) ─
   بياخد خلفية بيضاء + نص داكن = يبدو زي زرار ON
*/
.portal-widget--hero-toggle .pht-toggle--hire .pht-toggle__label--hire,
.portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--apply {
    background: #ffffff;
    color: #1a0533;
    border-radius: 12px;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 8px 30px;
}

/* hire mode على خلفية فاتحة: active label */
.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-toggle--hire .pht-toggle__label--hire {
    background: #ffffff;
    color: #0068FF;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 8px 30px;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.2;
}

/* ── Knob (الدايرة في النص) ─────────────────────────────── */
.portal-widget--hero-toggle .pht-knob {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: background 0.3s;
}

/* الـ arrow icon داخل الـ knob — نخبيه */
.portal-widget--hero-toggle .pht-knob svg {
    display: none;
}

/* hire mode على فاتح: knob */
.portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-knob {
    background: rgba(0, 0, 0, 0.08);
}

/* ─ RTL Order ─
   hire mode  : [قدّم(dim)] [knob] [وظّف(white bg)]
   apply mode : [قدّم(white bg)] [knob] [وظّف(dim)]
*/
/* hire mode */
.portal-widget--hero-toggle .pht-toggle--hire .pht-toggle__label--apply {
    order: 1;
}

.portal-widget--hero-toggle .pht-toggle--hire .pht-knob {
    order: 2;
}

.portal-widget--hero-toggle .pht-toggle--hire .pht-toggle__label--hire {
    order: 3;
}

/* apply mode */
.portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--apply {
    order: 1;
}

.portal-widget--hero-toggle .pht-toggle--apply .pht-knob {
    order: 2;
}

.portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--hire {
    order: 3;
    padding: 8px 30px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

/* ── Content Panels ───────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-panel {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    animation: phtFadeUp 0.45s ease forwards;
}

.portal-widget--hero-toggle .pht-panel--active {
    display: flex;
}

@keyframes phtFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Title ────────────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #ffffff;
    letter-spacing: -1px;
    max-width: 80%;
}

.portal-widget--hero-toggle .pht-mode-apply .pht-title {
    color: #022644;
}

.portal-widget--hero-toggle .pht-panel--hire .pht-title {
    color: #022644;
    font-size: 64px;
    font-weight: 500;
    line-height: 1.2;
}

.portal-widget--hero-toggle .pht-highlight {
    display: inline;
    color: #0068FF !important;
}

.portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--apply {
    color: #0068FF !important;
}

/* ── Subtitle ─────────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-subtitle {
    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 36px;
}

.portal-widget--hero-toggle .pht-panel--hire .pht-subtitle {
    color: #022644;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 800px;
}

.portal-widget--hero-toggle .pht-panel--apply .pht-subtitle {
    color: #022644;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 800px
}


/* ── Button ───────────────────────────────────────────────────── */
.portal-widget--hero-toggle .pht-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portal-widget--hero-toggle .pht-btn--hire {
    background: #0068FF;
    color: #ffffff;
    border: 1px solid #0068FF;
    border-radius: 12px;
    padding: 7px 25px;
    min-width: 180px;
}

.portal-widget--hero-toggle .pht-btn--hire:hover {
    background: transparent;
    color: #0068FF;
}

.portal-widget--hero-toggle .pht-btn--apply {
    background: #0068FF;
    color: #ffffff;
    border: 1px solid #0068FF;
    border-radius: 12px;
    padding: 7px 25px;
    min-width: 180px;
}

.portal-widget--hero-toggle .pht-btn--apply:hover {
    background: transparent;
    color: #0068FF;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .portal-widget--hero-toggle .pht-content {
        padding: 40px 20px;
    }

    .portal-widget--hero-toggle .pht-toggle {
        min-width: 240px;
    }

    .portal-widget--hero-toggle .pht-toggle__label {
        font-size: 15px;
        padding: 10px 18px;
    }

    .portal-widget--hero-toggle .pht-knob {
        width: 40px;
        height: 40px;
    }

    .portal-widget--hero-toggle .pht-deco--circle-1 {
        width: 250px;
        height: 250px;
    }

    .portal-widget--hero-toggle .pht-deco--cross,
    .portal-widget--hero-toggle .pht-deco--arrow {
        display: none;
    }

    .portal-widget--hero-toggle .pht-title {
        max-width: 100%;
    }

    .portal-widget--hero-toggle .pht-panel--apply .pht-subtitle {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-toggle--hire .pht-toggle__label--hire,
    .portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--apply {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-toggle--apply .pht-toggle__label--hire {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-toggle__label {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-hero.pht-mode-hire .pht-toggle--hire .pht-toggle__label--hire {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-title {
        max-width: 100%;
        font-size: 32px;
    }

    .portal-widget--hero-toggle .pht-panel--hire .pht-subtitle {
        font-size: 18px;
    }

    .portal-widget--hero-toggle .pht-panel--hire .pht-title {
        font-size: 32px;
    }
}
