/* Global logo sizing (applies across all pages).
   Uses max dimensions to preserve aspect ratio and prevent header/nav overlap. */

:root{
  --logo-max-h-desktop: 44px;
  --logo-max-h-tablet: 40px;
  --logo-max-h-mobile: 34px;

  --logo-max-w-desktop: 170px;
  --logo-max-w-tablet: 150px;
  --logo-max-w-mobile: 130px;

  --logo-gap: 10px;

  /* ── SaaS Design System (Homepage + shared UI) ── */
  --c-primary: #2D9CDB;
  --c-dark: #0F172A;
  --c-text: #1E293B;
  --c-muted: #64748B;
  --c-body: #475569;
  --c-bg: #F8FAFC;
  --c-card: #FFFFFF;
  --c-border: #E2E8F0;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.10);
  --radius-lg: 16px;
  --section-py: 100px;
  --section-py-mobile: 60px;
  --grid-gap: 28px;
}

/* Global font consistency */
html, body{
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
html{
  scroll-behavior: smooth;
}
body{
  color: var(--c-text);
  background: var(--c-bg);
}
button, input, select, textarea{
  font-family: inherit;
}
h1, h2, h3, h4, h5, h6{
  font-family: inherit;
}
*, *::before, *::after{
  font-family: inherit;
}

/* ── Buttons (shared) ── */
.btn-primary{
  background: var(--c-primary);
  color: #fff;
  border: 2px solid var(--c-primary);
  border-radius: 12px;
  padding: 12px 28px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover{
  transform: translateY(-1px);
  filter: saturate(1.05);
}
.btn-secondary{
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
  border-radius: 12px;
  padding: 12px 28px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary:hover{
  background: rgba(45,156,219,0.08);
  transform: translateY(-1px);
}

/* ── Scroll reveal animation (shared) ── */
.reveal{
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible{
  opacity: 1;
  transform: translateY(0);
}

/* ── Section title accent line ── */
.section-accent{
  width: 48px;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
  margin: 12px auto 24px;
}

/* Mobile menu panel visibility (unified header pattern) */
@media (max-width: 768px){
  /* Disable header blur/glass while menu is open */
  body.menu-open header{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
  }

  /* Force SOLID mobile dropdown background across pages */
  .nav-center.active,
  #navCenter.active,
  .nav-links.active{
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    opacity: 1 !important;
    box-shadow: 0 18px 40px rgba(0,0,0,0.14) !important;
    z-index: 9999 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
  }
  /* Keep consistent spacing for the opened panel */
  .nav-center.active,
  #navCenter.active{
    padding: 22px 18px !important;
  }
  .nav-center.active a,
  .nav-center.active .lang-btn,
  .nav-links.active a,
  .nav-links.active .lang-btn{
    color: #111111 !important;
  }

  /* Mobile nav action buttons: ensure visible contrast */
  .mob-actions a:last-child,
  #navCenter .btn-contact,
  .nav-center .btn-contact,
  #navCenter a[href*="contact"],
  .nav-center a[href*="contact"],
  #navCenter a[href*="wa.me"],
  .nav-center a[href*="wa.me"]{
    background: #0F172A !important;
    color: #ffffff !important;
    border: none !important;
  }

  .mob-actions a:first-child,
  #navCenter .btn-login,
  .nav-center .btn-login,
  #navCenter a[href*="login"],
  .nav-center a[href*="login"],
  #navCenter a[href*="register"],
  .nav-center a[href*="register"]{
    background: #2D9CDB !important;
    color: #ffffff !important;
    border: none !important;
  }
}

/* Any logo image (login/register cards, headers, etc.) */
.logo img{
  display:block;
  width:auto;
  height:auto;
  max-height:var(--logo-max-h-desktop);
  max-width:var(--logo-max-w-desktop);
  object-fit:contain;
}

/* Header logo (common layout: <div class="logo"><a><img .../></a></div>) */
header .logo{
  display:flex;
  align-items:center;
  gap:var(--logo-gap);
  flex:0 0 auto;
  min-width:0;
}

header .logo a{
  display:inline-flex;
  align-items:center;
  line-height:0;
}

header .logo img{
  max-height:var(--logo-max-h-desktop);
  max-width:var(--logo-max-w-desktop);
}

/* Sidebar logo (dashboard layout) */
.sidebar .logo img{
  display:block;
  width:auto;
  height:auto;
  max-height:52px;
  max-width:190px;
  object-fit:contain;
}

/* Tablet */
@media (max-width: 1024px){
  .logo img{
    max-height:var(--logo-max-h-tablet);
    max-width:var(--logo-max-w-tablet);
  }
  header .logo img{
    max-height:var(--logo-max-h-tablet);
    max-width:var(--logo-max-w-tablet);
  }
  .sidebar .logo img{
    max-height:48px;
    max-width:180px;
  }
}

/* Mobile */
@media (max-width: 768px){
  .logo img{
    max-height:var(--logo-max-h-mobile);
    max-width:var(--logo-max-w-mobile);
  }
  header .logo img{
    max-height:var(--logo-max-h-mobile);
    max-width:var(--logo-max-w-mobile);
  }
  .sidebar .logo img{
    max-height:42px;
    max-width:160px;
  }
}

