/**
 * سیستم طراحی و استایل جامع «کاروان رو» (Karvanro Design System)
 * معماری سه‌بعدی هیرو وب، پالت نارنجی آجری، آبی آسمانی و کهربایی
 * استاندارد طراحی Impeccable و UI/UX Pro Max با فونت وزیرمتن و ریسپانسیو بی‌نقص
 */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700;800;900&display=swap');

:root {
  --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-en: 'Poppins', sans-serif;
  --bg-dark: #070e14;
  --bg-surface: #0e1a24;
  --bg-card: rgba(16, 29, 41, 0.75);
  --bg-card-hover: rgba(23, 40, 56, 0.9);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-orange: rgba(234, 88, 12, 0.45);
  --border-sky: rgba(56, 189, 248, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-orange: #ea580c;
  --primary-orange-hover: #c2410c;
  --accent-sky: #0284c7;
  --accent-sky-glow: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --glass-blur: blur(20px);
  --shadow-card: 0 16px 36px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow-orange: 0 0 30px rgba(234, 88, 12, 0.35);
  --shadow-glow-sky: 0 0 30px rgba(56, 189, 248, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-family);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

input, select, textarea {
  font-family: var(--font-family);
  background: rgba(10, 21, 30, 0.85);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}

/* ====================================================
   نوار سربرگ و ناوبری (Header)
   ==================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--primary-orange);
  box-shadow: 0 0 18px rgba(234, 88, 12, 0.4);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fb923c, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ====================================================
   دکمه‌ها (Buttons)
   ==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange), #c2410c);
  color: #fff;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-sky-glow);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

/* ====================================================
   پنل‌های شیشه‌ای و کارت‌ها (Glassmorphism Panels)
   ==================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

.glow-orange {
  box-shadow: var(--shadow-glow-orange);
}

.glow-sky {
  box-shadow: var(--shadow-glow-sky);
}

/* ====================================================
   هیرو سه‌بعدی و استیج پرسپکتیو وب (3D Hero Web Stage)
   ==================================================== */
.hero-3d-wrapper {
  position: relative;
  width: 100%;
  margin: 10px 0 50px;
}

.hero-3d-stage {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 40px;
  align-items: center;
  background: radial-gradient(circle at 75% 30%, rgba(234, 88, 12, 0.18) 0%, rgba(2, 132, 199, 0.12) 45%, rgba(7, 14, 20, 0.96) 80%);
  border: 1px solid var(--border-orange);
  border-radius: 36px;
  padding: 50px 44px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

@media (max-width: 960px) {
  .hero-3d-stage {
    grid-template-columns: 1fr;
    padding: 36px 20px;
    gap: 30px;
  }
}

.hero-3d-visual {
  perspective: 1200px;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-3d-card {
  width: 100%;
  max-width: 440px;
  transform-style: preserve-3d;
  transform: rotateY(-8deg) rotateX(4deg) translateZ(10px);
  animation: floatSlow 5s ease-in-out infinite alternate;
  position: relative;
}

@keyframes floatSlow {
  0% {
    transform: rotateY(-8deg) rotateX(4deg) translateY(0px) translateZ(10px);
  }
  100% {
    transform: rotateY(-4deg) rotateX(2deg) translateY(-16px) translateZ(24px);
  }
}

.hero-banner-main-img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85);
  border: 2px solid rgba(56, 189, 248, 0.4);
  display: block;
}

.telemetry-floating-card {
  position: absolute;
  background: rgba(14, 26, 36, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 10;
  animation: badgeHover 4s infinite ease-in-out alternate;
  white-space: nowrap;
}

.telemetry-top-right {
  top: -16px;
  right: -16px;
  border-color: var(--primary-orange);
  animation-delay: 0.5s;
}

.telemetry-bottom-left {
  bottom: -16px;
  left: -16px;
  border-color: var(--accent-sky-glow);
  animation-delay: 1.5s;
}

@media (max-width: 600px) {
  .telemetry-top-right {
    top: -10px;
    right: 0;
  }
  .telemetry-bottom-left {
    bottom: -10px;
    left: 0;
  }
}

@keyframes badgeHover {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

.radar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
  display: inline-block;
}

.radar-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: radarWave 1.6s infinite ease-out;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ====================================================
   باکس دانلود چندسکویی Karvanro (APK + PWA + iOS)
   ==================================================== */
.download-card {
  background: linear-gradient(145deg, rgba(16, 29, 41, 0.95), rgba(7, 14, 20, 0.98));
  border: 1px solid var(--border-orange);
  border-radius: 28px;
  padding: 36px 28px;
  margin: 30px 0 50px;
  width: 100%;
}

.download-platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.platform-box {
  background: rgba(22, 38, 54, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 26px;
  text-align: center;
  transition: all 0.35s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.platform-box:hover {
  transform: translateY(-6px);
  border-color: var(--primary-orange);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.25);
}

.platform-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(234, 88, 12, 0.3);
}

/* ====================================================
   بخش امکانات و عناوین سکشن‌ها (Features & Headings)
   ==================================================== */
.features-section {
  margin: 60px 0;
  width: 100%;
}

.section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 30px 24px;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-orange);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.custom-svg-icon-frame {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-svg-icon-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-card:hover .custom-svg-icon-frame {
  transform: scale(1.15) rotate(4deg);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ====================================================
   پلن‌های اشتراک Karvanro (Pricing Plans)
   ==================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 30px 0 60px;
}

.plan-card {
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.plan-banner-svg {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}

.plan-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-features-list li {
  font-size: 0.92rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-features-list li::before {
  content: '✔';
  color: var(--accent-sky-glow);
  font-weight: bold;
}

/* ====================================================
   اپلیکیشن تحت وب و محیط کاربری (App Layout)
   ==================================================== */
.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

.trip-badge-header {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(234, 88, 12, 0.16), rgba(2, 132, 199, 0.12));
  border: 1px solid var(--border-orange);
}

.nav-tabs-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(14, 26, 36, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 700;
  transition: all 0.25s ease;
  text-align: right;
  width: 100%;
}

.nav-tab-btn:hover {
  background: rgba(22, 40, 56, 0.85);
  color: var(--text-main);
  border-color: var(--accent-sky-glow);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.3), rgba(2, 132, 199, 0.25));
  color: #fff;
  border-color: var(--primary-orange);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.25);
}

.nav-tab-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* نقشه تعاملی */
#live-map-wrapper {
  height: 540px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-orange);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  position: relative;
}

.map-floating-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 500;
  background: rgba(7, 14, 20, 0.92);
  backdrop-filter: blur(14px);
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
}

/* پلیر شناور رادیو آنلاین */
.floating-radio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 14, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-orange);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2000;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.7);
}

.radio-wave-anim {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
}

.radio-wave-bar {
  width: 4px;
  background: var(--primary-orange);
  border-radius: 2px;
  animation: wavePulse 1.2s infinite ease-in-out alternate;
}

.radio-wave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; background: #fb923c; }
.radio-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 12px; background: #38bdf8; }
.radio-wave-bar:nth-child(4) { animation-delay: 0.6s; height: 18px; background: #0284c7; }

@keyframes wavePulse {
  0% { height: 6px; }
  100% { height: 22px; }
}

/* چت روم */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 560px;
  background: url('../images/chat_bg.jpg') center/cover no-repeat;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.chat-messages-scroll {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(7, 14, 20, 0.82);
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.bubble-mine {
  align-self: flex-start;
  background: linear-gradient(135deg, #c2410c, #9a3412);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble-other {
  align-self: flex-end;
  background: rgba(26, 44, 60, 0.9);
  backdrop-filter: blur(10px);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bubble-sender {
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 4px;
}

.chat-input-bar {
  padding: 16px;
  background: rgba(14, 26, 36, 0.95);
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border-glass);
}

/* ====================================================
   مودال‌ها و پاپ‌آپ‌ها (Modals & Dialogs)
   ==================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: #0c1822;
  border: 1px solid var(--border-orange);
  border-radius: 26px;
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
}
