/* ==============================================================================
   TAYYAR LAYOUT & STRUCTURAL GRID
   ============================================================================== */

/* Reading Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--laser-cyan), var(--laser-cyan-bright), var(--cyber-emerald));
  z-index: 1001;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 10px var(--laser-cyan-glow);
}

/* Site Header & Navigation Bar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-header);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--laser-cyan-glow));
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-arabic-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--laser-cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Main Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover {
  color: var(--laser-cyan);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--laser-cyan);
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 8px var(--laser-cyan);
}

.nav-link:hover::after {
  width: 100%;
}

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

/* Main Content Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Section Shells */
.section-py {
  padding-top: 100px;
  padding-bottom: 100px;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 64px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--laser-cyan-dim);
  border: 1px solid var(--laser-cyan-border);
  border-radius: var(--radius-full);
  color: var(--laser-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: 2.35rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.08rem;
  color: var(--text-secondary);
}

/* Responsive Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Footer Section */
.site-footer {
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
  padding-top: 80px;
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 380px;
  font-size: 0.92rem;
}

.footer-dev-badge {
  display: inline-flex;
  flex-direction: column;
  margin-top: 24px;
  padding: 12px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
}

.footer-dev-badge .dev-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-dev-badge .dev-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--laser-cyan);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--laser-cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Mobile Navigation Hamburger & Drawer */
.btn-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

.btn-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background 0.2s ease;
}

.btn-mobile-toggle span::before,
.btn-mobile-toggle span::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  left: 0;
  transition: transform 0.25s ease;
}

.btn-mobile-toggle span::before {
  top: -6px;
}

.btn-mobile-toggle span::after {
  bottom: -6px;
}

.btn-mobile-toggle.open span {
  background: transparent;
}

.btn-mobile-toggle.open span::before {
  transform: rotate(45deg);
  top: 0;
}

.btn-mobile-toggle.open span::after {
  transform: rotate(-45deg);
  bottom: 0;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 998;
}

.mobile-nav-backdrop.active {
  display: block;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-surface);
  border-inline-start: 1px solid var(--border-laser);
  z-index: 999;
  padding: 84px 24px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[dir="rtl"] .mobile-nav-drawer {
  left: 0;
  transform: translateX(-100%);
  border-right: 1px solid var(--border-laser);
}

[dir="ltr"] .mobile-nav-drawer {
  right: 0;
  transform: translateX(100%);
  border-left: 1px solid var(--border-laser);
}

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

.mobile-nav-drawer .nav-link {
  font-size: 1.05rem;
  padding: 8px 0;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .desktop-nav {
    display: none;
  }
  .btn-mobile-toggle {
    display: flex;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  .section-py {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
