/*
Theme Name: ILP NGO
Theme URI: https://ngo.iraq-ilp.org
Author: Al Hub Wa Al Salam Iraqi Globally
Description: Bilingual (English / Arabic) block theme for Al Hub Wa Al Salam Iraqi Globally (ILP).
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ilp-ngo
*/

:root {
  --ilp-green-900: #0f3d26;
  --ilp-green-700: #1e6b3a;
  --ilp-green-100: #e7f2ea;
  --ilp-blue-600: #0b7fc7;
  --ilp-blue-100: #e6f3fb;
  --ilp-sand: #f6f4ee;
  --ilp-ink: #1b2a22;
  --ilp-muted: #5a6b62;
  --ilp-red: #b3202a;
  --ilp-line: #dfe5df;
  --ilp-radius: 14px;
}

html { scroll-behavior: smooth; }
body {
  color: var(--ilp-ink);
  background: #fff;
  font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.ilp-ar { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; line-height: 1.95; }
img { max-width: 100%; height: auto; }
a { color: var(--ilp-blue-600); }
a:hover { color: var(--ilp-green-700); }

/* ---------- Header ---------- */
.ilp-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--ilp-line);
}
.ilp-header .ilp-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; max-width: 1200px; margin: 0 auto; padding: .55rem 1.25rem;
}
.ilp-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ilp-green-900); }
.ilp-brand img { width: 56px; height: auto; display: block; }
.ilp-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.ilp-brand-text strong { font-size: 1.02rem; letter-spacing: .01em; }
.ilp-brand-text span { font-size: .78rem; color: var(--ilp-muted); }
.ilp-header .wp-block-navigation { font-size: .95rem; font-weight: 600; }
.ilp-header .wp-block-navigation a { color: var(--ilp-ink); text-decoration: none; padding: .35rem .2rem; border-bottom: 2px solid transparent; }
.ilp-header .wp-block-navigation a:hover { border-bottom-color: var(--ilp-blue-600); color: var(--ilp-green-900); }
.ilp-lang a {
  display: inline-block; padding: .3rem .8rem; border: 1.5px solid var(--ilp-green-700);
  border-radius: 999px; color: var(--ilp-green-700) !important; font-weight: 700;
}
.ilp-lang a:hover { background: var(--ilp-green-700); color: #fff !important; border-bottom-color: var(--ilp-green-700) !important; }

/* ---------- Layout helpers ---------- */
.ilp-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }
.ilp-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.ilp-section.alt { background: var(--ilp-sand); }
.ilp-section h2.ilp-h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--ilp-green-900);
  margin: 0 0 .35rem; line-height: 1.25;
}
.ilp-eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ilp-blue-600); margin-bottom: .6rem;
}
body.ilp-ar .ilp-eyebrow { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.ilp-lead { font-size: 1.12rem; color: var(--ilp-muted); max-width: 62ch; }

/* ---------- Hero ---------- */
.ilp-hero {
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(11,127,199,.55), transparent 60%),
    linear-gradient(135deg, #0f3d26 0%, #17573a 60%, #0d6aa8 130%);
  color: #fff; padding-block: clamp(3rem, 8vw, 6.5rem);
}
.ilp-hero .ilp-wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; }
.ilp-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.12; margin: 0 0 1rem; color: #fff; }
body.ilp-ar .ilp-hero h1 { line-height: 1.4; }
.ilp-hero p.ilp-lead { color: rgba(255,255,255,.88); }
.ilp-hero .ilp-eyebrow { color: #9ad4f5; }
.ilp-hero-logo { justify-self: center; background: #fff; border-radius: 50%; padding: 1.4rem; width: min(340px, 70vw); aspect-ratio: 1; display: grid; place-items: center; box-shadow: 0 25px 60px rgba(0,0,0,.35); }
.ilp-hero-logo img { width: 92%; }
.ilp-btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.ilp-btn a, a.ilp-btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: #fff; color: var(--ilp-green-900); border: 2px solid #fff; transition: .2s;
}
.ilp-btn a:hover, a.ilp-btn:hover { background: transparent; color: #fff; }
.ilp-btn.ghost a, a.ilp-btn.ghost { background: transparent; color: #fff; }
.ilp-btn.ghost a:hover, a.ilp-btn.ghost:hover { background: #fff; color: var(--ilp-green-900); }
.ilp-btn.solid a, a.ilp-btn.solid { background: var(--ilp-green-700); border-color: var(--ilp-green-700); color: #fff; }
.ilp-btn.solid a:hover, a.ilp-btn.solid:hover { background: transparent; color: var(--ilp-green-700); }

/* ---------- Stats ---------- */
.ilp-stats { background: var(--ilp-green-900); color: #fff; padding-block: 2.2rem; }
.ilp-stats .ilp-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.ilp-stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; color: #9ad4f5; }
.ilp-stat span { font-size: .95rem; opacity: .9; }

/* ---------- Cards / grids ---------- */
.ilp-grid { display: grid; gap: 1.4rem; margin-top: 2rem; }
.ilp-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.ilp-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.ilp-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.ilp-card {
  background: #fff; border: 1px solid var(--ilp-line); border-radius: var(--ilp-radius);
  padding: 1.5rem; box-shadow: 0 2px 10px rgba(15,61,38,.04); transition: .2s;
}
.ilp-card:hover { box-shadow: 0 12px 30px rgba(15,61,38,.1); transform: translateY(-2px); }
.ilp-card h3 { font-size: 1.12rem; margin: 0 0 .5rem; color: var(--ilp-green-900); }
.ilp-card p { margin: 0; color: var(--ilp-muted); font-size: .97rem; }
.ilp-card .ilp-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ilp-green-100); color: var(--ilp-green-700); font-size: 1.4rem; margin-bottom: .9rem;
}
.ilp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.ilp-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ilp-chip { background: var(--ilp-blue-100); color: #0a5f96; padding: .25rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }

/* ---------- Projects (details blocks) ---------- */
.ilp-projects .wp-block-details {
  background: #fff; border: 1px solid var(--ilp-line); border-radius: var(--ilp-radius);
  margin: 0 0 .9rem; padding: 0; overflow: hidden;
}
.ilp-projects .wp-block-details > summary {
  cursor: pointer; padding: 1.05rem 1.3rem; font-weight: 700; color: var(--ilp-green-900);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.ilp-projects .wp-block-details > summary::-webkit-details-marker { display: none; }
.ilp-projects .wp-block-details > summary::after { content: "+"; font-size: 1.5rem; color: var(--ilp-blue-600); line-height: 1; }
.ilp-projects .wp-block-details[open] > summary::after { content: "\2212"; }
.ilp-projects .wp-block-details[open] > summary { background: var(--ilp-green-100); }
.ilp-projects .wp-block-details > *:not(summary) { padding-inline: 1.3rem; }
.ilp-projects .wp-block-details > *:nth-child(2) { padding-top: 1rem; }
.ilp-projects .wp-block-details > *:last-child { padding-bottom: 1.3rem; }
.ilp-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .88rem; color: var(--ilp-muted); margin: 0 0 .8rem; }
.ilp-meta b { color: var(--ilp-green-700); }

/* ---------- Gallery ---------- */
.ilp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-top: 1rem; }
.ilp-gallery figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--ilp-sand); }
.ilp-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ilp-gallery figure:hover img { transform: scale(1.05); }

/* ---------- Partners ---------- */
.ilp-partners { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.ilp-partners span { border: 1px solid var(--ilp-line); background: #fff; padding: .55rem 1.1rem; border-radius: 10px; font-weight: 600; color: var(--ilp-green-900); }

/* ---------- Page header (inner pages) ---------- */
.ilp-pagehead { background: linear-gradient(135deg, #0f3d26, #17573a 70%, #0d6aa8 160%); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem); }
.ilp-pagehead h1 { margin: 0; color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.ilp-pagehead p { margin: .4rem 0 0; color: rgba(255,255,255,.85); max-width: 70ch; }
.ilp-prose { max-width: 860px; margin-inline: auto; }
.ilp-prose h2 { color: var(--ilp-green-900); margin-top: 2rem; }
.ilp-notice { border-inline-start: 5px solid var(--ilp-blue-600); background: var(--ilp-blue-100); padding: 1rem 1.3rem; border-radius: 10px; }
.ilp-files { list-style: none; padding: 0; display: grid; gap: .7rem; }
.ilp-files li a {
  display: flex; align-items: center; gap: .8rem; padding: .9rem 1.2rem; border: 1px solid var(--ilp-line);
  border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--ilp-green-900); background: #fff;
}
.ilp-files li a::before { content: "PDF"; background: var(--ilp-red); color: #fff; font-size: .7rem; padding: .15rem .45rem; border-radius: 5px; letter-spacing: .06em; }
.ilp-files li a:hover { border-color: var(--ilp-blue-600); }
table.ilp-table { width: 100%; border-collapse: collapse; }
table.ilp-table th, table.ilp-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--ilp-line); text-align: start; vertical-align: top; }
table.ilp-table th { background: var(--ilp-green-100); color: var(--ilp-green-900); }

/* ---------- Footer ---------- */
.ilp-footer { background: var(--ilp-green-900); color: rgba(255,255,255,.85); padding-block: 3rem 1.2rem; }
.ilp-footer a { color: #9ad4f5; text-decoration: none; }
.ilp-footer a:hover { color: #fff; }
.ilp-footer .ilp-fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.ilp-footer h4 { color: #fff; margin: 0 0 .8rem; font-size: 1rem; }
.ilp-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ilp-footer .ilp-copy { border-top: 1px solid rgba(255,255,255,.18); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; opacity: .8; }
.ilp-footer img.ilp-flogo { width: 88px; background: #fff; border-radius: 50%; padding: 6px; margin-bottom: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ilp-hero .ilp-wrap, .ilp-two, .ilp-footer .ilp-fgrid { grid-template-columns: 1fr; }
  .ilp-hero-logo { order: -1; width: 220px; }
  .ilp-stats .ilp-wrap, .ilp-grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .ilp-grid.c3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ilp-grid.c2, .ilp-grid.c3, .ilp-grid.c4 { grid-template-columns: 1fr; }
  .ilp-brand-text span { display: none; }
  .ilp-brand img { width: 46px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
