* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #eef1f6;
  color: #1d2733;
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.7;
}
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}
img { max-width: 100%; }
a { color: #14213d; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.22); }
.btn-primary { background: #c9a24b; color: #14213d; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #f5efe4; border: 1px solid rgba(201,162,75,0.55); }
.law-group .btn-secondary { background: #fff; color: #14213d; border: 1px solid #c9a24b; }
.btn-compact { padding: 8px 16px; font-size: 13.5px; }

/* ---------- hero ---------- */
.law-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #14213d;
  color: #f5efe4;
  margin-bottom: 8px;
  box-shadow: 0 10px 30px rgba(16,24,44,0.22);
}
.law-hero-art { position: relative; height: 240px; overflow: hidden; }
.law-hero-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: law-zoom 26s ease-in-out infinite alternate;
}
.law-hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,33,61,0) 40%, #14213d 100%);
}
.law-hero-body {
  position: relative; padding: 0 24px 28px; margin-top: -56px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  overflow: hidden;
}
.law-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%; opacity: 0.09;
  pointer-events: none;
  animation: law-zoom 32s ease-in-out infinite alternate;
}
.law-hero-body > *:not(.law-hero-bg) { position: relative; z-index: 1; }
.law-portrait {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: 50% 22%;
  border: 3px solid #c9a24b; box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  background: #0e1830;
  animation: law-glow 4.5s ease-in-out infinite;
}
.law-kicker { margin: 14px 0 0; font-size: 12px; letter-spacing: 0.08em; color: #c9a24b; font-weight: 700; }
.law-name { margin: 6px 0 0; font-size: 30px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 800; }
.law-name-en { margin: 2px 0 0; font-size: 13px; color: rgba(245,239,228,0.72); letter-spacing: 0.02em; }
.law-rule {
  width: 0; height: 2px; margin: 14px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #c9a24b, transparent);
  animation: law-rule-grow 0.7s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.law-title { margin: 12px 0 0; font-size: 15px; color: rgba(245,239,228,0.92); }
.law-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; justify-content: center; }

.law-kicker, .law-name, .law-name-en, .law-title, .law-hero-body .law-cta {
  animation: law-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.law-name { animation-delay: 0.08s; }
.law-name-en { animation-delay: 0.16s; }
.law-title { animation-delay: 0.3s; }
.law-hero-body .law-cta { animation-delay: 0.4s; }
.law-cta .btn-primary { animation: law-cta-pulse 3.2s ease-in-out infinite; }

/* ---------- sticky nav ---------- */
.law-nav {
  position: sticky; top: 10px; z-index: 30;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 10px; margin: 14px 0 4px;
  background: rgba(20, 33, 61, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(10, 16, 32, 0.25);
}
.law-nav::-webkit-scrollbar { display: none; }
.law-nav a {
  flex: 0 0 auto;
  color: #f5efe4; text-decoration: none;
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 8px 13px; border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.law-nav a:hover { background: #c9a24b; color: #14213d; }
.law-nav a.active { background: #c9a24b; color: #14213d; }
.law-nav.scrolled { box-shadow: 0 10px 28px rgba(10,16,32,0.4); }
.law-anchor { scroll-margin-top: 74px; }

/* ---------- content sections ---------- */
.law-group {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 20px;
  padding: 22px 20px;
  margin-top: 14px;
  box-shadow: 0 2px 10px rgba(16,24,44,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.law-group:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16,24,44,0.11); }
.law-label { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #a07c2c; }
.law-heading { margin: 0 0 12px; font-size: 21px; font-weight: 800; color: #14213d; }
.law-para { margin: 0 0 10px; font-size: 15px; }
.law-caption { margin: 10px 0 0; font-size: 12.5px; color: #66707e; }

/* accordion cards: tap a title to reveal its detail */
.acc { border-bottom: 1px solid #eef1f5; }
.acc:last-child { border-bottom: 0; }
.acc-head {
  width: 100%; background: none; border: 0; margin: 0;
  padding: 12px 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: inherit; font-size: 14.5px; font-weight: 800; color: #14213d;
  text-align: right; cursor: pointer;
  transition: color 0.18s ease;
}
.acc-head:hover { color: #a07c2c; }
.acc-head svg { flex: 0 0 auto; color: #a07c2c; transition: transform 0.3s ease; }
.acc.open .acc-head svg { transform: rotate(180deg); }
.acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.acc.open .acc-body { max-height: 240px; }
.acc-body p { margin: 0 0 12px; font-size: 14.5px; color: #37414d; }

/* scroll-reveal state (added by script; without JS everything stays visible) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

.law-rows { list-style: none; margin: 0; padding: 0; }
.law-rows li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid #eef1f5;
}
.law-rows li:last-child { border-bottom: 0; }
.law-row-num {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #14213d; color: #c9a24b;
  font-size: 13px; font-weight: 700;
}
.law-row-name { flex: 1 1 auto; font-size: 15px; font-weight: 600; }
.law-row-value { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: #a07c2c; }

.law-facts { margin: 0; }
.law-fact { padding: 10px 0; border-bottom: 1px solid #eef1f5; }
.law-fact:last-child { border-bottom: 0; }
.law-fact dt { font-size: 14.5px; font-weight: 800; color: #14213d; margin-bottom: 2px; }
.law-fact dd { margin: 0; font-size: 14.5px; color: #37414d; }

.law-photo { margin: 14px 0 0; }
.law-photo img {
  width: 100%; height: auto; border-radius: 14px; display: block;
  border: 1px solid #e4e8ef;
}
.law-photo.law-clip { text-align: center; }
.law-photo.law-clip img { width: auto; max-width: 320px; margin: 0 auto; }
.law-photo figcaption { margin-top: 8px; font-size: 12.5px; color: #66707e; text-align: center; }

/* swaying scales motif */
.law-scales-wrap { display: flex; justify-content: center; margin: 2px 0 10px; color: #c9a24b; }
.law-scales { width: 44px; height: 44px; transform-origin: 50% 10%; animation: law-sway 5s ease-in-out infinite; }

.law-closing { margin-top: 26px; text-align: center; font-size: 12.5px; color: #66707e; }

/* ---------- animations ---------- */
@keyframes law-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes law-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes law-rule-grow { to { width: 96px; } }
@keyframes law-glow {
  0%, 100% { box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 0 0 rgba(201,162,75,0.0); }
  50% { box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 22px 3px rgba(201,162,75,0.35); }
}
@keyframes law-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,75,0.0); }
  50% { box-shadow: 0 0 16px 2px rgba(201,162,75,0.35); }
}
@keyframes law-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- responsive ---------- */
@media (max-width: 540px) {
  .law-hero-art { height: 200px; }
  .law-cta { flex-direction: column; align-items: stretch; align-self: stretch; }
  .law-cta .btn { width: 100%; }
  .law-name { font-size: 26px; }
}
@media (min-width: 768px) {
  .law-hero-art { height: 320px; }
  .law-portrait { width: 152px; height: 152px; }
  .law-name { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .law-hero-art img, .law-rule, .law-portrait, .law-kicker, .law-name, .law-name-en,
  .law-title, .law-hero-body .law-cta, .law-hero-bg, .law-cta .btn-primary, .law-scales { animation: none; }
  .law-rule { width: 96px; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .acc-body, .acc-head svg { transition: none; }
}
