/*
Theme Name: Nainwa Welfare
Theme URI: https://nainwawelfare.org/
Author: Nainwa Welfare
Description: Modern editable hospital theme inspired by leading charitable hospital websites. Includes a front-end quick editor for logged-in administrators.
Version: 1.0.3
Text Domain: sftrust
*/
:root{--primary:#69c7ad;--primary2:#8bd8c3;--dark:#174f48;--text:#4d5b60;--light:#f1fbf7;--white:#fff;--accent:#e8b84a;--border:#e5eceb;--radius:16px;--shadow:0 12px 35px rgba(18,52,59,.10)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:#fff;line-height:1.65}a{color:inherit;text-decoration:none}img{max-width:100%;height:auto;display:block}.container{width:min(1180px,92%);margin:auto}.topbar{background:var(--dark);color:#fff;font-size:14px}.topbar .container{display:flex;justify-content:space-between;gap:20px;padding:8px 0}.header{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}.header .container{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:14px 0}.logo img{max-height:62px;width:auto}.logo-text{font-size:24px;font-weight:800;color:var(--dark)}.nav{display:flex;align-items:center;gap:20px}.nav a{font-weight:700;color:var(--dark);font-size:15px}.nav a:hover{color:var(--primary)}.donate-btn,.btn{display:inline-flex;align-items:center;justify-content:center;background:var(--primary);color:#fff!important;padding:12px 20px;border-radius:8px;font-weight:800;border:0;cursor:pointer}.donate-btn{background:var(--accent);color:#172a2f!important}.header-donate{display:none}.whatsapp-float{position:fixed;right:22px;bottom:22px;width:58px;height:58px;border-radius:50%;background:#25D366;color:#fff;display:flex;align-items:center;justify-content:center;z-index:9998;box-shadow:0 8px 24px rgba(0,0,0,.18);transition:transform .2s ease}.whatsapp-float:hover{transform:scale(1.06)}.whatsapp-float svg{width:31px;height:31px;fill:currentColor}.mobile-toggle{display:none;background:none;border:0;font-size:28px}.hero{position:relative;background:var(--dark);color:#fff;min-height:560px;overflow:hidden}.hero-slide{min-height:560px;background-size:cover;background-position:center;display:flex;align-items:center;position:relative}.hero-slide:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,30,35,.82),rgba(7,30,35,.38),rgba(7,30,35,.15))}.hero-content{position:relative;z-index:2;max-width:680px;padding:80px 0}.eyebrow{color:var(--accent);font-weight:800;text-transform:uppercase;letter-spacing:1.5px}.hero h1{font-size:clamp(36px,5vw,64px);line-height:1.08;margin:12px 0}.hero p{font-size:19px;max-width:600px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}.btn-light{background:#fff;color:var(--dark)!important}.section{padding:80px 0}.section.alt{background:var(--light)}.section-head{text-align:center;max-width:760px;margin:0 auto 42px}.section-head .eyebrow{color:var(--primary)}.section-head h2{font-size:38px;line-height:1.15;color:var(--dark);margin:8px 0 12px}.about-grid,.chair-grid,.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center}.about-img,.chair-img{border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}.about-img img{width:100%;height:430px;object-fit:cover}.chair-img{width:min(390px,100%);justify-self:center;background:#fff}.chair-img img{width:100%;height:auto;max-width:100%;object-fit:contain;object-position:center;background:#fff;margin:0 auto}.kicker{font-weight:800;color:var(--primary)}h2,h3{color:var(--dark)}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 25px rgba(18,52,59,.06)}.card-img{height:220px;object-fit:cover;width:100%}.card-body{padding:22px}.card-body h3{margin:0 0 8px;font-size:21px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.stat{background:#fff;border-radius:14px;padding:28px;text-align:center;border:1px solid var(--border)}.stat strong{display:block;font-size:38px;color:var(--primary);line-height:1}.stat span{font-weight:700;color:var(--dark);margin-top:8px;display:block}.cta{background:var(--primary);color:#fff;border-radius:24px;padding:55px}.cta h2{color:#fff;margin-top:0}.cta p{max-width:720px}.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.donation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:1000px;margin:0 auto}.donation-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:28px;box-shadow:0 8px 25px rgba(18,52,59,.07);min-height:270px}.payment-logo{height:70px;display:flex;align-items:center;justify-content:flex-start;margin-bottom:18px}.payment-logo img{width:180px;height:70px;object-fit:contain}.donation-card h3{font-size:22px;margin:4px 0 8px}.donation-card p{margin:0 0 10px}.donation-card strong{display:block;color:var(--dark);font-size:17px}.donation-card small{display:block;margin-top:7px;color:#667477}.qr-placeholder{margin-top:15px;width:120px;height:120px;border:2px dashed #9ab5ad;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--dark);font-weight:800;font-size:13px}.qr-placeholder span{font-size:8px;font-weight:400;margin-top:5px;padding:0 5px}@media(max-width:700px){.donation-grid{grid-template-columns:1fr}.donation-card{min-height:auto}}
.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.gallery-item{aspect-ratio:1;overflow:hidden;border-radius:12px}.gallery-item img{width:100%;height:100%;object-fit:cover}.contact-box{background:var(--light);padding:28px;border-radius:var(--radius);border:1px solid var(--border)}.footer{background:var(--dark);color:#d8e5e5;padding:60px 0 20px}.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px}.footer h3{color:#fff}.footer-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:35px;padding-top:18px;font-size:14px}.edit-link{display:none}.logged-in .sf-editable{position:relative}.logged-in .sf-editable:hover{outline:2px dashed var(--accent);outline-offset:5px}.logged-in .sf-editable:hover .edit-link{display:inline-flex;position:absolute;top:8px;right:8px;z-index:20;background:var(--dark);color:#fff!important;padding:7px 10px;border-radius:7px;font-size:12px;font-weight:800;line-height:1}.sf-admin-bar{position:fixed;bottom:18px;right:18px;z-index:9999;background:var(--dark);color:#fff;padding:10px 13px;border-radius:10px;box-shadow:var(--shadow);font-size:13px}.sf-admin-bar a{color:#fff;margin-left:10px;font-weight:800}.sf-admin-bar .primary{color:#8de3dc}.placeholder{background:#eaf2f1;color:#6b7a7d;display:flex;align-items:center;justify-content:center;text-align:center;height:100%;min-height:200px}.archive-title{padding:70px 0 20px}.single-content{max-width:850px;margin:auto}.single-content img{border-radius:15px;margin:20px 0}.pagination{margin-top:30px}.pagination a,.pagination span{display:inline-block;padding:9px 13px;border:1px solid var(--border);margin-right:5px;border-radius:6px}.menu-overlay{display:none}
@media(max-width:900px){.nav{display:none}.header-donate{display:inline-flex;margin-left:auto;margin-right:4px;padding:9px 13px;font-size:13px}.mobile-toggle{display:block}.cards,.news-grid{grid-template-columns:1fr 1fr}.stats{grid-template-columns:1fr 1fr}.gallery-grid{grid-template-columns:repeat(2,1fr)}.about-grid,.chair-grid,.contact-grid,.footer-grid{grid-template-columns:1fr}.hero,.hero-slide{min-height:520px}.hero-content{padding:60px 0}.section{padding:60px 0}.header .container{padding:10px 0}.nav.mobile-open{display:flex;position:absolute;top:100%;left:0;right:0;background:#fff;padding:18px;flex-direction:column;align-items:flex-start;border-bottom:1px solid var(--border)}}
@media(max-width:600px){.header-donate{padding:8px 10px;font-size:12px}.whatsapp-float{right:16px;bottom:16px;width:54px;height:54px}.whatsapp-float svg{width:28px;height:28px}.topbar .container{display:block;text-align:center}.topbar .container span{display:block}.cards,.news-grid,.stats{grid-template-columns:1fr}.gallery-grid{grid-template-columns:1fr 1fr}.hero h1{font-size:38px}.section-head h2{font-size:30px}.cta{padding:35px 24px}.about-img img{height:300px}.chair-img{width:min(390px,100%)}.chair-img img{height:auto;max-height:none}}

/* V3 fixes: reliable mobile menu closing and WhatsApp floating control */
.whatsapp-float{
  width:58px !important;
  height:58px !important;
  min-width:58px !important;
  min-height:58px !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:#25D366 !important;
  color:#fff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:fixed !important;
  right:22px !important;
  bottom:22px !important;
  z-index:99999 !important;
  line-height:0 !important;
  overflow:hidden !important;
}
.whatsapp-float .whatsapp-icon{
  display:block !important;
  width:32px !important;
  height:32px !important;
  max-width:32px !important;
  max-height:32px !important;
  min-width:32px !important;
  min-height:32px !important;
  margin:0 !important;
  padding:0 !important;
}
@media(max-width:600px){
  .whatsapp-float{
    width:56px !important;height:56px !important;
    min-width:56px !important;min-height:56px !important;
    right:16px !important;bottom:16px !important;
  }
  .whatsapp-float .whatsapp-icon{
    width:31px !important;height:31px !important;
    max-width:31px !important;max-height:31px !important;
    min-width:31px !important;min-height:31px !important;
  }
}
/* Ensure the open mobile menu can always be dismissed after a menu selection. */
@media(max-width:900px){
  .nav.mobile-open{display:flex !important;}
  .nav:not(.mobile-open){display:none !important;}
}
/* Homepage slider and success stories */
.sf-slider{min-height:560px;position:relative;background:#0d3d3b}.sf-slides,.sf-slide{position:absolute;inset:0}.sf-slide{opacity:0;visibility:hidden;background-size:cover;background-position:center;transition:opacity .55s ease;display:flex;align-items:center}.sf-slide.is-active{opacity:1;visibility:visible;z-index:1}.hero-overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,30,35,.80),rgba(7,30,35,.34),rgba(7,30,35,.08))}.sf-slider .hero-content{position:relative;z-index:2}.sf-slider-prev,.sf-slider-next{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:48px;height:64px;border:0;border-radius:8px;background:rgba(0,0,0,.28);color:#fff;font-size:52px;line-height:1;cursor:pointer}.sf-slider-prev{left:18px}.sf-slider-next{right:18px}.sf-slider-prev:hover,.sf-slider-next:hover{background:rgba(0,0,0,.5)}.sf-slider-dots{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);z-index:4;display:flex;gap:8px}.sf-dot{width:10px;height:10px;border-radius:50%;border:1px solid #fff;background:rgba(255,255,255,.45);padding:0;cursor:pointer}.sf-dot.active{background:#fff}.welcome-section{padding-top:70px;padding-bottom:65px}.welcome-wrap{max-width:980px}.welcome-copy{font-size:17px;line-height:1.85;color:var(--text)}.welcome-copy .kicker{margin-bottom:12px}.success-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}.success-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 25px rgba(18,52,59,.06)}.success-media{height:220px;background:#eaf2f1}.success-media img,.success-media video{width:100%;height:100%;object-fit:cover}.success-body{padding:18px}.success-body h3{margin:0 0 7px}.success-body p{margin:0}.success-card .edit-link{display:none}@media(max-width:1000px){.success-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.sf-slider,.sf-slide{min-height:520px}.sf-slider-prev,.sf-slider-next{width:38px;height:50px;font-size:40px}.sf-slider-prev{left:8px}.sf-slider-next{right:8px}.success-grid{grid-template-columns:1fr}.success-media{height:240px}}
/* Hero slider */
.sf-slider{min-height:560px;position:relative;background:#0d3d3b;overflow:hidden}.sf-slides,.sf-slide{position:absolute;inset:0}.sf-slide{opacity:0;visibility:hidden;background-size:cover;background-position:center;transition:opacity .55s ease;display:flex;align-items:center}.sf-slide.is-active{opacity:1;visibility:visible;z-index:1}.sf-slider .hero-content{position:relative;z-index:2}.sf-slider-prev,.sf-slider-next{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:48px;height:64px;border:0;border-radius:8px;background:rgba(0,0,0,.28);color:#fff;font-size:52px;line-height:1;cursor:pointer}.sf-slider-prev{left:18px}.sf-slider-next{right:18px}.sf-slider-prev:hover,.sf-slider-next:hover{background:rgba(0,0,0,.5)}.sf-slider-dots{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);z-index:5;display:flex;gap:8px}.sf-dot{width:10px;height:10px;border-radius:50%;border:1px solid #fff;background:rgba(255,255,255,.45);padding:0;cursor:pointer}.sf-dot.active{background:#fff}.sf-slider .edit-link{z-index:10}@media(max-width:600px){.sf-slider,.sf-slide{min-height:520px}.sf-slider-prev,.sf-slider-next{width:38px;height:50px;font-size:40px}.sf-slider-prev{left:8px}.sf-slider-next{right:8px}}

/* Nainwa Welfare editable logo */
.site-logo{display:inline-flex;align-items:center}.site-logo img{width:58px;height:58px;object-fit:contain;border-radius:50%;display:block}.header .logo{display:flex;align-items:center;gap:10px}.header .edit-link{display:none}

/* Final chairman portrait fix: use the original image at its natural aspect ratio, like Ghurki. */
.chair-grid{align-items:start !important;}
.chair-img{
  width:min(390px,100%) !important;
  height:auto !important;
  aspect-ratio:auto !important;
  overflow:visible !important;
  background:#fff;
  justify-self:center;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.chair-img img.chairman-photo{
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-width:100% !important;
  max-height:none !important;
  object-fit:initial !important;
  object-position:initial !important;
  margin:0 !important;
}
@media(max-width:600px){
  .chair-img{width:100% !important;height:auto !important;aspect-ratio:auto !important;}
  .chair-img img.chairman-photo{width:100% !important;height:auto !important;}
}


/* Chairman image - isolated Ghurki-style layout. No fixed-height box and no cropping. */
.nainwa-chairman-grid{display:grid !important;grid-template-columns:390px minmax(0,1fr) !important;gap:50px !important;align-items:start !important;width:100% !important;}
#nainwa-chairman-photo-wrap{width:390px !important;max-width:100% !important;height:auto !important;max-height:none !important;min-height:0 !important;overflow:visible !important;aspect-ratio:auto !important;border-radius:var(--radius);box-shadow:var(--shadow);background:#fff;}
#nainwa-chairman-photo{display:block !important;width:390px !important;max-width:100% !important;height:auto !important;max-height:none !important;min-height:0 !important;aspect-ratio:auto !important;object-fit:fill !important;object-position:center !important;margin:0 !important;padding:0 !important;border:0 !important;}
@media(max-width:700px){.nainwa-chairman-grid{grid-template-columns:1fr !important;gap:28px !important;}.nainwa-chairman-grid>div:first-child{justify-self:center;}#nainwa-chairman-photo-wrap{width:100% !important;}#nainwa-chairman-photo{width:100% !important;}}

/* Nainwa Welfare program styling */
.welfare-programs .card-img{height:210px;object-fit:cover}.welfare-programs .card-body p{margin:0}.nainwa-chairman-grid h2{margin-top:8px}.nainwa-chairman-grid p{font-size:16px}.success-media img{display:block}

/* V29: Nainwa donation cards - fixed 2 x 2 layout */
#donate.donation-section{display:block !important;width:100% !important;overflow:visible !important;}
#donate .container{width:min(1180px,92%) !important;margin:0 auto !important;}
#nainwa-donation-grid.donation-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-template-rows:repeat(2,auto) !important;gap:28px !important;width:100% !important;max-width:1000px !important;margin:0 auto !important;align-items:stretch !important;}
#nainwa-donation-grid .donation-card{display:flex !important;flex-direction:column !important;align-items:stretch !important;background:#fff !important;border:1px solid var(--border) !important;border-radius:16px !important;padding:28px !important;box-shadow:0 8px 25px rgba(18,52,59,.07) !important;min-height:300px !important;width:100% !important;margin:0 !important;}
#nainwa-donation-grid .payment-logo{height:105px !important;min-height:105px !important;display:flex !important;align-items:center !important;justify-content:center !important;margin:0 0 18px !important;padding:0 !important;background:#fff !important;}
#nainwa-donation-grid .payment-logo img{display:block !important;width:auto !important;max-width:220px !important;height:100px !important;max-height:100px !important;object-fit:contain !important;margin:0 auto !important;}
#nainwa-donation-grid .donation-content{text-align:center !important;}
#nainwa-donation-grid .donation-content h3{font-size:22px !important;margin:4px 0 8px !important;}
#nainwa-donation-grid .donation-content p{margin:0 0 10px !important;}
#nainwa-donation-grid .donation-content strong{display:block !important;color:var(--dark) !important;font-size:17px !important;}
#nainwa-donation-grid .donation-content small{display:block !important;margin-top:7px !important;color:#667477 !important;}
#nainwa-donation-grid .qr-placeholder{margin:15px auto 0 !important;width:120px !important;height:120px !important;}
@media(max-width:700px){#nainwa-donation-grid.donation-grid{grid-template-columns:1fr !important;grid-template-rows:none !important;gap:20px !important;}#nainwa-donation-grid .donation-card{min-height:280px !important;}}

/* V30: hard-force donation 2x2 desktop layout */
@media(min-width:701px){#nainwa-donation-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-auto-flow:row !important;}#nainwa-donation-grid>.donation-card{width:100% !important;min-width:0 !important;}#nainwa-donation-grid .payment-logo img{width:auto !important;height:100px !important;max-width:220px !important;object-fit:contain !important;}}
@media(max-width:700px){#nainwa-donation-grid{display:grid !important;grid-template-columns:1fr !important;}}

/* V31: compact responsive donation cards */
#nainwa-donation-grid.donation-grid{
  max-width:820px !important;
  gap:20px !important;
}
#nainwa-donation-grid .donation-card{
  min-height:240px !important;
  padding:18px !important;
  border-radius:14px !important;
}
#nainwa-donation-grid .payment-logo{
  height:72px !important;
  min-height:72px !important;
  margin:0 0 12px !important;
}
#nainwa-donation-grid .payment-logo img{
  height:70px !important;
  max-height:70px !important;
  max-width:150px !important;
}
#nainwa-donation-grid .donation-content h3{font-size:18px !important;margin:3px 0 7px !important;}
#nainwa-donation-grid .donation-content p{font-size:14px !important;margin:0 0 8px !important;}
#nainwa-donation-grid .donation-content strong{font-size:14px !important;}
#nainwa-donation-grid .donation-content small{font-size:12px !important;margin-top:5px !important;}
#nainwa-donation-grid .qr-placeholder{width:90px !important;height:90px !important;margin:10px auto 0 !important;}
@media(max-width:700px){
  #donate .container{width:min(94%,520px) !important;}
  #nainwa-donation-grid.donation-grid{grid-template-columns:1fr !important;gap:14px !important;max-width:440px !important;}
  #nainwa-donation-grid .donation-card{min-height:0 !important;padding:16px !important;}
  #nainwa-donation-grid .payment-logo{height:68px !important;min-height:68px !important;margin-bottom:10px !important;}
  #nainwa-donation-grid .payment-logo img{height:64px !important;max-height:64px !important;max-width:140px !important;}
}

/* Donation Methods editor/card layout */
#nainwa-donation-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:22px !important;max-width:860px !important;margin-left:auto !important;margin-right:auto !important;}
#nainwa-donation-grid .donation-card{box-sizing:border-box !important;}
@media(max-width:700px){
  #nainwa-donation-grid{grid-template-columns:1fr !important;gap:16px !important;width:100% !important;max-width:430px !important;}
  #nainwa-donation-grid .donation-card{min-height:0 !important;padding:18px !important;}
}
/* V34: Nainwa Welfare header branding */
.header{background:#f3fbf8 !important;border-bottom:1px solid #d9ebe5 !important;}
.header .container{gap:22px !important;}
.brand-wrap{display:flex !important;align-items:center !important;gap:16px !important;min-width:0 !important;}
.brand-wrap .logo{flex:0 0 auto !important;}
.brand-wrap .logo img{max-height:62px !important;width:auto !important;}
.brand-title{font-size:24px !important;line-height:1.15 !important;font-weight:800 !important;color:#174f48 !important;white-space:nowrap !important;}
.brand-wrap .edit-link{z-index:30 !important;}
@media(max-width:900px){.brand-title{font-size:18px !important;max-width:360px !important;white-space:normal !important;line-height:1.2 !important;}.brand-wrap{gap:11px !important;}.brand-wrap .logo img{max-height:54px !important;}.header .container{gap:10px !important;}}
@media(max-width:600px){.brand-title{font-size:15px !important;max-width:220px !important;}.brand-wrap{gap:8px !important;}.brand-wrap .logo img{max-height:48px !important;}.header .container{gap:7px !important;}}


/* V35: Header logo + organization name must stay side-by-side */
.header{
  background:#e8f6f1 !important;
  border-bottom:2px solid #c5e3d8 !important;
}
.header .container{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
}
.brand-wrap{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  width:auto !important;
  max-width:none !important;
  flex:0 1 auto !important;
  gap:16px !important;
}
.brand-wrap .logo{
  display:flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  margin:0 !important;
}
.brand-wrap .logo img{
  width:62px !important;
  height:62px !important;
  max-height:62px !important;
  object-fit:contain !important;
}
.brand-title{
  display:block !important;
  flex:0 0 auto !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  font-size:25px !important;
  line-height:1.15 !important;
  font-weight:800 !important;
  color:#174f48 !important;
  white-space:nowrap !important;
}
@media(max-width:900px){
  .brand-wrap{gap:10px !important;}
  .brand-wrap .logo img{width:54px !important;height:54px !important;}
  .brand-title{font-size:18px !important;white-space:normal !important;max-width:330px !important;}
}
@media(max-width:600px){
  .brand-wrap{gap:7px !important;min-width:0 !important;}
  .brand-wrap .logo img{width:46px !important;height:46px !important;}
  .brand-title{font-size:14px !important;line-height:1.15 !important;max-width:190px !important;white-space:normal !important;}
}


/* V36: Keep organization name directly beside logo */
.header .logo.sf-editable{display:flex !important;align-items:center !important;flex-direction:row !important;flex-wrap:nowrap !important;gap:16px !important;width:auto !important;max-width:none !important;margin:0 !important;}
.header .logo-image{display:flex !important;align-items:center !important;flex:0 0 auto !important;width:auto !important;}
.header .logo-image .site-logo,.header .logo-image .custom-logo-link{display:flex !important;align-items:center !important;flex:0 0 auto !important;}
.header .logo-image img,.header .logo-image .custom-logo{width:62px !important;height:62px !important;max-width:62px !important;max-height:62px !important;object-fit:contain !important;margin:0 !important;}
.header .logo.sf-editable .brand-title{display:block !important;position:static !important;flex:0 0 auto !important;width:auto !important;margin:0 !important;padding:0 !important;font-size:25px !important;line-height:1.15 !important;font-weight:800 !important;color:#174f48 !important;white-space:nowrap !important;}
.header{background:#e8f6f1 !important;border-bottom:2px solid #c5e3d8 !important;}
@media(max-width:900px){.header .logo.sf-editable{gap:10px !important;}.header .logo-image img,.header .logo-image .custom-logo{width:54px !important;height:54px !important;max-width:54px !important;max-height:54px !important;}.header .logo.sf-editable .brand-title{font-size:18px !important;white-space:normal !important;max-width:330px !important;}}
@media(max-width:600px){.header .logo.sf-editable{gap:7px !important;min-width:0 !important;}.header .logo-image img,.header .logo-image .custom-logo{width:46px !important;height:46px !important;max-width:46px !important;max-height:46px !important;}.header .logo.sf-editable .brand-title{font-size:14px !important;line-height:1.15 !important;max-width:190px !important;white-space:normal !important;}}


/* V40: Preserve portrait slider images instead of cropping them */
.sf-slide{overflow:hidden;background:#0d3d3b !important;}
.sf-slide-bg{position:absolute;inset:-24px;background-size:cover;background-position:center;z-index:0;}
.sf-slide-portrait .sf-slide-bg{filter:blur(18px);transform:scale(1.08);opacity:.72;}
.sf-slide-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;z-index:1;display:block;margin:0 auto;}
.sf-slide-portrait .hero-overlay{z-index:2;}
.sf-slide-portrait .container{z-index:3;}
.sf-slide-portrait .hero-content{z-index:3;}
@media(max-width:600px){
  .sf-slide-bg{inset:-18px;}
  .sf-slide-portrait .sf-slide-bg{filter:blur(14px);}
}

/* V41: Desktop portrait slides - centered full image with plain theme-color sides. */
@media(min-width:901px){
  .sf-slide-portrait{background:#174f48 !important;}
  .sf-slide-portrait .sf-slide-bg{display:none !important;}
  .sf-slide-portrait .hero-overlay{display:none !important;}
  .sf-slide-portrait .sf-slide-image{
    left:50% !important;
    top:0 !important;
    right:auto !important;
    bottom:auto !important;
    width:auto !important;
    max-width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
    transform:translateX(-50%) !important;
    z-index:1 !important;
  }
  .sf-slide-portrait .container{display:none !important;}
}

/* V42: Natural media sizing across the theme - no forced image/video crop rules. */
img, video{height:auto !important;max-height:none !important;object-fit:initial !important;object-position:initial !important;}
.about-img img,.card-img,.gallery-item img,.success-media img,.success-media video{
  height:auto !important;
  max-height:none !important;
  object-fit:initial !important;
  object-position:initial !important;
}
.about-img{height:auto !important;}
.card-img{width:100% !important;}
.gallery-item{aspect-ratio:auto !important;height:auto !important;}
.gallery-item img{width:100% !important;display:block !important;}
.success-media{height:auto !important;min-height:0 !important;}
.success-media img,.success-media video{width:100% !important;display:block !important;}

/* Hero slider: media keeps its own aspect ratio; no forced cover/crop. */
.sf-slide-bg{background-size:contain !important;background-repeat:no-repeat !important;background-color:#174f48 !important;}
.sf-slide-image{position:absolute !important;inset:0 !important;width:100% !important;height:auto !important;max-width:100% !important;object-fit:initial !important;object-position:center !important;margin:auto !important;}
.sf-slide-portrait .sf-slide-bg{display:none !important;}
@media(min-width:901px){
  .sf-slide-portrait{background:#174f48 !important;}
  .sf-slide-portrait .sf-slide-image{
    position:absolute !important;
    left:50% !important;right:auto !important;top:0 !important;bottom:auto !important;
    width:auto !important;max-width:100% !important;height:100% !important;
    object-fit:contain !important;transform:translateX(-50%) !important;margin:0 !important;
  }
}


/* V46: Hero slider - prevent two slides from visually merging. Only the active slide is rendered. */
.sf-slider .sf-slide{display:none !important;opacity:1 !important;visibility:hidden !important;transition:none !important;}
.sf-slider .sf-slide.is-active{display:flex !important;opacity:1 !important;visibility:visible !important;z-index:2 !important;}
.sf-slider .sf-slides{position:absolute !important;inset:0 !important;overflow:hidden !important;}


/* V47: hard-isolate hero slides so inactive slide content can never overlap. */
.sf-slider{isolation:isolate !important;overflow:hidden !important;}
.sf-slider .sf-slides{position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;overflow:hidden !important;isolation:isolate !important;}
.sf-slider .sf-slide{display:none !important;position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;opacity:1 !important;visibility:hidden !important;z-index:0 !important;pointer-events:none !important;transform:none !important;}
.sf-slider .sf-slide.is-active{display:block !important;visibility:visible !important;z-index:1 !important;pointer-events:auto !important;}
.sf-slider .sf-slide-bg,.sf-slider .sf-slide-image,.sf-slider .hero-overlay{position:absolute !important;}
.sf-slider .sf-slide .container{position:relative !important;width:min(1180px,92%) !important;height:100% !important;margin:0 auto !important;display:flex !important;align-items:center !important;z-index:3 !important;}
.sf-slider .sf-slide .hero-content{position:relative !important;z-index:4 !important;}
.sf-slider .sf-slide:not(.is-active) *{pointer-events:none !important;}
@media(max-width:600px){.sf-slider .sf-slide .container{width:92% !important;}}


/* V48: Compact hero copy layout - keep slide text in its own corner/panel, never over the photo. */
.sf-slider .sf-slide{overflow:hidden !important;background:#0d3d3b !important;}
.sf-slider .sf-slide-bg{left:34% !important;right:0 !important;top:0 !important;bottom:0 !important;width:66% !important;height:100% !important;background-size:cover !important;background-position:center !important;background-repeat:no-repeat !important;background-color:#174f48 !important;}
.sf-slider .sf-slide-image{display:none !important;}
.sf-slider .sf-slide .container{width:100% !important;max-width:none !important;height:100% !important;margin:0 !important;padding:0 !important;display:flex !important;align-items:stretch !important;position:relative !important;z-index:3 !important;}
.sf-slider .sf-slide .hero-content{width:34% !important;max-width:34% !important;box-sizing:border-box !important;padding:70px 38px 70px 7.5% !important;margin:0 !important;display:flex !important;flex-direction:column !important;justify-content:center !important;align-items:flex-start !important;background:#0d3d3b !important;position:relative !important;z-index:5 !important;}
.sf-slider .sf-slide .hero-content h1{font-size:clamp(32px,3.5vw,52px) !important;line-height:1.08 !important;margin:10px 0 16px !important;max-width:100% !important;}
.sf-slider .sf-slide .hero-content p{font-size:17px !important;line-height:1.55 !important;max-width:100% !important;margin:0 !important;}
.sf-slider .sf-slide .hero-actions{margin-top:22px !important;gap:12px !important;}
.sf-slider .sf-slide .hero-actions .btn{white-space:nowrap !important;}
.sf-slider .sf-slide .eyebrow{font-size:14px !important;}
.sf-slider .sf-slide .hero-overlay{left:34% !important;right:0 !important;background:linear-gradient(90deg,rgba(7,30,35,.38),rgba(7,30,35,.05)) !important;z-index:2 !important;}
.sf-slider .sf-slide-portrait{background:#0d3d3b !important;}
.sf-slider .sf-slide-portrait .sf-slide-bg{display:block !important;left:34% !important;right:0 !important;width:66% !important;height:100% !important;top:0 !important;bottom:0 !important;background-size:contain !important;background-position:center !important;background-repeat:no-repeat !important;background-color:#174f48 !important;}
.sf-slider .sf-slide-portrait .hero-overlay{display:block !important;left:34% !important;right:0 !important;}
.sf-slider .sf-slide-portrait .container{display:flex !important;}
@media(max-width:900px){
  .sf-slider{min-height:560px !important;}
  .sf-slider .sf-slide-bg{left:0 !important;right:0 !important;top:0 !important;bottom:42% !important;width:100% !important;height:58% !important;background-size:cover !important;}
  .sf-slider .sf-slide .container{height:100% !important;display:flex !important;align-items:flex-end !important;}
  .sf-slider .sf-slide .hero-content{width:100% !important;max-width:100% !important;height:42% !important;min-height:42% !important;padding:24px 7% 58px !important;justify-content:center !important;background:#0d3d3b !important;}
  .sf-slider .sf-slide .hero-content h1{font-size:34px !important;line-height:1.08 !important;margin:7px 0 10px !important;}
  .sf-slider .sf-slide .hero-content p{font-size:15px !important;line-height:1.45 !important;}
  .sf-slider .sf-slide .hero-actions{margin-top:14px !important;}
  .sf-slider .sf-slide .hero-overlay{left:0 !important;right:0 !important;top:0 !important;bottom:42% !important;height:58% !important;background:linear-gradient(180deg,rgba(7,30,35,.08),rgba(7,30,35,.32)) !important;}
  .sf-slider .sf-slide-portrait .sf-slide-bg{left:0 !important;right:0 !important;top:0 !important;bottom:42% !important;width:100% !important;height:58% !important;background-size:contain !important;background-position:center !important;}
  .sf-slider .sf-slide-portrait .hero-overlay{left:0 !important;right:0 !important;top:0 !important;bottom:42% !important;height:58% !important;}
}
@media(max-width:600px){
  .sf-slider{min-height:600px !important;}
  .sf-slider .sf-slide .hero-content{height:43% !important;min-height:43% !important;padding:20px 7% 54px !important;}
  .sf-slider .sf-slide-bg{bottom:43% !important;height:57% !important;}
  .sf-slider .sf-slide .hero-overlay{bottom:43% !important;height:57% !important;}
  .sf-slider .sf-slide-portrait .sf-slide-bg{bottom:43% !important;height:57% !important;}
  .sf-slider .sf-slide-portrait .hero-overlay{bottom:43% !important;height:57% !important;}
  .sf-slider .sf-slide .hero-content h1{font-size:29px !important;}
  .sf-slider .sf-slide .hero-content p{font-size:14px !important;}
  .sf-slider .sf-slide .hero-actions{gap:9px !important;}
  .sf-slider .sf-slide .hero-actions .btn{padding:11px 14px !important;font-size:14px !important;}
}

/* V49: Success Stories video controls */
.success-media .success-video{width:100% !important;display:block !important;border:0 !important;aspect-ratio:16/10 !important;object-fit:cover !important;background:#0d3d3b !important;}
.success-media iframe.success-video{height:auto !important;}
.sf-story-media-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.sf-video-upload-field{border-left:4px solid #174f48 !important;background:#f3fbf8 !important;}
.sf-video-upload-field .picker-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;}
.sf-video-upload-field .button-primary{background:#174f48;border-color:#174f48;}
.video-preview{min-width:180px;min-height:52px;background:#f3f5f6;display:flex;align-items:center;justify-content:center;padding:10px;}
@media(max-width:800px){.sf-story-media-row{grid-template-columns:1fr;}}


/* V51: Hero text is fully contained in a compact solid panel.
   It must never sit on top of the slide photo. */
.sf-slider .sf-slide .container{
  width:92% !important;
  max-width:1180px !important;
  margin:0 auto !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  position:relative !important;
  z-index:5 !important;
}
.sf-slider .sf-slide .hero-content{
  box-sizing:border-box !important;
  flex:0 0 430px !important;
  width:430px !important;
  max-width:430px !important;
  min-width:0 !important;
  padding:32px 30px !important;
  margin:0 !important;
  background:#0d3d3b !important;
  border-radius:0 14px 14px 0 !important;
  overflow:hidden !important;
  position:relative !important;
  z-index:6 !important;
}
.sf-slider .sf-slide .hero-content h1{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  font-size:clamp(30px,3.2vw,46px) !important;
  line-height:1.08 !important;
  margin:8px 0 14px !important;
  overflow-wrap:anywhere !important;
}
.sf-slider .sf-slide .hero-content p{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  font-size:16px !important;
  line-height:1.5 !important;
  margin:0 !important;
}
.sf-slider .sf-slide .hero-actions{
  margin-top:18px !important;
}
.sf-slider .sf-slide .hero-overlay{
  z-index:1 !important;
}
@media(max-width:900px){
  .sf-slider .sf-slide .container{
    width:100% !important;
    max-width:none !important;
    align-items:flex-end !important;
  }
  .sf-slider .sf-slide .hero-content{
    flex:0 0 100% !important;
    width:100% !important;
    max-width:100% !important;
    border-radius:0 !important;
    padding:22px 7% 48px !important;
  }
  .sf-slider .sf-slide .hero-content h1{
    font-size:32px !important;
    overflow-wrap:normal !important;
  }
}
@media(max-width:600px){
  .sf-slider .sf-slide .hero-content{
    padding:18px 7% 50px !important;
  }
  .sf-slider .sf-slide .hero-content h1{font-size:28px !important;}
  .sf-slider .sf-slide .hero-content p{font-size:14px !important;}
}

/* V52: Compact slider typography so text stays neatly in the corner */
.sf-slider .sf-slide .hero-content{width:30% !important;max-width:30% !important;padding:44px 30px 44px 6.5% !important;justify-content:center !important;}
.sf-slider .sf-slide .hero-content h1{font-size:clamp(28px,2.65vw,40px) !important;line-height:1.10 !important;margin:8px 0 12px !important;}
.sf-slider .sf-slide .hero-content p{font-size:15px !important;line-height:1.5 !important;margin:0 !important;}
.sf-slider .sf-slide .hero-content .eyebrow{font-size:12px !important;letter-spacing:1.2px !important;}
.sf-slider .sf-slide .hero-actions{margin-top:18px !important;gap:10px !important;}
.sf-slider .sf-slide .hero-actions .btn{padding:10px 15px !important;font-size:14px !important;}
.sf-slider .sf-slide .hero-overlay{left:30% !important;}
.sf-slider .sf-slide .sf-slide-bg{left:30% !important;width:70% !important;}
.sf-slider .sf-slide-portrait .sf-slide-bg{left:30% !important;width:70% !important;}
@media(max-width:900px){
  .sf-slider .sf-slide .hero-content{width:100% !important;max-width:100% !important;padding:20px 7% 54px !important;}
  .sf-slider .sf-slide .hero-content h1{font-size:29px !important;}
  .sf-slider .sf-slide .hero-content p{font-size:14px !important;}
}

/* V58: Our Work images show the complete uploaded image without cropping. */
.welfare-programs .card-img{width:100% !important;height:230px !important;object-fit:contain !important;object-position:center !important;background:#f7fbfa !important;display:block !important;}
@media(max-width:700px){.welfare-programs .card-img{height:auto !important;max-height:none !important;object-fit:contain !important;}}
