/* ═══════════════════════════════════════════════
   Header + Footer + Bottom Nav Styles
   Tesmino Academy — Figma-accurate
═══════════════════════════════════════════════ */

/* ─── HEADER ─────────────────────────────────── */
.acad-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(247, 249, 254, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e4e4e7;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  width: 100%;
  height: 64px;
}

/* Logo */
.acad-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.acad-header-logo-img {
  width: 36px; height: 36px;
  border-radius: 10px;
}

.acad-header-logo-fallback {
  display: none;
  width: 36px; height: 36px;
  background: #E71838;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acad-header-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #283249;
  white-space: nowrap;
}

/* Nav (desktop) */
.acad-header-nav {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.acad-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #283249;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  background: none;
  font-family: var(--font-base);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.acad-nav-link:hover { background: #f0f2f8; }
.acad-nav-link.active { color: #E71838; font-weight: 600; background: #fff0f2; }
.acad-nav-has-dropdown { position: relative; }

/* Dropdown */
.acad-nav-dropdown { position: relative; }

.acad-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 280px;
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.acad-nav-dropdown.open .acad-nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.acad-nav-dropdown.open .acad-nav-link i[data-lucide="chevron-down"] {
  transform: rotate(180deg);
}

.acad-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: #283249;
  transition: background 0.15s;
}

.acad-dropdown-item:hover { background: #f7f9fe; }

.acad-dropdown-item--simple {
  gap: 8px;
  font-size: 14px;
  padding: 10px 16px;
}

.acad-dropdown-item-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.acad-dropdown-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #283249;
}

.acad-dropdown-item-desc {
  font-size: 12px;
  color: #91A0C3;
  margin-top: 2px;
  line-height: 1.4;
}

/* Search */
.acad-header-search {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  position: relative;
}

.acad-header-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.acad-header-search-wrap:focus-within {
  border-color: #283249;
  box-shadow: 0 0 0 3px rgba(40,50,73,0.08);
}

.acad-header-search-input {
  flex: 1;
  font-size: 14px;
  font-family: var(--font-base);
  color: #283249;
  text-align: right;
  direction: rtl;
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
}

.acad-header-search-input::placeholder { color: #91A0C3; }
.acad-header-search-icon { width: 18px; height: 18px; color: #91A0C3; flex-shrink: 0; }

/* Search results dropdown */
.acad-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 400;
  max-height: 360px;
  overflow-y: auto;
}

/* Actions */
.acad-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-right: auto;
}

.acad-header-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #546999;
  transition: background 0.15s, color 0.15s;
  position: relative;
  text-decoration: none;
}
.acad-header-icon-btn:hover { background: #f0f2f8; color: #283249; }

.acad-cart-badge {
  position: absolute;
  top: 3px; right: 3px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: #E71838;
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-num);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid white;
}

.acad-notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E71838;
  border: 2px solid white;
}

/* User avatar */
.acad-user-avatar-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
}

.acad-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff0f2;
  color: #E71838;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #E71838;
}

/* Login button */
.acad-header-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #E71838;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-base);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.acad-header-login-btn:hover { background: #C8152F; }

/* Mobile menu button */
.acad-mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  color: #546999;
  border-radius: 10px;
  transition: background 0.15s;
}
.acad-mobile-menu-btn:hover { background: #f0f2f8; }

/* ── Mobile Drawer ────────────────────────────── */
.acad-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18,18,31,0.4);
  backdrop-filter: blur(2px);
  z-index: 400;
}

.acad-mobile-overlay.open { display: block; }

.acad-mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  overflow-y: auto;
}

.acad-mobile-drawer.open { transform: translateX(0); }

.acad-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e4e4e7;
  flex-shrink: 0;
}

.acad-mobile-nav {
  padding: 8px 12px;
  flex: 1;
}

.acad-mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #546999;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.acad-mobile-nav-item svg { width: 20px; height: 20px; }
.acad-mobile-nav-item:hover { background: #f7f9fe; color: #283249; }
.acad-mobile-nav-item.active { background: #fff0f2; color: #E71838; font-weight: 600; }

/* ── Mobile Search Overlay ────────────────────── */
.acad-mobile-search {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 600;
  display: flex;
  flex-direction: column;
}

.acad-mobile-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e4e7;
}

.acad-mobile-search-input {
  flex: 1;
  font-size: 15px;
  font-family: var(--font-base);
  color: #283249;
  text-align: right;
  direction: rtl;
  border: none;
  outline: none;
  background: transparent;
}

.acad-mobile-search-input::placeholder { color: #91A0C3; }

.acad-mobile-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* ─── FOOTER ──────────────────────────────────── */
.acad-footer {
  background: #12121F;
  color: rgba(255,255,255,0.7);
  direction: rtl;
}

.acad-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

/* Brand col */
.acad-footer-brand {}

.acad-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
}

.acad-footer-logo-icon {
  width: 40px; height: 40px;
  background: #E71838;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.acad-footer-about {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 20px;
}

.acad-footer-socials {
  display: flex;
  gap: 8px;
}

.acad-footer-social {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.acad-footer-social:hover { background: #E71838; color: white; }

/* Link columns */
.acad-footer-col {}

.acad-footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.acad-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acad-footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.acad-footer-links a:hover { color: white; }

/* Bottom bar */
.acad-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.acad-footer-bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.acad-footer-bottom-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.acad-footer-bottom-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}
.acad-footer-bottom-links a:hover { color: white; }

/* ─── BOTTOM NAV ──────────────────────────────── */
.acad-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: white;
  border-top: 1px solid #e4e4e7;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.acad-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: #91A0C3;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  transition: color 0.15s;
  border: none;
  background: none;
  font-family: var(--font-base);
}

.acad-bottom-item svg { width: 22px; height: 22px; }
.acad-bottom-item.active { color: #E71838; }

.acad-bottom-fab {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #E71838;
  color: white;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(231,24,56,0.35);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-bottom: 18px;
  text-decoration: none;
}
.acad-bottom-fab:hover { background: #C8152F; transform: scale(1.05); }

/* ─── Desktop overrides ──────────────────────── */
@media (min-width: 1024px) {
  .acad-header { padding: 0 40px; height: 72px; gap: 20px; }
  .acad-header-nav { display: flex; }
  .acad-mobile-menu-btn { display: none; }
  .acad-header-search { max-width: 320px; }
  .acad-header-actions { margin-right: 0; }
  .acad-bottom-nav { display: none !important; }

  .acad-footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
  }
}

@media (max-width: 1023px) {
  .acad-bottom-nav { display: flex; }
  body { padding-bottom: 68px; }
}

@media (max-width: 480px) {
  .acad-header-logo-text { display: none; }
  .acad-header { padding: 0 14px; }
}
