/* شركة الزعبي للاستشارات القانونية — أنماط نظيفة ومتجاوبة */
:root {
  --navy: #173653;
  --blue: #285c83;
  --gold: #c6a24a;
  --gold-light: #e5c66f;
  --ink: #263442;
  --muted: #5b6873;
  --paper: #f5f7f8;
  --white: #fff;
  --line: #e1e6e9;
  --shadow: 0 12px 34px rgba(20, 44, 65, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* رأس الموقع والتنقل */
header, .site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  color: var(--white);
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 5px 22px rgba(14, 37, 57, .16);
}
header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 12px;
}
.logo-section { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-section img, .logo {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid rgba(229, 198, 111, .6);
  border-radius: 50%;
  background: white;
}
.site-name, header h1, .logo-text {
  margin: 0;
  color: white;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.4;
}
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 9px;
  color: white;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
header nav a:hover, header nav a:focus-visible { color: var(--navy); background: var(--gold-light); }
.contact-info { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: inherit; font-size: .85rem; }
.contact-info span { overflow-wrap: anywhere; }
.contact-info a { color: inherit; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

/* الواجهة الرئيسية وعرض الصور */
.hero { position: relative; height: clamp(360px, 53vw, 610px); overflow: hidden; background: #20384b; }
.slider-container, .slider, .slide { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity .55s ease, visibility .55s ease; }
.slide.active { visibility: visible; opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 25, 38, .18), rgba(9, 25, 38, .68)); content: ""; }
.slide-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: max(8%, calc((100% - 1080px) / 2));
  width: min(590px, 76%);
  padding: clamp(22px, 4vw, 42px);
  transform: translateY(-50%);
  color: white;
  background: rgba(17, 42, 62, .86);
  border-right: 4px solid var(--gold-light);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.slide-content h1, .slide-content h2 { margin: 0 0 13px; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.35; }
.slide-content p { margin: 0 0 22px; color: #f0f3f5; font-size: clamp(1rem, 1.7vw, 1.16rem); }
.slider-btn {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translateY(-50%);
  color: white;
  background: rgba(15, 39, 58, .72);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  cursor: pointer;
}
.slider-btn:hover { background: var(--blue); }
.slider-btn.prev { left: 18px; }
.slider-btn.next { right: 18px; }
.slider-dots { position: absolute; z-index: 3; bottom: 18px; left: 50%; display: flex; gap: 10px; transform: translateX(-50%); }
.dot { width: 13px; height: 13px; padding: 0; background: rgba(255,255,255,.64); border: 0; border-radius: 50%; cursor: pointer; }
.dot.active { background: var(--gold-light); box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* الأزرار والصفحات */
.btn, .cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  color: var(--navy);
  background: var(--gold-light);
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(15, 39, 58, .12);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.btn:hover, .cta-button:hover { transform: translateY(-2px); background: #f0d98e; }
.page-content { min-height: 45vh; padding: clamp(34px, 6vw, 68px) 0; background: white; }
.page-content .container { max-width: 900px; }
.page-content h1, .page-content h2 { margin: 0 0 22px; color: var(--navy); text-align: center; font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.4; }
.page-content h3 { margin: 30px 0 12px; color: var(--blue); font-size: 1.3rem; }
.page-content p, .page-content li { color: var(--muted); }
.page-content ul, .page-content ol { padding-inline-start: 1.5rem; }
.page-content li { margin-bottom: 10px; }
.contact-details, .contact-info-box, .contact-emergency {
  margin-block: 24px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.contact-details p { margin: 6px 0; }

/* المقالات والبطاقات */
.articles { padding: clamp(38px, 6vw, 72px) 0; background: var(--paper); }
.articles > .container { display: block; }
.articles h2, .featured-articles h2, .original-articles h2 {
  margin: 0 0 28px;
  color: var(--navy);
  text-align: center;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}
.articles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 13px;
  box-shadow: 0 5px 18px rgba(20,44,65,.055);
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card h3 { margin: 0 0 10px; color: var(--navy); font-size: 1.12rem; line-height: 1.55; }
.article-card p { margin: 0 0 18px; color: var(--muted); font-size: .96rem; }
.read-more { margin-top: auto; color: var(--blue); font-weight: 700; text-decoration: none; }
.read-more:hover { text-decoration: underline; }
.article-main { min-height: 65vh; padding: clamp(28px, 5vw, 56px) 0; background: var(--paper); }
.article-content { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.article-header { padding: clamp(24px, 5vw, 46px); color: white; text-align: center; background: var(--navy); border-bottom: 4px solid var(--gold); }
.article-header h1 { margin: 0 0 16px; font-size: clamp(1.55rem, 3.7vw, 2.35rem); line-height: 1.45; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.article-meta span { padding: 5px 12px; color: #f4f6f7; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 30px; font-size: .88rem; }
.article-body { padding: clamp(22px, 5vw, 48px); color: var(--ink); font-size: 1.03rem; line-height: 1.9; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { margin: 32px 0 14px; padding-bottom: 9px; color: var(--navy); border-bottom: 2px solid var(--gold); font-size: clamp(1.28rem, 2.6vw, 1.65rem); }
.article-body h3 { margin: 24px 0 10px; color: var(--blue); font-size: 1.2rem; }
.article-body ul, .article-body ol { padding-inline-start: 1.5rem; }
.article-body li { margin-bottom: 9px; }
.article-body a { color: #175f91; }
.article-body .lead { padding: 18px 20px; color: #34495a; background: #f7f4eb; border-right: 4px solid var(--gold); border-radius: 8px; }
.article-body .legal-note { margin: 26px 0; padding: 17px 20px; background: #fff8e5; border-right: 4px solid var(--gold); border-radius: 8px; }
.cta-section { margin: 34px 0 0; padding: 26px; color: white; text-align: center; background: var(--navy); border-radius: 12px; }
.cta-section h3 { margin: 0 0 8px; color: white; }
.cta-section p { color: #eef2f4; }

/* نموذج التواصل */
.contact-form { margin-top: 22px; padding: clamp(18px, 4vw, 32px); background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 8px 24px rgba(20,44,65,.07); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--navy); font-weight: 700; }
.form-group input, .form-group textarea { display: block; width: 100%; min-height: 46px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #cbd4da; border-radius: 8px; font: inherit; }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--blue); outline: 3px solid rgba(40,92,131,.12); }
.form-status { margin: 15px 0 0; color: var(--navy); }
.form-status a { display: inline-block; margin-top: 6px; font-weight: 700; }

/* التذييل */
footer { margin-top: 0; padding: 34px 0 18px; color: white; background: #122c42; border-top: 3px solid var(--gold); }
footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 30px; }
footer p { margin: 0; }
.footer-content { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.footer-section { padding: 16px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.footer-section h3 { margin: 0 0 9px; color: var(--gold-light); font-size: 1.05rem; }
.footer-section p { margin: 5px 0; color: #e1e8ed; }
.footer-section ul { margin: 0; padding-inline-start: 1.2rem; }
.footer-section li { margin: 4px 0; color: #e1e8ed; }
.footer-section a, footer .contact-info a { color: #f3dc9a; }
.footer-bottom { width: 100%; padding-top: 15px; text-align: center; color: #d5dfe6; border-top: 1px solid rgba(255,255,255,.16); }

/* أداة الاتصال العائمة */
.floating-contact { position: fixed; z-index: 1100; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); font-family: Tahoma, Arial, sans-serif; }
.contact-btn { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; color: var(--navy); background: var(--gold-light); border: 1px solid rgba(23,54,83,.12); border-radius: 30px; box-shadow: 0 6px 20px rgba(15,39,58,.22); font: inherit; font-weight: 700; cursor: pointer; }
.contact-btn:hover { background: #f0d98e; }
.btn-icon, .link-icon { font-size: 1.1rem; }
.contact-menu { position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; width: max-content; min-width: 190px; gap: 4px; padding: 8px; visibility: visible; opacity: 1; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: opacity .16s ease, transform .16s ease, visibility .16s ease; }
.contact-menu.hidden { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(6px); }
.contact-link { display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: var(--navy); border-radius: 8px; text-decoration: none; }
.contact-link:hover { background: #f3f6f7; }

/* صفحات الخطأ والطباعة والحركة المخففة */
.error-page { min-height: 70vh; display: grid; place-items: center; padding: 40px 0; text-align: center; }
.error-page h1 { margin: 0 0 10px; color: var(--navy); font-size: clamp(2rem, 7vw, 4rem); }
.error-page p { color: var(--muted); }
@media (max-width: 900px) {
  .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  header .container { justify-content: center; }
  header nav { justify-content: center; }
  header .contact-info { justify-content: center; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1160px); }
  header { position: relative; }
  header .container { gap: 9px; padding-block: 10px; }
  .logo-section { justify-content: center; }
  .logo-section img, .logo { width: 44px; height: 44px; }
  header nav { width: 100%; gap: 3px; }
  header nav a { min-height: 38px; padding: 6px 9px; font-size: .82rem; }
  header .contact-info { width: 100%; flex-direction: column; gap: 2px; font-size: .77rem; }
  .hero { height: 430px; }
  .slide-content { right: 7%; width: 86%; padding: 21px 18px; }
  .slide-content h1, .slide-content h2 { font-size: 1.65rem; }
  .slide-content p { font-size: .96rem; }
  .slider-btn { width: 38px; height: 38px; }
  .slider-btn.prev { left: 8px; }
  .slider-btn.next { right: 8px; }
  .articles-grid { grid-template-columns: 1fr; gap: 14px; }
  .article-card { padding: 19px; }
  .footer-content { grid-template-columns: 1fr; }
  footer .container { flex-direction: column; text-align: center; }
  .contact-form .btn { width: 100%; }
  .floating-contact { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .contact-btn { min-height: 44px; padding: 9px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  header, footer, .floating-contact, .slider-btn, .slider-dots, .btn, .cta-button { display: none !important; }
  body, .page-content, .article-main { background: white; }
  .container { width: 100%; }
}

/* صورة المحامية في صفحة التعريف */
.person-profile {
  display: grid;
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 42px);
  max-width: 820px;
  margin: 26px auto 34px;
  padding: clamp(16px, 3vw, 26px);
  background: #f6f8f9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 44, 65, .07);
}
.person-profile > img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 12px;
  background: #e8ecee;
}
.person-profile-copy h2 { margin: 0 0 12px; color: var(--navy); text-align: right; font-size: clamp(1.5rem, 3vw, 2rem); }
.person-profile-copy p { margin: 0 0 12px; }
.person-profile-label { color: var(--blue) !important; font-weight: 700; }
@media (max-width: 620px) {
  .person-profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .person-profile > img { width: min(100%, 310px); height: 380px; }
  .person-profile-copy h2 { text-align: center; }
}

/* واتساب المحامية: الإجراء الرئيسي مباشر، وبقية قنوات التواصل ضمن القائمة */
.floating-contact {
  display: flex;
  width: min(292px, calc(100vw - 24px));
  align-items: flex-end;
  gap: 8px;
}
.whatsapp-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 13px;
  color: #fff;
  background: #16864a;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  text-decoration: none;
}
.whatsapp-main:hover { color: #fff; background: #0e703c; }
.whatsapp-main .btn-icon { font-size: 1.35rem; }
.whatsapp-copy { display: grid; min-width: 0; text-align: right; line-height: 1.35; }
.whatsapp-name { overflow: hidden; font-size: .9rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.whatsapp-caption { color: #e7f4eb; font-size: .74rem; font-weight: 400; }
.contact-more {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: var(--navy);
  background: var(--gold-light);
  border: 1px solid rgba(23,54,83,.14);
  border-radius: 13px;
  box-shadow: 0 6px 20px rgba(15,39,58,.2);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.contact-more:hover { background: #f0d98e; }
.contact-more[aria-expanded="true"] { background: #f0d98e; }
@media (max-width: 620px) {
  .floating-contact { width: min(278px, calc(100vw - 24px)); }
  .whatsapp-main { min-height: 50px; padding: 7px 10px; }
  .whatsapp-name { font-size: .84rem; }
  .whatsapp-caption { font-size: .7rem; }
  .contact-more { width: 46px; height: 46px; flex-basis: 46px; }
}
