/* ============================================================
   base.css — shared styles loaded on EVERY user page
   Includes: reset, fonts, body, navbar, footer, utilities
   ============================================================ */

/* ── Scale: make 80% zoom the default at 100% browser zoom ── */
html { zoom: 0.8; }

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

/* ── Fonts ── */
@font-face {
  font-family: "Hacen Maghreb Bd";
  src: url("../../fonts/user/Hacen-Maghreb-Bd.ttf") format("truetype");
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: "29lbukra";
  src: url("../../fonts/user/29ltbukraregular.otf") format("truetype");
  font-weight: 100; font-style: normal;
}
@font-face {
  font-family: "Bahij";
  src: url("../../fonts/user/Bahij_TheSansArabic-Bold.ttf") format("truetype");
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: "Hayah";
  src: url("../../fonts/user/Hayah.otf") format("truetype");
  font-style: normal;
}
@font-face {
  font-family: "Hacen Maghreb";
  src: url("../../fonts/user/Hacen-Maghreb.ttf") format("truetype");
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: "Hacen Saudi Arabia";
  src: url("../../fonts/user/Hacen Saudi Arabia.ttf") format("truetype");
  font-weight: 400; font-style: normal;
}

/* ── Base ── */
body {
  background-color: #A1A1A133;
  overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
  width: 95%;
  margin: 0 auto;
  height: 90px;
  background-color: #46348B;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 1px;
}

.navbar-button {
  background-color: #fff;
  width: 165px;
  height: 41px;
  border: none;
  border-radius: 15px;
  padding: 24px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "29lbukra";
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  cursor: pointer;
}

/* ── Hamburger menu ── */
.navbar-menu {
  position: relative;
  margin-right: 12px;
}

.navbar-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  cursor: pointer;
  padding: 8px 7px;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.navbar-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #F8E2AF;
}
.navbar-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.navbar-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown panel */
.navbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(70, 52, 139, 0.22);
  overflow: hidden;
  z-index: 9999;
  animation: dropdownFadeIn 0.18s ease;
}
.navbar-dropdown.open { display: block; }

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

.navbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: "29lbukra", sans-serif;
  font-size: 18px;
  color: #333;
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s;
  direction: rtl;
  text-align: right;
}
.navbar-dropdown-item:hover {
  background: #f0ecf8;
  color: #46348B;
}
.navbar-dropdown-item--cta {
  color: #46348B;
  font-weight: bold;
}
.navbar-dropdown-item--cta:hover {
  background: #ede9f8;
  color: #46348B;
}
.navbar-dropdown-item--danger { color: #c0392b; }
.navbar-dropdown-item--danger:hover {
  background: #fdecea;
  color: #c0392b;
}
.navbar-dropdown-form { margin: 0; padding: 0; }

.div-button {
  width: 50%;
  padding: 0 50px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.perfix-div {
  display: flex;
  align-items: center;
  width: 50%;
}

.perfix-div h1 {
  font-family: "Bahij";
  font-weight: 500;
  color: white;
  font-size: 32px;
  line-height: 100%;
  letter-spacing: 0%;
}

.perfix-div span { color: #F8E2AF; }

.line {
  height: 70px;
  width: 5px;
  background-color: #fff;
  margin: 0 10px 0 0;
}

.perfix-div img {
  padding: 8px 0 0;
  width: 198px;
  height: 102px;
  opacity: 1;
}

/* ── Site Footer ── */
.footer {
  width: 100%;
  background-color: #46348B;
  min-height: 284px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.center div {
  width: 450px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.link {
  font-family: "Hacen Maghreb Bd";
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;
  text-decoration: none;
  color: white;
}

.socal {
  margin-top: 10px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 450px;
  gap: 13px;
}

/* ── Utility classes ── */
.cta-link-reset,
.cta-link-reset:hover,
.cta-link-reset:focus,
.cta-link-reset:active {
  text-decoration: none !important;
  color: #000 !important;
}

.card-link-reset,
.card-link-reset:hover,
.card-link-reset:focus,
.card-link-reset:active {
  text-decoration: none;
  color: inherit;
  display: block;
}

.site-scale-wrapper {
  width: min(100%, 1160px);
  margin: 0 auto;
}

/* ── Responsive: Navbar ── */
@media (max-width: 1024px) {
  .navbar { padding: 0 20px; flex-wrap: nowrap; height: 78px; }
  .perfix-div { width: auto; flex: 1; }
  .perfix-div h1 { font-size: 22px; }
  .perfix-div img { width: 130px; height: 70px; }
  .div-button { width: auto; padding: 0; flex-shrink: 0; }
}

@media (max-width: 768px) {
  .navbar { flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 0 12px; height: 64px; }
  .perfix-div { width: auto; flex: 1; min-width: 0; gap: 6px; }
  .perfix-div h1 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .perfix-div img { width: 72px; height: auto; flex-shrink: 0; }
  .line { height: 36px; width: 3px; margin: 0 6px 0 0; flex-shrink: 0; }
  .div-button { width: auto; padding: 0; gap: 8px; flex-shrink: 0; }
  .navbar-button { width: auto; font-size: 13px; padding: 0 14px; height: 36px; white-space: nowrap; border-radius: 10px; }
  .navbar-menu-toggle { width: 36px; height: 36px; border-radius: 9px; }
  .navbar-dropdown { left: auto; right: 0; }
}

@media (max-width: 400px) {
  .perfix-div h1 { display: none; }
  .line { display: none; }
  .navbar-button { font-size: 12px; padding: 0 10px; height: 34px; }
}

/* ── Responsive: Footer ── */
@media (max-width: 1024px) {
  .footer { min-height: auto; padding: 24px 16px; }
  .center div { width: 100%; flex-wrap: wrap; gap: 10px; }
  .socal { width: 100%; }
}

@media (max-width: 768px) {
  .footer { padding: 20px 10px; }
  .center div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .link { text-align: center; margin: 4px 0; }
  .socal { width: 100%; flex-wrap: wrap; }
}
