/* Fresh styles for P3 replica (created from scratch) */
:root{
  --accent:#0e7a4f;
  --muted:#6b7280;
  --bg:#f6f8f9;
  --card:#ffffff;
  --maxw:1100px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{font-family:"Poppins",system-ui,Arial,sans-serif;margin:0;color:#111;background:var(--bg);padding-top:72px}
.no-overflow-x, html.no-overflow-x {overflow-x:hidden}

/* prevent images and SVGs from exceeding container width */
img, svg, picture {max-width:100%;height:auto;display:block}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.site-header{height:72px}
.header-inner{display:grid;grid-template-columns:auto 1fr auto;align-items:center;padding:12px 0;gap:18px}
.brand{display:flex;gap:12px;align-items:center;min-width:0}
.logo{width:clamp(36px,4.2vw,44px);height:clamp(36px,4.2vw,44px);border-radius:8px;background:transparent;color:inherit;display:flex;align-items:center;justify-content:center;font-weight:700;flex:0 0 auto}
/* logo image sizing — keep the image inside the logo box */
.logo-img{width:100%;height:100%;object-fit:contain;display:block;border-radius:6px}
.brand-text{min-width:0}
.brand-text .site-title{font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-text .site-tag{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.primary-nav{display:none}
.primary-nav ul{display:flex;gap:18px;list-style:none;margin:0;padding:0}
.nav-item{color:#1f2937;text-decoration:none;font-weight:700;font-size:13px;padding:8px 10px;border-radius:6px;text-transform:uppercase;letter-spacing:0.6px}
.nav-item:hover{color:var(--accent)}
.nav-actions{display:flex;gap:8px;align-items:center;flex:0 0 auto;justify-self:end}

/* Active page highlight for navigation */
.nav-item.active,
.mobile-link.active {
  color: var(--accent);
  background: rgba(14,122,79,0.06);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(3,20,14,0.04);
}
.nav-item.active:hover,
.mobile-link.active:hover{
  color: var(--accent);
  text-decoration: none;
}

/* header container padding and desktop donate style */
.site-header .container{padding-left:16px;padding-right:8px}
.donate-desktop{padding:8px 14px;border-radius:10px;background:var(--accent);color:#fff;border:0;font-weight:700}
.btn{background:var(--accent);color:#fff;padding:9px 16px;border-radius:10px;border:0;font-weight:600}
.btn.ghost{background:transparent;color:var(--accent);border:1px solid rgba(14,122,79,0.12)}
.site-header{position:fixed;top:0;left:0;right:0;background:rgba(255,255,255,0.98);border-bottom:1px solid rgba(0,0,0,0.06);z-index:90}
.nav-toggle{display:inline-block;border:0;background:transparent}

/* mobile slide-over panel */
#mobileNav{position:fixed;inset:0;visibility:hidden;opacity:0;pointer-events:none;background:rgba(6,8,10,0.35);z-index:1200;transition:opacity .22s ease,visibility .22s ease}
#mobileNav.open{visibility:visible;opacity:1;pointer-events:auto}
#mobileNav .mobile-panel{position:fixed;top:0;right:0;height:100vh;width:100%;max-width:360px;background:var(--card);padding:20px;box-shadow:0 12px 40px rgba(12,20,30,0.12);transform:translateX(12px);transition:transform .28s cubic-bezier(.2,.9,.2,1);z-index:1300}
#mobileNav.open .mobile-panel{transform:translateX(0)}
.mobile-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.mobile-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.mobile-list .mobile-link{display:block;padding:12px 10px;border-radius:8px;color:var(--muted);text-decoration:none;font-weight:700;font-size:16px}
.mobile-list .mobile-link:hover{background:rgba(14,122,79,0.06);color:var(--accent);cursor:pointer}

.mobile-actions{margin-top:18px}
.mobile-actions .donate-mobile{width:100%;display:block;padding:12px 14px;border-radius:10px;background:var(--accent);color:#fff;border:0;font-weight:700}

/* debug styles removed (overflow audit disabled) */
/* hamburger icon */
.hamburger{display:inline-block;width:clamp(22px,4vw,28px);height:clamp(14px,2.2vw,18px);position:relative}
.hamburger span{position:absolute;left:0;right:0;height:2px;background:#111;border-radius:2px}
.hamburger span:nth-child(1){top:0}
.hamburger span:nth-child(2){top:8px}
.hamburger span:nth-child(3){top:16px}

/* Hero */
.hero{background:linear-gradient(130deg,var(--accent) 0%,#0b8a56 100%);color:#fff;padding:78px 0 36px}
.hero-inner{display:flex;gap:28px;align-items:center}
.hero-left{flex:1;min-width:0}
.hero-left h1{font-size:44px;margin:0 0 14px;line-height:1.06}
.hero-desc{opacity:.95;font-size:16px}
.hero-ctas{display:flex;gap:12px;margin-top:14px}
.hero-right{flex:1 1 42%;max-width:520px;min-width:0;width:100%}
.hero-image{width:100%;height:auto;border-radius:12px;box-shadow:0 22px 48px rgba(2,18,12,0.18)}

.partners-strip{display:flex;gap:18px;justify-content:center;padding:22px 0}
.partners-strip img{height:28px;opacity:0.9;filter:grayscale(60%)}

/* Make partner logos wrap or scroll on narrow screens so each tag stays visible */
.partners-strip{
  align-items:center;
  flex-wrap:wrap;
}
.partners-strip img{
  background:var(--card);
  padding:10px 18px;
  border-radius:10px;
  box-shadow:0 6px 18px rgba(3,20,14,0.04);
  min-width:120px;
  height:auto;
  max-height:44px;
  object-fit:contain;
}

@media(max-width:480px){
  .partners-strip img{min-width:100px;padding:8px 12px;max-height:40px}
}

/* Collaboration block (image left, list right) */
.collab{padding:84px 0}
.collab-inner{display:grid;grid-template-columns:minmax(0,40%) minmax(0,60%);gap:28px;align-items:start}
.collab-image img{width:100%;max-width:100%;height:auto;border-radius:12px;box-shadow:0 32px 64px rgba(2,18,12,0.08);display:block}
.collab-image, .collab-content{min-width:0}
.collab-content{display:flex;flex-direction:column;justify-content:center}
.collab-content h2{margin-top:0;font-size:28px;line-height:1.12}
.collab-list{display:flex;flex-direction:column;gap:16px;margin-top:18px;margin-left:0;max-width:100%}
.collab-item{display:flex;gap:14px;align-items:center;padding:16px 18px;background:#fff;border-radius:12px;box-shadow:0 14px 36px rgba(3,20,14,0.04)}
.collab-item .icon{width:44px;height:44px;min-width:44px;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;line-height:1;flex:0 0 auto}
.collab-item > div:last-child{flex:1}

@media(max-width:980px){
  .collab-inner{grid-template-columns:1fr;gap:20px}
  .collab{padding:40px 0}
  .collab-image img{max-width:100%;}
  .collab-content{align-items:flex-start}
  .collab-list{margin-left:0;max-width:100%}
}

.values{background:var(--card);padding:28px;border-radius:12px;margin-top:-48px;box-shadow:0 10px 30px rgba(3,20,14,0.04)}
.values-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}
.value{padding:14px;border-radius:8px;background:linear-gradient(180deg,#fff,#fafafa)}
.muted{color:var(--muted)}

.video-section{background:#111827;color:#fff;padding:36px;border-radius:8px;margin:28px 0}
.video-cta{display:flex;justify-content:center}
.play-btn{background:var(--accent);color:#fff;border:0;border-radius:999px;width:clamp(64px,16vw,92px);height:clamp(64px,16vw,92px);font-size:clamp(20px,4.4vw,32px)}

.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.card{background:var(--card);padding:18px;border-radius:10px;box-shadow:0 8px 24px rgba(10,20,20,0.04);text-align:center}
.card .icon{width:clamp(40px,6.4vw,56px);height:clamp(40px,6.4vw,56px);border-radius:8px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto 8px}

.support{display:flex;gap:20px;align-items:flex-start;padding:40px 0}
.support-figure{flex:0 0 auto;max-width:360px;min-width:0;width:100%}
.support-figure img{width:100%;border-radius:10px}
.support-list{flex:1}
.detailed-list{padding-left:18px}

.stats{background:linear-gradient(90deg,#07101a,#0b1320);color:#fff;padding:22px;border-radius:10px;margin:24px 0;display:flex;gap:12px;justify-content:space-between}
.stat{text-align:center;flex:1}
.stat h3{margin:0;font-size:26px}

.team{padding:32px 0}
.team-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.member{background:var(--card);padding:10px;border-radius:10px;text-align:center}
.member img{width:100%;height:140px;object-fit:cover;border-radius:8px}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.gallery img{width:100%;height:110px;object-fit:cover;border-radius:8px;cursor:pointer}

/* Contact form styles */
.contact-form{max-width:920px;background:var(--card);padding:18px;border-radius:12px;box-shadow:0 10px 30px rgba(3,20,14,0.04);margin-top:12px}
.contact-form label{display:block;margin-bottom:12px}
.contact-form .label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
.contact-form input[type="text"],.contact-form input[type="email"],.contact-form textarea{width:100%;padding:10px;border-radius:8px;border:1px solid #e6eef0;background:#fff}
.contact-form .form-row{display:flex;gap:14px}
.contact-form .form-row label{flex:1}
.contact-form button{padding:10px 18px;border-radius:8px}

@media(max-width:720px){
  .contact-form .form-row{flex-direction:column}
}

/* Polished links and contact grid */
.contact-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.contact-link{color:var(--accent);text-decoration:none;font-weight:600}
.contact-link:hover{text-decoration:underline}
.form-feedback{font-size:14px;margin-top:8px}
.form-feedback.success{color:green}
.form-feedback.error{color:#c53030}

@media(max-width:720px){
  .contact-grid{grid-template-columns:1fr}
}

/* Team page helpers */
.team-block{margin-bottom:22px}
.two-column-list{display:flex;gap:32px;align-items:flex-start}
.two-column-list ul{margin:0;padding-left:18px}
.key-directors{margin:0;padding-left:18px;list-style:disc}
.branches-list{margin:8px 0 0 18px;padding:0;list-style:disc}

.site-footer{padding:24px 0;text-align:center;color:var(--muted);background:linear-gradient(90deg,#f6f8f9,#eaf6f2);border-top:1px solid #e6eef0;margin-top:24px}

/* lightbox */
.lightbox{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(6,8,10,0.6);visibility:hidden;opacity:0;pointer-events:none;transition:opacity .18s ease}
.lightbox.open{visibility:visible;opacity:1;pointer-events:auto}
.lightbox .lightbox-img{max-width:90vw;max-height:80vh;border-radius:8px}
.lightbox .lightbox-close{position:absolute;top:16px;right:16px;background:transparent;border:0;color:#fff;font-size:28px}

/* responsive */
@media(max-width:980px){
  .hero-inner{flex-direction:column}
  .values-grid{grid-template-columns:repeat(2,1fr)}
  .cards{grid-template-columns:1fr}
  .team-grid{grid-template-columns:repeat(2,1fr)}
  .two-column-list{flex-direction:column;gap:12px}
  .two-column-list ul{padding-left:14px}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .primary-nav ul{display:none}
  .nav-toggle{display:inline-block}
}
@media(max-width:720px){
  /* hide desktop donate and collapse header for narrow screens */
  .donate-desktop{display:none}
  .header-inner{grid-template-columns:1fr auto}
  .site-header .container{padding-left:20px;padding-right:8px;padding-top:12px;padding-bottom:12px}
  /* ensure body offset matches the fixed header height on small screens */
  body{padding-top:calc(72px + 12px)}
}

/* Desktop: add extra top padding to header and adjust page offset to match */
@media(min-width:981px){
  .site-header .container{padding-top:12px;padding-bottom:12px}
  /* increase body offset so page content sits below the taller fixed header */
  body{padding-top:calc(72px + 12px)}
}
@media(max-width:640px){
  .hero-left h1{font-size:26px}
  .hero-desc{font-size:14px}
  .support{flex-direction:column}
  .support-figure{width:100%;flex:0 0 auto}
  .values-grid{grid-template-columns:1fr}
}

/* Mobile fixes to avoid horizontal scrollbar from overflowing elements */
@media(max-width:720px){
  html, body {overflow-x:hidden}
  .container{padding-left:16px;padding-right:8px}
  .hero-right, .support-figure, .gallery img, .team-grid .member img{max-width:100%;box-sizing:border-box}
  .mobile-panel{box-sizing:border-box}
}

/* reveal animations */
.reveal{opacity:0;transform:translateY(12px);transition:opacity .6s ease,transform .6s ease}
.reveal.visible{opacity:1;transform:none}
@media(max-width:420px){
  .logo{width:36px;height:36px}
}

/* Values grid: on wide screens make room for a centered image that spans two columns */
@media(min-width:981px){
  .values-grid{grid-template-columns:1fr auto 1fr;grid-template-rows:auto auto;gap:18px}
  .values-grid .value-vision{grid-column:1;grid-row:1}
  .values-grid .value-mission{grid-column:1;grid-row:2}
  .values-grid .value-image{grid-column:2;grid-row:1/ span 2;display:flex;align-items:center;justify-content:center}
  .values-grid .value-image img{max-width:160px;height:auto;border-radius:8px}
  .values-grid .value-interventions{grid-column:3;grid-row:1/ span 2}
}

/* Remove underlines from all links site-wide (overrides inline text-decoration) */
a, a:visited, a:active, a:hover, a:focus {
  text-decoration: none !important;
}

/* Defensive rules to avoid overflowing children in flex/grid containers */
.header-inner > *,
.nav-actions,
.primary-nav, .primary-nav ul, .primary-nav li,
.hero-inner > *, .collab-inner > *, .support > *,
.values-grid > *, .team-grid > *, .gallery > * {
  min-width:0;
}

.section-head {
  padding-left: 24px;
  text-align: left;
}

/* Break long words/URLs to avoid horizontal overflow */
html, body, p, h1, h2, h3, h4, a, .nav-item, .mobile-list .mobile-link {
  word-break:break-word;
  overflow-wrap:break-word;
}

/* Ensure container never causes horizontal scrollbar at small widths */
.container{max-width:var(--maxw);margin:0 auto;padding:0 16px}
