/*
 * WebPlus — Home Page Styles (المرحلة 4)
 * Hero (الشريط ينمو)، شريط الثقة، من الفكرة إلى موقع احترافي
 */

/* ════════════════════════════════════════════════
   1. HERO SECTION
   ════════════════════════════════════════════════ */
.wp-hero {
  min-height: 100vh;
  background: var(--wp-navy-950);
  color: var(--wp-snow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--wp-header-h) + var(--wp-space-8));
  padding-bottom: 120px; /* مساحة للأفق في الأسفل */
}

.wp-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--wp-space-12);
  align-items: center;
}

.wp-hero__title {
  font-size: clamp(var(--wp-text-4xl), 5.5vw, var(--wp-text-7xl));
  line-height: 1.15;
  font-weight: 900;
  color: var(--wp-snow);
  margin-bottom: var(--wp-space-2);
}

.wp-hero__title-grow {
  position: relative;
  display: inline-block;
}

.wp-hero__latin-subtitle {
  font-family: var(--wp-font-latin);
  font-weight: 700;
  font-size: clamp(var(--wp-text-lg), 2vw, var(--wp-text-2xl));
  color: var(--wp-sky);
  margin-bottom: var(--wp-space-4);
  letter-spacing: -0.02em;
}

.wp-hero__desc {
  font-size: clamp(var(--wp-text-base), 1.25vw, var(--wp-text-xl));
  color: var(--wp-slate-400);
  line-height: 1.85;
  max-width: 58ch;
  margin-bottom: var(--wp-space-8);
}

.wp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp-space-4);
  align-items: center;
}

/* مسرح الشريط والمجسم ثلاثي الأبعاد */
.wp-hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wp-hero__ribbon-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.wp-hero__browser-frame {
  background: rgba(18, 48, 107, 0.45);
  backdrop-filter: blur(20px);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), var(--wp-shadow-glow);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-6deg) rotateX(4deg);
  transition: transform 0.6s var(--wp-ease);
}

.wp-hero__visual:hover .wp-hero__browser-frame {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

.wp-hero__browser-header {
  background: rgba(7, 21, 48, 0.8);
  padding: 10px 16px;
  border-bottom: 1px solid var(--wp-line-dark);
  display: flex;
  align-items: center;
  gap: 16px;
}

.wp-hero__browser-dots {
  display: flex;
  gap: 6px;
}

.wp-hero__browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.wp-hero__browser-dots span:nth-child(1) { background: #ef4444; }
.wp-hero__browser-dots span:nth-child(2) { background: #f59e0b; }
.wp-hero__browser-dots span:nth-child(3) { background: #22c55e; }

.wp-hero__browser-address {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--wp-font-latin);
  font-size: 11px;
  color: var(--wp-slate-400);
}

.wp-hero__browser-body {
  padding: 24px;
  background: linear-gradient(180deg, rgba(11, 31, 68, 0.6) 0%, rgba(7, 21, 48, 0.9) 100%);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wp-hero__mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wp-hero__mock-badge {
  display: inline-block;
  font-family: var(--wp-font-latin);
  font-size: 10px;
  font-weight: 700;
  color: var(--wp-success);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.wp-hero__mock-h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--wp-snow);
  margin-bottom: 8px;
}

.wp-hero__mock-line {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  margin-bottom: 6px;
}

.wp-hero__mock-btn {
  display: inline-block;
  margin-top: 14px;
  background: var(--wp-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
}

/* شريط W الأيقوني العائم */
.wp-hero__floating-ribbon {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 110px;
  height: 110px;
  pointer-events: none;
  animation: wpRibbonFloat 5s ease-in-out infinite alternate;
}

@keyframes wpRibbonFloat {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-16px) rotate(6deg); }
}

/* أفق المدن أسفل الـ Hero */
.wp-hero__skylines {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.wp-hero__skyline-layer svg {
  width: 100%;
  height: auto;
  max-height: 220px;
  display: block;
}

/* ════════════════════════════════════════════════
   2. IDEA TO SITE (WOW #2)
   ════════════════════════════════════════════════ */
.wp-idea-to-site {
  position: relative;
}

.wp-idea-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--wp-space-12);
  align-items: center;
  margin-top: var(--wp-space-12);
}

.wp-idea-stages-nav {
  display: flex;
  flex-direction: column;
  gap: var(--wp-space-3);
}

.wp-idea-stage-step {
  display: flex;
  gap: var(--wp-space-4);
  padding: 16px 20px;
  background: var(--wp-navy-800);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-lg);
  cursor: pointer;
  transition: all 0.3s var(--wp-ease);
}

.wp-idea-stage-step:hover {
  background: rgba(18, 48, 107, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
}

.wp-idea-stage-step.is-active {
  background: rgba(0, 102, 255, 0.15);
  border-color: var(--wp-blue);
  box-shadow: 0 0 24px rgba(0, 102, 255, 0.2);
  transform: translateX(-6px);
}

[dir="ltr"] .wp-idea-stage-step.is-active {
  transform: translateX(6px);
}

.wp-idea-step-num {
  font-family: var(--wp-font-latin);
  font-size: 20px;
  font-weight: 800;
  color: var(--wp-sky);
  line-height: 1;
}

.wp-idea-step-info h3 {
  font-size: 16px;
  color: var(--wp-snow);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-idea-step-info p {
  font-size: 13px;
  color: var(--wp-slate-400);
  line-height: 1.6;
  margin: 0;
}

/* شاشة العرض الحية في الـ Canvas */
.wp-idea-stage-screen {
  position: sticky;
  top: 100px;
}

.wp-idea-browser-window {
  background: var(--wp-navy-950);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.wp-idea-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(7, 21, 48, 0.95);
  border-bottom: 1px solid var(--wp-line-dark);
}

.wp-idea-browser-dots {
  display: flex;
  gap: 6px;
}

.wp-idea-browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.wp-idea-browser-url {
  font-family: var(--wp-font-latin);
  font-size: 11px;
  color: var(--wp-slate-400);
}

.wp-idea-screen-canvas {
  padding: var(--wp-space-8);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-canvas-view {
  display: none;
  width: 100%;
  animation: wpViewFadeIn 0.35s var(--wp-ease) forwards;
}

.wp-canvas-view.is-active {
  display: block;
}

@keyframes wpViewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wp-wireframe-block {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.wp-canvas-badge-hint {
  font-size: 12px;
  color: var(--wp-slate-400);
  margin-top: 18px;
  text-align: center;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .wp-hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .wp-hero__desc {
    margin-inline: auto;
  }
  .wp-hero__actions {
    justify-content: center;
  }
  .wp-hero__visual {
    margin-top: var(--wp-space-8);
  }
  .wp-idea-grid {
    grid-template-columns: 1fr;
  }
  .wp-idea-stage-screen {
    position: static;
  }
}

/* ════════════════════════════════════════════════
   3. BENTO GRID — THE 5 PLUSES (المرحلة 5)
   ════════════════════════════════════════════════ */
.wp-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp-space-6);
  margin-top: var(--wp-space-12);
}

.wp-bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.wp-bento-card--large {
  grid-column: span 2;
}

.wp-bento-card--wide {
  grid-column: span 2;
}

.wp-bento-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wp-space-4);
}

.wp-bento-icon {
  width: 44px;
  height: 44px;
  color: var(--wp-sky);
}

.wp-bento-card__title {
  font-size: var(--wp-text-2xl);
  color: var(--wp-snow);
  margin-bottom: var(--wp-space-2);
}

.wp-bento-card__desc {
  color: var(--wp-slate-400);
  font-size: var(--wp-text-sm);
  line-height: 1.8;
  margin: 0;
}

.wp-bento-interactive-pill {
  display: inline-flex;
  gap: 8px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--wp-sky);
  font-family: var(--wp-font-latin);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--wp-line-dark);
  padding: 4px 12px;
  border-radius: var(--wp-radius-pill);
  align-self: flex-start;
}

/* ════════════════════════════════════════════════
   4. AUDIT TOOL — WEBPLUS SCORE (WOW #3)
   ════════════════════════════════════════════════ */
.wp-audit-section {
  position: relative;
}

.wp-audit-box {
  max-width: 840px;
  margin: var(--wp-space-8) auto 0;
  background: var(--wp-navy-800);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-xl);
  padding: var(--wp-space-8);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), var(--wp-shadow-glow);
}

.wp-audit-input-group {
  display: flex;
  align-items: center;
  background: var(--wp-navy-950);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-pill);
  padding: 6px 8px 6px 20px;
  transition: border-color 0.3s var(--wp-ease);
}

.wp-audit-input-group:focus-within {
  border-color: var(--wp-sky);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.wp-audit-input-icon {
  color: var(--wp-sky);
  margin-inline-end: 12px;
  display: flex;
  align-items: center;
}

.wp-audit-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--wp-font-latin);
  font-size: var(--wp-text-base);
  color: var(--wp-snow);
  outline: none;
}

.wp-audit-input::placeholder {
  color: var(--wp-slate-400);
}

.wp-audit-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: var(--wp-space-8);
}

.wp-audit-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: var(--wp-sky);
  border-radius: 50%;
  animation: wpSpin 0.9s linear infinite;
}

@keyframes wpSpin {
  to { transform: rotate(360deg); }
}

.wp-audit-results {
  animation: wpFadeIn 0.4s var(--wp-ease) forwards;
}

.wp-audit-result-header {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--wp-space-8);
  align-items: center;
  border-bottom: 1px solid var(--wp-line-dark);
  padding-bottom: var(--wp-space-8);
}

.wp-audit-score-num {
  font-family: var(--wp-font-latin);
  font-size: 64px;
  font-weight: 900;
  color: var(--wp-success);
  line-height: 1;
  margin: 6px 0;
}

.wp-audit-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wp-space-4);
}

.wp-audit-cat-item {
  background: rgba(7, 21, 48, 0.6);
  border: 1px solid var(--wp-line-dark);
  border-radius: var(--wp-radius-md);
  padding: 10px 14px;
}

.wp-audit-improvements {
  padding-block: var(--wp-space-6);
  border-bottom: 1px solid var(--wp-line-dark);
}

.wp-audit-opp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wp-audit-opp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7, 21, 48, 0.5);
  padding: 10px 14px;
  border-radius: var(--wp-radius-md);
  border: 1px solid var(--wp-line-dark);
}

.wp-audit-actions {
  display: flex;
  gap: var(--wp-space-4);
  margin-top: var(--wp-space-6);
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════
   5. SERVICES GRID (المرحلة 5)
   ════════════════════════════════════════════════ */
.wp-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--wp-space-6);
  margin-top: var(--wp-space-12);
}

.wp-service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--wp-space-8);
  border-radius: var(--wp-radius-xl);
  min-height: 320px;
}

.wp-service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wp-space-4);
}

.wp-service-icon-wrap {
  width: 48px;
  height: 48px;
  color: var(--wp-blue);
}

.wp-service-card__title {
  font-size: var(--wp-text-xl);
  color: var(--wp-snow);
  margin-bottom: var(--wp-space-3);
  transition: color 0.3s var(--wp-ease);
}

.wp-service-card:hover .wp-service-card__title {
  color: var(--wp-sky);
}

.wp-service-card__desc {
  font-size: var(--wp-text-sm);
  color: var(--wp-slate-400);
  line-height: 1.8;
  margin-bottom: var(--wp-space-4);
}

.wp-service-card__features {
  margin-top: auto;
  padding-top: var(--wp-space-4);
  border-top: 1px solid var(--wp-line-dark);
}

.wp-service-card__footer {
  margin-top: var(--wp-space-4);
}

/* ════════════════════════════════════════════════
   RESPONSIVE BENTO & AUDIT
   ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .wp-bento-grid {
    grid-template-columns: 1fr;
  }
  .wp-bento-card--large,
  .wp-bento-card--wide {
    grid-column: span 1;
  }
  .wp-audit-result-header {
    grid-template-columns: 1fr;
  }
}
