/*
Theme Name: Restaurant Landing
Theme URI: https://example.com
Author: Professional Landing Theme
Description: قالب صفحة هبوط احترافية ومتجاوبة للشركات والخدمات، مع دعم كامل للوجو والصور ومحرر ووردبريس.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: restaurant-landing
Tags: one-page, landing-page, rtl-language, custom-logo, featured-images, full-width-template
*/

:root {
  --rl-gold: #d7b84d;
  --rl-text: #ffffff;
  --rl-muted: rgba(255,255,255,.74);
  --rl-panel: rgba(8,16,31,.54);
  --rl-border: rgba(255,255,255,.13);
  --rl-wa: #25d366;
  --rl-call: #2563eb;
}

*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  background: #08101f;
  color: var(--rl-text);
  font-family: 'Cairo', Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.admin-bar .rl-page { min-height: calc(100vh - 32px); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

@keyframes rlFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rlLogoIn {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rlGlow {
  0%,100% { opacity: .58; transform: scale(1); }
  50% { opacity: .18; transform: scale(1.22); }
}
@keyframes rlRipple {
  to { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}
@keyframes rlPhone {
  0%,80%,100% { transform: rotate(0); }
  84% { transform: rotate(-12deg); }
  89% { transform: rotate(11deg); }
  94% { transform: rotate(-7deg); }
}

/* Background */
.rl-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}
.rl-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #08101f;
}
.rl-bg-img,
.rl-bg-fallback {
  width: 100%;
  height: 100%;
  display: block;
}
.rl-bg-img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
}
.rl-bg-fallback {
  background:
    radial-gradient(circle at 18% 20%, rgba(25,94,180,.34), transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(34,197,94,.14), transparent 27%),
    linear-gradient(145deg, #0b1b31 0%, #08101f 52%, #03070e 100%);
}
.rl-bg-overlay,
.rl-bg-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rl-bg-overlay {
  background: linear-gradient(180deg, rgba(2,8,18,.38) 0%, rgba(3,10,22,.54) 46%, rgba(2,7,15,.84) 100%);
}
.rl-bg-vignette {
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.48) 100%);
}

/* Main flow — no absolute positioning, so long text can never overlap */
.rl-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 20px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
}
.rl-content {
  width: min(100%, 560px);
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  border: 1px solid var(--rl-border);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(8,16,31,.56), rgba(8,16,31,.34));
  box-shadow: 0 28px 70px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.rl-hero-core,
.rl-action-core {
  position: static;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rl-hero-core { gap: 10px; }
.rl-action-core { gap: 16px; }

/* Logo */
.rl-logo-wrap {
  position: relative;
  width: clamp(104px, 24vw, 132px);
  height: clamp(104px, 24vw, 132px);
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  animation: rlLogoIn .55s cubic-bezier(.16,1,.3,1) both;
}
.rl-logo-glow {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215,184,77,.42) 0%, rgba(215,184,77,.12) 44%, transparent 73%);
  filter: blur(19px);
  animation: rlGlow 4s ease-in-out infinite;
}
.rl-logo-img,
.rl-logo-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  box-shadow: 0 16px 36px rgba(0,0,0,.32), 0 0 0 6px rgba(215,184,77,.06);
}
.rl-logo-img {
  display: block;
  object-fit: contain;
  object-position: center;
  padding: 7px;
}
.rl-logo-placeholder {
  display: grid;
  place-items: center;
  color: rgba(215,184,77,.86);
}

/* Text */
.rl-divider-gold {
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--rl-gold), transparent);
}
.rl-name {
  width: 100%;
  margin: 2px 0 0;
  color: #fff;
  font-size: clamp(2rem, 8.7vw, 3.45rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -.025em;
  text-align: center;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 10px 32px rgba(0,0,0,.34);
  animation: rlFadeUp .55s .08s both;
}
.rl-tagline {
  width: min(100%, 480px);
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(.9rem, 3.6vw, 1.08rem);
  font-weight: 600;
  line-height: 1.9;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  animation: rlFadeUp .55s .14s both;
}
.rl-location {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.76);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  animation: rlFadeUp .55s .2s both;
}
.rl-location svg { width: 14px; height: 14px; flex: 0 0 auto; }
.rl-location-text { overflow-wrap: anywhere; }

/* Actions */
.rl-divider-white {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
}
.rl-btns-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rl-card-btn {
  position: relative;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 15px;
  border: 1px solid transparent;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
  transition: transform .18s ease, filter .2s ease, box-shadow .2s ease;
  animation: rlFadeUp .55s .26s both;
}
.rl-card-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.rl-card-btn:active { transform: scale(.98); }
.rl-card-btn.wa { background: linear-gradient(135deg, #2ad46d, #19a952); border-color: rgba(255,255,255,.16); }
.rl-card-btn.call { background: linear-gradient(135deg, #3472f1, #2053c9); border-color: rgba(255,255,255,.16); }
.rl-card-btn .btn-icon { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; }
.rl-card-btn .btn-icon svg { width: 100%; height: 100%; }
.rl-pulse-ring { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.icon-tel { animation: rlPhone 3.4s ease-in-out infinite; }
.is-disabled { opacity: .62; cursor: default; }

.rl-badge {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  overflow-wrap: anywhere;
  animation: rlFadeUp .55s .32s both;
}
.rl-badge-line {
  width: 26px;
  height: 1px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, transparent, rgba(215,184,77,.56));
}
.rl-badge-line:last-child { transform: scaleX(-1); }

/* WordPress editor content — fixes missing published images/text */
.rl-editor-content {
  width: min(100%, 760px);
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--rl-border);
  border-radius: 26px;
  background: rgba(8,16,31,.66);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,.91);
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.rl-editor-content > *:first-child { margin-top: 0; }
.rl-editor-content > *:last-child { margin-bottom: 0; }
.rl-editor-content p,
.rl-editor-content ul,
.rl-editor-content ol,
.rl-editor-content figure,
.rl-editor-content .wp-block-image { margin: 0 0 1.1em; }
.rl-editor-content h1,
.rl-editor-content h2,
.rl-editor-content h3,
.rl-editor-content h4 { margin: 1.2em 0 .6em; color: #fff; line-height: 1.4; }
.rl-editor-content img,
.rl-editor-content .wp-block-image img,
.rl-editor-content figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 18px;
}
.rl-editor-content iframe,
.rl-editor-content video { max-width: 100%; }
.rl-editor-content a { color: #8fc2ff; text-decoration: underline; text-underline-offset: 3px; }
.alignwide { width: min(100%, 900px); max-width: 900px; margin-inline: auto; }
.alignfull { width: 100%; max-width: none; }

/* Floating buttons */
.rl-floating-btns {
  position: fixed;
  z-index: 9999;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: rtl;
}
.rl-float-btn {
  position: relative;
  width: 142px;
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 15px 34px rgba(0,0,0,.26);
  transition: transform .18s ease, filter .2s ease;
}
.rl-float-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.rl-float-btn.wa-float { background: linear-gradient(135deg, rgba(37,211,102,.98), rgba(23,166,79,.98)); }
.rl-float-btn.call-float { background: linear-gradient(135deg, rgba(52,104,244,.98), rgba(30,75,194,.98)); }
.rl-float-btn .btn-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
}
.rl-float-btn .btn-icon svg { width: 16px; height: 16px; }
.rl-float-btn .btn-label { min-width: 0; overflow-wrap: anywhere; }

.ripple-wave {
  position: absolute;
  z-index: 4;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.24);
  transform: translate(-50%, -50%) scale(0);
  animation: rlRipple .65s ease-out forwards;
  pointer-events: none;
}

@media (max-width: 700px) {
  .rl-shell {
    justify-content: flex-start;
    padding: 24px 14px 126px;
    gap: 18px;
  }
  .rl-content {
    width: 100%;
    padding: 24px 17px 22px;
    gap: 20px;
    border-radius: 24px;
  }
  .rl-logo-wrap {
    width: 100px;
    height: 100px;
  }
  .rl-logo-img,
  .rl-logo-placeholder { border-radius: 23px; }
  .rl-name { font-size: clamp(1.8rem, 9.6vw, 2.8rem); }
  .rl-tagline { font-size: 14px; line-height: 1.85; }
  .rl-btns-row { gap: 10px; }
  .rl-card-btn { min-height: 48px; padding: 10px 9px; font-size: 13px; }
  .rl-editor-content { border-radius: 22px; padding: 20px 16px; }
  .rl-float-btn { width: 132px; min-height: 45px; border-radius: 15px; font-size: 12.5px; }
}

@media (max-width: 390px) {
  .rl-shell { padding-inline: 10px; }
  .rl-content { padding-inline: 14px; }
  .rl-btns-row { grid-template-columns: 1fr; }
  .rl-card-btn { min-height: 46px; }
  .rl-floating-btns { left: 8px; bottom: 10px; }
  .rl-float-btn { width: 124px; padding: 7px 9px; }
  .rl-float-btn .btn-icon { width: 28px; height: 28px; flex-basis: 28px; }
}

@media (min-width: 901px) {
  .rl-floating-btns {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

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