/*
Theme Name: SAI Social
Theme URI: https://saisocial.bizzinfo.in
Author: Digital Dadi
Author URI: https://digitaldadi.agency
Description: Full Site Editing (FSE) block theme for SAI Social Microfinance Foundation — a skill assessment & examination organization. Faithful port of the brand site: blue/green/red palette, Plus Jakarta Sans, editable block patterns for every section.
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sai-social
Tags: full-site-editing, block-patterns, one-column, custom-colors, custom-logo, block-styles
*/

/* =========================================================
   SAI Social — ported from the static brand stylesheet.
   Design tokens live in theme.json (editable via Site Editor)
   and are ALSO mirrored here so ported component CSS works
   even before global-styles CSS loads.
   ========================================================= */

:root {
  --purple: #0E6FBE;        /* primary brand blue */
  --purple-dark: #0B4C87;   /* deep navy blue */
  --purple-light: #6FB2E4;  /* light blue */
  --coral: #7CB342;         /* brand green accent */
  --coral-dark: #5E9A2E;    /* deep green */
  --red: #D32F2F;           /* logo red accent */
  --ink: #10233A;
  --slate: #4A5A6B;
  --mist: #EEF5FC;
  --cloud: #F7FBFE;
  --white: #FFFFFF;
  --line: #DCE8F2;

  --grad: linear-gradient(135deg, #0B4C87 0%, #0E6FBE 55%, #4C9C3F 130%);
  --grad-soft: linear-gradient(135deg, #EEF5FC 0%, #EAF6E6 100%);

  --shadow-sm: 0 2px 10px rgba(11, 76, 135, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 76, 135, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 76, 135, 0.16);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1180px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* Kill the default block gaps we don't want between our full-bleed sections */
.wp-site-blocks > * { margin-block: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.bg-mist { background: var(--mist); }
.bg-cloud { background: var(--cloud); }
.text-center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--purple); background: var(--mist);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow--onDark { color: #fff; background: rgba(255,255,255,0.14); }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.5px; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
.lead { font-size: 1.15rem; color: var(--slate); max-width: 640px; }
.section-head { max-width: 680px; margin: 0 auto 56px; }
.section-head.text-center { text-align: center; }
.section-head p { color: var(--slate); font-size: 1.08rem; margin-top: 14px; }

/* ---------- Buttons (block-style variations bridge core buttons) ---------- */
.btn, .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1rem;
  padding: 15px 30px; border-radius: 999px;
  cursor: pointer; border: none; line-height: 1.2;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary, .is-style-primary > .wp-block-button__link {
  background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(14,111,190,.32);
}
.btn--primary:hover, .is-style-primary > .wp-block-button__link:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(14,111,190,.42); }
.btn--green, .is-style-green > .wp-block-button__link { background: var(--coral); color: #fff; box-shadow: 0 10px 24px rgba(124,179,66,.34); }
.btn--green:hover, .is-style-green > .wp-block-button__link:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(124,179,66,.46); }
.btn--ghost, .is-style-ghost > .wp-block-button__link { background: #fff; color: var(--purple); border: 2px solid var(--line); }
.btn--ghost:hover, .is-style-ghost > .wp-block-button__link:hover { border-color: var(--purple-light); transform: translateY(-3px); }
.btn--light, .is-style-light > .wp-block-button__link { background: #fff; color: var(--purple); }
.btn--light:hover, .is-style-light > .wp-block-button__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn--outline-light, .is-style-outline-light > .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn--outline-light:hover, .is-style-outline-light > .wp-block-button__link:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: ''; display: block; height: 4px; width: 100%;
  background: linear-gradient(90deg, #0E6FBE 0 33.34%, #7CB342 33.34% 66.67%, #D32F2F 66.67% 100%);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.3px; line-height: 1.15; color: var(--ink); }
.brand__logo, .brand img, .wp-block-site-logo img { height: 52px !important; width: auto; display: block; }
.brand small, .brand__sub { display: block; font-size: .68rem; font-weight: 700; color: var(--red); letter-spacing: .4px; text-transform: uppercase; }
.brand__name { display: flex; flex-direction: column; }

/* Core navigation styled like the original nav links */
.main-nav .wp-block-navigation__container { gap: 34px; }
.main-nav a { font-weight: 600; color: var(--slate); font-size: .98rem; transition: color .2s; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--ink); }
.header-cta .wp-block-button__link { padding: 11px 22px; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--grad-soft); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 84px 0 92px; }
.hero .grad-text, .hero h1 .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { margin: 22px 0 32px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__actions .wp-block-button { margin: 0; }
.hero__trust { display: flex; align-items: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }
.hero__stars { color: #F5A623; font-size: 1.1rem; letter-spacing: 2px; }
.hero__trust small { color: var(--slate); font-weight: 600; }
.hero__visual { position: relative; }
.hero__card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px; position: relative; z-index: 2; }
.hero__card h4 { font-size: .95rem; color: var(--slate); font-weight: 600; margin-bottom: 4px; }
.hero__metric { font-size: 2.4rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-top: 20px; }
.hero__bars i { flex: 1; background: var(--grad); border-radius: 8px 8px 3px 3px; opacity: .85; }
.hero__pill { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-md); padding: 12px 16px; font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 9px; z-index: 3; }
.hero__pill .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem; background: var(--mist); }
.hero__pill--a { top: 18px; right: -14px; }
.hero__pill--b { bottom: 30px; left: -22px; }
.hero__blob { position: absolute; width: 340px; height: 340px; background: var(--purple-light); filter: blur(90px); opacity: .35; border-radius: 50%; top: -40px; right: -40px; z-index: 1; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon { width: 56px; height: 56px; border-radius: 15px; background: var(--mist); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 20px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: .98rem; }
.card__link { color: var(--purple); font-weight: 700; font-size: .95rem; margin-top: 16px; display: inline-block; }

/* ---------- Feature list ---------- */
.feature-list { display: grid; gap: 22px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-item .tick { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.feature-item h4 { font-size: 1.08rem; margin-bottom: 3px; }
.feature-item p { color: var(--slate); font-size: .96rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 2.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { color: var(--slate); font-weight: 600; font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); border-radius: var(--radius-lg); padding: 60px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 560px; margin: 16px auto 30px; font-size: 1.1rem; }
.cta-band::before, .cta-band::after { content:''; position:absolute; border-radius:50%; background: rgba(255,255,255,.12); }
.cta-band::before { width: 220px; height: 220px; top: -80px; left: -60px; }
.cta-band::after { width: 180px; height: 180px; bottom: -70px; right: -40px; }
.cta-band > * { position: relative; z-index: 1; }

/* ---------- Page hero ---------- */
.page-hero { background: var(--grad); color: #fff; padding: 72px 0; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 620px; margin: 16px auto 0; font-size: 1.12rem; }
.page-hero .crumb { color: rgba(255,255,255,.75); font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.page-hero::after { content:''; position:absolute; width:300px; height:300px; border-radius:50%; background:rgba(255,255,255,.08); top:-120px; right:-80px; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__img { border-radius: var(--radius-lg); background: var(--grad); aspect-ratio: 4/3.4; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.split__img.photo-ph { background: var(--grad-soft); border: 2px dashed var(--purple-light); box-shadow: none; display:grid; place-items:center; }
.split__img.photo-ph span { color: var(--purple); font-weight:700; font-size:.95rem; letter-spacing:.3px; opacity:.85; }

/* ---------- Team ---------- */
.team-card { text-align:center; }

/* ---------- Service detail rows ---------- */
.svc-detail { display:grid; grid-template-columns: 64px 1fr; gap: 22px; background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 30px; align-items:start; }
.svc-detail .card__icon { margin:0; }
.svc-detail h3 { margin-bottom:8px; }
.svc-detail p { color: var(--slate); }
.svc-detail ul.tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; list-style:none; padding:0; }
.svc-detail ul.tags li { background: var(--mist); color: var(--purple); font-weight:600; font-size:.82rem; padding:5px 12px; border-radius:999px; }

/* ---------- FAQ (native details blocks) ---------- */
.faq { max-width: 780px; margin: 0 auto; display:grid; gap:14px; }
.faq details, .faq .wp-block-details { background:#fff; border:1px solid var(--line); border-radius: var(--radius-sm); overflow:hidden; padding: 0; }
.faq summary { padding:20px 24px; font-weight:700; font-size:1.02rem; cursor:pointer; color:var(--ink); list-style:none; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:'+'; color:var(--purple); font-size:1.4rem; font-weight:700; transition:transform .3s; }
.faq details[open] summary::after { transform:rotate(45deg); }
.faq details > *:not(summary) { padding:0 24px 20px; color:var(--slate); }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1fr 1.1fr; gap:48px; align-items:start; }
.contact-info { display:grid; gap:22px; }
.contact-info .ci { display:flex; gap:16px; align-items:flex-start; }
.contact-info .ci .ic { flex:none; width:48px; height:48px; border-radius:13px; background: var(--mist); display:grid; place-items:center; font-size:1.3rem; }
.contact-info .ci b { display:block; font-size:1.02rem; margin-bottom:2px; }
.contact-info .ci p { color:var(--slate); font-size:.96rem; }
.form-wrap { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding:34px; box-shadow: var(--shadow-sm); }
.map-embed { border-radius: var(--radius); overflow:hidden; border:1px solid var(--line); height:260px; background: var(--grad-soft); display:grid; place-items:center; color:var(--purple); font-weight:700; }

/* Fluent Forms cosmetic alignment with the brand */
.form-wrap .ff-el-input--label label { font-weight:600; font-size:.92rem; margin-bottom:7px; }
.form-wrap .ff-el-form-control { border:1.5px solid var(--line) !important; border-radius:12px !important; background:var(--cloud) !important; padding:13px 15px !important; font-family:inherit !important; }
.form-wrap .ff-el-form-control:focus { border-color:var(--purple-light) !important; background:#fff !important; }
.form-wrap .ff-btn-submit { background: var(--grad) !important; border:none !important; border-radius:999px !important; padding:15px 30px !important; font-weight:700 !important; width:100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9C3E0; padding: 66px 0 28px; }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap:40px; }
.site-footer .brand { color:#fff; margin-bottom:16px; }
.site-footer .brand small { color:#B7C7D8; }
.footer-motto { color:#FF9A9A; font-weight:700; font-style:italic; margin-top:14px; }
.site-footer p { font-size:.95rem; line-height:1.7; }
.footer-col h5 { color:#fff; font-size:1rem; margin-bottom:16px; font-weight:700; }
.footer-col a { display:block; padding:6px 0; color:#B5AECF; font-size:.95rem; transition:color .2s; }
.footer-col a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.1); margin-top:44px; padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:.88rem; color:#8f88ab; }

/* ---------- Sector grid ---------- */
.sector-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:12px; list-style:none; padding:0; margin:0; }
.sector-grid li, .sector-grid span {
  background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px;
  font-weight:600; font-size:.92rem; color:var(--ink); display:flex; align-items:center; gap:9px;
  transition:border-color .2s, transform .2s, box-shadow .2s;
}
.sector-grid li::before, .sector-grid span::before { content:'▹'; color:var(--coral); font-weight:800; }
.sector-grid li:hover, .sector-grid span:hover { border-color:var(--purple-light); transform:translateY(-2px); box-shadow:var(--shadow-sm); }

/* ---------- Credentials list ---------- */
.creds { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; list-style:none; padding:0; margin:0; }
.creds li { display:flex; gap:12px; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 18px; font-weight:600; color:var(--ink); }
.creds li .ck { color:var(--coral); font-weight:800; flex:none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap:36px; }
  .grid-4, .stats { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap:32px; }
  .sector-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .grid-3, .grid-2, .grid-4, .stats { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { justify-content:center; text-align:center; }
  .sector-grid { grid-template-columns:repeat(2,1fr); }
  .site-header .container { height:auto; padding:12px 24px; flex-wrap:wrap; gap:12px; }
}
@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
  .sector-grid { grid-template-columns:1fr; }
}

/* =========================================================
   Block-editor bridges: core blocks emit <p>/<div>/<h*>,
   so mirror the original element selectors onto class hooks.
   ========================================================= */
.wp-block-group.section > .container,
.wp-block-group.section > .wp-block-group.container { margin-inline:auto; }
.wp-block-group.card, .wp-block-group.svc-detail, .wp-block-group.stat,
.wp-block-group.feature-item, .wp-block-group.hero__inner,
.wp-block-group.split, .wp-block-group.grid, .wp-block-group.contact-grid,
.wp-block-group.footer-grid, .wp-block-group.section-head { margin-block:0; }

/* Stats */
.stat .num { display:block; font-size:2.6rem; font-weight:800; margin:0;
  background: var(--grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.stat .label { color: var(--slate); font-weight:600; font-size:.95rem; margin:0; }

/* Section head as blocks */
.section-head .eyebrow { margin-bottom:18px; }
.section-head h2 { margin:0; }
.section-head p { color:var(--slate); font-size:1.08rem; margin-top:14px; }

/* Card blocks: tighten default block spacing */
.card > *:first-child { margin-top:0; }
.card .card__icon { margin-bottom:20px; }
.card h3 { margin:0 0 10px; }
.card p { margin:0; }
.card .card__link { margin-top:16px; }

/* Feature-item as blocks: icon + body group */
.feature-item .tick { margin:0; }
.feature-item .fi-body h4 { margin:0 0 3px; }
.feature-item .fi-body p { margin:0; }

/* svc-detail body */
.svc-detail .svc-body h3 { margin:0 0 8px; }
.svc-detail .svc-body p { margin:0; }

/* Page hero as blocks */
.page-hero .crumb { margin:0 0 14px; }
.page-hero h1 { margin:0; }
.page-hero p { margin:16px auto 0; }

/* Hero copy spacing */
.hero__copy h1 { margin:0; }
.hero__copy .eyebrow { margin-bottom:18px; }

/* CTA band as blocks */
.cta-band h2 { margin:0; }
.cta-band p { margin:16px auto 30px; }
.cta-band .wp-block-buttons { justify-content:center; display:flex; }

/* Contact info blocks */
.contact-info .ci .ci-body b { display:block; font-size:1.02rem; margin-bottom:2px; }
.contact-info .ci .ci-body p { color:var(--slate); font-size:.96rem; margin:0; }

/* Grid of cards via CSS grid on a plain group */
.grid.grid-2 > .wp-block-group, .grid.grid-3 > .wp-block-group, .grid.grid-4 > .wp-block-group { margin:0; }

/* Buttons inside groups shouldn't inherit block margins */
.hero__actions .wp-block-buttons, .cta-band .wp-block-buttons { margin:0; }
