/*
Theme Name: ARD Dynamic Network
Theme URI: https://eshoardl.com
Author: Architecture Research & Development Ltd. / ARD
Author URI: https://eshoardl.com
Description: A dynamic WordPress theme for ARD Social Network, Smart Village, Micro Rural Economic Zone, WASH, investment and development collaboration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GPLv2 or later
Text Domain: ard-dynamic-network
*/

:root {
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #17231f;
  --muted: #667085;
  --line: #d8dfe6;
  --green: #087b4b;
  --green-dark: #064c33;
  --blue: #0a66c2;
  --gold: #d5a43a;
  --orange: #ff5a00;
  --danger: #e11d48;
  --shadow: 0 10px 34px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

body.ard-dark {
  --bg: #080b10;
  --surface: #111827;
  --surface-2: #0f172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #263244;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }

.ard-topbar {
  min-height: 70px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  align-items: center;
  gap: 18px;
  padding: 8px 18px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.ard-brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ard-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #2ab77d);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 1000;
  letter-spacing: -1px;
  flex: 0 0 auto;
}

.ard-search {
  flex: 1;
  min-width: 0;
  position: relative;
}

.ard-search input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 16px 0 42px;
}

.ard-search span {
  position: absolute;
  left: 15px;
  top: 11px;
  color: var(--muted);
}

.ard-center-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

.ard-tab {
  min-width: 88px;
  height: 60px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  position: relative;
  border-radius: 10px;
}

.ard-tab:hover,
.ard-tab.active { background: var(--surface-2); color: var(--green); }

.ard-tab.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: var(--green);
}

.ard-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.ard-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.ard-notify {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}

.ard-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--green));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 2px solid var(--surface);
  flex: 0 0 auto;
}

.ard-layout {
  display: grid;
  grid-template-columns: 320px minmax(420px, 760px) 340px;
  gap: 24px;
  width: min(1520px, calc(100% - 32px));
  margin: 18px auto 44px;
  align-items: start;
}

.ard-left,
.ard-right {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 98px);
  overflow-y: auto;
}

.ard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ard-profile-cover {
  height: 96px;
  background:
    linear-gradient(90deg, rgba(8,123,75,.78), rgba(213,164,58,.45)),
    url("assets/images/ard-gallery-smart.png") center/cover no-repeat;
}

.ard-profile-body {
  text-align: center;
  padding: 0 18px 18px;
}

.ard-big-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: -48px auto 12px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff;
  display: grid;
  place-items: center;
  border: 5px solid var(--surface);
  font-size: 30px;
  font-weight: 1000;
}

.ard-profile-body h2 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.15;
}

.ard-profile-body p { margin: 0; color: var(--muted); font-size: 14px; }

.ard-mini-stats {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.ard-mini-stats div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.ard-mini-stats strong { color: var(--green); }

.ard-menu { margin-top: 14px; padding: 10px; }
.ard-side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
}
.ard-side-link:hover,
.ard-side-link.active {
  background: var(--surface-2);
  color: var(--green);
}
.ard-side-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: #fff; background: var(--green);
}

.ard-feed { display: grid; gap: 14px; min-width: 0; }

.ard-hero {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6,76,51,.9), rgba(6,76,51,.42)),
    url("assets/images/ard-hero-smart-village.png") center/cover no-repeat;
  color: #fff;
  padding: 44px 28px;
  display: flex;
  align-items: center;
}
.ard-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: .98;
  letter-spacing: -2px;
  max-width: 720px;
}
.ard-hero p {
  margin: 0 0 24px;
  max-width: 620px;
  color: rgba(255,255,255,.86);
  font-size: 18px;
}

.ard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 900;
}
.ard-btn-primary { background: var(--green); color: #fff; }
.ard-btn-white { background: #fff; color: var(--green-dark); }
.ard-btn-soft { background: var(--surface-2); color: var(--text); }

.ard-composer { padding: 16px; }
.ard-composer-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ard-composer-open {
  flex: 1;
  min-height: 46px;
  border-radius: 999px;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  padding: 0 18px;
}
.ard-composer-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}
.ard-composer-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 11px;
  border-radius: 10px;
  font-weight: 900;
}
.ard-composer-actions button:hover { background: var(--surface-2); color: var(--green); }

.ard-stories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  overflow-x: auto;
}
.ard-story {
  min-height: 170px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  color: white;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  font-weight: 1000;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)), url("assets/images/ard-gallery-weavers.png") center/cover no-repeat;
}
.ard-story:nth-child(2) { background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.7)), url("assets/images/ard-gallery-smart.png"); }
.ard-story:nth-child(3) { background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.7)), url("assets/images/ard-gallery-survey.png"); }
.ard-story:nth-child(4) { background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.7)), url("assets/images/ard-gallery-housing.png"); }
.ard-story:nth-child(5) { background: linear-gradient(135deg, var(--green), var(--gold)); }

.ard-feed-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ard-feed-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 15px;
  font-weight: 1000;
  cursor: pointer;
  position: relative;
}
.ard-feed-tab.active { color: var(--green); }
.ard-feed-tab.active::after {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: var(--green);
}

.ard-post { padding: 16px 0 0; }
.ard-post-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
}
.ard-post-author {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ard-post-author h3 { margin: 0; font-size: 16px; }
.ard-post-author p { margin: 0; color: var(--muted); font-size: 13px; }
.ard-post-text { padding: 0 16px 14px; }
.ard-post-media {
  min-height: 310px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #88d5b2, #f3d88d);
}
.ard-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ard-post-metrics {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.ard-post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px 10px 10px;
}
.ard-post-actions button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 11px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.ard-post-actions button:hover,
.ard-post-actions button.active { background: var(--surface-2); color: var(--green); }

.ard-right-card { padding: 16px; margin-bottom: 14px; }
.ard-right-card h3 { margin: 0 0 12px; }
.ard-trend, .ard-partner, .ard-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ard-trend:last-child, .ard-partner:last-child, .ard-event:last-child { border-bottom: 0; }
.ard-trend span, .ard-partner span, .ard-event span { color: var(--muted); font-size: 12px; }
.ard-pill {
  background: rgba(8,123,75,.12);
  color: var(--green);
  padding: 6px 9px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}
.ard-small-btn {
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}
.ard-small-btn.secondary { background: var(--surface-2); color: var(--text); }

.ard-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ard-gallery-grid img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.ard-message {
  position: fixed;
  right: 24px;
  bottom: 0;
  width: 360px;
  max-width: calc(100% - 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  transform: translateY(calc(100% - 58px));
  transition: transform .25s ease;
  z-index: 2000;
  overflow: hidden;
}
.ard-message.open { transform: translateY(0); }
.ard-message-head {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.ard-message-body { height: 360px; padding: 14px; overflow-y: auto; }
.ard-message-search {
  width: 100%;
  border: 0;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ard-chat {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
}
.ard-chat:hover { background: var(--surface-2); }
.ard-chat p { margin: 0; color: var(--muted); font-size: 13px; }

.ard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.64);
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 3000;
}
.ard-modal.open { display: grid; }
.ard-modal-box {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.ard-modal-head {
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.ard-modal-body { padding: 14px; }
.ard-modal textarea,
.ard-modal input,
.ard-modal select {
  width: 100%;
  border: 0;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.ard-modal textarea { min-height: 145px; resize: vertical; }

.ard-footer {
  margin-top: 30px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .ard-topbar { grid-template-columns: 300px 1fr 250px; }
  .ard-layout { grid-template-columns: 280px minmax(380px, 1fr); }
  .ard-right { display: none; }
}

@media (max-width: 920px) {
  .ard-topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 64px;
    padding: 10px 12px;
  }
  .ard-brand-area { grid-column: 1/2; }
  .ard-search { grid-column: 1/3; order: 3; }
  .ard-center-tabs { display: none; }
  .ard-left { display: none; position: static; max-height: none; }
  .ard-left.open { display: block; }
  .ard-layout {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 20px));
    margin-top: 12px;
  }
  .ard-mobile-menu { display: grid !important; }
  .ard-stories { grid-template-columns: repeat(5, 130px); }
  .ard-message { right: 10px; }
}

.ard-mobile-menu { display: none; }

@media (max-width: 560px) {
  .ard-logo, .ard-avatar, .ard-round { width: 38px; height: 38px; }
  .ard-composer-actions, .ard-post-actions, .ard-feed-tabs { grid-template-columns: 1fr; }
  .ard-post-media { min-height: 220px; }
}
