/*
Theme Name: Rayh Invite
Theme URI: https://rayhglobal.com
Author: Rayh
Author URI: https://rayhglobal.com
Description: قالب عربي متجاوب لمنصة رايح، مرتبط بواجهة تسجيل الناقلين بالدعوة وتتبع الشحنات.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: rayh-invite
*/

:root {
    --rayh-navy: #062846;
    --rayh-navy-deep: #031d35;
    --rayh-orange: #ff5a16;
    --rayh-teal: #079ba4;
    --rayh-ink: #102a43;
    --rayh-muted: #64748b;
    --rayh-line: #dce5ec;
    --rayh-soft: #f4f8fa;
    --rayh-white: #ffffff;
    --rayh-success: #148a62;
    --rayh-danger: #bd2c2c;
    --rayh-shadow: 0 10px 28px rgba(6, 40, 70, .09);
    --rayh-radius: 8px;
    --rayh-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    direction: rtl;
    color: var(--rayh-ink);
    background: var(--rayh-white);
    font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}
body.admin-bar .rayh-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.rayh-container { width: min(calc(100% - 36px), var(--rayh-container)); margin-inline: auto; }
.rayh-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.rayh-section { padding: 62px 0; }
.rayh-section--soft { background: var(--rayh-soft); }
.rayh-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 26px; }
.rayh-section-title { margin: 0; color: var(--rayh-navy); font-size: clamp(1.55rem, 2.4vw, 2.2rem); font-weight: 900; }
.rayh-section-title::after { content: ""; display: inline-block; width: 42px; height: 3px; margin-right: 12px; background: var(--rayh-orange); vertical-align: middle; }
.rayh-section-copy { margin: 7px 0 0; color: var(--rayh-muted); }

.rayh-header {
    position: sticky; top: 0; z-index: 50; color: #fff;
    background: rgba(3, 29, 53, .97); border-bottom: 1px solid rgba(255,255,255,.08);
}
.rayh-header__inner { min-height: 72px; display: flex; align-items: center; gap: 24px; }
.rayh-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-left: auto; }
.rayh-brand img { width: 48px; height: 48px; object-fit: contain; }
.rayh-brand__text { display: grid; line-height: 1.05; font-size: 1.35rem; font-weight: 900; }
.rayh-brand__text small { color: #ff7a3d; font-size: .66rem; font-weight: 700; }
.rayh-nav { display: flex; align-items: center; gap: 22px; }
.rayh-nav__list { display: flex; align-items: center; gap: 22px; list-style: none; padding: 0; margin: 0; }
.rayh-nav a { color: #e9f0f5; text-decoration: none; font-size: .88rem; font-weight: 700; padding: 24px 0 20px; border-bottom: 3px solid transparent; }
.rayh-nav a:hover, .rayh-nav a:focus { color: #fff; border-color: var(--rayh-orange); }
.rayh-header__actions { display: flex; gap: 10px; align-items: center; }
.rayh-menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.3); color: white; background: transparent; border-radius: var(--rayh-radius); }
.rayh-btn {
    min-height: 46px; border: 0; border-radius: var(--rayh-radius); padding: 10px 20px;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    text-decoration: none; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.rayh-btn:hover { transform: translateY(-1px); }
.rayh-btn--primary { color: white; background: var(--rayh-orange); box-shadow: 0 8px 18px rgba(255,90,22,.23); }
.rayh-btn--company { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.35); }
.rayh-btn--company:hover { color: #fff; border-color: var(--rayh-orange); }
.rayh-btn--outline { color: #45d9df; background: transparent; border: 1px solid #10b7bf; }
.rayh-btn--secondary { color: var(--rayh-navy); background: white; border: 1px solid #b6c7d2; }
.rayh-btn--block { width: 100%; }
.rayh-btn:disabled { opacity: .62; cursor: not-allowed; transform: none; }

.rayh-hero { position: relative; min-height: 570px; isolation: isolate; overflow: hidden; background: #eaf1f3; }
.rayh-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.rayh-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.68) 48%, rgba(255,255,255,.98) 100%);
}
.rayh-hero__inner { min-height: 570px; display: flex; align-items: center; }
.rayh-hero__content { width: min(580px, 58%); padding: 46px 0; }
.rayh-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--rayh-teal); font-weight: 900; }
.rayh-hero h1 { margin: 0; color: var(--rayh-navy-deep); font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: 1.12; font-weight: 900; }
.rayh-hero h1 span { display: block; color: var(--rayh-orange); }
.rayh-hero__subtitle { margin: 14px 0 8px; font-size: clamp(1.15rem, 2vw, 1.65rem); color: var(--rayh-navy); font-weight: 900; }
.rayh-hero__copy { max-width: 590px; margin: 0 0 25px; color: #334e68; font-size: 1rem; }
.rayh-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.rayh-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rayh-feature { border: 1px solid var(--rayh-line); background: #fff; border-radius: var(--rayh-radius); padding: 22px; box-shadow: var(--rayh-shadow); }
.rayh-feature__icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--rayh-teal); background: #e8f8f8; border-radius: 50%; font-size: 1.55rem; }
.rayh-feature h3 { margin: 12px 0 5px; color: var(--rayh-navy); font-size: 1rem; }
.rayh-feature p { margin: 0; color: var(--rayh-muted); font-size: .88rem; }

.rayh-tools { display: grid; grid-template-columns: .9fr 1.15fr .95fr; gap: 18px; align-items: stretch; }
.rayh-panel { border: 1px solid var(--rayh-line); border-radius: var(--rayh-radius); background: white; padding: 25px; box-shadow: var(--rayh-shadow); }
.rayh-panel--dark { color: #fff; border-color: var(--rayh-navy); background: var(--rayh-navy); }
.rayh-panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.rayh-panel__head .dashicons { width: 38px; height: 38px; font-size: 25px; display: grid; place-items: center; color: var(--rayh-teal); }
.rayh-panel h3 { margin: 0; color: var(--rayh-navy); font-size: 1.05rem; }
.rayh-panel--dark h3 { color: white; }
.rayh-panel p { margin: 0 0 18px; color: var(--rayh-muted); font-size: .88rem; }
.rayh-panel--dark p { color: #d7e5ee; }
.rayh-value-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rayh-value { border-top: 1px solid rgba(255,255,255,.18); padding-top: 13px; }
.rayh-value strong { display: block; font-size: .9rem; }
.rayh-value span { display: block; color: #bad0dd; font-size: .78rem; }
.rayh-field { margin-bottom: 14px; }
.rayh-field label { display: block; margin-bottom: 6px; color: var(--rayh-navy); font-size: .82rem; font-weight: 800; }
.rayh-field input, .rayh-field select {
    width: 100%; height: 48px; padding: 0 13px; color: var(--rayh-ink);
    border: 1px solid #cbd7df; border-radius: 6px; background: #fff; outline: none;
}
.rayh-field input:focus, .rayh-field select:focus { border-color: var(--rayh-teal); box-shadow: 0 0 0 3px rgba(7,155,164,.12); }
.rayh-form-step[hidden], .rayh-form-message[hidden], .rayh-track-result[hidden] { display: none !important; }
.rayh-form-message { margin: 14px 0; padding: 11px 13px; border-radius: 6px; font-size: .84rem; font-weight: 700; }
.rayh-form-message--error { color: #8f2020; background: #fff0f0; border: 1px solid #f0bcbc; }
.rayh-form-message--success { color: #0b6647; background: #eaf9f3; border: 1px solid #a8dfcc; }
.rayh-form-progress { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; }
.rayh-form-progress span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e7eef2; color: var(--rayh-muted); font-size: .78rem; font-weight: 900; }
.rayh-form-progress span.is-active { color: #fff; background: var(--rayh-orange); }
.rayh-form-progress i { flex: 1; height: 2px; background: #d9e4ea; }
.rayh-success { text-align: center; padding: 16px 0 5px; }
.rayh-success .dashicons { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #fff; background: var(--rayh-success); font-size: 38px; }
.rayh-success h3 { font-size: 1.45rem; }

.rayh-track-flow { display: flex; gap: 5px; align-items: center; margin-top: 19px; }
.rayh-track-flow span { flex: 1; text-align: center; color: var(--rayh-muted); font-size: .69rem; }
.rayh-track-flow span::before { content: ""; display: block; width: 12px; height: 12px; margin: 0 auto 7px; border: 3px solid #b7c8d2; border-radius: 50%; background: #fff; }
.rayh-track-flow span.is-current { color: var(--rayh-teal); font-weight: 800; }
.rayh-track-flow span.is-current::before { border-color: var(--rayh-teal); background: var(--rayh-teal); }

.rayh-content-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.rayh-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rayh-post { overflow: hidden; border: 1px solid var(--rayh-line); border-radius: var(--rayh-radius); background: #fff; }
.rayh-post__media { aspect-ratio: 16 / 9; overflow: hidden; background: #e9f0f3; }
.rayh-post__media img { width: 100%; height: 100%; object-fit: cover; }
.rayh-post__body { padding: 15px; }
.rayh-post__meta { color: var(--rayh-teal); font-size: .72rem; font-weight: 800; }
.rayh-post h3 { margin: 7px 0 11px; color: var(--rayh-navy); font-size: .93rem; line-height: 1.55; }
.rayh-post h3 a { text-decoration: none; }
.rayh-post time { color: var(--rayh-muted); font-size: .72rem; }
.rayh-testimonial { position: relative; min-height: 100%; }
.rayh-quote { color: var(--rayh-orange); font-size: 3.6rem; line-height: 1; font-family: Georgia, serif; }
.rayh-testimonial blockquote { margin: 5px 0 24px; color: #3c5264; font-size: .94rem; }
.rayh-person { display: flex; align-items: center; gap: 12px; }
.rayh-person__avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--rayh-teal); font-weight: 900; }
.rayh-stars { color: var(--rayh-orange); letter-spacing: 2px; }

.rayh-footer { color: #d8e5ed; background: var(--rayh-navy-deep); padding: 48px 0 18px; }
.rayh-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px; }
.rayh-footer h3 { margin: 0 0 13px; color: #fff; font-size: .95rem; }
.rayh-footer p, .rayh-footer a { color: #b9ceda; font-size: .82rem; text-decoration: none; }
.rayh-footer ul { list-style: none; padding: 0; margin: 0; }
.rayh-footer li { margin: 7px 0; }
.rayh-footer__bottom { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: #91aaba; font-size: .76rem; }

.rayh-article { width: min(calc(100% - 36px), 820px); margin: 55px auto; }
.rayh-article h1 { color: var(--rayh-navy); line-height: 1.4; }
.rayh-article__meta { color: var(--rayh-muted); font-size: .82rem; }
.rayh-article__content { margin-top: 28px; }

@media (max-width: 1020px) {
    .rayh-nav { display: none; position: absolute; top: 72px; right: 0; left: 0; padding: 12px 24px 20px; flex-direction: column; align-items: stretch; background: var(--rayh-navy-deep); }
    .rayh-nav.is-open { display: flex; }
    .rayh-nav a { padding: 9px 0; }
    .rayh-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .rayh-menu-toggle { display: grid; place-items: center; }
    .rayh-header__actions .rayh-btn--outline { display: none; }
    .rayh-header__actions .rayh-btn--company { display: none; }
    .rayh-features { grid-template-columns: 1fr 1fr; }
    .rayh-tools { grid-template-columns: 1fr 1fr; }
    .rayh-panel--dark { grid-column: 1 / -1; }
    .rayh-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    body.admin-bar .rayh-header { top: 46px; }
    .rayh-container { width: min(calc(100% - 24px), var(--rayh-container)); }
    .rayh-header__inner { min-height: 64px; gap: 10px; }
    .rayh-brand img { width: 40px; height: 40px; }
    .rayh-brand__text { font-size: 1.08rem; }
    .rayh-header__actions .rayh-btn--primary { display: none; }
    .rayh-nav { top: 64px; }
    .rayh-hero, .rayh-hero__inner { min-height: 560px; }
    .rayh-hero::after { background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.88) 54%, rgba(255,255,255,.2) 100%); }
    .rayh-hero__media { object-position: 58% center; }
    .rayh-hero__inner { align-items: flex-start; }
    .rayh-hero__content { width: 100%; padding-top: 55px; }
    .rayh-hero h1 { font-size: clamp(2.25rem, 13vw, 3.5rem); }
    .rayh-hero__copy { font-size: .91rem; }
    .rayh-section { padding: 45px 0; }
    .rayh-section-head { align-items: start; flex-direction: column; }
    .rayh-features, .rayh-tools, .rayh-posts, .rayh-footer__grid { grid-template-columns: 1fr; }
    .rayh-panel--dark { grid-column: auto; }
    .rayh-value-list { grid-template-columns: 1fr; }
    .rayh-footer__grid { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
