/* ==========================================================================
   Yemeni Legal Website — Unified Library & Section Indexes Stylesheet
   File: /assets/css/library.css
   Covers: library/index.html + 8 explanation section indexes + yemeni-laws/index.html
   ========================================================================== */

/* 1. Local Fonts (Cairo + Font Awesome Subset) */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-01.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-02.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-03.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/vendor/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/vendor/fontawesome/webfonts/fa-brands-400.woff2") format("woff2");
}

.fa-solid, .fas { font-family: "Font Awesome 6 Free"; font-weight: 900; font-style: normal; display: inline-block; line-height: 1; }
.fa-brands, .fab { font-family: "Font Awesome 6 Brands"; font-weight: 400; font-style: normal; display: inline-block; line-height: 1; }
.fa-arrow-left::before { content: "\f060"; }
.fa-bolt::before { content: "\f0e7"; }
.fa-book::before { content: "\f02d"; }
.fa-book-open::before { content: "\f518"; }
.fa-briefcase::before { content: "\f0b1"; }
.fa-building-columns::before { content: "\f19c"; }
.fa-folder-open::before { content: "\f07c"; }
.fa-gavel::before { content: "\f0e3"; }
.fa-helmet-safety::before { content: "\f807"; }
.fa-hourglass-half::before { content: "\f252"; }
.fa-landmark::before { content: "\f66f"; }
.fa-layer-group::before { content: "\f5fd"; }
.fa-magnifying-glass::before { content: "\f002"; }
.fa-people-roof::before { content: "\e537"; }
.fa-scale-balanced::before { content: "\f24e"; }
.fa-whatsapp::before { content: "\f232"; }

/* 2. Royal Navy & Gold Design Tokens */
:root {
  --yl-font: "Cairo", Tahoma, Arial, sans-serif;
  --yl-navy-950: #041024;
  --yl-navy-900: #07152f;
  --yl-navy-800: #0b225a;
  --yl-navy-700: #12325f;
  --yl-blue-600: #1d4ed8;
  --yl-gold-500: #d6a62f;
  --yl-gold-400: #f3c969;
  --yl-gold-soft: #fff8e8;
  --yl-bg: #f4f7fb;
  --yl-surface: #ffffff;
  --yl-ink: #0f172a;
  --yl-muted: #475569;
  --yl-border: #dce4f0;
  --yl-border-gold: rgba(214, 166, 47, 0.48);
  --yl-shadow: 0 8px 24px rgba(7, 21, 47, 0.08);
  --yl-radius: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

html, body {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  font-family: var(--yl-font);
  background: var(--yl-bg);
  color: var(--yl-ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a, button, summary { touch-action: manipulation; }
[hidden] { display: none !important; }

:where(a[href], button, input, summary):focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* 3. Top Header Bar */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: linear-gradient(135deg, var(--yl-navy-900) 0%, var(--yl-navy-800) 100%);
  border-bottom: 2.5px solid var(--yl-gold-500);
  padding: 0.65rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(7, 21, 47, 0.18);
}

header.topbar .brand,
header.topbar .yl-header-link--site {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.08rem;
  text-decoration: none;
}

header.topbar .brand small {
  display: block;
  color: var(--yl-gold-400);
  font-size: 0.78rem;
  font-weight: 700;
}

header.topbar nav,
header.topbar .main-nav,
header.topbar .yl-header-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}

header.topbar nav a,
header.topbar .yl-header-shortcuts a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.78rem;
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

header.topbar nav a:hover,
header.topbar .yl-header-shortcuts a:hover,
header.topbar nav a[aria-current="page"] {
  background: rgba(243, 201, 105, 0.18);
  color: var(--yl-gold-400);
}

header.topbar .menu-toggle,
header.topbar .nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--yl-gold-400);
  border: 1px solid rgba(243, 201, 105, 0.5);
  border-radius: 9px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* 4. Main Container & Breadcrumb */
.page-shell,
main.page-shell,
.law-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.1rem 2.5rem;
}

nav.breadcrumb,
.yl-library-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  background: var(--yl-surface);
  border: 1px solid var(--yl-border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--yl-muted);
}

nav.breadcrumb a,
.yl-library-breadcrumb a {
  color: var(--yl-navy-800);
  text-decoration: none;
}

nav.breadcrumb a:hover,
.yl-library-breadcrumb a:hover {
  text-decoration: underline;
}

/* 5. Hero Section */
.hero.yl-site-static-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.4rem;
  padding: clamp(1.5rem, 3.2vw, 2.5rem) clamp(1.1rem, 3vw, 2.2rem);
  border-radius: 22px;
  border: 1.5px solid var(--yl-border-gold);
  background: radial-gradient(circle at 12% 0%, rgba(243, 201, 105, 0.16), transparent 36%),
              linear-gradient(135deg, var(--yl-navy-900) 0%, var(--yl-navy-800) 60%, var(--yl-navy-700) 100%);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 14px 36px rgba(7, 21, 47, 0.16);
}

.yl-static-hero__content {
  max-width: 960px;
  margin: 0 auto;
}

.yl-static-hero__badge,
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 1rem;
  margin: 0 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 201, 105, 0.55);
  background: rgba(243, 201, 105, 0.12);
  color: var(--yl-gold-400);
  font-size: 0.86rem;
  font-weight: 800;
}

.yl-site-static-hero h1 {
  margin: 0 0 0.6rem;
  color: #ffffff;
  font-size: clamp(1.55rem, 3.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.35;
}

.yl-static-hero__description {
  max-width: 780px;
  margin: 0 auto;
  color: #dbe8ff;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  font-weight: 600;
  line-height: 1.85;
}

.yl-static-hero__rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.yl-static-hero__whatsapp {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, #087f43, #12a855 50%, #25d366);
  color: #ffffff;
  text-align: right;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.yl-static-hero__whatsapp:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.yl-static-hero__whatsapp-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #138841;
  font-size: 1.5rem;
}

.yl-static-hero__notification-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  background: #ff3b30;
}

.yl-static-hero__whatsapp-copy strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 900;
  color: #ffffff;
}

.yl-static-hero__action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.yl-static-hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border-radius: 13px;
  border: 1px solid rgba(243, 201, 105, 0.36);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.yl-static-hero__action i { color: var(--yl-gold-400); }

.yl-static-hero__action:hover {
  transform: translateY(-2px);
  background: rgba(243, 201, 105, 0.2);
}

/* 6. Section Cards & Headings */
.section-card {
  background: var(--yl-surface);
  border: 1px solid var(--yl-border);
  border-radius: 20px;
  padding: 1.35rem;
  margin: 0 0 1.35rem;
  box-shadow: var(--yl-shadow);
}

.section-head {
  margin: 0 0 1.15rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(214, 166, 47, 0.3);
}

.section-head h2 {
  margin: 0 0 0.25rem;
  color: var(--yl-navy-900);
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
  font-weight: 900;
  line-height: 1.45;
}

.section-head p {
  margin: 0;
  color: var(--yl-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

/* 7. Search Panels (Library Index, Section Index, Laws Index) */
.library-search-panel,
.civil-search-section,
.library-section-search-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #fffdf7 100%);
  border: 1.5px solid var(--yl-border-gold);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.1rem;
}

.civil-search-form,
.library-search-panel form,
.library-section-search-panel form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}

.civil-search-form input,
.library-search-panel input[type="search"],
.library-search-panel input[type="text"],
.library-section-search-panel input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: var(--yl-ink);
  font-size: 1rem;
  font-weight: 700;
}

.civil-search-form input:focus,
.library-search-panel input:focus,
.library-section-search-panel input:focus {
  border-color: var(--yl-gold-500);
  outline: none;
}

.library-search-button,
.library-section-search-button,
.civil-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.65rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--yl-gold-500);
  background: linear-gradient(135deg, var(--yl-navy-900) 0%, var(--yl-navy-800) 100%);
  color: var(--yl-gold-400);
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.library-search-button:hover,
.library-section-search-button:hover,
.civil-search-form button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.civil-search-status,
#ylLibrarySectionSearchStatus {
  margin: 0.7rem 0 0;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--yl-navy-800);
  font-size: 0.9rem;
  font-weight: 700;
}

.civil-search-results,
.ai-results {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.65rem;
}


/* 7b. Homepage-Style Instant Search Bar & Sleek Suggestion Dropdown */
#ylLibraryIndexSearch .library-search-panel,
.civil-search-section,
#ylLibrarySectionSearch .library-section-search-panel {
  background: linear-gradient(180deg, #0b225a 0%, #07152f 100%);
  border: 1.5px solid rgba(214, 166, 47, 0.55);
  border-radius: 18px;
  padding: 1.15rem;
  box-shadow: 0 12px 28px rgba(7, 21, 47, 0.14);
}
.civil-search-section .section-head {
  border-bottom-color: rgba(243, 201, 105, 0.28);
}
.civil-search-section .section-head h2 {
  color: #ffffff;
}
.civil-search-section .section-head p {
  color: #cbd5e1;
}
#ylLibraryIndexSearchForm,
.civil-search-form,
.library-section-search-panel form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 54px;
  border: 2px solid #f3c969;
  border-radius: 13px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
#ylLibraryIndexSearchInput,
.civil-search-form input,
.library-section-search-panel input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #102747;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  outline: 0;
}
#ylLibraryIndexSearchForm .library-search-button,
.civil-search-form button[type="submit"],
.library-section-search-button {
  flex: 0 0 auto;
  min-width: 82px;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #c79210, #f3c969);
  color: #07152f;
  font-weight: 900;
  font-size: 0.96rem;
  cursor: pointer;
}
#librarySearchClear,
.yl-search-clear-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 52px;
  border: 0;
  border-inline-start: 1px solid #e2e8f0;
  border-radius: 0;
  background: #ffffff;
  color: #475569;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}
#librarySearchClear:hover,
.yl-search-clear-btn:hover {
  background: #f1f5f9;
  color: #07152f;
}
#ylLibraryIndexSearchStatus,
.civil-search-status,
#ylLibrarySectionSearchStatus {
  margin: 12px 0 0;
  padding: 10px 15px;
  border: 1px solid #567199;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: #edf2f8;
  color: #102747;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: right;
}
#ylLibraryIndexSearchResults:not([hidden]),
.yl-instant-results:not([hidden]) {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #567199;
  border-top: 0;
  border-radius: 0 0 13px 13px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(7, 21, 47, 0.16);
}
.home-search-suggestion {
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-search-suggestion-link {
  display: block;
  padding: 12px 16px;
  color: #102747;
  background: #ffffff;
  text-decoration: none;
  border-top: 1px solid #d7e1ed;
  line-height: 1.7;
  transition: background 0.15s ease;
}
.home-search-suggestion-link:hover,
.home-search-suggestion-link:focus {
  background: #eef4fc;
}
.home-search-suggestion-title {
  display: block;
  font-weight: 800;
  color: #07152f;
  font-size: 0.96rem;
}
.home-search-suggestion-meta {
  display: block;
  color: #526078;
  font-size: 0.82rem;
  font-weight: 600;
}


/* 7c. Universal Search Selectors (Commercial, Criminal, Labor, Personal Status, Urgent, Procedures, Deadlines) */
.yl-unified-search-box,
.yl-clean-index-search,
.criminal-search-section,
section[id$="Search"] {
  background: linear-gradient(180deg, #0b225a 0%, #07152f 100%);
  border: 1.5px solid rgba(214, 166, 47, 0.55);
  border-radius: 18px;
  padding: 1.15rem;
  box-shadow: 0 12px 28px rgba(7, 21, 47, 0.14);
}
.yl-unified-search-box .section-head,
.yl-clean-index-search .section-head,
.criminal-search-section .section-head,
section[id$="Search"] .section-head {
  border-bottom-color: rgba(243, 201, 105, 0.28);
}
.yl-unified-search-box .section-head h2,
.yl-clean-index-search .section-head h2,
.criminal-search-section .section-head h2,
section[id$="Search"] .section-head h2 {
  color: #ffffff;
}
.yl-unified-search-box .section-head p,
.yl-clean-index-search .section-head p,
.criminal-search-section .section-head p,
section[id$="Search"] .section-head p {
  color: #cbd5e1;
}
form[role="search"],
.yl-unified-search-form,
.yl-clean-index-search__form,
.criminal-search-form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 54px;
  border: 2px solid #f3c969;
  border-radius: 13px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
form[role="search"] input,
.yl-unified-search-form input,
.yl-clean-index-search__form input,
.criminal-search-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #102747;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  outline: 0;
}
form[role="search"] button[type="submit"],
.yl-unified-search-form button[type="submit"],
.yl-clean-index-search__form button[type="submit"],
.criminal-search-form button[type="submit"] {
  flex: 0 0 auto;
  min-width: 82px;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #c79210, #f3c969);
  color: #07152f;
  font-weight: 900;
  font-size: 0.96rem;
  cursor: pointer;
}
.yl-unified-search-status,
.yl-clean-index-search__status,
.criminal-search-status {
  margin: 12px 0 0;
  padding: 10px 15px;
  border: 1px solid #567199;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: #edf2f8;
  color: #102747;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: right;
}

/* 8. Main Library Index Cards */
.library-modern-grid,
.case-grid,
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.library-modern-card,
.yl-index-modern-card,
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border-radius: var(--yl-radius);
  border: 1.5px solid var(--yl-border-gold);
  background: linear-gradient(180deg, #ffffff 0%, #fcfaf4 100%);
  box-shadow: 0 4px 14px rgba(7, 21, 47, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.library-modern-card:hover,
.yl-index-modern-card:hover,
.case-card:hover {
  transform: translateY(-3px);
  border-color: var(--yl-gold-500);
  box-shadow: 0 12px 28px rgba(7, 21, 47, 0.12);
}

.library-modern-card__icon,
.yl-index-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.8rem;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--yl-navy-900), var(--yl-navy-800));
  border: 1.5px solid var(--yl-gold-500);
  color: var(--yl-gold-400);
  font-size: 1.25rem;
}

.library-modern-card h2,
.library-modern-card h3,
.yl-index-modern-card h2,
.yl-index-modern-card h3,
.case-card h2,
.case-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--yl-navy-900);
}

.library-title-link,
.case-card h3 a {
  color: var(--yl-navy-900);
  text-decoration: none;
}

.library-title-link:hover {
  color: var(--yl-blue-600);
}

.library-modern-card p,
.yl-index-modern-card p,
.case-card p {
  margin: 0 0 0.85rem;
  color: var(--yl-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.library-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.library-card-tags span {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--yl-navy-800);
  font-size: 0.78rem;
  font-weight: 800;
}

.action-btn,
.library-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  margin-top: auto;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.action-btn.primary,
.library-card-action {
  background: linear-gradient(135deg, var(--yl-navy-900) 0%, var(--yl-navy-800) 100%);
  color: var(--yl-gold-400);
  border: 1px solid var(--yl-gold-500);
}

.action-btn.primary:hover,
.library-card-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* 9. Explanations Section Index Lists (claim-list & claim-link) */
.claim-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.claim-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  color: var(--yl-navy-900);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.claim-link:hover {
  background: var(--yl-gold-soft);
  border-color: var(--yl-gold-500);
  transform: translateX(-2px);
}

/* 10. Yemeni Laws Index Grid & Cards */
.laws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
}

.law-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border-radius: var(--yl-radius);
  border: 1.5px solid var(--yl-border-gold);
  background: linear-gradient(180deg, #ffffff 0%, #fcfaf4 100%);
  box-shadow: 0 4px 12px rgba(7, 21, 47, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.law-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(7, 21, 47, 0.12);
}

.law-title {
  margin: 0 0 0.4rem;
  font-size: 1.06rem;
  font-weight: 900;
  color: var(--yl-navy-900);
  line-height: 1.5;
}

.law-sub {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--yl-muted);
  font-weight: 600;
}

.law-note {
  margin: 0 0 0.9rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  border-inline-start: 3px solid var(--yl-gold-500);
  font-size: 0.84rem;
  color: #334155;
}

.law-card-admin,
.law-card-admin-single {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.law-card-admin .action-btn,
.law-card-admin-single .action-btn {
  width: 100%;
}


/* 10b. Judicial Precedents Indexes (Vol. 1, 2, 3) */
.precedent-group-nav,
.precedent-category-list,
.precedent-title-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.precedent-group-nav a,
.precedent-category-list a,
.precedent-title-list a {
  display: block;
  height: 100%;
  padding: 0.95rem 1.05rem;
  border: 1.5px solid var(--yl-border-gold);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfaf4 100%);
  color: var(--yl-navy-900);
  text-decoration: none;
  line-height: 1.8;
  overflow-wrap: anywhere;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.precedent-group-nav a:hover,
.precedent-category-list a:hover,
.precedent-title-list a:hover {
  transform: translateY(-2px);
  border-color: var(--yl-gold-500);
  background: var(--yl-gold-soft);
  box-shadow: 0 8px 20px rgba(7, 21, 47, 0.1);
}
.precedent-label {
  display: block;
  color: #8c5d0b;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.precedent-title {
  font-weight: 800;
  color: var(--yl-navy-900);
}
.group-source-link,
.back-to-groups {
  display: inline-block;
  color: var(--yl-navy-800);
  font-weight: 800;
  margin-top: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#precedentSuggestions {
  margin-top: 0.85rem;
  border: 1px solid #567199;
  border-radius: 13px;
  background: #ffffff;
  color: #102747;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(7, 21, 47, 0.16);
}
#precedentSearchStatus {
  padding: 0.7rem 1rem;
  margin: 0;
  background: #edf2f8;
  color: #102747;
  font-weight: 800;
  font-size: 0.9rem;
}
#precedentSearchResults {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#precedentSearchResults a {
  display: block;
  padding: 0.75rem 1rem;
  color: #102747;
  text-decoration: none;
  border-top: 1px solid #d7e1ed;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
#precedentSearchResults a:hover {
  background: #eef4fc;
}
#clearPrecedentSearch {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 14px;
  border: 0;
  border-inline-start: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 640px) {
  .precedent-group-nav,
  .precedent-category-list,
  .precedent-title-list {
    grid-template-columns: 1fr;
  }
}

/* 11. Internal Links Grid & Ad Slots */
.seo-internal-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 0.65rem;
}

.seo-internal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--yl-navy-900);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.seo-internal-link:hover {
  background: var(--yl-gold-soft);
  border-color: var(--yl-gold-500);
}

.yl-in-article-ad,
.yl-autorelaxed-ad,
.library-card-ad {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem;
  margin: 1rem auto 1.25rem;
  text-align: center;
}

.library-card-ad__label {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}

/* 12. Royal Navy & Gold Footer (Unified Site Footer) */
footer.site-footer {
  background: linear-gradient(180deg, var(--yl-navy-800) 0%, var(--yl-navy-900) 100%);
  color: #e2e8f0;
  border-top: 3px solid var(--yl-gold-500);
  padding: 1.7rem 1rem 2rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.88rem;
}

footer.site-footer p { margin: 0 0 0.85rem; color: #e2e8f0; }

footer.site-footer .yl-institutional-owner {
  max-width: 820px;
  margin: 0 auto 1.1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(243, 201, 105, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1.8;
}

footer.site-footer .yl-institutional-owner strong {
  display: block;
  color: var(--yl-gold-400);
  font-size: 1rem;
}

footer.site-footer .yl-institutional-owner span { display: block; color: #e2e8f0; }
footer.site-footer .yl-institutional-owner small { display: block; color: #cbd5e1; }
footer.site-footer .yl-institutional-owner a { color: #ffffff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

footer.site-footer .yl-trust-footer-links {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.9rem;
}

footer.site-footer .yl-trust-footer-links a {
  color: #cbd5e1;
  font-size: 0.84rem;
  text-decoration: none;
  white-space: nowrap;
}

footer.site-footer .yl-trust-footer-links a:hover {
  color: var(--yl-gold-400);
  text-decoration: underline;
}

/* 13. Floating Share & Toast */
.yl-floating-share-wrap {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 20px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: rtl;
}

.yl-floating-share-btn {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.34);
}

.yl-floating-share-facebook { background: #1877f2; }
.yl-floating-share-btn svg { width: 25px; height: 25px; fill: currentColor; }

.yl-floating-share-toast {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 150px;
  z-index: 99999;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.yl-floating-share-toast.show { opacity: 1; transform: translateY(0); }

/* 14. Responsive Breakpoints */
@media (max-width: 960px) {
  .library-modern-grid,
  .case-grid,
  .posts-grid,
  .laws-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell, main.page-shell, .law-shell { padding: 0.75rem 0.7rem 2rem; }
  .section-card { padding: 1rem; border-radius: 16px; }
  .yl-static-hero__action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-modern-grid,
  .case-grid,
  .posts-grid,
  .laws-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  header.topbar,
  .yl-floating-share-wrap,
  .yl-floating-share-toast,
  .yl-in-article-ad,
  .yl-autorelaxed-ad,
  .library-card-ad,
  ins.adsbygoogle { display: none !important; }
  body { background: #ffffff; }
}
