/* ===================================================
   ICPalestina – Shared Stylesheet
   Warm & Cultural / Heritage-Museum Aesthetic
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;1,8..60,400&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  --black:        #111010;
  --white:        #fdfaf5;
  --cream:        #f5ede0;
  --parchment:    #e8d9c0;
  --green:        #1e4d2b;
  --green-mid:    #2d6e3e;
  --green-light:  #4a9460;
  --green-pale:   #eaf2ec;
  --red:          #a01e22;
  --red-mid:      #c0282d;
  --red-pale:     #faeaea;
  --gold:         #b8852a;
  --gold-light:   #d4a84b;
  --text-dark:    #1c160e;
  --text-body:    #3a2e20;
  --text-muted:   #7a6650;
  --border:       #d4c5aa;
  --shadow:       rgba(28,22,14,0.12);
  --nav-h:        72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--white);
  color: var(--text-body);
  line-height: 1.7;
  min-height: 100vh;
}

body.lang-ar {
  direction: rtl;
  text-align: right;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-dark);
  line-height: 1.25;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-mid);
  margin-bottom: 0.75rem;
}
body.lang-ar .section-label { letter-spacing: 0; }

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--black);
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--red-mid);
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.4); }

.nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }
.nav-logo-wrap {
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.nav-logo img {
  width: 46px; height: 46px;
  object-fit: cover;
}
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-text .org-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.nav-logo-text .org-sub {
  font-size: 0.62rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-links a {
  padding: 0.45rem 0.9rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-links a.active { color: var(--gold-light); background: rgba(200,150,50,0.1); }

/* A menu item with a dropdown (e.g. "Conscious choice"): a button, and the list it shows while aria-expanded is true */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: none; border: none; border-radius: 4px; cursor: pointer;
  font-family: inherit; font-size: 0.87rem; font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-dropdown-toggle:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-dropdown-toggle.active { color: var(--gold-light); background: rgba(200,150,50,0.1); }
.nav-dropdown-toggle i { font-size: 0.6rem; transition: transform 0.2s; }
.nav-dropdown-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.nav-submenu {
  display: none;
  position: absolute; top: calc(100% + 1.1rem); inset-inline-start: 0;
  min-width: 220px; padding: 0.4rem;
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.12); border-top: 3px solid var(--red-mid);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.nav-dropdown-toggle[aria-expanded="true"] + .nav-submenu { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-submenu a { display: block; }
.nav-submenu a[aria-current="page"] { color: var(--gold-light); background: rgba(200,150,50,0.1); }

.nav-links a:focus-visible, .nav-dropdown-toggle:focus-visible,
.lang-btn:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.2rem 0.3rem;
  flex-shrink: 0;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  padding: 0.2rem 0.5rem; border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  text-transform: uppercase;
}
.lang-btn:hover { color: var(--white); }
.lang-btn.active { background: var(--red-mid); color: var(--white); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── PAGE CONTENT ── */
.page-content { padding-top: var(--nav-h); }

/* Palestinian flag top bar */
.flag-bar {
  display: flex; width: 100%; height: 5px;
}
.flag-bar .fb-black { flex: 1; background: #1a1a1a; }
.flag-bar .fb-white { flex: 1; background: #e8e4dc; }
.flag-bar .fb-green { flex: 1; background: var(--green-mid); }
.flag-bar .fb-red   { 
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 0px solid transparent;
  border-left: 10px solid var(--red-mid);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--red-mid); color: var(--white);
  font-family: 'Source Serif 4', serif; font-size: 0.9rem; font-weight: 500;
  border-radius: 4px; border: 2px solid var(--red-mid); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent; color: var(--white);
  font-family: 'Source Serif 4', serif; font-size: 0.9rem; font-weight: 500;
  border-radius: 4px; border: 2px solid rgba(255,255,255,0.35); cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); transform: translateY(-2px); }

.btn-green {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--green); color: var(--white);
  font-family: 'Source Serif 4', serif; font-size: 0.9rem; font-weight: 500;
  border-radius: 4px; border: 2px solid var(--green); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-green:hover { background: var(--green-mid); border-color: var(--green-mid); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: transparent; color: var(--text-dark);
  font-family: 'Source Serif 4', serif; font-size: 0.9rem; font-weight: 500;
  border-radius: 4px; border: 2px solid var(--border); cursor: pointer;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--text-dark); }

.view-all-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 500; color: var(--green-mid);
  transition: gap 0.2s;
}
.view-all-link:hover { gap: 0.7rem; }

/* ── SECTIONS ── */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.75rem; }
.section-header p { font-size: 0.97rem; color: var(--text-muted); max-width: 560px; }
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 0 auto; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--black);
  padding: 5rem 2rem 4rem; text-align: center;
  position: relative; overflow: hidden;
  border-bottom: 3px solid var(--red-mid);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 0.75rem; position: relative; }
.page-hero p  { color: rgba(255,255,255,0.62); font-size: 0.97rem; max-width: 600px; margin: 0 auto; position: relative; }

/* ── FORM STYLES (shared by actions & contact) ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: span 2; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-dark); }
.form-group label .req { color: var(--red-mid); margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.7rem 1rem;
  border: 1px solid var(--border); border-radius: 4px;
  font-family: 'Source Serif 4', serif; font-size: 0.87rem;
  color: var(--text-dark); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(45,110,62,0.1); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea { border-color: var(--red-mid); box-shadow: 0 0 0 3px rgba(192,40,45,0.1); }
.form-error-msg {
  background: var(--red-pale); color: var(--red);
  border: 1px solid var(--red-mid); border-radius: 4px;
  padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-size: 0.85rem;
}
button[type="submit"]:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.form-submit { margin-top: 1.75rem; display: flex; justify-content: flex-end; gap: 1rem; align-items: center; }

/* ── FOOTER ── */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.65);
  padding: 4rem 2rem 2rem;
  border-top: 3px solid var(--red-mid);
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 3fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}
.footer-brand-logo-wrap {
  border: 2px solid var(--gold);
  border-radius: 50%;
  margin-bottom: 1rem;
  width: 64px; height: 64px;
}
.footer-brand-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.footer-brand p { font-size: 0.84rem; line-height: 1.7; color: rgba(255,255,255,0.5); margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.footer-social a:hover { border-color: var(--gold); background: rgba(200,160,60,0.15); color: var(--gold-light); }
.footer-col h4 {
  font-family: 'Playfair Display', serif; font-size: 0.94rem;
  color: var(--white); margin-bottom: 1.2rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { font-size: 0.82rem; color: rgba(255,255,255,0.5); transition: color 0.2s; display: flex; align-items: center; gap: 0.4rem; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-contact p { font-size: 0.82rem; color: rgba(255,255,255,0.5); display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.7rem; }
.footer-contact p i { margin: auto 0; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.77rem; color: rgba(255,255,255,0.3);
  flex-wrap: wrap; gap: 0.5rem;
}
/* Honeypot field of the public forms: invisible, but still in the page for bots */
/* Hidden in place (not moved off-screen): an element pushed far to the left makes RTL (Arabic) pages scroll sideways */
.form-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.footer-privacy-link { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer-privacy-link:hover { color: var(--gold-light); text-decoration: underline; }
.footer-flag { display: flex; gap: 0.4rem; align-items: center; }
.flag-stripe { width: 18px; height: 6px; border-radius: 1px; }

/* ── ANIMATIONS ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Navbar: compact between tablet and desktop, so all menu items fit on one line (the English labels need up to 1300px) */
@media (min-width: 901px) and (max-width: 1300px) {
  .nav-inner { gap: 1rem; padding: 0 1.5rem; }
  .nav-links a, .nav-dropdown-toggle { padding: 0.45rem 0.6rem; }
  .nav-logo-text .org-sub { display: none; }
}
/* Just above the phone menu the longest labels (English "Choose consciously") need a little more room: only the
   logo itself stays, still a link to the home page */
@media (min-width: 901px) and (max-width: 1050px) {
  .nav-inner { gap: 0.75rem; padding: 0 1rem; }
  .nav-links a, .nav-dropdown-toggle { padding: 0.45rem 0.5rem; }
  .nav-logo-text { display: none; }
}

/* Navbar: the menu opens from the toggle button */
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-links {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 1.5rem 2rem 2rem; gap: 0.2rem;
    border-bottom: 2px solid var(--red-mid);
  }
  .nav-links.open { display: flex; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
  .nav-links a { padding: 0.65rem 1rem; font-size: 1rem; }
  /* The dropdown opens in place, as an indented list under its button */
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.65rem 1rem; font-size: 1rem; }
  .nav-submenu {
    position: static; min-width: 0;
    margin-inline-start: 1rem; padding: 0 0 0.3rem;
    border: none; border-inline-start: 2px solid #241e13; border-radius: 0;
    box-shadow: none;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 12px;
  }
  body.lang-ar .nav-submenu { border-bottom-left-radius: 0; border-bottom-right-radius: 12px; }
  .nav-toggle { display: flex; }
  .nav-logo-text .org-sub { display: none; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
}

@media (max-width: 480px) {
  .section { padding: 3.5rem 1.25rem; }
  .page-hero { padding: 4rem 1.25rem 3rem; }
  .btn-primary, .btn-outline, .btn-green { width: 100%; justify-content: center; }
  .footer-grid { gap: 1.75rem; }
  .nav-links { gap: 1rem;}
}
