/* ==========================================================================
   روضة إمبريال رويال - صفحة الـ QR والبطاقة الرقمية الذكية
   QR & Digital Business Card Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --royal-navy-dark: #050E20;
  --royal-navy: #0B1B3D;
  --royal-navy-card: #0E224D;
  --royal-gold: #C5A059;
  --royal-gold-light: #DFBD69;
  --royal-gold-gradient: linear-gradient(135deg, #DFBD69 0%, #C5A059 50%, #9E7930 100%);
  --gold-glow: 0 0 25px rgba(197, 160, 89, 0.35);
  --radius-card: 28px;
  --radius-btn: 18px;
  --text-white: #FFFFFF;
  --text-muted: #9BB0C7;
}

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

html {
  direction: rtl;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: var(--royal-navy-dark);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(197, 160, 89, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(21, 46, 94, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(197, 160, 89, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Background animated stars / ambient glow */
.ambient-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.2) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}

/* QR Main Card Container */
.qr-container {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 34, 77, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  border-radius: var(--radius-card);
  padding: 2.5rem 1.8rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), var(--gold-glow);
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Logo & Header */
.qr-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.qr-logo-frame {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-logo-frame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--royal-gold-gradient);
  opacity: 0.7;
  filter: blur(8px);
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

.qr-logo-img {
  position: relative;
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.96);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.04);
    opacity: 0.85;
  }
}

.qr-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.qr-subtitle {
  font-size: 0.92rem;
  color: var(--royal-gold-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.qr-badge-location {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(197, 160, 89, 0.3);
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #E2E8F0;
}

.qr-badge-location i {
  color: var(--royal-gold-light);
}

/* Links List */
.qr-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.qr-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.3rem;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.qr-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.qr-btn-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.qr-btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.qr-btn-text {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.qr-btn-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.qr-btn-desc {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
}

.qr-btn-arrow {
  font-size: 0.9rem;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.qr-btn:hover .qr-btn-arrow {
  transform: translateX(-4px);
  opacity: 1;
}

/* Button Variants */
.qr-btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
}
.qr-btn-whatsapp .qr-btn-icon {
  background: rgba(255, 255, 255, 0.2);
}

.qr-btn-call {
  background: var(--royal-gold-gradient);
  color: #071329;
}
.qr-btn-call .qr-btn-icon {
  background: rgba(0, 0, 0, 0.12);
  color: #071329;
}

.qr-btn-web {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
  border: 1px solid rgba(197, 160, 89, 0.4);
}
.qr-btn-web .qr-btn-icon {
  background: rgba(197, 160, 89, 0.2);
  color: var(--royal-gold-light);
}

.qr-btn-facebook {
  background: linear-gradient(135deg, #1877F2 0%, #0D56B3 100%);
  color: #FFFFFF;
}
.qr-btn-facebook .qr-btn-icon {
  background: rgba(255, 255, 255, 0.2);
}

.qr-btn-location {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.qr-btn-location .qr-btn-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.qr-btn-vcard {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: #FFFFFF;
}
.qr-btn-vcard .qr-btn-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* Quick Tools */
.qr-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.qr-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 999px;
  color: #E2E8F0;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.qr-tool-btn:hover {
  background: rgba(197, 160, 89, 0.18);
  border-color: var(--royal-gold);
  color: #FFF;
}

.qr-tool-btn i {
  color: var(--royal-gold-light);
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--royal-gold);
  color: #071329;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 3000;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Modal for QR Code Display */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.qr-modal.active {
  display: flex;
}

.qr-modal-card {
  background: var(--royal-navy);
  border: 2px solid var(--royal-gold);
  border-radius: var(--radius-card);
  padding: 2.2rem 1.8rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.qr-modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
}

.qr-modal-img {
  width: 200px;
  height: 200px;
  margin: 1.2rem auto;
  border-radius: 16px;
  background: #FFF;
  padding: 8px;
}
