/*
Theme Name: Sahyog Charity
Theme URI: https://example.org/
Author: Your Trust Name
Description: A warm, accessible starter theme for an Indian charitable trust or nonprofit.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: sahyog-charity
*/

:root {
  --ink: #252231;
  --muted: #737180;
  --line: #ecebf0;
  --paper: #ffffff;
  --canvas: #f7f7f8;
  --purple: #512a78;
  --purple-dark: #371956;
  --saffron: #e8a63d;
  --green: #2f7658;
  --soft-purple: #f1ebf6;
  --sidebar-width: 264px;
  --radius: 18px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body.admin-bar .site-sidebar { top: 32px; height: calc(100vh - 32px); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--purple); }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; height: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; transform: translateY(-150%); background: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

/* Fixed navigation rail inspired by the supplied menu reference. */
.site-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1000;
  width: var(--sidebar-width); height: 100vh; display: flex; flex-direction: column;
  padding: 20px 12px 14px; background: var(--paper); border-right: 1px solid var(--line);
  transition: transform .25s ease, width .25s ease;
}
.brand-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 14px; }
.custom-logo-link { display: inline-flex; align-items: center; max-width: 185px; }
.custom-logo { width: auto; max-width: 180px; max-height: 42px; object-fit: contain; }
.brand-wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--purple-dark); font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px 11px 11px 3px; background: var(--purple); color: white; }
.brand-mark svg { width: 20px; height: 20px; }
.sidebar-collapse, .mobile-menu-toggle, .submenu-toggle { display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.sidebar-collapse { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.sidebar-collapse svg { width: 16px; height: 16px; }
.mobile-menu-toggle { display: none; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d8d6de transparent; }
.primary-navigation { padding: 3px 0 12px; }
.primary-navigation ul { list-style: none; margin: 0; padding: 0; }
.primary-navigation > ul > li { margin: 2px 0; }
.primary-navigation .menu-item-wrap { display: flex; align-items: center; position: relative; }
.primary-navigation a { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #575665; font-size: 14px; font-weight: 550; line-height: 1.35; transition: color .15s ease, background .15s ease; }
.primary-navigation a:hover { background: #f4f3f6; color: var(--purple-dark); }
.primary-navigation .current-menu-item > .menu-item-wrap > a,
.primary-navigation .current-menu-ancestor > .menu-item-wrap > a,
.primary-navigation .current_page_item > a { background: #e9e9eb; color: var(--ink); font-weight: 700; }
.nav-icon { flex: 0 0 18px; display: grid; place-items: center; color: #777684; }
.nav-icon svg { width: 17px; height: 17px; stroke-width: 1.7; }
.submenu-toggle { width: 30px; height: 34px; border-radius: 7px; color: #898895; }
.submenu-toggle svg { width: 15px; height: 15px; transition: transform .2s; }
.menu-item-has-children.is-open > .menu-item-wrap .submenu-toggle svg { transform: rotate(90deg); }
.primary-navigation .sub-menu { display: none; padding: 2px 0 5px 29px; }
.menu-item-has-children.is-open > .sub-menu { display: block; }
.primary-navigation .sub-menu a { padding: 8px 10px; font-size: 13px; }
.primary-navigation .sub-menu .nav-icon { display: none; }
.sidebar-tools { margin: 0 0 12px; padding: 12px 1px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sidebar-search { display: flex; align-items: center; gap: 8px; padding: 0 9px; color: #888795; }
.sidebar-search svg { flex: 0 0 16px; width: 16px; height: 16px; }
.sidebar-search input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #dedde3; border-radius: 8px; outline: 0; color: var(--ink); font-size: 12px; }
.sidebar-search input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #512a7817; }
.sidebar-bottom { padding-top: 2px; }
.sidebar-note { margin: 0 8px 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sidebar-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 8px; padding: 0 1px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 750; line-height: 1.2; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--purple); color: #fff; }
.button-primary:hover { background: var(--purple-dark); color: #fff; }
.button-secondary { border-color: #dedde3; background: #fff; color: var(--ink); }
.sidebar-actions .button { min-height: 38px; padding: 8px 9px; font-size: 12px; }
.sidebar-donate { grid-column: 1 / -1; background: var(--purple); color: #fff; }
.sidebar-donate:hover { color: #fff; background: var(--purple-dark); }
.sidebar-donate svg { width: 16px; height: 16px; }
.site-main { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .25s ease; }
.site-shell { width: min(100%, 1480px); margin: 0 auto; }
.mobile-topbar { display: none; }
.mobile-quick-navigation { display: none; }

/* Main page */
.home-main { padding: 28px clamp(18px, 4vw, 56px) 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { width: 20px; height: 2px; content: ""; background: var(--saffron); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .78fr); align-items: center; gap: clamp(22px, 5vw, 66px); min-height: 360px; padding: clamp(30px, 5vw, 64px); overflow: hidden; border-radius: 22px; background: linear-gradient(115deg, #f4edf7 0%, #faf7f1 58%, #e9f2eb 100%); }
.hero::before, .hero::after { position: absolute; z-index: 0; content: ""; border-radius: 50%; pointer-events: none; }
.hero::before { width: 390px; height: 390px; top: -235px; right: -70px; border: 1px solid #ffffffa8; box-shadow: 0 0 0 30px #ffffff30, 0 0 0 70px #ffffff20; }
.hero::after { width: 200px; height: 200px; bottom: -130px; left: 48%; background: #ffffff48; }
.hero-copy, .hero-art { position: relative; z-index: 1; }
.hero h1 { max-width: 650px; margin: 0 0 16px; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy > p:not(.eyebrow) { max-width: 580px; margin: 0; color: #5e5b68; font-size: clamp(16px, 1.45vw, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.hero-actions .button { min-width: 145px; }
.hero-art { display: grid; place-items: center; min-height: 245px; }
.orbit { position: absolute; width: 250px; height: 250px; border: 1px solid #ffffffbd; border-radius: 50%; }
.orbit::before, .orbit::after { position: absolute; content: ""; border: 1px solid #ffffff90; border-radius: 50%; }
.orbit::before { inset: 22px; }
.orbit::after { inset: 48px; }
.hero-emblem { display: grid; place-items: center; width: 152px; height: 152px; border: 10px solid #ffffff90; border-radius: 50% 50% 50% 14%; background: var(--purple); color: #fff; box-shadow: 0 18px 45px #37195626; transform: rotate(-7deg); }
.hero-emblem svg { width: 65px; height: 65px; stroke-width: 1.4; transform: rotate(7deg); }
.hero-caption { position: absolute; right: 0; bottom: 0; padding: 8px 12px; border: 1px solid #ffffffbd; border-radius: 9px; background: #ffffffb8; color: #5c5967; font-size: 12px; font-weight: 700; }
.section { padding: 48px 0 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.04em; }
.section-heading p { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--purple); font-size: 13px; font-weight: 800; white-space: nowrap; }
.text-link svg { width: 15px; height: 15px; }
.program-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.program-card { min-height: 215px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.program-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #2b233010; }
.program-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 18px; border-radius: 14px; background: var(--soft-purple); color: var(--purple); }
.program-card:nth-child(2) .program-icon { background: #eef5ee; color: var(--green); }
.program-card:nth-child(3) .program-icon { background: #fbf2e4; color: #a46a11; }
.program-icon svg { width: 22px; height: 22px; }
.program-card h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.02em; }
.program-card p { margin: 0; color: var(--muted); font-size: 14px; }
.trust-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: center; margin-top: 44px; padding: 24px 26px; border-radius: 16px; background: #282433; color: white; }
.trust-strip h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.trust-point { display: flex; align-items: center; gap: 11px; color: #e5e2e9; font-size: 13px; }
.trust-point svg { flex: 0 0 21px; width: 21px; height: 21px; color: #efc36b; }
.home-content, .page-content { padding: 35px clamp(18px, 4vw, 56px); }
.page-header { padding: 52px clamp(18px, 4vw, 56px) 30px; background: linear-gradient(120deg, #f4edf7, #f6f3eb); }
.page-header h1 { max-width: 920px; margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.06; letter-spacing: -.05em; }
.entry-content { max-width: 850px; margin: 0 auto; padding: 38px 0 70px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2, .entry-content h3 { letter-spacing: -.035em; line-height: 1.2; }
.entry-content a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 12px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(18px, 4vw, 56px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); }

/* WooCommerce storefront, cart, and checkout styling. */
.woocommerce .woocommerce-breadcrumb, .woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { color: var(--muted); font-size: 13px; }
.woocommerce .woocommerce-breadcrumb a { color: var(--purple); }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; margin: 24px 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { float: none; width: auto; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.woocommerce ul.products li.product a img { aspect-ratio: 4 / 3; margin: 0 0 12px; border-radius: 10px; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0; color: var(--ink); font-size: 16px; font-weight: 750; }
.woocommerce div.product div.images img { border-radius: 14px; }
.woocommerce div.product .product_title { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.woocommerce div.product p.price, .woocommerce div.product span.price, .woocommerce ul.products li.product .price { color: var(--green); font-weight: 800; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt { min-height: 40px; padding: 11px 16px; border-radius: 9px; background: var(--purple); color: #fff; font-weight: 750; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover { background: var(--purple-dark); color: #fff; }
.woocommerce .quantity .qty { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; }
.woocommerce table.shop_table, .woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { border-color: var(--line); border-radius: 12px; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error { border-top-color: var(--green); border-radius: 9px; background: #fff; }
.woocommerce .woocommerce-message::before, .woocommerce .woocommerce-info::before { color: var(--green); }
.woocommerce-checkout #payment { border-radius: 12px; background: #f2f0f4; }

/* The sidebar can collapse on wide screens and becomes a drawer on small screens. */
body.sidebar-collapsed { --sidebar-width: 76px; }
body.sidebar-collapsed .site-sidebar { padding-right: 9px; padding-left: 9px; }
body.sidebar-collapsed .brand-row { justify-content: center; }
body.sidebar-collapsed .brand-wordmark span:last-child,
body.sidebar-collapsed .primary-navigation .nav-label,
body.sidebar-collapsed .submenu-toggle,
body.sidebar-collapsed .sidebar-tools,
body.sidebar-collapsed .sidebar-note,
body.sidebar-collapsed .sidebar-actions .button-secondary,
body.sidebar-collapsed .sidebar-actions .button-primary { display: none; }
body.sidebar-collapsed .sidebar-actions { display: block; }
body.sidebar-collapsed .sidebar-actions .sidebar-donate { display: grid; width: 42px; height: 42px; margin: auto; padding: 0; overflow: hidden; font-size: 0; }
body.sidebar-collapsed .primary-navigation a { justify-content: center; padding: 11px 5px; }
body.sidebar-collapsed .primary-navigation .nav-icon { flex-basis: 22px; }
body.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }

@media (max-width: 980px) {
  :root { --sidebar-width: 238px; }
  .hero { grid-template-columns: 1.2fr .8fr; padding: 34px; }
  .program-grid { gap: 10px; }
  .program-card { padding: 18px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip h2 { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body.admin-bar .site-sidebar { top: 46px; height: calc(100vh - 46px); }
  .site-sidebar { z-index: 1200; width: min(84vw, 300px); transform: translateX(-105%); box-shadow: 20px 0 50px #17141e18; }
  body.mobile-nav-open .site-sidebar { transform: translateX(0); }
  .sidebar-collapse { display: none; }
  .mobile-topbar { position: sticky; top: 0; z-index: 1100; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 60px; padding: 7px 16px; border-bottom: 1px solid var(--line); background: #ffffffed; backdrop-filter: blur(12px); }
  .mobile-topbar .brand-wordmark { font-size: 15px; }
  .mobile-topbar .brand-mark { width: 32px; height: 32px; }
  .mobile-menu-toggle { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; }
  .mobile-menu-toggle svg { width: 20px; height: 20px; }
  .mobile-quick-navigation { display: block; flex: 0 0 calc(100% + 32px); min-width: 0; margin: 5px -16px -7px; border-top: 1px solid var(--line); }
  .mobile-quick-navigation > ul { display: flex; gap: 4px; margin: 0; padding: 7px 12px 8px; overflow-x: auto; list-style: none; scrollbar-width: none; }
  .mobile-quick-navigation > ul::-webkit-scrollbar { display: none; }
  .mobile-quick-navigation > ul > li { flex: 0 0 auto; margin: 0; }
  .mobile-quick-navigation a { display: block; padding: 7px 11px; border-radius: 999px; color: #575665; font-size: 12px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
  .mobile-quick-navigation a:hover { background: #f4f3f6; }
  .mobile-quick-navigation .current-menu-item > .menu-item-wrap > a, .mobile-quick-navigation .current-menu-item > a { background: #e9e9eb; color: var(--ink); }
  .mobile-quick-navigation .nav-icon, .mobile-quick-navigation .submenu-toggle, .mobile-quick-navigation .sub-menu { display: none; }
  body.mobile-nav-open::after { position: fixed; inset: 0; z-index: 1150; content: ""; background: #1e192a66; }
  .site-main { margin-left: 0; }
  body.sidebar-collapsed { --sidebar-width: 0px; }
  .home-main { padding-top: 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 10px; padding: 32px 25px 24px; }
  .hero h1 { font-size: clamp(40px, 11vw, 58px); }
  .hero-art { min-height: 180px; }
  .orbit { width: 184px; height: 184px; }
  .hero-emblem { width: 116px; height: 116px; }
  .hero-emblem svg { width: 48px; height: 48px; }
  .hero-caption { right: 4px; bottom: -4px; }
  .section-heading { align-items: start; flex-direction: column; }
  .program-grid { grid-template-columns: 1fr; }
  .program-card { min-height: 0; }
  .trust-strip { grid-template-columns: 1fr; padding: 21px; }
  .trust-strip h2 { grid-column: auto; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
