
/* Heaven Sent volunteer, webmail, finance ministry upgrade */
.volunteer-heavenly-hero{background:radial-gradient(circle at 18% 20%,rgba(255,219,108,.32),transparent 28%),linear-gradient(135deg,#061a3d,#0a3674 52%,#d7a735);border:2px solid #d8aa3a;color:#fff;box-shadow:0 24px 60px rgba(0,0,0,.18)}
.volunteer-heavenly-hero h1{color:#fff;text-shadow:0 3px 14px rgba(0,0,0,.35)}
.volunteer-opportunity-card{border:1px solid rgba(214,170,58,.55);box-shadow:0 18px 40px rgba(4,20,47,.12);background:linear-gradient(145deg,#fff,#fffaf0)}
.volunteer-media-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px;margin-top:14px}.volunteer-media-gallery a{display:flex;align-items:center;justify-content:center;min-height:110px;border-radius:18px;overflow:hidden;border:2px solid #d7a735;background:#061a3d;color:#fff;font-weight:900;text-decoration:none}.volunteer-media-gallery img{width:100%;height:120px;object-fit:cover;transition:transform .2s}.volunteer-media-gallery a:hover img{transform:scale(1.08)}.volunteer-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.82);display:none;z-index:99999;align-items:center;justify-content:center;padding:28px}.volunteer-lightbox.open{display:flex}.volunteer-lightbox button{position:absolute;right:24px;top:18px;border:0;background:#d7a735;color:#061a3d;border-radius:999px;font-size:30px;width:48px;height:48px;font-weight:900}.volunteer-lightbox-body{max-width:min(1100px,96vw);max-height:90vh}.volunteer-lightbox-body img,.volunteer-lightbox-body iframe{max-width:100%;max-height:90vh;border-radius:18px;background:#fff}.volunteer-lightbox-body iframe{width:90vw;height:86vh}.volunteer-media-editor{display:flex;gap:10px;flex-wrap:wrap}.volunteer-media-chip{border:1px solid #d7a735;border-radius:999px;padding:8px 12px;background:#fff8dd}.volunteer-interest-card{background:linear-gradient(180deg,#fff,#fff7df);border:1px solid rgba(214,170,58,.45)}
.webmail-app-shell{display:grid;grid-template-columns:230px minmax(260px,360px) 1fr;gap:0;border:1px solid rgba(214,170,58,.45);border-radius:24px;overflow:hidden;background:#fff;min-height:650px}.webmail-sidebar{background:#061a3d;color:#fff;padding:20px}.webmail-sidebar a,.webmail-folder{display:block;color:#fff;text-decoration:none;padding:12px 14px;border-radius:12px;margin-bottom:6px}.webmail-folder.active,.webmail-sidebar a:hover{background:#0e3b80}.webmail-list{border-right:1px solid #dfe6f5;background:#f8fbff;overflow:auto}.webmail-list h2,.webmail-reader h2{padding:18px 20px;margin:0}.webmail-list .mail-row{display:block;padding:14px 18px;border-bottom:1px solid #e2e8f0;text-decoration:none;color:#061a3d;background:#fff}.webmail-list .mail-row.unseen{font-weight:900;background:#eef5ff}.webmail-reader{background:#fff;overflow:auto}.webmail-compose-card{border-top:1px solid #e2e8f0;padding:18px}.mail-body{background:#fbfdff;border:1px solid #dfe6f5;border-radius:18px;padding:18px;line-height:1.65}.webmail-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 18px;border-bottom:1px solid #e2e8f0;background:#fff}.webmail-search{width:100%;border-radius:999px;border:1px solid #d9e2f2;padding:10px 14px}.finance-service-card{background:linear-gradient(135deg,#061a3d,#0c3673);color:#fff;border:1px solid #d7a735}.finance-service-card h2,.finance-service-card label{color:#fff}.finance-service-card input,.finance-service-card select,.finance-service-card textarea{background:#fff;color:#061a3d}.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
@media(max-width:950px){.webmail-app-shell{grid-template-columns:1fr}.webmail-sidebar{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.webmail-list{max-height:360px}}

/* HSM upload/media reliability polish - actual uploaded files shown through serve-upload.php */
.volunteer-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.volunteer-opportunity-card{padding:24px!important;overflow:hidden}.volunteer-opportunity-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);gap:24px;align-items:start}.volunteer-opportunity-card h3{font-size:clamp(1.6rem,3vw,2.35rem);line-height:1.05;max-width:740px}.volunteer-media-panel{background:linear-gradient(180deg,#fffdf8,#fff);border:1px solid rgba(214,173,69,.38);border-radius:22px;padding:14px;box-shadow:0 16px 34px rgba(5,30,72,.10)}
.volunteer-media-gallery{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-top:0}.volunteer-media-gallery button,.volunteer-media-gallery a{width:100%;min-height:120px;border-radius:16px;overflow:hidden;background:#061d46;border:2px solid #d7b750;color:#fff;text-decoration:none;font-weight:800;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;padding:0}.volunteer-media-gallery img{width:100%;height:132px;object-fit:cover;display:block}.volunteer-media-gallery button span{background:rgba(5,24,58,.88);font-size:.78rem;letter-spacing:.03em;width:100%;padding:7px}.volunteer-media-review{min-height:112px;border-radius:16px;background:#071f4c;border:2px dashed #d7b750;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:14px}.volunteer-media-review small{opacity:.85;margin-top:6px}.volunteer-lightbox-body{display:flex;flex-direction:column;gap:12px;align-items:center;max-width:min(1120px,96vw);max-height:90vh;background:#fff;border-radius:18px;padding:16px;border:3px solid #d7b750;box-shadow:0 30px 70px rgba(0,0,0,.35)}.volunteer-lightbox-body img{max-width:92vw;max-height:76vh;object-fit:contain}.volunteer-lightbox-body iframe{width:min(1000px,92vw);height:78vh;border:0}.volunteer-lightbox-body video{max-width:92vw;max-height:76vh;background:#000;border-radius:12px}.volunteer-staff-thumbs,.volunteer-media-editor-grid{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start}.volunteer-staff-media-link{width:74px;height:58px;border-radius:10px;background:#061d46;color:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #d7b750;text-decoration:none;font-weight:900}.volunteer-staff-media-link img{width:100%;height:100%;object-fit:cover}.volunteer-staff-media-link.pdf,.volunteer-staff-media-link.file{font-size:.8rem}.volunteer-media-missing{width:74px;height:58px;border-radius:10px;background:#6b1f1f;color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;font-size:.72rem;padding:4px}.volunteer-media-chip{display:flex!important;align-items:center;gap:8px;border-radius:14px!important;padding:8px 10px!important}.upload-confirmation,.save-confirmation{border-left:5px solid #18894e;background:#e9f8ef;color:#042b19;padding:12px 16px;border-radius:12px;font-weight:800;margin:12px 0}.upload-warning{border-left:5px solid #b8860b;background:#fff7df;color:#3d2700;padding:12px 16px;border-radius:12px;font-weight:800;margin:12px 0}
@media(max-width:900px){.volunteer-section-head{display:block}.volunteer-opportunity-layout{grid-template-columns:1fr}.volunteer-media-panel{margin-top:10px}.volunteer-opportunity-card h3{font-size:1.7rem}.volunteer-media-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* HSM Events preservation and professional formatting pass */
.hsm-event-manager-card,.hsm-events-section{position:relative}
.hsm-section-head.compact{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.hsm-compact-event-form{gap:.85rem}
.hsm-compact-event-form label{font-size:.95rem}
.hsm-compact-event-form input,.hsm-compact-event-form select,.hsm-compact-event-form textarea{font-size:1rem;min-height:44px}
.hsm-compact-event-form textarea{min-height:96px}
.hsm-saved-media-box{border:1px solid rgba(198,151,44,.35);border-radius:18px;padding:1rem;background:#fffaf0}
.hsm-event-media-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.8rem}
.hsm-event-media-admin-card{display:flex!important;flex-direction:column;gap:.35rem;border:1px solid rgba(9,43,91,.18);border-radius:16px;padding:.65rem;background:#fff;color:#092b5b;min-width:0}
.hsm-event-media-admin-card img{width:100%;height:110px;object-fit:cover;border-radius:12px;border:1px solid rgba(198,151,44,.35)}
.hsm-event-media-admin-card span{font-weight:800;word-break:break-word}
.hsm-event-media-admin-card small{font-size:.75rem;color:#5d6b7c;word-break:break-all}
.hsm-event-media-admin-card em{font-style:normal;font-size:.82rem}
.hsm-pdf-tile{height:110px;border-radius:12px;display:grid;place-items:center;background:#092b5b;color:#fff;font-weight:900;letter-spacing:.12em}
.hsm-event-admin-list{display:grid;gap:.75rem}
.hsm-event-admin-row{display:grid;grid-template-columns:120px 1fr auto;gap:.85rem;align-items:center;border:1px solid rgba(198,151,44,.28);border-radius:18px;padding:.8rem;background:#fff}
.hsm-event-admin-row.is-archived{opacity:.72;background:#f7f4ec}
.hsm-event-admin-thumb{width:120px;height:80px;border-radius:14px;background:#092b5b;color:#fff;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(198,151,44,.35)}
.hsm-event-admin-thumb img{width:100%;height:100%;object-fit:cover}
.hsm-event-admin-main strong{display:block;font-size:1.05rem;color:#092b5b}
.hsm-event-admin-main p{margin:.15rem 0;color:#263b5a}
.hsm-event-admin-main small{color:#677187}
.hsm-event-admin-actions{display:flex;gap:.45rem;flex-wrap:wrap;justify-content:flex-end}
.hsm-events-hero{background:linear-gradient(135deg,#061d42,#0d4385);color:#fff;border-bottom:4px solid #d6a93a}
.hsm-events-grid{display:grid;gap:1.1rem}
.hsm-event-public-card{display:grid;grid-template-columns:minmax(180px,320px) 1fr;gap:1rem;border:1px solid rgba(198,151,44,.32);border-radius:24px;padding:1rem;background:#fffdf7;box-shadow:0 18px 50px rgba(9,43,91,.08)}
.hsm-event-image-button{border:0;background:transparent;padding:0;cursor:pointer;width:100%;align-self:start}
.hsm-event-image-button img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:18px;border:2px solid #d6a93a;box-shadow:0 14px 32px rgba(9,43,91,.14)}
.hsm-event-copy h3{margin:.2rem 0 .45rem;font-size:clamp(1.4rem,2.8vw,2.25rem);line-height:1.05;color:#092b5b}
.hsm-event-date{font-size:1rem;color:#092b5b}.hsm-event-date span{color:#ad7b11;font-weight:800}.hsm-event-location{font-weight:700;color:#2c3e59}
.hsm-event-media-strip{display:flex;gap:.5rem;flex-wrap:wrap;margin:.75rem 0}
.hsm-event-media-chip{border:1px solid #d6a93a;background:#092b5b;color:#fff;border-radius:999px;padding:.55rem .85rem;font-weight:800;cursor:pointer}
.hsm-event-modal[hidden]{display:none}.hsm-event-modal{position:fixed;inset:0;z-index:99999;background:rgba(1,8,20,.78);display:grid;place-items:center;padding:1rem}.hsm-event-modal-card{background:#fffdf7;border:2px solid #d6a93a;border-radius:24px;max-width:min(92vw,1000px);max-height:90vh;padding:1rem;box-shadow:0 28px 80px rgba(0,0,0,.35);display:grid;gap:.75rem}.hsm-event-modal-card img{max-width:100%;max-height:68vh;object-fit:contain;border-radius:16px}.hsm-event-modal-card iframe{width:min(86vw,900px);height:70vh;border:0;border-radius:16px}.hsm-event-modal-close{position:fixed;right:22px;top:22px;width:52px;height:52px;border-radius:50%;border:0;background:#d6a93a;color:#061d42;font-size:2rem;font-weight:900;cursor:pointer}
@media(max-width:800px){.hsm-section-head.compact,.hsm-event-public-card,.hsm-event-admin-row{display:flex;flex-direction:column;align-items:stretch}.hsm-event-admin-thumb{width:100%;height:160px}.hsm-event-admin-actions{justify-content:flex-start}.hsm-event-public-card{padding:.85rem}.hsm-event-copy h3{font-size:1.55rem}.hsm-event-modal-card iframe{height:60vh}}


/* HSM 3.0.51 - Volunteer media, saved-preview, and layout reliability pass */
.hsm-volunteer-page{max-width:1320px;margin:28px auto 54px;padding:0 18px;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:28px;align-items:start;box-sizing:border-box}.hsm-volunteer-main,.hsm-volunteer-form-card{min-width:0}.hsm-volunteer-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.hsm-volunteer-heading h2,.hsm-volunteer-form-card h2{font-family:Georgia,serif;color:#061d46;font-size:clamp(1.7rem,2.2vw,2.25rem);line-height:1.08;margin:.15rem 0}.hsm-volunteer-list{display:grid;gap:20px}.hsm-volunteer-card{box-sizing:border-box;width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:24px;align-items:start;padding:26px!important;border:1px solid rgba(214,170,58,.48);border-radius:24px;background:linear-gradient(145deg,#fffdf8,#fff);box-shadow:0 18px 40px rgba(5,25,60,.11);overflow:visible}.hsm-volunteer-copy{min-width:0;max-width:760px}.hsm-volunteer-copy h3{font-family:Georgia,serif;color:#061d46;font-size:clamp(1.75rem,2.6vw,2.45rem);line-height:1.08;margin:.35rem 0 .9rem;overflow-wrap:normal;word-break:normal;hyphens:none}.hsm-volunteer-copy p{font-size:1.02rem;line-height:1.55;color:#061d46;margin:.75rem 0;overflow-wrap:break-word}.hsm-volunteer-media{min-width:0;width:100%;background:linear-gradient(180deg,#fffaf0,#fff);border:1px solid rgba(214,170,58,.42);border-radius:20px;padding:14px;box-shadow:0 14px 34px rgba(5,25,60,.10)}.hsm-volunteer-media h4{font-family:Georgia,serif;color:#061d46;font-size:1.05rem;margin:0 0 10px}.hsm-vol-media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:12px}.hsm-vol-media-tile{box-sizing:border-box;width:100%;min-height:132px;border-radius:16px;overflow:hidden;background:#061d46;border:2px solid #d7b750;color:#fff;text-decoration:none;font-weight:800;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;padding:0;text-align:center;box-shadow:0 10px 24px rgba(5,25,60,.16)}.hsm-vol-media-tile img{display:block;width:100%;height:142px;object-fit:cover;background:#fff}.hsm-vol-media-tile span,.hsm-vol-media-tile strong{display:block;width:100%;box-sizing:border-box;padding:8px 10px;background:rgba(5,24,58,.9);font-size:.82rem;line-height:1.2}.hsm-vol-media-missing{min-height:124px;border-radius:16px;background:#071f4c;border:2px dashed #d7b750;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:14px}.hsm-volunteer-form-card{position:sticky;top:18px;background:linear-gradient(180deg,#fffdf8,#fff);border:1px solid rgba(214,170,58,.46);border-radius:24px;padding:24px;box-shadow:0 18px 42px rgba(5,25,60,.12)}.hsm-vol-form{display:grid;grid-template-columns:1fr;gap:12px}.hsm-vol-form input,.hsm-vol-form textarea{box-sizing:border-box;width:100%;border:1px solid rgba(169,126,42,.44);border-radius:12px;padding:13px 15px;font-size:1rem;background:#fff;color:#061d46}.hsm-vol-form textarea{min-height:132px;resize:vertical}.hsm-vol-form .submit{width:100%;min-height:52px;border-radius:999px}.volunteer-lightbox.open{display:flex!important}.volunteer-lightbox{position:fixed;inset:0;background:rgba(4,16,40,.86);z-index:99999;align-items:center;justify-content:center;padding:24px}.volunteer-lightbox>button{position:absolute;right:24px;top:18px;border:0;background:#d7b750;color:#061d46;border-radius:999px;font-size:30px;width:50px;height:50px;font-weight:900}.volunteer-lightbox-body{display:flex;flex-direction:column;gap:12px;align-items:center;max-width:min(1120px,96vw);max-height:90vh;background:#fff;border-radius:18px;padding:16px;border:3px solid #d7b750;box-shadow:0 30px 70px rgba(0,0,0,.35)}.volunteer-lightbox-body img{max-width:92vw;max-height:76vh;object-fit:contain}.volunteer-lightbox-body iframe{width:min(1000px,92vw);height:78vh;border:0}.volunteer-lightbox-body video{max-width:92vw;max-height:76vh;background:#000;border-radius:12px}
@media(max-width:1050px){.hsm-volunteer-page{grid-template-columns:1fr}.hsm-volunteer-form-card{position:relative;top:auto}.hsm-volunteer-card{grid-template-columns:1fr}.hsm-volunteer-copy{max-width:none}}
@media(max-width:640px){.hsm-volunteer-page{padding:0 12px;margin-top:18px}.hsm-volunteer-heading{display:block}.hsm-volunteer-card{padding:18px!important;border-radius:18px}.hsm-volunteer-copy h3{font-size:1.6rem}.hsm-vol-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hsm-volunteer-media{padding:10px}.hsm-volunteer-form-card{padding:18px;border-radius:18px}.page-hero.volunteer-heavenly-hero{margin-left:12px;margin-right:12px}}
.staff-volunteer-card-list{display:grid;gap:14px}.staff-volunteer-record{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(180px,.7fr) minmax(160px,.6fr) minmax(160px,.6fr);gap:16px;align-items:start;border:1px solid rgba(214,170,58,.35);border-radius:18px;padding:16px;background:#fff}.staff-volunteer-record h3{font-size:1.15rem;margin:0 0 5px;color:#061d46}.staff-volunteer-actions{display:flex;gap:8px;flex-wrap:wrap}.staff-volunteer-media-preview{display:flex;gap:8px;flex-wrap:wrap}.staff-volunteer-media-preview .volunteer-staff-media-link{width:82px;height:64px}.staff-save-success{border-left:5px solid #168a4c;background:#e9f8ef;color:#042b19;padding:12px 16px;border-radius:12px;font-weight:800;margin:12px 0}.staff-save-warning{border-left:5px solid #b8860b;background:#fff7df;color:#3d2700;padding:12px 16px;border-radius:12px;font-weight:800;margin:12px 0}
@media(max-width:900px){.staff-volunteer-record{grid-template-columns:1fr}.staff-volunteer-actions{justify-content:flex-start}}

/* HSM professional volunteer layout correction - keeps media visible without squeezing text */
.hsm-volunteer-page{
  max-width:1180px !important;
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) minmax(300px, 380px) !important;
  gap:24px !important;
  align-items:start !important;
}
.hsm-volunteer-main{min-width:0 !important;}
.hsm-volunteer-heading{margin-bottom:14px !important;}
.hsm-volunteer-heading h2,
.hsm-volunteer-form-card h2{
  font-size:clamp(1.45rem, 2vw, 1.9rem) !important;
  letter-spacing:.01em !important;
}
.hsm-volunteer-card{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:18px !important;
  padding:22px !important;
  border-radius:22px !important;
  overflow:hidden !important;
}
.hsm-volunteer-copy{
  max-width:100% !important;
  width:100% !important;
  min-width:0 !important;
}
.hsm-volunteer-copy h3{
  max-width:760px !important;
  font-size:clamp(1.65rem, 2.2vw, 2.15rem) !important;
  line-height:1.12 !important;
  letter-spacing:-.02em !important;
  margin:.35rem 0 .85rem !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
}
.hsm-volunteer-copy p{
  max-width:760px !important;
  font-size:1rem !important;
  line-height:1.52 !important;
}
.hsm-volunteer-media{
  width:100% !important;
  max-width:100% !important;
  padding:14px !important;
  border-radius:18px !important;
  background:linear-gradient(135deg,#fffaf0,#ffffff) !important;
}
.hsm-vol-media-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap:12px !important;
}
.hsm-vol-media-tile{
  min-height:0 !important;
  height:auto !important;
  border-radius:16px !important;
}
.hsm-vol-media-tile img{
  height:170px !important;
  object-fit:cover !important;
}
.hsm-vol-media-tile span,
.hsm-vol-media-tile strong{
  font-size:.86rem !important;
  padding:9px 10px !important;
}
.hsm-volunteer-form-card{
  padding:22px !important;
  border-radius:22px !important;
}
.hsm-vol-form{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px !important;
}
.hsm-vol-form textarea,
.hsm-vol-form .submit{grid-column:1 / -1 !important;}
.hsm-vol-form input,
.hsm-vol-form textarea{
  font-size:.98rem !important;
  padding:12px 14px !important;
  border-radius:12px !important;
}
.hsm-vol-form textarea{min-height:132px !important;}
.hsm-vol-form .submit{min-height:50px !important;}
.volunteer-lightbox-body{
  width:auto !important;
  max-width:min(1040px,94vw) !important;
}
.volunteer-lightbox-body img{max-width:90vw !important; max-height:76vh !important;}
@media(max-width:980px){
  .hsm-volunteer-page{grid-template-columns:1fr !important; max-width:920px !important;}
  .hsm-volunteer-form-card{position:relative !important; top:auto !important;}
}
@media(max-width:700px){
  .hsm-volunteer-page{padding:0 14px !important; gap:18px !important;}
  .hsm-volunteer-heading{display:grid !important; gap:12px !important;}
  .hsm-volunteer-card{padding:18px !important;}
  .hsm-volunteer-copy h3{font-size:1.55rem !important; line-height:1.14 !important;}
  .hsm-volunteer-copy p{font-size:.96rem !important; line-height:1.48 !important;}
  .hsm-vol-media-grid{grid-template-columns:1fr !important;}
  .hsm-vol-media-tile img{height:auto !important; max-height:260px !important; object-fit:contain !important; background:#fff !important;}
  .hsm-vol-form{grid-template-columns:1fr !important;}
}
