/* ==========================================
   HomeCare Luxury Landing Page Stylesheet
   Modern Glassmorphism, Emerald & Gold Palette
   ========================================== */

:root {
  --bg-dark: #070b14;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.55);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-emerald: rgba(16, 185, 129, 0.35);

  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-light: #34d399;
  --primary-dark: #059669;

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-coral: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Theme 1: Emerald (الزمردي الملكي المعاصر) */
[data-landing-theme="emerald"] {
  --bg-dark: #070b14;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-light: #34d399;
  --primary-dark: #059669;
  --accent-gold: #f59e0b;
}

/* Theme 2: Warm Heritage & Desert Gold (التراثي الدافئ والذهب الصحراوي) */
[data-landing-theme="heritage"] {
  --bg-dark: #120b06;
  --bg-card: rgba(36, 20, 13, 0.85);
  --bg-card-hover: rgba(54, 31, 20, 0.9);
  --bg-glass: rgba(28, 17, 11, 0.7);
  --border-glass: rgba(245, 158, 11, 0.15);
  --border-emerald: rgba(217, 119, 6, 0.4);
  --primary: #d97706;
  --primary-glow: rgba(217, 119, 6, 0.3);
  --primary-light: #fbbf24;
  --primary-dark: #92400e;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --shadow-glow: 0 0 40px rgba(217, 119, 6, 0.2);
}

/* Theme 3: Minimalist Obsidian Tech (النيوم العصري الفائق) */
[data-landing-theme="minimal"] {
  --bg-dark: #000000;
  --bg-card: rgba(18, 18, 20, 0.9);
  --bg-card-hover: rgba(30, 30, 35, 0.95);
  --bg-glass: rgba(12, 12, 15, 0.75);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-emerald: rgba(56, 189, 248, 0.35);
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.3);
  --primary-light: #7dd3fc;
  --primary-dark: #0284c7;
  --accent-gold: #38bdf8;
  --accent-gold-glow: rgba(56, 189, 248, 0.25);
  --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.landing-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 14px 0;
  transition: all 0.3s ease;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.landing-logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.landing-logo-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.landing-logo-text span {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn-landing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  font-family: inherit;
}

.btn-landing-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-landing-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.btn-landing-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn-landing-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.55);
}

.btn-landing-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-glass);
}

.btn-landing-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-landing-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 20px;
  animation: pulseBadge 3s infinite;
}

@keyframes pulseBadge {
  0%, 100% { border-color: rgba(16, 185, 129, 0.3); }
  50% { border-color: rgba(16, 185, 129, 0.7); box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 22px;
  letter-spacing: -0.5px;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
}

.stat-box h4 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.stat-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Interactive Phone Mockup Frame */
.mockup-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 1;
}

.phone-frame {
  position: relative;
  z-index: 2;
  width: 300px;
  height: 610px;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  border: 4px solid #334155;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.phone-speaker {
  width: 70px;
  height: 4px;
  background: #334155;
  border-radius: 4px;
  margin: 6px auto 10px;
}

.phone-screen {
  flex: 1;
  background: #0f172a;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-header {
  background: rgba(15, 23, 42, 0.95);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.phone-content {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  font-size: 0.82rem;
}

.phone-tab-content {
  display: none;
  animation: fadeInMock 0.3s ease;
}

.phone-tab-content.active {
  display: block;
}

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

.mock-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.mock-card h5 {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.phone-nav-bar {
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  background: #090e1a;
  border-top: 1px solid var(--border-glass);
}

.mock-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.mock-tab-btn.active {
  color: var(--primary);
  font-weight: 700;
}

/* Live Interactive Savings Calculator */
.calculator-section {
  padding: 60px 0;
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.calc-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-glow);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.calc-slider-group {
  margin-bottom: 22px;
}

.calc-slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.calc-slider-header span.val {
  color: var(--primary);
  font-weight: 800;
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.calc-result-box {
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.calc-total-sar {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1.1;
  margin: 10px 0;
}

.calc-breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
  text-align: right;
  font-size: 0.85rem;
}

.calc-breakdown-item {
  background: rgba(30, 41, 59, 0.5);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

/* Features Showcase Grid */
.features-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.section-badge {
  display: inline-block;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
}

/* App Download & Mobile Section */
.download-section {
  padding: 80px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(16, 185, 129, 0.05) 50%, transparent 100%);
}

.download-box {
  background: linear-gradient(145deg, #0d1526 0%, #08111e 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
}

.download-info h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.download-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.install-methods {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.method-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.method-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.method-text strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
}

.method-text span {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.qr-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-wrapper {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* FAQ Section */
.faq-section {
  padding: 60px 0;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
}

.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '▼';
  font-size: 0.75rem;
  color: var(--primary);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
}

/* Footer */
.landing-footer {
  background: #04070e;
  border-top: 1px solid var(--border-glass);
  padding: 50px 0 25px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand p {
  margin-top: 10px;
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

/* Modal Overlay for Android Download */
.landing-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.landing-modal-overlay.active {
  display: flex;
  animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.landing-modal-card {
  background: #0f172a;
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
  position: relative;
}

.landing-modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-badge {
    margin: 0 auto 20px;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .mockup-wrapper {
    margin-top: 20px;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .download-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .install-methods {
    align-items: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .calc-total-sar {
    font-size: 2.2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
