
:root {
  --adabi-bg: #f8f4ec;
  --adabi-surface: #fffdf9;
  --adabi-surface-2: #f4ede2;
  --adabi-dark: #2f241c;
  --adabi-text: #5b4a3f;
  --adabi-muted: #806d60;
  --adabi-gold: #b28a52;
  --adabi-red: #7a3b2e;
  --adabi-red-deep: #633024;
  --adabi-border: rgba(178, 138, 82, 0.22);
  --shadow-sm: 0 8px 24px rgba(47, 36, 28, 0.07);
  --shadow-md: 0 18px 45px rgba(47, 36, 28, 0.1);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

html { scroll-behavior: smooth; }
body.front-site {
  font-family: "Bahij Palatino Sans Arabic", "BahijPalatinoSansArabic-Regular", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(178,138,82,0.08), transparent 25%),
    linear-gradient(180deg, #fbf8f2 0%, #f4ede2 100%);
  color: var(--adabi-text);
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img { max-width: 100%; }
main#app.page-shell { min-height: calc(100vh - 220px); padding: 104px 0 32px; }
.container[dir="rtl"], [dir="rtl"] { text-align: right; }
.form-label { color: var(--adabi-dark); font-weight: 700; margin-bottom: 8px; }
.form-control, .form-select {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--adabi-border);
  background: #fff;
  color: var(--adabi-dark);
  box-shadow: none;
}
.form-control::placeholder { color: #9a8879; }
.form-control:focus, .form-select:focus {
  border-color: var(--adabi-gold);
  box-shadow: 0 0 0 0.18rem rgba(178,138,82,0.12);
}
.input-icon-group { position: relative; }
.input-icon-group i {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--adabi-gold); z-index: 2; font-size: .95rem;
}
.input-icon-group .form-control, .input-icon-group .form-select { padding-right: 42px; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  padding: 14px 0;
  backdrop-filter: blur(12px);
  background: rgba(248,244,236,.78);
  border-bottom: 1px solid rgba(122,59,46,.08);
}
.site-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 18px; border-radius: 20px; background: rgba(255,253,249,.88);
  border: 1px solid var(--adabi-border); box-shadow: var(--shadow-sm);
}
.brand-mark { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark img {
  width: 48px; height: 48px; object-fit: contain; border-radius: 14px;
  background: linear-gradient(135deg, rgba(122,59,46,.08), rgba(178,138,82,.12)); padding: 6px;
}
.brand-mark strong { display: block; color: var(--adabi-dark); font-size: 1.1rem; }
.brand-mark span { display: block; color: var(--adabi-muted); font-size: .86rem; }
.site-menu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-menu a {
  color: var(--adabi-text); padding: 10px 14px; border-radius: 999px; font-weight: 700; transition: .2s ease;
}
.site-menu a:hover, .site-menu a.active { background: rgba(122,59,46,.09); color: var(--adabi-red); }
.site-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; border: 0; background: var(--adabi-surface-2); color: var(--adabi-red);
  width: 44px; height: 44px; border-radius: 12px;
}

.btn-gradient, .btn-blog, .btn-outline-soft, .btn-outline-secondary, .btn-soft-gold {
  border: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px; font-weight: 700; transition: .2s ease;
}
.btn-gradient, .btn-blog {
  color: #fff; background: linear-gradient(135deg, var(--adabi-red), #9a5b42);
  box-shadow: 0 10px 24px rgba(122,59,46,.16);
}
.btn-gradient:hover, .btn-blog:hover { color: #fff; transform: translateY(-2px); }
.btn-outline-soft, .btn-outline-secondary {
  background: #fff; color: var(--adabi-dark); border: 1px solid var(--adabi-border);
}
.btn-outline-soft:hover, .btn-outline-secondary:hover {
  background: var(--adabi-surface-2); color: var(--adabi-red); transform: translateY(-1px);
}

.section-header {
  display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; color: var(--adabi-dark);
}
.section-header.compact { margin: 0 0 12px; }
.section-header i {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(178,138,82,.12); color: var(--adabi-gold);
}
.section-header h2, .section-header h3, .section-header h4 { margin: 0; font-weight: 800; }

.hero-wrapper, .search-elegant, .century-card, .blog-card, .detail-card, .info-card, .category-card, .folk-item, .video-card, .poetry-card, .soft-panel {
  background: var(--adabi-surface);
  border: 1px solid var(--adabi-border);
  box-shadow: var(--shadow-sm);
}
.hero-wrapper {
  position: relative; overflow: hidden; border-radius: 34px; padding: 56px 22px 72px; margin-bottom: 0;
}
.hero-lite {
  background: linear-gradient(180deg, rgba(122,59,46,.96), rgba(99,48,36,.92)); color: #fff;
}
.hero-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,.08), transparent 20%),
    linear-gradient(0deg, rgba(255,255,255,.04), rgba(255,255,255,.04));
}
.hero-content { position: relative; z-index: 1; }
.narrow-content { max-width: 760px; margin: 0 auto; }
.logo-circle {
  width: 104px; height: 104px; margin: 0 auto 16px; border-radius: 32px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; padding: 16px;
}
.hero-kicker {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: .92rem; margin-bottom: 12px;
}
.hero-title { font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 800; margin: 0; }
.hero-lead { max-width: 620px; margin: 14px auto 0; color: rgba(255,255,255,.88); font-size: 1.04rem; }
.search-panel { border-radius: 28px; padding: 24px; }
.search-panel-overlap { margin: -36px auto 20px; position: relative; z-index: 2; }

.quick-stats-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 22px 0 8px;
}
.quick-stat {
  padding: 18px; border-radius: 20px; background: rgba(255,253,249,.76); border: 1px solid var(--adabi-border);
  text-align: center; box-shadow: var(--shadow-sm);
}
.quick-stat strong { display: block; color: var(--adabi-red); font-size: 1.5rem; line-height: 1.2; }
.quick-stat span { color: var(--adabi-muted); font-size: .95rem; }

.poets-scroll.simple-scroll {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px;
}
.poet-grid, .folk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.poet-grid-wide { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }
.poet-card-soft {
  background: linear-gradient(180deg, #fffdf9 0%, #f7f0e6 100%);
  border: 1px solid var(--adabi-border); border-radius: 22px; padding: 18px 12px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.poet-card-soft:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.avatar {
  width: 98px; height: 98px; object-fit: cover; border-radius: 50%; border: 3px solid rgba(178,138,82,.18);
  box-shadow: 0 8px 18px rgba(122,59,46,.12);
}
.name-badge, .poet-card .name {
  display: inline-block; margin-top: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--adabi-dark); font-weight: 700; padding: 8px 12px; border-radius: 999px; background: rgba(122,59,46,.08);
}
.century-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--adabi-dark);
  border: 1px solid var(--adabi-border); font-weight: 700; transition: .2s ease;
}
.chip:hover { color: var(--adabi-red); background: rgba(122,59,46,.06); }
.century-card { padding: 22px; border-radius: 28px; margin-bottom: 22px; }
.century-card-soft { background: linear-gradient(180deg, rgba(255,253,249,.98), rgba(244,237,226,.9)); }
.century-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.century-title { font-weight: 800; color: var(--adabi-dark); }
.text-link { color: var(--adabi-red); font-weight: 700; }
.text-link:hover { color: var(--adabi-red-deep); }
.folk-item { border-radius: 20px; overflow: hidden; }
.folk-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px; color: var(--adabi-dark); font-weight: 700;
}
.folk-link-start { display: inline-flex; align-items: center; gap: 10px; }
.folk-icon, .folk-arrow { color: var(--adabi-gold); }

.blog-card, .info-card, .detail-card, .category-card, .video-card, .poetry-card {
  border-radius: 24px; overflow: hidden;
}
.blog-content, .card-body { padding: 22px; }
.blog-image, .rounded-cover { width: 100%; object-fit: cover; border-radius: 18px; }
.alert-info {
  background: #fff8ef; border: 1px solid var(--adabi-border); color: var(--adabi-dark); border-radius: 18px;
}
.pagination { gap: 8px; }
.page-link {
  border-radius: 999px !important; border: 1px solid var(--adabi-border); color: var(--adabi-dark); background: #fff;
}
.page-item.active .page-link, .page-link:hover { background: var(--adabi-red); border-color: var(--adabi-red); color: #fff; }

.bottom-nav {
  position: sticky; bottom: 12px; z-index: 40; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin: 28px auto 0; width: fit-content; max-width: 100%;
  background: rgba(255,253,249,.93); border: 1px solid var(--adabi-border); border-radius: 999px;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(10px);
}
.bottom-nav .nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 72px;
  color: var(--adabi-text); padding: 10px 14px; border-radius: 999px; transition: .2s ease;
}
.bottom-nav .nav-item.active, .bottom-nav .nav-item:hover { background: var(--adabi-red); color: #fff; }

.site-footer { color: var(--adabi-dark); }
.historical-surface {
  background: rgba(255,253,249,.92); border: 1px solid var(--adabi-border); border-radius: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img {
  width: 56px; height: 56px; object-fit: contain; padding: 8px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(122,59,46,.1), rgba(178,138,82,.15));
}
.footer-brand h5 { color: var(--adabi-dark); font-weight: 800; margin-bottom: 6px; }
.footer-brand p { color: var(--adabi-muted); }
.footer-socials { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(122,59,46,.08); color: var(--adabi-red);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h6 { color: var(--adabi-dark); font-weight: 800; margin-bottom: 6px; }
.footer-links a { color: var(--adabi-text); }
.footer-links a:hover { color: var(--adabi-red); }
.footer-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.footer-mini-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-mini-links a {
  padding: 7px 12px; border-radius: 999px; background: rgba(122,59,46,.07); color: var(--adabi-dark); font-size: .92rem;
}
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--adabi-border);
  color: var(--adabi-muted);
}

.select2-container--bootstrap-5 .select2-selection {
  min-height: 50px !important; border-radius: 14px !important; border-color: var(--adabi-border) !important;
  padding-right: 34px !important; background-color: #fff !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 48px !important; color: var(--adabi-dark) !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  left: 12px !important; right: auto !important; height: 48px !important;
}
.select2-container--bootstrap-5 .select2-dropdown { border-color: var(--adabi-border) !important; }

@media (max-width: 991px) {
  .site-nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-menu {
    display: none; width: 100%; padding-top: 8px; border-top: 1px solid var(--adabi-border);
  }
  .site-menu.open { display: flex; }
  .site-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 767px) {
  main#app.page-shell { padding-top: 96px; }
  .hero-wrapper { padding: 34px 16px 58px; border-radius: 26px; }
  .search-panel { padding: 18px; }
  .search-panel-overlap { margin-top: -24px; }
  .quick-stats-grid { grid-template-columns: 1fr; }
  .poet-grid, .folk-grid, .poets-scroll.simple-scroll { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .avatar { width: 86px; height: 86px; }
  .century-card, .blog-content, .card-body { padding: 18px; }
  .century-heading-row, .footer-bottom, .footer-search { grid-template-columns: 1fr; display: grid; }
  .footer-search { display: grid; }
  .site-actions { justify-content: stretch; }
  .site-actions a { flex: 1; }
  .bottom-nav { width: calc(100% - 12px); border-radius: 22px; gap: 8px; }
  .bottom-nav .nav-item { min-width: 0; flex: 1; }
}
