/* ─── post-problem.css ──────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════ */
.pp-hero {
    position: relative;
    background: linear-gradient(150deg, var(--teal-xl) 0%, var(--teal-d) 55%, var(--teal) 100%);
    padding: 72px 24px 0;
    overflow: hidden;
    border-radius: 0 0 48px 48px;
}
.pp-hero-inner {
    position: relative; z-index: 2;
    max-width: 920px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center;
    gap: 40px; padding-bottom: 56px;
}
.pp-hero-text { text-align: center; }

.pp-hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 99px;
    padding: 6px 14px;
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9);
    margin-bottom: 18px;
    backdrop-filter: blur(6px);
}

.pp-hero-title {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800; color: #fff;
    letter-spacing: -.6px; line-height: 1.15;
    margin-bottom: 12px;
}
[dir="rtl"] .pp-hero-title { letter-spacing: 0; }
.pp-hero-title em { font-style: normal; color: var(--orange); }
.pp-hero-sub {
    font-size: 15px; color: rgba(255,255,255,.72);
    line-height: 1.7; max-width: 460px; margin: 0 auto;
}

/* Steps row */
.pp-hero-steps {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; justify-content: center;
}
.pp-step {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px; padding: 14px 18px;
    min-width: 170px;
    backdrop-filter: blur(6px);
}
.pp-step-icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.pp-step-body { display: flex; flex-direction: column; gap: 2px; }
.pp-step-body strong { font-size: 13px; font-weight: 700; color: #fff; }
.pp-step-body span   { font-size: 11px; color: rgba(255,255,255,.55); line-height: 1.4; }
.pp-step-arrow { color: rgba(255,255,255,.3); flex-shrink: 0; }

/* Orbs */
.pp-hero-orb {
    position: absolute; border-radius: 50%;
    filter: blur(64px); pointer-events: none;
}
.pp-hero-orb-1 { width: 320px; height: 320px; background: rgba(217,112,61,.22); top: -80px; right: -60px; }
.pp-hero-orb-2 { width: 260px; height: 260px; background: rgba(255,255,255,.06); bottom: -40px; left: -60px; }


/* ══════════════════════════════════════════════════════
   GATE — signed-out (split panel)
══════════════════════════════════════════════════════ */
.pp-gate-section {
    background: var(--bg2);
    padding: 60px 24px 80px;
}
.pp-gate-wrap { max-width: 900px; margin: 0 auto; }

.pp-gate-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.13), 0 1px 0 rgba(0,0,0,.05);
}

/* Left — teal brand panel */
.pp-gate-left {
    background: linear-gradient(155deg, var(--teal-xl) 0%, var(--teal-d) 55%, var(--teal) 100%);
    padding: 52px 48px;
    position: relative;
    overflow: hidden;
}
.pp-gate-left::before {
    content: '';
    position: absolute; top: -80px; right: -80px;
    width: 280px; height: 280px; border-radius: 50%;
    background: rgba(217,112,61,.2);
    filter: blur(60px);
    pointer-events: none;
}

.pp-gate-logo {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 36px;
}
.pp-gate-logo img {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,.15);
}
.pp-gate-logo span {
    font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px;
}

.pp-gate-headline {
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 800; color: #fff;
    line-height: 1.2; letter-spacing: -.4px;
    margin-bottom: 14px;
}
[dir="rtl"] .pp-gate-headline { letter-spacing: 0; }
.pp-gate-headline em { font-style: normal; color: var(--orange); }

.pp-gate-tagline {
    font-size: 14px; color: rgba(255,255,255,.7);
    line-height: 1.65; margin-bottom: 32px;
}

.pp-gate-features {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 18px;
}
.pp-gate-features li {
    display: flex; align-items: flex-start; gap: 12px;
}
.pp-gf-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff; margin-top: 1px;
}
.pp-gf-text { display: flex; flex-direction: column; gap: 2px; }
.pp-gf-text strong { font-size: 13px; font-weight: 700; color: #fff; }
.pp-gf-text span   { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.4; }

/* Right — white auth panel */
.pp-gate-right {
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 52px 44px;
}
.pp-gate-auth-inner {
    width: 100%; max-width: 300px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
}

.pp-gate-auth-icon {
    width: 72px; height: 72px; border-radius: 20px;
    background: rgba(46,124,133,.08);
    border: 1.5px solid rgba(46,124,133,.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--teal);
    margin-bottom: 20px;
}

.pp-gate-auth-title {
    font-size: 20px; font-weight: 800; color: var(--text);
    margin-bottom: 8px; letter-spacing: -.3px;
}
.pp-gate-auth-sub {
    font-size: 13px; color: var(--muted); line-height: 1.6;
    margin-bottom: 28px;
}

.pp-gate-signin-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; padding: 14px 20px;
    background: var(--teal); color: #fff;
    border-radius: 12px;
    font-size: 15px; font-weight: 700;
    transition: background var(--t), transform var(--t), box-shadow var(--t);
    box-shadow: 0 4px 16px rgba(46,124,133,.3);
    text-decoration: none;
    margin-bottom: 12px;
}
.pp-gate-signin-btn:hover {
    background: var(--teal-d); transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(46,124,133,.4);
}

.pp-gate-sep {
    display: flex; align-items: center; gap: 10px;
    color: var(--muted); font-size: 12px; font-weight: 500;
    width: 100%; margin-bottom: 12px;
}
.pp-gate-sep::before, .pp-gate-sep::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.pp-gate-register-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 13px 20px;
    background: transparent;
    border: 1.5px solid var(--border); border-radius: 12px;
    font-size: 14px; font-weight: 600; color: var(--text);
    text-decoration: none;
    transition: border-color var(--t), color var(--t), background var(--t);
    margin-bottom: 24px;
}
.pp-gate-register-btn:hover {
    border-color: var(--teal); color: var(--teal);
    background: rgba(46,124,133,.04);
}

.pp-gate-auth-note {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--muted); line-height: 1.4;
    justify-content: center;
}

@media (max-width: 720px) {
    .pp-gate-split { grid-template-columns: 1fr; }
    .pp-gate-left  { padding: 40px 32px; }
    .pp-gate-right { padding: 40px 32px; }
    .pp-gate-auth-inner { max-width: 100%; }
}
@media (max-width: 480px) {
    .pp-gate-section { padding: 40px 16px 60px; }
    .pp-gate-left  { padding: 32px 24px; }
    .pp-gate-right { padding: 32px 24px; }
}


/* ══════════════════════════════════════════════════════
   FORM SECTION — 2-col layout
══════════════════════════════════════════════════════ */
.pp-form-section { background: var(--bg2); padding: 52px 24px 80px; }
.pp-form-wrap    { max-width: 1080px; margin: 0 auto; }

/* 2-col grid: form + sidebar */
.pp-form-cols {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 28px;
    align-items: start;
}

/* Sidebar */
.pp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}
.pp-sb-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pp-sb-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
}
.pp-sb-head-icon {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    background: rgba(46,124,133,.1); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
}
.pp-sb-head-icon--2 { background: rgba(16,185,129,.1); color: #10B981; }
.pp-sb-head h3 { font-size: 13px; font-weight: 700; color: var(--text); }
.pp-sb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.pp-sb-list li { display: flex; align-items: flex-start; gap: 10px; }
.pp-sb-dot {
    width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
    background: rgba(46,124,133,.08); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.pp-sb-list span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pp-sb-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.pp-sb-steps li { display: flex; align-items: flex-start; gap: 10px; }
.pp-sb-step-num {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    background: var(--teal); color: #fff;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.pp-sb-steps span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pp-sb-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    background: rgba(46,124,133,.06);
    border: 1px solid rgba(46,124,133,.15);
    border-radius: 12px;
    font-size: 12px; font-weight: 600; color: var(--teal);
}

@media (max-width: 900px) {
    .pp-form-cols { grid-template-columns: 1fr; }
    .pp-sidebar   { display: none; }
}


/* ══════════════════════════════════════════════════════
   SUCCESS STATE
══════════════════════════════════════════════════════ */
.pp-success {
    background: #fff; border: 1px solid var(--border);
    border-radius: 24px; box-shadow: 0 8px 40px rgba(0,0,0,.08);
    padding: 64px 40px; text-align: center;
}
.pp-success-icon {
    width: 80px; height: 80px; border-radius: 22px;
    background: rgba(16,185,129,.08);
    border: 1.5px solid rgba(16,185,129,.18);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px; color: #10B981;
}
.pp-success h2   { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.pp-success p    { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 32px; max-width: 400px; margin-left: auto; margin-right: auto; }
.pp-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pp-btn-outline {
    padding: 12px 24px; border-radius: 10px;
    border: 1.5px solid var(--border); background: transparent;
    color: var(--text); font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t);
}
.pp-btn-outline:hover { border-color: var(--teal); color: var(--teal); background: rgba(46,124,133,.04); }
.pp-btn-teal {
    display: inline-flex; align-items: center;
    padding: 12px 24px; border-radius: 10px;
    background: var(--teal); color: #fff;
    font-size: 14px; font-weight: 700;
    transition: background var(--t);
}
.pp-btn-teal:hover { background: var(--teal-d); }


/* ══════════════════════════════════════════════════════
   FORM CARD
══════════════════════════════════════════════════════ */
.pp-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,.07);
    overflow: hidden;
}

/* Card header */
.pp-card-header {
    display: flex; align-items: center; gap: 14px;
    padding: 28px 36px 24px;
    border-bottom: 1.5px solid var(--bg2);
    background: var(--bg);
}
.pp-card-header-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: rgba(46,124,133,.1); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
}
.pp-card-title {
    font-size: 18px; font-weight: 800; color: var(--text);
    margin-bottom: 2px; letter-spacing: -.3px;
}
.pp-card-sub { font-size: 13px; color: var(--muted); }

/* Error alert */
.pp-alert {
    display: flex; align-items: flex-start; gap: 10px;
    background: #FEF2F2; border-bottom: 1px solid #FECACA;
    padding: 14px 36px;
    color: #B91C1C; font-size: 13px; font-weight: 500; line-height: 1.5;
}
.pp-alert svg { flex-shrink: 0; margin-top: 1px; }

/* Form body */
#ppForm { padding: 0 36px 36px; }


/* ══════════════════════════════════════════════════════
   GROUPS (form sections)
══════════════════════════════════════════════════════ */
.pp-group {
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    background: var(--bg);
    transition: border-color .2s var(--ease);
}
.pp-group:focus-within { border-color: rgba(46,124,133,.35); }

.pp-group-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.pp-group-icon {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.pp-group-icon--1 { background: linear-gradient(135deg, #2E7C85, #1E5A61); }
.pp-group-icon--2 { background: linear-gradient(135deg, #7C3AED, #5B21B6); }
.pp-group-icon--3 { background: linear-gradient(135deg, #D97041, #B85C30); }
.pp-group-icon--4 { background: linear-gradient(135deg, #0EA5E9, #0369A1); }
.pp-group-icon--5 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.pp-group-label {
    display: block;
    font-size: 14px; font-weight: 700; color: var(--text);
    line-height: 1.2;
}
.pp-group-note {
    display: block;
    font-size: 12px; color: var(--muted); line-height: 1.3;
    margin-top: 1px;
}

/* ══════════════════════════════════════════════════════
   FIELDS
══════════════════════════════════════════════════════ */
.pp-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.pp-field:last-child { margin-bottom: 0; }

.pp-label {
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 4px;
}
.pp-req { color: var(--orange); font-size: 12px; }

.pp-input, .pp-textarea, .pp-select {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: var(--r);
    font-size: 14px; font-family: inherit; color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.pp-input::placeholder, .pp-textarea::placeholder { color: var(--muted); opacity: .7; }
.pp-input:focus, .pp-textarea:focus, .pp-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,124,133,.12);
}
.pp-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.pp-char-count { align-self: flex-end; font-size: 12px; color: var(--muted); }

/* Select wrapper */
.pp-select-wrap { position: relative; }
.pp-select {
    appearance: none;
    padding-inline-end: 40px; cursor: pointer;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat;
    background-position: calc(100% - 12px) center;
}
[dir="rtl"] .pp-select { background-position: 12px center; padding-inline-start: 40px; padding-inline-end: 16px; }

/* Category selects row */
.pp-cat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 640px) { .pp-cat-row { grid-template-columns: 1fr; } }

/* City field */
.pp-field--city { max-width: 340px; }
@media (max-width: 520px) { .pp-field--city { max-width: 100%; } }

/* Budget toggle */
.pp-budget-toggle {
    display: flex; border: 1.5px solid var(--border); border-radius: var(--r);
    overflow: hidden; margin-bottom: 16px;
}
.pp-budget-opt {
    flex: 1; padding: 11px 12px;
    background: transparent; border: none;
    border-inline-end: 1.5px solid var(--border);
    font-size: 13px; font-weight: 600; font-family: inherit;
    color: var(--muted); cursor: pointer;
    transition: background var(--t), color var(--t);
}
.pp-budget-opt:last-child { border-inline-end: none; }
.pp-budget-opt:hover { background: var(--bg2); color: var(--text); }
.pp-budget-opt--active { background: var(--teal); color: #fff; }
.pp-budget-opt--active:hover { background: var(--teal-d); }

/* Budget range */
.pp-budget-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .pp-budget-range { grid-template-columns: 1fr; } }

/* Currency prefix input */
.pp-input-prefix { position: relative; display: flex; align-items: center; }
.pp-prefix {
    position: absolute; inset-inline-start: 14px;
    font-size: 14px; font-weight: 600; color: var(--muted);
    pointer-events: none; z-index: 1;
}
.pp-input--prefixed { padding-inline-start: 32px; }

/* Options group */
.pp-group--options { padding: 0; }
.pp-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 20px 24px;
    cursor: pointer;
}
.pp-toggle-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.pp-toggle-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pp-toggle-hint  { font-size: 12px; color: var(--muted); line-height: 1.4; }

.pp-toggle-switch { flex-shrink: 0; position: relative; }
.pp-toggle-input  { position: absolute; opacity: 0; width: 0; height: 0; }
.pp-toggle-track {
    display: block; width: 44px; height: 24px; border-radius: 12px;
    background: var(--border); cursor: pointer; position: relative;
    transition: background var(--t) var(--ease);
}
.pp-toggle-input:checked + .pp-toggle-track { background: var(--teal); }
.pp-toggle-thumb {
    position: absolute; top: 3px; inset-inline-start: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: inset-inline-start var(--t) var(--ease);
}
.pp-toggle-input:checked ~ .pp-toggle-track .pp-toggle-thumb { inset-inline-start: 23px; }

/* Submit */
.pp-submit {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 32px; margin-top: 28px;
    background: linear-gradient(135deg, var(--teal), var(--teal-d));
    color: #fff; border: none; border-radius: 14px;
    font-size: 16px; font-weight: 700; font-family: inherit;
    cursor: pointer;
    transition: opacity var(--t), transform var(--t), box-shadow var(--t);
    box-shadow: 0 4px 24px rgba(46,124,133,.35);
}
.pp-submit:hover:not(:disabled) {
    opacity: .92; transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(46,124,133,.45);
}
.pp-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.pp-submit-spinner {
    width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff; border-radius: 50%;
    animation: pp-spin .7s linear infinite; flex-shrink: 0;
}
@keyframes pp-spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .pp-hero { padding: 64px 20px 0; }
    .pp-hero-steps { flex-direction: column; align-items: stretch; gap: 4px; }
    .pp-step-arrow { display: none; }
    .pp-form-section { padding: 36px 16px 64px; }
    .pp-card-header, #ppForm { padding-left: 20px; padding-right: 20px; }
    .pp-alert { padding-left: 20px; padding-right: 20px; }
    .pp-group { padding: 20px; }
}
@media (max-width: 520px) {
    .pp-hero-badge { display: none; }
    .pp-card-header { padding: 20px; }
    .pp-card-title  { font-size: 16px; }
    #ppForm         { padding: 0 16px 24px; }
    .pp-alert       { padding: 12px 16px; }
    .pp-group       { padding: 16px; border-radius: 12px; }
    .pp-success     { padding: 40px 24px; }
}
