/*
Theme Name: أبو مرام للواجهات والحجر الطبيعي (شركة حجر الدار)
Theme URI: https://example.com
Author: أبو مرام — شركة حجر الدار
Description: قالب ووردبريس متكامل وسريع لتوريد حجر الواجهات الطبيعي، حاسبة الكميات والهدر والنقل، لوحة تحكم منظمة، إدارة المقالات وخيارات عرضها، السرعة، وتحسين محركات البحث SEO/GEO.
Version: 4.0.0
Text Domain: abu-maram-facades
*/

:root {
  --bg-page: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-muted: #efeae0;
  --bg-dark: #161512;
  --bg-dark-card: #22201b;
  --text-main: #1b1916;
  --text-muted: #5c574f;
  --text-light: #f9f7f2;
  --accent: #9c6f24;
  --accent-hover: #7d5719;
  --accent-soft: rgba(156, 111, 36, 0.12);
  --whatsapp: #187a43;
  --whatsapp-hover: #125e33;
  --border: #e3ddd1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(22, 21, 18, 0.06);
  --container: 1180px;
}

body.am-dark-mode {
  --bg-page: #11100e;
  --bg-surface: #1b1916;
  --bg-muted: #24211c;
  --text-main: #f4efe6;
  --text-muted: #b8b0a2;
  --border: #322e27;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Topbar */
.top-announce {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 7px 0;
  text-align: center;
}

/* Header & Mobile Navigation */
.site-header {
  z-index: 900;
  background: rgba(22, 21, 18, 0.98);
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 12px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo-img {
  max-height: 44px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.75rem;
  color: #d6c5a5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 18px;
}

.desktop-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ede8de;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.desktop-nav a:hover {
  color: #e4be78;
  border-bottom-color: #e4be78;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-wa-sm {
  background: var(--whatsapp);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-wa-sm:hover {
  background: var(--whatsapp-hover);
}

.icon-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 14, 12, 0.65);
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer-panel {
  width: min(86vw, 340px);
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  margin-right: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.drawer-close {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-list a {
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 0.95rem;
}

.mobile-nav-list a:hover {
  background: rgba(156, 111, 36, 0.25);
  color: #f3d59b;
}

@media (min-width: 900px) {
  .desktop-nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(155deg, var(--bg-dark) 0%, #2b251c 60%, #1b1915 100%);
  color: var(--text-light);
  padding: 38px 0 44px;
  border-bottom: 3px solid var(--accent);
}

.hero-badge {
  display: inline-block;
  background: rgba(228, 190, 120, 0.16);
  border: 1px solid rgba(228, 190, 120, 0.35);
  color: #f0cf8e;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
}

.hero-desc {
  margin: 0 0 20px;
  color: #dfd8ca;
  max-width: 780px;
  font-size: 0.98rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5efe3;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-light-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-light-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Main Sections */
.section-block {
  padding: 36px 0;
}

.section-head {
  margin-bottom: 20px;
}

.section-title {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--text-main);
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Finish Preview Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.finish-box {
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid #353026;
}

.finish-stage {
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #ede6d8;
  color: #1b1916;
  transition: all 0.25s ease;
}

.finish-stage.style-plain {
  background: linear-gradient(135deg, #f3eee4 0%, #e6decb 100%);
}

.finish-stage.style-grooved {
  background-color: #ebe2cf;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(125, 87, 25, 0.18) 0px,
    rgba(125, 87, 25, 0.18) 2px,
    transparent 2px,
    transparent 16px
  );
}

.finish-stage.style-honed {
  background: linear-gradient(145deg, #f7f4ed 0%, #dcd2be 100%);
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.65);
}

.finish-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.finish-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f3eee4;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.finish-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Stone & Articles Grids */
.stones-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 680px) {
  .stones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stones-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .articles-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stone-card, .post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow);
}

.post-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.stone-meta, .post-meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stone-title, .post-title {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 800;
}

.stone-desc, .post-excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stone-price-box {
  background: var(--bg-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.stone-price-val {
  font-weight: 800;
  color: var(--text-main);
  font-size: 1rem;
}

.stone-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stone-actions .btn {
  flex: 1 1 120px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

/* Calculator Layout */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .calc-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid #cfc7b8;
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.calc-result-card {
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid #353026;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.result-row.total {
  border-bottom: none;
  padding-top: 14px;
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f0cf8e;
}

.calc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.notice-box {
  background: var(--bg-muted);
  border-right: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 18px;
}

/* Subpages / Tables / Single Post */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.data-table th {
  background: var(--bg-dark);
  color: #fff;
  font-weight: 700;
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-main);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #dfd8ca;
  padding: 36px 0 24px;
  margin-top: 24px;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #cfc7b8;
}

.footer-links a:hover {
  color: #f0cf8e;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: #a9a192;
}
