/* ORHI Theme main styles */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--orhi-font-base);
  line-height: 1.6;
  color: #111;
}

h1,h2,h3,h4 { font-family: var(--orhi-font-headings); line-height: 1.2; margin: 0 0 .6rem; }
p { margin: 0 0 1rem; }

.container { width: min(1150px, calc(100% - 2rem)); margin: 0 auto; }

a { color: inherit; }
.link { color: var(--orhi-primary); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}

.btn-accent { background: var(--orhi-accent); color: #fff; }
.btn-primary { background: var(--orhi-primary); color: #fff; }
.btn-accent:hover, .btn-primary:hover { filter: brightness(0.95); }

/* =========================
   HEADER / NAV (DO NOT BREAK)
========================= */
.site-header {
  color:#fff;
  position: relative;
  z-index: 50;
  background: var(--orhi-header-bg); /* safe: uses your customizer color */
}
.site-header.is-sticky { position: sticky; top: 0; }

.header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: .8rem 0;
  gap: 1rem;
}

.site-title { font-weight: 800; text-decoration:none; color:#fff; }
.site-logo img { max-height: 56px; width:auto; }

.primary-nav { display:flex; align-items:center; gap: 1rem; }
.primary-nav .menu {
  list-style:none;
  display:flex;
  gap: .75rem;
  margin:0;
  padding:0;
  align-items:center;
}
.primary-nav .menu a {
  color:#fff;
  text-decoration:none;
  padding: .4rem .6rem;
  border-radius: 10px;
}
.primary-nav .menu a:hover { background: rgba(255,255,255,.12); }
.nav-cta { white-space: nowrap; }

/* SAFE dropdown styling (prevents “broken heading/menu” issues) */
.primary-nav .menu li { position: relative; }
.primary-nav .menu .sub-menu,
.primary-nav .menu ul {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: .5rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  z-index: 999;
}
.primary-nav .menu li:hover > .sub-menu,
.primary-nav .menu li:focus-within > .sub-menu {
  display: block;
}
.primary-nav .menu .sub-menu a {
  color: #111;
  display: block;
  padding: .6rem .7rem;
  border-radius: 10px;
}
.primary-nav .menu .sub-menu a:hover { background: rgba(0,0,0,.06); }

.nav-toggle {
  display:none;
  background:transparent;
  border:0;
  color:#fff;
  padding:.5rem;
  border-radius: 10px;
}
.burger { width: 22px; height: 2px; background: #fff; display:block; position: relative; }
.burger::before, .burger::after { content:""; position:absolute; left:0; width:22px; height:2px; background:#fff; }
.burger::before { top: -7px; }
.burger::after  { top: 7px; }

.mobile-drawer { background: var(--orhi-header-bg); border-top: 1px solid rgba(255,255,255,.15); }
.mobile-drawer-inner { padding: 1rem; display:flex; flex-direction:column; gap: 1rem; }
.mobile-menu { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap: .25rem; }
.mobile-menu a { color:#fff; text-decoration:none; padding:.7rem .6rem; border-radius: 10px; display:block; }
.mobile-menu a:hover { background: rgba(255,255,255,.12); }

/* =========================
   HERO
========================= */
.hero { position:relative; min-height: 70vh; display:flex; align-items:center; }
.hero-media { position:absolute; inset:0; overflow:hidden; }
.hero-image { position:absolute; inset:0; background-size: cover; background-position:center; transform: scale(1.02); }
.hero-video { width: 100%; height: 100%; object-fit: cover; display:block; }
.hero-overlay { position:absolute; inset:0; background: rgba(0,0,0,.55); }
.hero-content { position: relative; padding: 4.2rem 0; color:#fff; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3.2rem); max-width: 28ch; }
.hero-subtitle { font-size: 1.05rem; max-width: 60ch; opacity: .95; }
.hero-actions { display:flex; gap:.75rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* =========================
   SECTIONS / LAYOUT
========================= */
.section { padding: 3rem 0; }
.section-alt { background: var(--orhi-bg-alt); }
.section-title { font-size: 1.8rem; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap: 1rem; margin-bottom: 1rem; }

.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.card { background:#fff; border-radius: 16px; padding: 1.2rem; box-shadow: 0 8px 18px rgba(0,0,0,.06); }

.grid.cards { display:grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.value-card {
  background:#fff;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,.06);
  font-weight: 700;
}

.thematic-card {
  display:flex; gap: .85rem;
  background:#fff; padding: 1rem;
  border-radius: 16px; text-decoration:none;
  border: 1px solid rgba(0,0,0,.06);
}
.thematic-icon { color: var(--orhi-support); font-size: 1.2rem; }

/* =========================
   POST CARDS
========================= */
.post-card {
  background:#fff;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.06);
}
.post-card-thumb img {
  width:100%;
  height: 200px;
  object-fit: cover;
  display:block;
}
.post-card-body { padding: 1rem; }

/* FIX: var(--orhi-text) may not exist; don’t break link color */
.post-card-title a { text-decoration:none; color: #111; }
.meta { font-size: .9rem; opacity: .8; margin-bottom: .35rem; }

/* =========================
   PARTNERS / MODAL
========================= */
.partners-grid { display:grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.partner-logo {
  background:#fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: .7rem;
  cursor:pointer;
}
.partner-logo img { width:100%; height: 54px; object-fit: contain; display:block; }

.modal[hidden] { display:none; }
.modal { position:fixed; inset:0; z-index: 1000; display:flex; align-items:center; justify-content:center; }
.modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.55); }
.modal-dialog {
  position:relative;
  width: min(900px, calc(100% - 1.5rem));
  background:#fff;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.modal-close {
  position:absolute; top:.6rem; right:.6rem;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.1);
  background:#fff;
  cursor:pointer;
  font-size: 22px;
}
.modal-content { display:grid; grid-template-columns: 1fr 1.2fr; }
.modal-media img { width:100%; height: 100%; object-fit: cover; display:block; min-height: 240px; }
.modal-body { padding: 1.2rem; }

.cta-strip { background: var(--orhi-secondary); color:#fff; padding: 1.2rem 0; }
.cta-strip-inner { display:flex; justify-content:space-between; align-items:center; gap: 1rem; flex-wrap: wrap; }

/* =========================
   FOOTER
========================= */
.site-footer { padding: 2.5rem 0 1rem; }
.footer-grid { display:grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 1rem; }
.footer-title { font-size: 1.05rem; margin-bottom: .6rem; }
.footer-menu { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap: .35rem; }
.footer-menu a { text-decoration:none; }
.footer-menu a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(0,0,0,.08); margin-top: 1rem; padding-top: 1rem; }

.social-icons { display:flex; gap:.5rem; flex-wrap: wrap; }
.social-link {
  display:inline-flex; align-items:center; justify-content:center;
  width: 40px; height: 40px;
  background:#fff; border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
}
.social-icon svg { fill: #111; }

.page-header { margin: 2rem 0 1rem; }
.single-thumb img { width: 100%; height: auto; border-radius: 18px; margin: 1rem 0; }

.search-form { display:flex; gap:.5rem; margin: 1rem 0 2rem; }
.search-field { flex:1; padding: .75rem .9rem; border-radius: 12px; border: 1px solid rgba(0,0,0,.15); }
.search-submit { padding: .75rem 1rem; border-radius: 12px; border: 0; background: var(--orhi-primary); color:#fff; font-weight: 700; }

.sr-only, .screen-reader-text {
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

@media (max-width: 980px) {
  .grid.cards { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .modal-content { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .primary-nav { display:none; }
  .nav-toggle { display:inline-flex; }
  .two-col { grid-template-columns: 1fr; }
  .grid.cards { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   SAFE FIX: stop cropping card thumbnails + show full excerpt
   (keep at the end so it overrides only what it needs)
========================================================= */

/* Thumbnail wrapper must not force a fixed height that crops */
.post-card .post-card-thumb,
.post-card a.post-card-thumb {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Make sure the actual image can show fully */
.post-card .post-card-thumb img,
.post-card .post-card-thumb .wp-post-image {
  width: 100% !important;
  height: auto !important;          /* KEY: allow natural height */
  max-height: none !important;
  object-fit: contain !important;   /* KEY: no cropping */
  object-position: center !important;
  display: block !important;
}

/* Some themes wrap thumbnails in figure */
.post-card figure,
.post-card figure img {
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}

/* Excerpt: remove line clamp / forced height */
.post-card .post-card-excerpt {
  overflow: visible !important;
  display: block !important;
  max-height: none !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}