/**
 * =====================================================
 * landing-theme.css
 * منصة مدعوم - وحدة واتساب
 * Shared styling for home.html + account.html
 *
 * Design tokens and component patterns (colors, font, card/
 * button/nav shapes) are taken directly from the core platform's
 * login.html so these two new pages read as part of the same
 * product, not a separate skin. subscriptions.html's actual
 * stylesheet (subscriptions-styles.css) wasn't provided, so this
 * recreates its layout patterns (navbar, hero, sections, footer)
 * using login.html's real tokens rather than guessing its CSS —
 * swap in the real file if pixel-parity with subscriptions.html
 * matters.
 * ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1677FF;
  --primary-dark: #0F52BA;
  --primary-light: #4DA3FF;
  --accent: #00B8FF;
  --bg: #F0F6FF;
  --border: #E5EDF7;
  --text: #0F172A;
  --muted: #64748B;
  --success: #22C55E;
  --shadow: rgba(15,23,42,0.08);
  --shadow-blue: rgba(22,119,255,0.16);
}

html, body {
  min-height: 100%;
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font-family: inherit; }

/* ─── Navbar ─────────────────────────────────────────── */
.landing-navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.landing-nav-container {
  max-width: 1180px; margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.landing-nav-logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-size: 1.05rem; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.landing-nav-logo img { width: 34px; height: 34px; object-fit: contain; }
.landing-nav-logo .colored { color: var(--primary); }
.landing-nav-menu {
  list-style: none; display: flex; align-items: center; gap: 1.6rem;
}
.landing-nav-menu a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  transition: color 0.2s;
}
.landing-nav-menu a:hover, .landing-nav-menu a.active { color: var(--primary); }
.landing-nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 0.88rem; text-decoration: none;
  box-shadow: 0 4px 14px var(--shadow-blue);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.landing-nav-cta:hover { transform: translateY(-1.5px); box-shadow: 0 6px 20px var(--shadow-blue); }
@media (max-width: 820px) {
  .landing-nav-menu { display: none; }
}

/* ─── Hero (brand-panel pattern from login.html) ────────── */
.landing-hero {
  position: relative;
  background: linear-gradient(145deg, #d8eaff 0%, #e4f0ff 40%, #c4daff 100%);
  overflow: hidden;
  padding: 4.5rem 1.5rem 5.5rem;
}
.landing-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(22,119,255,0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.landing-hero::after {
  content: ''; position: absolute; top: -90px; left: -70px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,119,255,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.landing-hero-blob {
  position: absolute; bottom: -110px; right: -80px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,184,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.landing-hero-content {
  position: relative; z-index: 1;
  max-width: 780px; margin: 0 auto; text-align: center;
}
.landing-hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.85); border: 1px solid rgba(22,119,255,0.16);
  border-radius: 999px; padding: 0.4rem 0.9rem;
  font-size: 0.8rem; font-weight: 700; color: var(--primary-dark);
  box-shadow: 0 3px 10px var(--shadow); margin-bottom: 1.3rem;
}
.landing-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; line-height: 1.28;
  color: var(--text); margin-bottom: 0.9rem;
}
.landing-hero h1 .colored { color: var(--primary); }
.landing-hero p.lead {
  font-size: 1.05rem; color: var(--muted); font-weight: 500; line-height: 1.75;
  max-width: 560px; margin: 0 auto 2rem;
}
.landing-hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 0.85rem; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.82rem 1.7rem; border-radius: 10px;
  font-family: 'Cairo', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; text-decoration: none; border: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s, color 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; box-shadow: 0 4px 16px var(--shadow-blue);
}
.btn-primary:hover { transform: translateY(-1.5px); box-shadow: 0 6px 22px var(--shadow-blue); }
.btn-outline {
  background: #fff; color: var(--text); border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: #fff; color: #ef4444; border: 1.5px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.06); border-color: #ef4444; }

/* Floating feature chips reused from login.html's brand panel */
.landing-hero-chips {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  margin-top: 2.6rem;
}
.chip {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.92);
  border-radius: 13px; padding: 0.65rem 1rem;
  box-shadow: 0 4px 14px var(--shadow-blue); backdrop-filter: blur(10px);
  font-size: 0.82rem; font-weight: 700; color: var(--text);
}
.chip svg { flex-shrink: 0; }

/* ─── Sections ───────────────────────────────────────── */
.landing-container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.landing-section { padding: 4.5rem 0; }
.section-header { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.section-eyebrow {
  display: block; font-size: 0.82rem; font-weight: 800; color: var(--primary);
  letter-spacing: 0.02em; margin-bottom: 0.6rem;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.7rem; }
.section-subtitle { color: var(--muted); font-size: 1rem; font-weight: 500; line-height: 1.7; }

/* ─── Feature grid ───────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem;
}
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 1.6rem; box-shadow: 0 3px 14px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px var(--shadow-blue); }
.feature-card .icon-badge {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,119,255,0.1); color: var(--primary); margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 0.45rem; }
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }

/* ─── Steps (real onboarding sequence, so numbering is honest here) ─── */
.steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; counter-reset: step; }
.step-card { position: relative; padding-top: 0.3rem; }
.step-num {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; font-weight: 800; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--shadow-blue); margin-bottom: 0.9rem;
}
.step-card h3 { font-size: 0.98rem; font-weight: 800; margin-bottom: 0.4rem; }
.step-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.7; }

/* ─── Subscriptions teaser ──────────────────────────── */
.plan-teaser {
  background: linear-gradient(135deg, #0F52BA 0%, #1677FF 55%, #00B8FF 100%);
  border-radius: 22px; padding: 2.8rem 2rem; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.plan-teaser::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 22px 22px; pointer-events: none;
}
.plan-teaser > * { position: relative; z-index: 1; }
.plan-teaser h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.6rem; }
.plan-teaser p { font-size: 0.95rem; opacity: 0.92; max-width: 480px; margin: 0 auto 1.6rem; line-height: 1.7; }
.plan-teaser .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 16px rgba(0,0,0,0.16); }
.plan-teaser .btn-primary:hover { box-shadow: 0 6px 22px rgba(0,0,0,0.22); }
.plan-teaser .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.plan-teaser .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* ─── Footer ─────────────────────────────────────────── */
.landing-footer { border-top: 1px solid var(--border); padding: 2.2rem 0; margin-top: 2rem; }
.landing-footer .landing-container {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.landing-footer p { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.footer-links { display: flex; gap: 1.3rem; list-style: none; }
.footer-links a { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* ─── Account page ───────────────────────────────────── */
.account-shell { max-width: 780px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.account-hero { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 2.2rem; }
.account-avatar {
  width: 62px; height: 62px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; font-weight: 800; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--shadow-blue);
}
.account-hero h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.2rem; }
.account-hero p { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.account-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 1.6rem; margin-bottom: 1.25rem; box-shadow: 0 3px 14px var(--shadow);
}
.account-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; gap: 0.75rem; }
.account-card-header h2 { font-size: 1rem; font-weight: 800; }
.status-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.76rem; font-weight: 800;
}
.status-badge.connected { background: rgba(34,197,94,0.12); color: #16a34a; }
.status-badge.disconnected { background: rgba(148,163,184,0.16); color: var(--muted); }
.status-badge svg { width: 8px; height: 8px; }
.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border); gap: 1rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { font-size: 0.85rem; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.info-row .value { font-size: 0.88rem; font-weight: 700; color: var(--text); text-align: left; direction: ltr; }
.account-card-actions { display: flex; gap: 0.7rem; margin-top: 1.2rem; flex-wrap: wrap; }
.account-card-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; flex: 1; min-width: 140px; }
.skeleton {
  background: linear-gradient(90deg, #eef3fb 25%, #f7fafd 37%, #eef3fb 63%);
  background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite;
  border-radius: 8px; height: 0.9rem;
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (max-width: 640px) {
  .landing-hero { padding: 3.2rem 1.25rem 4rem; }
  .landing-section { padding: 3rem 0; }
  .info-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .info-row .value { text-align: right; }
}
