/* Modern portal home — bento / soft industrial */

.ph {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.ph-eyebrow {
    display: inline-flex;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border-radius: 999px;
}


.ph-hero {
    /* LTR: ستون اول چپ (عکس+متن روی عکس)، ستون دوم راست (عنوان پیشخوان) */
    direction: ltr;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(155deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
    color: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    min-height: 17rem;
    align-items: stretch;
}

.ph-hero__art {
    position: relative;
    min-height: 12rem;
    order: 2;
}

.ph-hero__plant {
    position: absolute;
    left: -2%;
    right: auto;
    bottom: -8%;
    width: min(100%, 22rem);
    height: auto;
    max-height: 110%;
    object-fit: contain;
    object-position: left bottom;
    opacity: 0.85;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.ph-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% 40%;
    height: 80%;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.28), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.ph-hero__content {
    position: relative;
    z-index: 1;
    direction: rtl;
    text-align: right;
    order: 1;
}

.ph-hero h1 {
    margin: 0 0 1rem;
    max-width: 16ch;
    font-size: clamp(1.65rem, 3.8vw, 2.55rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.03em;
    color: #fff;
}

.ph-hero__lead {
    margin: 0;
    max-width: 34rem;
    font-size: clamp(0.925rem, 0.88rem + 0.2vw, 1.05rem);
    line-height: 1.8;
    color: rgba(248, 250, 252, 0.9);
}

.ph-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.65rem;
    margin-top: 1.6rem;
}

.ph-hero__tagline {
    position: absolute;
    left: 0.5rem;
    right: auto;
    top: 0.5rem;
    z-index: 2;
    width: min(92%, 18rem);
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    direction: rtl;
    text-align: right;
}

.ph-hero__tagline p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(248, 250, 252, 0.95);
}

@media (min-width: 960px) {
    .ph-hero {
        grid-template-columns: minmax(15rem, 0.95fr) minmax(0, 1.35fr);
        gap: 1.5rem;
        min-height: 20rem;
        align-items: center;
    }

    .ph-hero__art {
        order: 1;
        min-height: 18rem;
        align-self: stretch;
    }

    .ph-hero__content {
        order: 2;
    }

    .ph-hero__plant {
        width: min(108%, 26rem);
        opacity: 0.92;
    }

    .ph-hero__tagline {
        left: 0.75rem;
        top: 0.75rem;
        width: min(88%, 19rem);
    }
}

@media (max-width: 959px) {
    .ph-hero__art {
        min-height: 10rem;
    }

    .ph-hero__plant {
        opacity: 0.45;
        width: min(70%, 16rem);
    }
}

.ph-btn-lg {
    min-height: 48px;
    border-radius: 999px !important;
    padding-inline: 1.25rem !important;
}

.ph-hero .btn--primary {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.ph-hero .btn--primary:hover {
    background: #f0fdfa;
    color: #115e59;
}

.ph-hero .btn--outline {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    background: transparent;
}

.ph-hero .btn--outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid transparent;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.ph-head {
    margin-bottom: 1rem;
}

.ph-head h2 {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ph-head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.ph-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

.ph-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.ph-link:hover {
    text-decoration: underline;
}

.ph-roles__grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .ph-roles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ph-roles__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ph-role {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 10rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.ph-role:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
    box-shadow: var(--shadow-card);
}

.ph-role:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.ph-role__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.ph-role__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.ph-role strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-text-strong);
}

.ph-role span:last-child {
    font-size: 0.8125rem;
    line-height: 1.65;
    color: var(--color-muted);
}

.ph-section {
    min-width: 0;
}

.ph-split {
    display: grid;
    gap: 1.75rem;
}

@media (min-width: 960px) {
    .ph-split {
        grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.85fr);
        align-items: start;
    }
}

.ph-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.35rem;
    box-shadow: var(--shadow-sm);
}

.ph-card--flush {
    padding: 0.35rem 0.85rem;
}

.ph-muted {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    color: var(--color-muted);
    line-height: 1.65;
}

.ph-empty {
    border: none !important;
    text-align: center;
    color: var(--color-muted);
    padding: 1.75rem 0 !important;
}

.ph-contact {
    display: grid;
    gap: 1.25rem;
}

.ph-contact__place + .ph-contact__place {
    padding-top: 1.15rem;
    border-top: 1px solid var(--color-border-subtle);
}

.ph-contact__title {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

.ph-contact__address {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--color-muted);
}

.ph-contact__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.ph-contact__list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.75rem;
    font-size: 0.875rem;
}

.ph-contact__label {
    flex: 0 0 2.75rem;
    font-size: 0.78rem;
    color: var(--color-muted);
}

.ph-contact__list a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.ph-contact__list a:hover {
    color: var(--color-primary);
}

/* Job cards inside modern home */
.ph .job-card {
    border-radius: var(--radius-lg);
}

.ph .jobs-chip--light {
    border-radius: 999px;
}

@media (max-width: 640px) {
    .ph-hero__actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ph-role {
        transition: none;
    }
    .ph-role:hover {
        transform: none;
    }
}

[data-theme="dark"] .ph-hero {
    background: linear-gradient(155deg, #020617 0%, #042f2e 50%, #134e4a 100%);
}

[data-theme="dark"] .ph-role__icon {
    background: rgba(45, 212, 191, 0.14);
    color: #2dd4bf;
}

/* Shared portal inner pages */
.ph-page {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.ph-page-hero {
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(45, 212, 191, 0.16), transparent 55%),
        linear-gradient(155deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
    color: #fff;
    box-shadow: var(--shadow-card);
}

.ph-page-hero .ph-eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ph-page-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.ph-page-hero p:last-child {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.7;
    color: rgba(248, 250, 252, 0.9);
}

.ph-article__title {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-strong);
}

.ph-article__summary {
    margin: 0 0 1.5rem;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--color-muted);
}

.ph-back {
    margin: 0;
    font-size: 0.875rem;
}

.ph-back a {
    font-weight: 600;
    text-decoration: none;
    color: var(--color-primary);
}

.ph-back a:hover {
    text-decoration: underline;
}

body.portal-app .pagination {
    margin-top: 0.25rem;
}

