@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

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

:root {
  --paper: #fdfbf7;
  --paper-alt: #f5f5f5;
  --ink: #1a1a1a;
  --ink-mid: #3a3a3a;
  --ink-light: #6a6a6a;
  --border: #d0cdc8;
  --border-light: #e8e5e0;
  --sidebar-w: 220px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(26,26,26,0.08), 0 1px 3px rgba(26,26,26,0.05);
  --font-serif: 'Noto Naskh Arabic', Georgia, 'Times New Roman', serif;
  --font-sans: 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.layout-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-right: 2px solid var(--ink);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 0 1.5rem;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem 1.75rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(253,251,247,0.15);
  margin-bottom: 1.5rem;
}

.site-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo-text-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 0 0.75rem;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.875rem;
  color: rgba(253,251,247,0.82);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 5px;
  min-height: 40px;
  letter-spacing: 0.01em;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: rgba(253,251,247,0.1);
  color: var(--paper);
  outline: none;
}

.sidebar-cta {
  padding: 1.5rem 1rem 0.5rem;
  border-top: 1px solid rgba(253,251,247,0.15);
  margin-top: 1rem;
}

/* ===== 主内容区 ===== */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== Hero ===== */
.hero-block {
  position: relative;
  min-height: 70vh;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-inner {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3.5rem 4rem 7rem;
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-media {
  flex-shrink: 0;
  width: 260px;
  height: 300px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(253,251,247,0.15);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(253,251,247,0.78);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-btn {
  font-size: 1rem;
}

.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--paper);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

/* ===== 主内容 ===== */
.site-main {
  padding: 3.5rem 4rem 5rem;
  flex: 1;
}

.main-article {
  max-width: 820px;
}

.content-section {
  min-width: 0;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 3.5rem 0 0.5rem;
  padding-top: 3rem;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 80px;
  letter-spacing: -0.01em;
}

.content-section h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content-section .subtitle,
.content-section .subhead,
.content-section .desc,
.content-section .lead {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.content-section p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.175rem;
  font-weight: 600;
  margin: 2rem 0 0.625rem;
  color: var(--ink);
}

.content-section ul,
.content-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.content-section a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-section a:hover {
  opacity: 0.65;
}

.content-section div {
  scroll-margin-top: 80px;
  padding-bottom: 2rem;
  margin-bottom: 1rem;
}

.content-section dt {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.0625rem;
  margin-top: 1.5rem;
  margin-bottom: 0.375rem;
  color: var(--ink);
}

.content-section dd {
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--ink-mid);
  line-height: 1.8;
}

.content-section .card,
.content-section article {
  background: var(--paper-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid var(--paper);
  min-height: 44px;
  letter-spacing: 0.02em;
}

.btn-primary:hover,
.btn-primary:focus {
  background: transparent;
  color: var(--paper);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.sidebar-cta .btn-primary {
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
}

.sidebar-cta .btn-primary:hover {
  background: rgba(253,251,247,0.12);
  color: var(--paper);
  border-color: var(--paper);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 0;
  border-top: 3px solid var(--ink);
}

.footer-cta-block {
  text-align: center;
  padding: 3.5rem 2rem 3rem;
  background: var(--ink);
  border-bottom: 1px solid rgba(253,251,247,0.12);
}

.footer-cta-label {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.25rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid var(--paper);
  min-height: 44px;
  letter-spacing: 0.02em;
}

.footer-cta-btn:hover {
  background: transparent;
  color: var(--paper);
}

.footer-nav {
  padding: 3rem 3rem 2rem;
  border-bottom: 1px solid rgba(253,251,247,0.12);
}

.footer-nav-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(253,251,247,0.45);
  margin-bottom: 1.25rem;
}

.footer-nav-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem 2rem;
}

.footer-nav-list dt {
  grid-column: 1 / -1;
}

.footer-nav-list dd {
  margin: 0;
}

.footer-nav-list a {
  color: rgba(253,251,247,0.72);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  padding: 0.3rem 0;
  min-height: 40px;
}

.footer-nav-list a:hover {
  color: var(--paper);
}

.footer-address {
  padding: 2rem 3rem 1rem;
  font-style: normal;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: rgba(253,251,247,0.6);
}

.footer-brand {
  font-weight: 600;
  color: var(--paper);
}

.footer-contact {
  color: rgba(253,251,247,0.6);
  text-decoration: none;
}

.footer-contact:hover {
  color: var(--paper);
}

.footer-links {
  list-style: none;
  padding: 0 3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-links li a {
  color: rgba(253,251,247,0.55);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-links li a:hover {
  color: var(--paper);
}

.footer-bottom {
  padding: 1.25rem 3rem 2rem;
  border-top: 1px solid rgba(253,251,247,0.10);
  text-align: center;
}

.copyright {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: rgba(253,251,247,0.45);
  margin-bottom: 0.375rem;
}

.footer-note {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(253,251,247,0.3);
}

/* ===== 汉堡按钮 ===== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper);
  border-radius: 1px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.5);
  z-index: 150;
}

.sidebar-overlay.active {
  display: block;
}

/* ===== 移动端 ===== */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -240px;
    width: 240px;
    z-index: 200;
  }

  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(26,26,26,0.25);
  }

  .main-wrap {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    flex-direction: column;
    padding: 2.5rem 1.5rem 6rem;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero-block {
    min-height: auto;
  }

  .hero-media {
    width: 100%;
    height: 200px;
    order: 2;
  }

  .hero-content {
    order: 1;
  }

  .site-main {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .footer-nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-nav {
    padding: 2rem 1.5rem 1.5rem;
  }

  .footer-address {
    padding: 1.5rem 1.5rem 0.75rem;
  }

  .footer-links {
    padding: 0 1.5rem 1.25rem;
  }

  .footer-bottom {
    padding: 1rem 1.5rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .hero-h1 {
    font-size: 1.5rem;
  }

  .footer-nav-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
  }

  .footer-cta-block {
    padding: 2.5rem 1.25rem 2rem;
  }

  .footer-cta-label {
    font-size: 1.125rem;
  }

  .content-section h2 {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
