/* ==========================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================== */
:root {
  /* Color Palette (Brand-specific) */
  --brand-blue: #0f349c;
  --brand-blue-glow: rgba(15, 52, 156, 0.4);
  --brand-yellow: #ffc700;
  --brand-yellow-glow: rgba(255, 199, 0, 0.3);
  
  /* Light Theme Colors (Default) */
  --bg-dark: #f4f7fc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --card-border: rgba(15, 52, 156, 0.08);
  --card-border-hover: rgba(15, 52, 156, 0.2);
  
  --text-primary: #0b1530;
  --text-secondary: #3b4e7a;
  --text-muted: #5c72a6;
  
  --scrollbar-track: #e4ebf5;
  --scrollbar-thumb: rgba(15, 52, 156, 0.15);
  --scrollbar-thumb-hover: var(--brand-blue);
  
  /* Layout & Sizing */
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --max-width: 580px;
  
  /* Fonts */
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  
  color-scheme: light;
}



/* ==========================================
   RESET & FOUNDATIONS
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-ar);
  min-height: 100dvb;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 1rem;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Language font-family override */
html[lang="en"] body {
  font-family: var(--font-en);
}

/* Lang display logic */
html[lang="ar"] [lang="en"] {
  display: none !important;
}
html[lang="en"] [lang="ar"] {
  display: none !important;
}

/* ==========================================
   PREMIUM BACKGROUND GLOWS (ANIMATED)
   ========================================== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: multiply;
}



.bg-glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--brand-blue) 0%, transparent 70%);
  top: -10%;
  inset-inline-start: -10%;
  animation: floatGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--brand-yellow) 0%, transparent 70%);
  bottom: 10%;
  inset-inline-end: -10%;
  animation: floatGlow 20s infinite alternate-reverse ease-in-out;
}

.bg-glow-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #3a5ba0 0%, transparent 70%);
  top: 40%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  animation: pulseGlow 12s infinite alternate ease-in-out;
}

@keyframes floatGlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.15); }
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.65; }
}

/* ==========================================
   APP SHELL CONTAINER
   ========================================== */
.app-container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 1;
}

/* ==========================================
   FLOATING HEADER & TOP BAR
   ========================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}

.btn-icon {
  background: rgba(15, 52, 156, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}



.btn-icon:hover {
  background: rgba(15, 52, 156, 0.08);
  border-color: var(--brand-blue);
  box-shadow: 0 0 12px var(--brand-blue-glow);
  transform: translateY(-2px);
}



.btn-icon .lang-text {
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
}



/* ==========================================
   MAIN PREMIUM CARD
   ========================================== */
.main-card {
  background: var(--bg-card);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}



@media (max-width: 480px) {
  .main-card {
    padding: 1.75rem 1rem;
  }
  body {
    padding: 0.75rem 0.35rem;
  }
  .brand-title {
    font-size: 1.65rem;
  }
  .brand-tagline {
    font-size: 0.9rem;
  }
  .section-title {
    font-size: 1.2rem;
  }
  .tab-btn {
    padding: 0.6rem 0.25rem;
    font-size: 0.8rem;
  }
  .tab-btn i {
    font-size: 0.95rem;
  }
  .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }
  .product-item {
    padding: 1rem;
    gap: 1rem;
  }
  .contact-card {
    padding: 0.9rem 1rem;
    gap: 1rem;
  }
  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .card-label {
    font-size: 0.85rem;
  }
  .card-value {
    font-size: 0.8rem;
  }
  .qr-dialog {
    padding: 1.5rem 1rem;
  }
  .qr-image-wrapper {
    width: 180px;
    height: 180px;
  }
}

/* ==========================================
   PROFILE SECTION (HEADER OF THE CARD)
   ========================================== */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-block-end: 2rem;
}

.logo-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: none;
  border: none;
  margin-block-end: 1rem;
  transition: transform var(--transition-normal);
}

.logo-wrapper:hover {
  transform: scale(1.08) rotate(3deg);
}

.brand-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(15, 52, 156, 0.12));
}



.brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-block-end: 0.25rem;
  background: linear-gradient(135deg, var(--brand-blue) 45%, #d69e00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}



.brand-tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-blue);
  letter-spacing: 1px;
  margin-block-end: 1.25rem;
}



.badges-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--card-border);
}

.badge-primary {
  background: rgba(15, 52, 156, 0.08);
  color: var(--brand-blue);
  border-color: rgba(15, 52, 156, 0.15);
}



.badge-secondary {
  background: rgba(255, 199, 0, 0.15);
  color: #b58c00;
  border-color: rgba(255, 199, 0, 0.3);
}



/* ==========================================
   NAVIGATION TABS
   ========================================== */
.tabs-nav {
  display: flex;
  background: rgba(15, 52, 156, 0.04);
  border: 1px solid var(--card-border);
  padding: 4px;
  border-radius: var(--border-radius-md);
  margin-block-end: 1.75rem;
}



.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: calc(var(--border-radius-md) - 3px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.tab-btn i {
  font-size: 1.05rem;
}

.tab-btn:hover {
  color: var(--brand-blue);
  background: rgba(15, 52, 156, 0.03);
}



.tab-btn.active {
  background: #ffffff;
  color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(15, 52, 156, 0.08);
}



/* ==========================================
   TABS PANES & FADE EFFECTS
   ========================================== */
.tabs-content {
  position: relative;
}

.tab-pane {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.tab-pane.active {
  display: block;
}

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

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-block-end: 0.75rem;
  color: var(--text-primary);
  border-inline-start: 4px solid var(--brand-blue);
  padding-inline-start: 0.75rem;
}



.desc-paragraph {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-block-end: 1.5rem;
}

.text-center {
  text-align: center;
}

/* ==========================================
   TAB 1: ABOUT - FEATURES GRID
   ========================================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  background: rgba(15, 52, 156, 0.02);
  border: 1px solid rgba(15, 52, 156, 0.05);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}



.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 52, 156, 0.2);
  background: rgba(15, 52, 156, 0.04);
}



.feature-icon {
  font-size: 1.5rem;
  color: var(--brand-blue);
  margin-block-end: 0.75rem;
  display: inline-block;
}



.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-block-end: 0.4rem;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================
   TAB 2: PRODUCTS
   ========================================== */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-block-start: 1rem;
}

.product-item {
  display: flex;
  gap: 1.25rem;
  background: rgba(15, 52, 156, 0.02);
  border: 1px solid rgba(15, 52, 156, 0.05);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  align-items: center;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.product-item:hover {
  border-color: var(--card-border-hover);
  background: rgba(15, 52, 156, 0.04);
  transform: scale(1.01);
}

.product-item:hover .arrow-icon {
  color: var(--text-primary);
  transform: translateX(-4px);
}

html[lang="en"] .product-item:hover .arrow-icon {
  transform: rotate(180deg) translateX(-4px);
}



.product-img-wrapper {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background: rgba(15, 52, 156, 0.05);
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
}



.product-illustration {
  font-size: 1.85rem;
  color: var(--brand-blue);
}



.product-illustration.pasteurized {
  color: #4dc3ff;
}

.product-illustration.powder {
  color: #ff9d4d;
}

.product-info {
  flex-grow: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-block-end: 0.3rem;
  color: var(--text-primary);
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-block-end: 0.5rem;
}

.product-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(15, 52, 156, 0.06);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}



@media (max-width: 440px) {
  .product-item {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* ==========================================
   TAB 3: CONTACT CARDS GRID
   ========================================== */
.contact-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-block-start: 1.25rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 52, 156, 0.06);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}



.contact-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 15px rgba(15, 52, 156, 0.06);
}



.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  color: #ffffff;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.contact-card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
}

.card-details {
  flex-grow: 1;
}

.card-label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-block-end: 0.15rem;
}

.card-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.phone-link {
  color: inherit;
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
  color: var(--brand-yellow);
}

.arrow-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

/* Flip Chevron for English mode */
html[lang="en"] .arrow-icon {
  transform: rotate(180deg);
}

.contact-card:hover .arrow-icon {
  color: var(--text-primary);
  transform: translateX(-4px);
}

html[lang="en"] .contact-card:hover .arrow-icon {
  transform: rotate(180deg) translateX(-4px);
}

/* Brand Colors Customization for Contact Cards */
.contact-card.whatsapp {
  border-inline-start: 4px solid #25d366;
}
.contact-card.whatsapp .card-icon {
  background: #25d366;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.3);
}

.contact-card.phone {
  border-inline-start: 4px solid #00c6ff;
}
.contact-card.phone .card-icon {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  box-shadow: 0 0 15px rgba(0, 198, 255, 0.3);
}

.contact-card.landline {
  border-inline-start: 4px solid #90caf9;
  cursor: default;
}
.contact-card.landline .card-icon {
  background: #1976d2;
}

.contact-card.email {
  border-inline-start: 4px solid #0f349c;
}
.contact-card.email .card-icon {
  background: var(--brand-blue);
  box-shadow: 0 0 15px var(--brand-blue-glow);
}

.contact-card.facebook {
  border-inline-start: 4px solid #1877f2;
}
.contact-card.facebook .card-icon {
  background: #1877f2;
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.3);
}

.contact-card.instagram {
  border-inline-start: 4px solid #f81e64;
}
.contact-card.instagram .card-icon {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
  box-shadow: 0 0 15px rgba(214, 36, 159, 0.3);
}

.contact-card.map {
  border-inline-start: 4px solid #ea4335;
}
.contact-card.map .card-icon {
  background: #ea4335;
  box-shadow: 0 0 15px rgba(234, 67, 53, 0.3);
}

.contact-card.website {
  border-inline-start: 4px solid var(--brand-yellow);
}
.contact-card.website .card-icon {
  background: var(--brand-yellow);
  color: #070e24;
  box-shadow: 0 0 15px var(--brand-yellow-glow);
}

/* Copy Email Actions */
.btn-copy {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast);
}

.btn-copy:hover {
  color: var(--brand-yellow);
}

.copy-tooltip {
  position: absolute;
  top: -12px;
  inset-inline-end: 15px;
  background: var(--brand-yellow);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  transform: translateY(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.copy-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   APP FOOTER
   ========================================== */
.app-footer {
  text-align: center;
  padding: 0.5rem 0;
}

.copyright-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==========================================
   MODAL DIALOG (QR CODE DISPLAY)
   ========================================== */
.qr-dialog {
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 
    0 25px 50px rgba(15, 52, 156, 0.08),
    0 0 40px rgba(15, 52, 156, 0.05);
  margin: auto;
  max-width: calc(100% - 2rem);
  width: 380px;
  padding: 2rem;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: var(--text-primary);
  overflow: visible;
}



.qr-dialog::backdrop {
  background: rgba(15, 52, 156, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}



/* Dialog content styles */
.dialog-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.btn-close {
  position: absolute;
  top: -10px;
  inset-inline-end: -10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 52, 156, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}



.btn-close:hover {
  background: rgba(15, 52, 156, 0.1);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}



.dialog-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-block-end: 0.5rem;
  color: var(--text-primary);
}

.dialog-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-block-end: 1.5rem;
}

.qr-image-wrapper {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-block-end: 1.75rem;
  border: 4px solid var(--brand-blue);
  width: 200px;
  height: 200px;
}



.qr-image-file {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-download {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--brand-blue);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}



.btn-download:hover {
  background: #0b2570;
  box-shadow: 0 0 20px var(--brand-blue-glow);
  transform: translateY(-2px);
}



/* Animation for Dialog Open */
.qr-dialog[open] {
  animation: modalScaleUp var(--transition-normal) forwards;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Phone numbers layout fix (LTR display under RTL layout) */
.phone-number {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}
