/*
Theme Name: CashDir
Theme URI: https://cashdir.com
Author: CashDir
Description: Shariah-compliant finance directory for Asia, US and Europe
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: cashdir
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #04342C;
  --green-mid:    #0F6E56;
  --green-bright: #1D9E75;
  --green-light:  #5DCAA5;
  --green-pale:   #E1F5EE;
  --cream:        #F9F6F0;
  --text:         #1a1a1a;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --white:        #ffffff;
  --radius:       10px;
  --font-body:    'DM Sans', sans-serif;
  --font-head:    'Playfair Display', serif;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
}

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ── */
#site-header {
  background: var(--green-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.site-logo span { color: var(--green-light); }

#site-navigation ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

#site-navigation a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}

#site-navigation a:hover { color: var(--green-light); }

/* ── Hero ── */
.hero {
  background: var(--green-dark);
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(29,158,117,0.08);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: var(--white);
  margin-bottom: 18px;
}

.hero h1 em {
  color: var(--green-light);
  font-style: normal;
}

.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto 24px;
}

.hero-search input {
  flex: 1;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.hero-search input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search input:focus { border-color: var(--green-bright); }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: opacity 0.15s, transform 0.1s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--green-bright); color: var(--white); }
.btn-outline { background: transparent; border: 1px solid var(--green-light); color: var(--green-light); }

.hero-regions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.region-pill {
  padding: 5px 16px;
  border-radius: 30px;
  border: 1px solid rgba(93,202,165,0.4);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.region-pill:hover {
  background: rgba(29,158,117,0.2);
  color: var(--green-light);
  text-decoration: none;
}

/* ── Section ── */
.section {
  padding: 56px 0;
}

.section-alt { background: var(--cream); }

.section-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 8px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 32px;
  color: var(--text);
}

/* ── Category Grid ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.cat-card:hover {
  border-color: var(--green-bright);
  box-shadow: 0 4px 16px rgba(29,158,117,0.1);
  text-decoration: none;
}

.cat-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}

.cat-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.cat-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Listings ── */
.listings { display: flex; flex-direction: column; gap: 12px; }

.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: border-color 0.15s;
}

.listing-card:hover { border-color: var(--green-bright); }

.listing-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--green-pale);
  color: var(--green-mid);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.3;
}

.listing-body { flex: 1; }

.listing-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.listing-name { font-size: 16px; font-weight: 500; }

.badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.badge-halal { background: var(--green-pale); color: var(--green-mid); }
.badge-region { background: #f3f4f6; color: var(--text-muted); }

.listing-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.6;
}

.listing-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-visit {
  margin-left: auto;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--green-bright);
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn-visit:hover { opacity: 0.85; text-decoration: none; }

/* ── Blog Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.blog-card:hover { border-color: var(--green-bright); }

.blog-thumb {
  height: 160px;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.blog-body { padding: 18px; }

.blog-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-bright);
  margin-bottom: 8px;
}

.blog-title {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
}

.blog-meta { font-size: 12px; color: var(--text-muted); }

/* ── Trust bar ── */
.trust-bar {
  background: var(--green-dark);
  padding: 32px 0;
  text-align: center;
}

.trust-bar p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-bottom: 16px;
}

.trust-logos {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.trust-logo {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
}

/* ── Footer ── */
#site-footer {
  background: var(--green-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 40px 0 24px;
}

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

.footer-brand .site-logo { display: inline-block; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.7; }

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 14px;
  font-family: var(--font-body);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color 0.15s; }
.footer-col a:hover { color: var(--green-light); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.35); }
.disclaimer { font-size: 12px; color: rgba(255,255,255,0.3); max-width: 600px; }

/* ── WordPress Core ── */
.wp-block-post-content { max-width: 720px; margin: 40px auto; padding: 0 24px; }
.entry-title { font-size: 36px; margin-bottom: 8px; }
.entry-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.entry-content p { margin-bottom: 1.4em; }
.entry-content h2 { font-size: 24px; margin: 2em 0 0.75em; }
.entry-content h3 { font-size: 20px; margin: 1.5em 0 0.5em; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; text-align: center; }
  .nav-inner { padding: 0 16px; }
  #site-navigation { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .listing-card { flex-direction: column; }
  .btn-visit { margin-left: 0; }
}
