/* ==========================================================================
   AL-USRA FAMILY WEBSITE — SHARED STYLESHEET
   Font: Poppins only (per brief)
   Palette:
     --sand        #f3deb3  (base background)
     --sand-light  #faf1dc  (card / surface)
     --cream       #fffaf0  (lightest surface)
     --ink         #2b2116  (primary text)
     --ink-soft    #5c4d38  (secondary text)
     --green       #0f4c3a  (primary accent — deep emerald)
     --green-dark  #0a3327
     --maroon      #7a2331  (secondary accent)
     --gold        #b8862b  (ornament / signature accent)
     --gold-light  #d9ad4d
   Signature element: an eight-pointed khatam star + mashrabiya lattice
   pattern used throughout as dividers, corner ornaments and card frames.
   ========================================================================== */

:root {
  --sand: #f3deb3;
  --sand-light: #faf1dc;
  --cream: #fffaf3;
  --ink: #2b2116;
  --ink-soft: #5c4d38;
  --green: #0f4c3a;
  --green-dark: #0a3327;
  --maroon: #7a2331;
  --gold: #b8862b;
  --gold-light: #d9ad4d;
  --shadow: 0 10px 30px rgba(43, 33, 22, 0.12);
  --radius: 14px;
  --max-width: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: #f3deb3;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Lattice / ornament background ---------------- */
.lattice-band2232 {
  height: 14px;
  width: 100%;
  background-image:
    repeating-linear-gradient(135deg, var(--gold) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(45deg, var(--gold) 0 2px, transparent 2px 18px);
  background-color: var(--green-dark);
  opacity: 0.9;
}

.lattice-bg {
  position: relative;
}
.lattice-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%230f4c3a' stroke-width='1.4'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M40 0 L40 80 M0 40 L80 40'/%3E%3Ccircle cx='40' cy='40' r='14'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}

.star8 { display: inline-block; width: 22px; height: 22px; color: var(--gold); vertical-align: middle; }
.star8 svg { width: 100%; height: 100%; }

.divider-star {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 34px;
}
.divider-star::before,
.divider-star::after {
  content: "";
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider-star::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* Corner ornament used on hero / section frames */
.corner-ornament {
  position: absolute;
  width: 64px;
  height: 64px;
  opacity: 0.55;
  color: var(--gold);
}
.corner-ornament svg { width: 100%; height: 100%; }
.corner-tl { top: 14px; left: 14px; }
.corner-tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner-bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.corner-br { bottom: 14px; right: 14px; transform: scale(-1,-1); }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: static;   /* was: position: sticky; */
  top: 0;
  z-index: 200;
  background: #fff;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 134, 43, 0.35);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 14px 24px;
  max-width: 100%;   /* was: max-width: var(--max-width); */
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; order: 1; flex-shrink: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 60%, var(--maroon) 140%);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-weight: 700; font-size: 18px;
  border: 2px solid var(--green);
  box-shadow: var(--shadow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text .en { font-weight: bold; font-size: 25px; letter-spacing: 0.5px; color: var(--green-dark); }
.brand-text .ar { font-weight: 600; font-size: 13px; color: var(--maroon); }

.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; order: 2; flex: 1 1 auto; justify-content: center; }
.nav-links a {
  font-size: 17.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); transition: all 0.2s ease; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--green); color: var(--cream);
}
.nav-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--green-dark); order: 4; }



/* ---------------- Header Search ---------------- */
.nav-search {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid rgba(184,134,43,0.4);
  border-radius: 999px; padding: 5px 5px 5px 16px;
  order: 3; flex: 0 0 190px; width: 190px;
}
.nav-search input {
  border: none; background: transparent; font-family: 'Poppins', sans-serif;
  font-size: 13px; width: 100%; min-width: 0; color: var(--ink);
}
.nav-search input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.nav-search input:focus { outline: none; }
.nav-search button {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--green);
  color: var(--cream); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 14px; transition: background 0.2s ease;
}
.nav-search button:hover { background: var(--green-dark); }
.search-no-results { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 0px 0; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-search { flex: 1 1 auto; width: auto; order: 3; }
  .nav-links {
    order: 5;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--sand-light); flex-direction: column; align-items: stretch;
    padding: 10px 16px 18px; display: none; border-bottom: 1px solid rgba(184,134,43,0.35);
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; padding: 12px; }
}
@media (max-width: 560px) {
  .nav-search { flex-basis: 130px; }
  .brand-text .ar { display: none; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 2px solid transparent; transition: all 0.25s ease; cursor: pointer;
}
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--cream); }
.btn-gold:hover { background: var(--maroon); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--cream); }
.btn-sm { padding: 8px 18px; font-size: 16px; }

/* ---------------- Hero ---------------- */
.page-hero {
  position: relative;
  padding: 90px 24px 70px;
  text-align: center;
  background: linear-gradient(180deg, var(--sand-light), var(--sand));
  overflow: hidden;
}
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--maroon); font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: 65px; font-weight: 700; color: var(--green-dark);
  margin-bottom: 14px;
}
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--ink-soft); font-size: 19px; font-weight:bold;}

/* ---------------- Section ---------------- */
.section { padding: 70px 24px; }
.section-title-wrap { text-align: center; max-width: 680px; margin: 0 auto 10px; }
.section-title-wrap .eyebrow {
  color: var(--maroon); font-weight: 600; font-size: 16px; letter-spacing: 2px; text-transform: uppercase;
}
.section-title-wrap h2 { font-size: clamp(26px, 4vw, 38px); color: var(--green-dark); margin: 10px 0 8px; font-weight: 700; }
.section-title-wrap p { color: var(--ink-soft); font-size: 18px;font-weight:bold; }
.section-alt { background: var(--sand-light); }

/* ---------------- Cards (generic frame w/ gold hairline) ---------------- */
.card {
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid rgba(184,134,43,0.3);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(43,33,22,0.18); }

.grid {
  display: grid;
  gap: 26px;
}
.grid-3 { grid-template-columns: repeat(4, 1fr); }
.grid-4 { grid-template-columns: repeat(5, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 2fr; } }

.avatar {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--sand-light), var(--sand));
  color: var(--green-dark); font-weight: 700;
  border: 2px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
 
}

/* ---------------- Member Card ---------------- */
.member-card { padding: 26px 20px; text-align: center; cursor: pointer; }
.member-card .avatar { width: 206px;
    height: 197px; font-size: 30px; margin: 0 auto 16px; }
.member-card h3 { font-size: 17px; color: var(--green-dark); margin-bottom: 4px; }
.member-card .role { font-size: 12.5px; color: var(--maroon); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.member-card .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }

/* ---------------- Filter bar ---------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--sand-light); border: 1px solid rgba(184,134,43,0.4); color: var(--ink-soft);
}
.filter-btn.active, .filter-btn:hover { background: var(--green); color: var(--cream); border-color: var(--green); }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,15,8,0.65); z-index: 999;
  display: none; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow-y: auto; backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--cream); border-radius: 18px; max-width: 780px; width: 100%;
  position: relative; box-shadow: 0 30px 70px rgba(0,0,0,0.35); border: 2px solid var(--gold);
  animation: modalIn 0.28s ease;
}
@keyframes modalIn { from { opacity:0; transform: translateY(16px) scale(0.98);} to {opacity:1; transform: translateY(0) scale(1);} }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: var(--cream); border: none; font-size: 18px; z-index: 5;
}
.modal-head {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--cream); padding: 36px 30px 26px; border-radius: 16px 16px 0 0; text-align: center; position: relative;
}
.modal-head .avatar { width: 100px; height: 100px; font-size: 26px; margin: 0 auto 14px; border-color: var(--gold-light); }
.modal-head h2 { font-size: 22px; margin-bottom: 4px; }
.modal-head .sub { font-size: 13px; opacity: 0.85; }
.modal-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 24px 0; border-bottom: 1px solid rgba(184,134,43,0.3); }
.modal-tab-btn {
  background: none; border: none; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 3px solid transparent;
}
.modal-tab-btn.active { color: var(--green-dark); border-color: var(--gold); }
.modal-body { padding: 24px 30px 32px; }
.modal-pane { display: none; }
.modal-pane.active { display: block; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-row { padding: 10px 0; border-bottom: 1px dashed rgba(92,77,56,0.25); }
.detail-row .label { font-size: 20px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--maroon); font-weight: 600; }
.detail-row .value { font-size: 16.5px; color: var(--ink); margin-top: 3px; font-weight:bold; }

.child-mini {
  display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--sand-light);
  border-radius: 10px; margin-bottom: 10px; border: 1px solid rgba(184,134,43,0.25);
}
.child-mini .avatar { width: 48px; height: 48px; font-size: 14px; flex-shrink: 0; }
.child-mini .info h4 { font-size: 14px; color: var(--green-dark); }
.child-mini .info span { font-size: 12px; color: var(--ink-soft); }

/* ---------------- Family Tree ---------------- */
.tree-wrap { overflow-x: auto; padding: 20px 10px 40px; }
.tree {
  display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 640px;
}
.tree-gen { display: flex; justify-content: center; gap: 40px; position: relative; padding: 30px 0; }
.tree-node {
  background: var(--cream); border: 2px solid var(--gold); border-radius: 12px; padding: 14px 18px;
  text-align: center; min-width: 140px; box-shadow: var(--shadow); position: relative; z-index: 2;
}
.tree-node.root { background: var(--green); color: var(--cream); border-color: var(--gold-light); }
.tree-node .avatar { width: 54px; height: 54px; font-size: 15px; margin: 0 auto 8px; }
.tree-node h4 { font-size: 13.5px; }
.tree-node span { font-size: 11px; opacity: 0.8; }
.tree-connector { width: 2px; background: var(--gold); height: 30px; margin: 0 auto; }
.tree-gen::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 2px; background: var(--gold); opacity: 0.5;
}
.tree-gen.single::before { display:none; }

/* ---------------- Wedding Card ---------------- */
.wedding-card { position: relative; }
.wedding-photo {
  height: 220px; background: linear-gradient(150deg, var(--green), var(--green-dark));
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.wedding-photo .avatars { display: flex; gap: -10px; }
.wedding-photo .avatar { width: 78px; height: 78px; font-size: 22px; border-color: var(--gold-light); }
.wedding-photo .avatar:first-child { margin-right: -18px; }
.wedding-body { padding: 22px 22px 26px; text-align: center; }
.wedding-body h3 { font-size: 19px; color: var(--green-dark); margin-bottom: 4px; }
.wedding-body .family-tag { font-size: 12px; color: var(--maroon); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; display:block;}
.wedding-body .msg { font-style: italic; color: var(--ink-soft); font-size: 13.5px; margin-bottom: 16px; }
.wedding-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink); margin-bottom: 16px; }
.countdown { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; }
.countdown .box { background: var(--sand-light); border: 1px solid rgba(184,134,43,0.4); border-radius: 10px; padding: 8px 10px; min-width: 54px; }
.countdown .box b { display: block; font-size: 18px; color: var(--green-dark); }
.countdown .box small { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; }

/* ---------------- Degree Card ---------------- */
.degree-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit; cursor: pointer; }
.degree-card .avatar { width: 64px; height: 64px; font-size: 16px; flex-shrink: 0; }
.degree-card h4 { font-size: 15.5px; color: var(--green-dark); transition: color 0.2s ease; }
.degree-card:hover h4 { color: var(--green); }
.degree-card .field { font-size: 13px; color: var(--maroon); font-weight: 600; }
.degree-card .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.degree-category-block { margin-bottom: 54px; }
.degree-category-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.degree-category-head .icon-badge {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.degree-category-head h3 { font-size: 19px; color: var(--green-dark); }
.degree-category-head span { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------- Memorial Card ---------------- */
.memorial-card { text-align: center; padding: 30px 22px; position: relative; }
.memorial-card::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; opacity: 0.35; color: var(--maroon);
}
.memorial-card .avatar { width: 100px; height: 100px; font-size: 26px; margin: 0 auto 16px; filter: grayscale(35%); border-color: var(--ink-soft); border-radius: 50%; overflow: hidden; }
.memorial-card .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.memorial-card h3 { font-size: 17px; color: var(--green-dark); margin-bottom: 4px; }
.memorial-card .years { font-size: 13px; color: var(--maroon); font-weight: 600; margin-bottom: 10px; direction: ltr; unicode-bidi: isolate; }
.memorial-card .msg { font-size: 13px; color: var(--ink-soft); font-style: italic; margin: 12px 0 16px; min-height: 40px; }
.memorial-card .meta-list { text-align: left; font-size: 12.5px; color: var(--ink-soft); border-top: 1px dashed rgba(92,77,56,0.3); padding-top: 12px; margin-bottom: 14px; }
.memorial-card .meta-list div { display: flex; justify-content: space-between; padding: 3px 0; }
.memorial-card .meta-list b { color: var(--ink); font-weight: 600; }

/* ---------------- News Card ---------------- */
.news-card { display: flex; flex-direction: column; }
.news-photo { height: 190px; background: linear-gradient(150deg, var(--gold-light), var(--gold)); position: relative; }
.news-photo .cat-tag {
  position: absolute; top: 14px; left: 14px; background: var(--green-dark); color: var(--cream);
  font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px;
}
.news-body { padding: 20px 20px 24px; flex-grow: 1; display: flex; flex-direction: column; }
.news-date { font-size: 12px; color: var(--maroon); font-weight: 600; margin-bottom: 8px; }
.news-body h3 { font-size: 17px; color: var(--green-dark); margin-bottom: 8px; }
.news-body p { font-size: 13.5px; color: var(--ink-soft); flex-grow: 1; margin-bottom: 14px; }
.news-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-soft); border-top: 1px dashed rgba(92,77,56,0.3); padding-top: 12px; }
.featured-badge { background: var(--maroon); color: var(--cream); font-size: 10.5px; padding: 3px 10px; border-radius: 999px; margin-left: 8px; }

/* ---------------- Gallery ---------------- */
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 1/1; }
.gallery-item .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--sand-light), var(--gold-light));
  color: var(--green-dark); font-size: 13px; font-weight: 600; text-align:center; padding: 10px;
}
.gallery-item .overlay {
  position: absolute; inset: 0; background: rgba(15,76,58,0.75); color: var(--cream);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease;
  font-size: 13px; text-align: center; padding: 14px;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item.video .ph::after { content: "▶"; }

.lightbox {
  position: fixed; inset: 0; background: rgba(10,8,4,0.9); z-index: 999; display: none;
  align-items: center; justify-content: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 800px; width: 100%; background: var(--cream); border-radius: 14px; overflow: hidden; }
.lightbox-inner .ph { height: 420px; }
.lightbox-caption { padding: 18px 22px; }
.lightbox-close { position: absolute; top: 26px; right: 30px; color: var(--cream); font-size: 30px; background: none; border: none; }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card { background: var(--green); color: var(--cream); border-radius: var(--radius); padding: 34px; position: relative; overflow: hidden; }
.contact-info-card h3 { font-size: 20px; margin-bottom: 18px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.contact-info-item .ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contact-info-item .txt b { display: block; margin-bottom: 3px; }
.contact-info-item .txt span { font-size: 13.5px; opacity: 0.85; }
.social-row { display: flex; gap: 10px; margin-top: 24px; }
.social-row a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.social-row a:hover { background: var(--gold); }

.form-card { background: var(--cream); border-radius: var(--radius); padding: 34px; border: 1px solid rgba(184,134,43,0.3); box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; border: 1px solid rgba(92,77,56,0.3);
  background: var(--sand-light); font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--ink);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 2px solid var(--gold); background: var(--cream); }
.map-frame { border-radius: var(--radius); overflow: hidden; margin-top: 30px; border: 1px solid rgba(184,134,43,0.3); }

/* ---------------- Family Info (home) ---------------- */
.info-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; }
@media (max-width: 860px) { .info-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .info-strip { grid-template-columns: 1fr; } }
.info-stat { background: var(--cream); border: 1px solid rgba(184,134,43,0.3); border-radius: var(--radius); padding: 26px 18px; text-align: center; box-shadow: var(--shadow); }
.info-stat b { display: block; font-size: 28px; color: var(--green-dark); }
.info-stat span { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.5px; }

.history-block { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .history-block { grid-template-columns: 1fr; } }
.history-photo { aspect-ratio: 4/3.2; border-radius: var(--radius); background: linear-gradient(150deg, var(--gold-light), var(--green)); display: flex; align-items: center; justify-content: center; color: var(--cream); font-weight: 600; box-shadow: var(--shadow); border: 4px solid var(--cream); outline: 2px solid var(--gold); }
.history-text h3 { font-size: 24px; color: var(--green-dark); margin-bottom: 14px; }
.history-text p { color: var(--ink-soft); margin-bottom: 14px; font-size: 14.5px; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.meta-pills span { background: var(--sand-light); border: 1px solid rgba(184,134,43,0.35); padding: 7px 14px; border-radius: 999px; font-size: 12.5px; color: var(--ink-soft); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-dark); color: rgba(255,250,240,0.85); padding: 60px 24px 24px; position: relative; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; max-width: var(--max-width); margin: 0 auto; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--gold-light); font-size: 18.5px; margin-bottom: 16px; letter-spacing: 0.5px; }
.footer-grid p, .footer-grid a { font-size: 16.5px; color: rgba(255,250,240,0.75); display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom { text-align: center; font-size: 12.5px; color: rgba(255,250,240,0.55); margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,250,240,0.15); }

/* Hero small (interior pages use smaller hero) */
.mini-hero { padding: 60px 24px 50px; }

.two-col-list { columns: 2; column-gap: 40px; }
@media (max-width: 620px) { .two-col-list { columns: 1; } }

.tag-chip { display:inline-block; background: var(--sand-light); border:1px solid rgba(184,134,43,0.4); padding:4px 12px; border-radius:999px; font-size:11.5px; color:var(--ink-soft); margin: 2px 4px 2px 0; }

/* ---------------- Detail Pages (wd-section) ---------------- */
.wd-section {
  padding: 60px 24px 90px;
  font-family: 'Poppins', sans-serif;
  background: var(--sand, #f3deb3);
  position: relative;
}
.wd-container { max-width: 900px; margin: 0 auto; }

.wd-head { text-align: center; margin-bottom: 40px; }
.wd-photo {
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 20px;
  overflow: hidden; border: 5px solid var(--gold, #b8862b); box-shadow: var(--shadow, 0 10px 30px rgba(43,33,22,0.12));
}
.wd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-head h1 { font-size: 28px; color: var(--green-dark, #0a3327); font-weight: 700; margin-bottom: 8px; }
.wd-branch {
  display: inline-block; background: var(--green, #0f4c3a); color: var(--cream, #fffaf3);
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  padding: 6px 16px; border-radius: 999px;
  direction: ltr; unicode-bidi: isolate;
}

.wd-table-card {
  background: var(--cream, #fffaf3); border: 1px solid rgba(184,134,43,0.3); border-radius: 16px;
  box-shadow: var(--shadow, 0 10px 30px rgba(43,33,22,0.12)); overflow: hidden; margin-bottom: 36px;
}
.wd-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wd-table td {
  padding: 16px 30px; font-size: 14.5px; border-bottom: 1px solid rgba(184,134,43,0.15);
  text-align: right;
}
.wd-table tr:last-child td { border-bottom: none; }
.wd-table tr:nth-child(even) { background: rgba(184,134,43,0.05); }
.wd-table td:first-child {
  color: var(--ink-soft, #5c4d38); font-weight: 600; width: 40%;
  font-size: 12.5px; letter-spacing: 0.2px;
}
.wd-table td:last-child { color: var(--ink, #2b2116); font-weight: 500; }

@media (max-width: 560px) {
  .wd-table td { padding: 12px 16px; font-size: 13px; }
}

.breadcrumb-section { padding: 22px 24px; }

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  direction: rtl;
}

.breadcrumb-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.breadcrumb-nav a:hover {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-color: var(--gold);
}

.breadcrumb-sep {
  color: var(--gold);
  font-size: 13px;
  transform: scaleX(-1);
  display: inline-block;
}

.breadcrumb-current {
  color: var(--maroon);
  font-weight: 700;
}
