/*
Theme Name: ALMOQAYADA
Theme URI: https://almoqayada.com
Template: adforest
Author: ALMOQAYADA Team
Author URI: https://almoqayada.com
Description: Thème enfant ALMOQAYADA basé sur AdForest — Plateforme Collaborative d'Échange au Maroc. Design personnalisé avec couleurs ALMOQAYADA, sections IA matching, catégories marocaines et plan d'action intégré.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: almoqayada
Tags: classifieds, marketplace, exchange, morocco, barter, ai-matching
*/

/* ============================================================
   ALMOQAYADA CHILD THEME — Variables & Overrides
   ============================================================ */

:root {
  --alm-orange:  #F47B20;
  --alm-yellow:  #F5C518;
  --alm-green:   #3DAA5C;
  --alm-blue:    #2563EB;
  --alm-dark:    #111827;
  --alm-mid:     #374151;
  --alm-light:   #F9FAFB;
  --alm-radius:  14px;
  --alm-shadow:  0 8px 40px rgba(0,0,0,0.10);

  /* Override AdForest red theme color with ALMOQAYADA orange */
  --theme-color: #F47B20;
}

/* ── GLOBAL FONT & BODY ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

body {
  font-family: 'DM Sans', 'Poppins', sans-serif !important;
  background-color: #F9FAFB !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', 'Poppins', sans-serif !important;
}

/* ── OVERRIDE ADFOREST RED → ALMOQAYADA ORANGE ──────────────── */
.btn-theme,
.btn-theme:hover {
  background-color: var(--alm-orange) !important;
  border-color: var(--alm-orange) !important;
  box-shadow: 0 0.5rem 1.125rem -0.5rem var(--alm-orange) !important;
}

.btn-theme-secondary {
  border-color: var(--alm-orange) !important;
  color: var(--alm-orange) !important;
}

.btn-theme-secondary:hover {
  background-color: var(--alm-orange) !important;
  color: white !important;
}

a:hover { color: var(--alm-orange) !important; }

.text-theme { color: var(--alm-orange) !important; }
.bg-theme   { background-color: var(--alm-orange) !important; }

/* AdForest uses #ff002e everywhere — override key elements */
.adt-nav-list > li > a:hover,
.sb-menu > ul > li > a:hover,
.adt-post-ad-btn,
.ad-post-btn,
.tag-theme { color: var(--alm-orange) !important; }

.adt-post-ad-btn,
.ad-post-btn {
  background-color: var(--alm-orange) !important;
  border-color: var(--alm-orange) !important;
  color: white !important;
  border-radius: 40px !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  transition: all .25s !important;
}

.adt-post-ad-btn:hover,
.ad-post-btn:hover {
  box-shadow: 0 8px 24px rgba(244,123,32,0.4) !important;
  transform: translateY(-1px) !important;
  color: white !important;
}

/* Category active/hover states */
.ad-cats-box:hover .cat-name,
.ad-cats-box.active .cat-name,
.ad-cats-box:hover .cat-icon i,
.popular-cats-box:hover .cat-name {
  color: var(--alm-orange) !important;
}

.ad-cats-box:hover,
.popular-cats-box:hover {
  border-color: var(--alm-orange) !important;
}

/* Search button */
.search-btn, .btn-search, #ad-search-btn,
button[type="submit"].btn-dark {
  background-color: var(--alm-orange) !important;
  border-color: var(--alm-orange) !important;
  color: white !important;
}

/* Pagination active */
.page-link.active,
.pagination .active .page-link {
  background-color: var(--alm-orange) !important;
  border-color: var(--alm-orange) !important;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.sb-header {
  border-bottom: 2px solid rgba(244,123,32,0.08) !important;
}

.sb-header .logo img {
  max-height: 48px !important;
}

/* Logo text fallback if no image set */
.alm-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--alm-dark);
  text-decoration: none;
}
.alm-logo-text em {
  color: var(--alm-orange);
  font-style: normal;
}

/* ── ALMOQAYADA HERO SECTION ────────────────────────────────── */
.alm-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #fef9e7 50%, #f0fdf4 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.alm-hero::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 450px; height: 450px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,123,32,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.alm-hero::after {
  content: '';
  position: absolute; bottom: -60px; left: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(61,170,92,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.alm-hero-inner {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto; padding: 0 20px;
}

.alm-hero-badge {
  display: inline-block;
  background: rgba(244,123,32,0.12); color: var(--alm-orange);
  border: 1px solid rgba(244,123,32,0.3);
  padding: 6px 20px; border-radius: 40px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.alm-hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  margin-bottom: 20px !important;
  color: var(--alm-dark) !important;
}

.alm-hero .hero-sub {
  font-size: 1.1rem;
  color: var(--alm-mid);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

.alm-hero-buttons {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 0;
}

/* ── ALM SECTION COMMONS ────────────────────────────────────── */
.alm-section { padding: 80px 0; }

.alm-section-label {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--alm-orange); margin-bottom: 10px;
}

.alm-section-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem) !important;
  font-weight: 800 !important;
  margin-bottom: 14px !important;
  line-height: 1.2 !important;
}

.alm-section-sub {
  color: var(--alm-mid);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 540px;
}

/* ── HOW IT WORKS ───────────────────────────────────────────── */
.alm-how-section { background: white; }

.alm-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px; margin-top: 48px;
}

.alm-how-card {
  background: #F9FAFB;
  border: 1px solid #f3f4f6;
  border-radius: var(--alm-radius);
  padding: 32px 26px;
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.alm-how-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--alm-shadow);
  border-color: rgba(244,123,32,0.2);
}

.alm-how-card::before {
  content: attr(data-step);
  position: absolute; top: -10px; right: 14px;
  font-family: 'Syne', sans-serif; font-size: 5rem; font-weight: 800;
  color: rgba(0,0,0,0.04); line-height: 1; pointer-events: none;
}

.alm-how-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}

.alm-how-icon.ic-orange { background: rgba(244,123,32,0.12); }
.alm-how-icon.ic-green  { background: rgba(61,170,92,0.12); }
.alm-how-icon.ic-blue   { background: rgba(37,99,235,0.10); }
.alm-how-icon.ic-yellow { background: rgba(245,197,24,0.15); }

.alm-how-card h3 { font-size: 1rem !important; font-weight: 700 !important; margin-bottom: 10px !important; }
.alm-how-card p  { font-size: 0.87rem; color: var(--alm-mid); line-height: 1.65; margin: 0; }

/* ── CATEGORIES DARK ────────────────────────────────────────── */
.alm-cats-section {
  background: var(--alm-dark);
  padding: 80px 0;
}

.alm-cats-section .alm-section-label { color: var(--alm-yellow); }
.alm-cats-section .alm-section-title { color: white; }
.alm-cats-section .alm-section-sub   { color: rgba(255,255,255,0.6); }

.alm-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px; margin-top: 48px;
}

.alm-cat-tile {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--alm-radius);
  padding: 26px 16px;
  text-align: center; cursor: pointer;
  transition: all .25s;
  text-decoration: none !important; display: block;
}

.alm-cat-tile:hover {
  background: rgba(244,123,32,0.15);
  border-color: rgba(244,123,32,0.4);
  transform: translateY(-3px);
}

.alm-cat-emoji { font-size: 1.9rem; margin-bottom: 10px; display: block; }
.alm-cat-name  { font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 600; color: white; display: block; }
.alm-cat-sub   { font-size: 0.7rem; color: rgba(255,255,255,0.4); display: block; margin-top: 3px; }

/* ── AI MATCHING SECTION ────────────────────────────────────── */
.alm-ai-section {
  background: linear-gradient(135deg, #f0fdf4, #fff7ed);
  padding: 80px 0;
}

.alm-ai-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.alm-ai-demo {
  background: white; border-radius: 22px; padding: 32px;
  box-shadow: var(--alm-shadow);
}

.alm-ai-demo-header {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 0.95rem; margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}

.alm-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--alm-green);
  box-shadow: 0 0 8px var(--alm-green);
  animation: alm-pulse 2s infinite;
}

@keyframes alm-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.alm-live-badge {
  background: rgba(61,170,92,0.1); color: var(--alm-green);
  font-size: 10px; padding: 3px 10px; border-radius: 20px; font-weight: 700;
}

.alm-match-row {
  display: flex; align-items: center; gap: 12px;
  background: #F9FAFB; border-radius: 12px; padding: 14px;
  border: 1px solid #e5e7eb; margin-bottom: 10px;
}

.alm-match-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

.alm-match-info { flex: 1; }
.alm-match-name  { font-weight: 600; font-size: 0.85rem; }
.alm-match-offer { font-size: 0.75rem; color: var(--alm-mid); }

.alm-match-tag { font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.alm-tag-offer { background: rgba(61,170,92,0.12);  color: var(--alm-green); }
.alm-tag-need  { background: rgba(37,99,235,0.10);  color: var(--alm-blue); }

.alm-arrow {
  text-align: center; font-size: 1rem; color: var(--alm-orange);
  font-weight: 800; display: flex; align-items: center;
  justify-content: center; gap: 10px; margin: 4px 0 10px;
}

.alm-match-badge {
  background: var(--alm-green); color: white;
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}

.alm-match-result {
  background: rgba(61,170,92,0.07); border: 1px solid rgba(61,170,92,0.2);
  border-radius: 10px; padding: 11px 14px;
  font-size: 0.78rem; color: var(--alm-green); font-weight: 600;
}

.alm-ai-features { list-style: none; margin-top: 28px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.alm-ai-feature  { display: flex; align-items: flex-start; gap: 13px; }
.alm-ai-feat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(244,123,32,0.1); color: var(--alm-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.alm-ai-feat-text h4 { font-size: 0.9rem !important; font-weight: 700 !important; margin-bottom: 3px !important; }
.alm-ai-feat-text p  { font-size: 0.81rem; color: var(--alm-mid); line-height: 1.55; margin: 0; }

/* ── AI TOOL PAGE (recherche-ia) ─────────────────────────────── */
.alm-ai-tool-wrap { background: #0a0f1e; min-height: 100vh; }

.alm-ai-tool-header {
  background: linear-gradient(135deg, #0a0f1e 0%, #111827 60%, #0f1f3d 100%);
  padding: 100px 0 56px; text-align: center; position: relative; overflow: hidden;
}

.alm-ai-tool-header::before {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,123,32,0.12) 0%, transparent 70%);
}

/* ── ACTION PLAN ────────────────────────────────────────────── */
.alm-action-section { background: var(--alm-dark); padding: 80px 0; }
.alm-action-section .alm-section-label { color: var(--alm-yellow); }
.alm-action-section .alm-section-title { color: white !important; }

.alm-action-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin-top: 48px;
}

.alm-action-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--alm-radius); padding: 28px;
  transition: all .25s;
}

.alm-action-card:hover {
  background: rgba(244,123,32,0.12);
  border-color: rgba(244,123,32,0.3);
}

.alm-action-phase {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--alm-orange); margin-bottom: 10px;
}

.alm-action-card h3 { font-size: 1rem !important; color: white !important; margin-bottom: 14px !important; }
.alm-action-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.alm-action-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.83rem; color: rgba(255,255,255,0.7); line-height: 1.5;
}
.alm-action-list li::before { content: '→'; color: var(--alm-orange); flex-shrink: 0; font-weight: 700; }

/* ── TRUST SECTION ──────────────────────────────────────────── */
.alm-trust-section { background: white; padding: 80px 0; }

.alm-trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-top: 48px;
}

.alm-trust-card {
  background: #F9FAFB; border-radius: var(--alm-radius); padding: 28px;
  text-align: center; border: 1px solid #e5e7eb;
  transition: transform .25s, box-shadow .25s;
}

.alm-trust-card:hover { transform: translateY(-3px); box-shadow: var(--alm-shadow); }
.alm-trust-icon { font-size: 2rem; margin-bottom: 12px; }
.alm-trust-card h3 { font-size: 0.9rem !important; font-weight: 700 !important; margin-bottom: 7px !important; }
.alm-trust-card p  { font-size: 0.8rem; color: var(--alm-mid); line-height: 1.6; margin: 0; }

/* ── CTA BANNER ─────────────────────────────────────────────── */
.alm-cta-banner {
  background: linear-gradient(135deg, var(--alm-orange), #e8650a);
  padding: 72px 0; text-align: center; position: relative; overflow: hidden;
}
.alm-cta-banner h2 { font-size: clamp(1.7rem, 3.5vw, 2.8rem) !important; color: white !important; margin-bottom: 16px !important; }
.alm-cta-banner p  { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 36px; }

.alm-btn-white {
  display: inline-block; background: white; color: var(--alm-orange);
  padding: 15px 40px; border-radius: 50px;
  font-weight: 800; font-size: 15px; font-family: 'Syne', sans-serif;
  transition: all .25s; text-decoration: none !important;
}
.alm-btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.2);
  color: var(--alm-orange) !important;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.alm-btn {
  display: inline-block; padding: 13px 32px; border-radius: 50px;
  font-weight: 700; font-size: 14px; font-family: 'Syne', sans-serif;
  transition: all .25s; text-decoration: none !important; border: none; cursor: pointer;
}
.alm-btn-primary { background: var(--alm-orange); color: white !important; }
.alm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(244,123,32,0.4); color: white !important; }
.alm-btn-secondary { background: white; color: var(--alm-dark) !important; border: 2px solid #e5e7eb; }
.alm-btn-secondary:hover { border-color: var(--alm-orange); color: var(--alm-orange) !important; }
.alm-btn-ai { background: linear-gradient(135deg, #2563EB, #7c3aed); color: white !important; }
.alm-btn-ai:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.4); color: white !important; }

/* ── ADFOREST OVERRIDE: AD LISTING CARDS ─────────────────────── */
.ad-listing-box {
  border-radius: var(--alm-radius) !important;
  transition: transform .25s, box-shadow .25s !important;
}
.ad-listing-box:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--alm-shadow) !important;
}

/* Price color → orange */
.ad-price, .adt-price { color: var(--alm-orange) !important; }

/* Featured badge */
.featured-badge, .adt-featured { background: var(--alm-orange) !important; }

/* ── ADFOREST FOOTER OVERRIDE ───────────────────────────────── */
.adt-footer-section {
  background: #0d1117 !important;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .alm-ai-inner { grid-template-columns: 1fr; gap: 36px; }
  .alm-section { padding: 60px 0; }
}

@media (max-width: 600px) {
  .alm-hero h1 { font-size: 1.9rem !important; }
  .alm-hero-buttons { flex-direction: column; align-items: center; }
  .alm-cats-grid { grid-template-columns: repeat(2, 1fr); }
}
