/*
Theme Name: Afritan Finance (Blocks)
Theme URI: https://www.afritan.co.tz
Author: Afritan Finance Limited
Description: Block theme for Afritan Finance Limited — every section is editable in Appearance > Editor. Your bridge to financial success.
Version: 2.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: afritan-finance
*/
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 90px; }
.wp-site-blocks > * + *, .afritan-main > * + * { margin-block-start: 0 !important; }
.afritan-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .afritan-site-header { top: 32px; }
.m-header { border-bottom: 4px solid #58A418; box-shadow: 0 2px 10px rgba(6,33,127,.06); }
.m-topbar p { margin: 0; font-size: 13px; }
.m-topbar a, .afritan-footer a { color: inherit; }
.has-navy-background-color a:not(.wp-element-button) { color: #FFFFFF; }
.afritan-icon { margin: 0 0 4px; }
.afritan-card-top { border-top: 5px solid #58A418; }
.wp-block-column:nth-child(even) > .afritan-card-top { border-top-color: #043CEB; }
.afritan-outline { border: 1px solid #DCE3EE; }
.afritan-big { line-height: 1; margin: 4px 0; }
.afritan-stat { margin-top: 2px !important; }
.m-stats { border-top: 1px solid #2A47A6; padding-top: 20px; margin-top: 12px; }
.m-stats p { margin: 0; }
.afritan-list, .afritan-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.afritan-list li { background: #F3F7EE; border-radius: 12px; padding: 14px 18px; }
.afritan-checks li { background: #FFFFFF; border-radius: 12px; padding: 16px 18px 16px 50px; position: relative; font-size: 15px; }
.afritan-checks li::before { content: ""; position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  background: url("assets/icons/check.svg") center / contain no-repeat; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; padding: 13.5px 24.5px; }
.has-navy-background-color .is-style-outline .wp-block-button__link { border-color: #7C93E0; color: #FFFFFF; }
.afritan-anchor { height: 0; margin: 0; }
p.m-swipe { display: none; }
.m-bar.wp-block-buttons { display: none !important; }
.afritan-legal { border-top: 1px solid #1E3290; padding-top: 16px; margin-top: 32px !important; }

/* Call-back form */
.afritan-form { background: #FFFFFF; color: #0F1A33; border-radius: 18px; padding: 32px; border-top: 6px solid #58A418; display: flex; flex-direction: column; gap: 16px; }
.afritan-form h3 { margin: 0; color: #06217F; font-size: 22px; }
.afritan-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.afritan-form input, .afritan-form select { font: inherit; font-weight: 500; font-size: 16px; padding: 12px 14px; border: 1.5px solid #B4BED3; border-radius: 8px; min-height: 46px; background: #FFFFFF; color: #0F1A33; width: 100%; box-sizing: border-box; }
.afritan-form button { font: inherit; font-weight: 800; font-size: 17px; background: #043CEB; color: #FFFFFF; border: 0; border-radius: 10px; padding: 16px; cursor: pointer; }
.afritan-form .ok { margin: 0; background: #F3F7EE; color: #2C5A0B; font-weight: 700; padding: 12px 14px; border-radius: 8px; }
.afritan-form .err { margin: 0; background: #FDECEC; color: #8A1C1C; font-weight: 700; padding: 12px 14px; border-radius: 8px; }
.afritan-hp { position: absolute; left: -9999px; }

/* ---------- Phones ---------- */
@media (max-width: 781px) {
  body { padding-bottom: 76px; }
  [id] { scroll-margin-top: 76px; }
  .m-hide { display: none !important; }
  .m-topbar { padding: 6px 16px !important; text-align: center; }
  .m-topbar p { font-size: 11px; }
  .m-topbar .wp-block-group { justify-content: center !important; }
  .m-header { padding: 10px 16px !important; }
  .afritan-logo img { width: 170px !important; }
  .afritan-nav .wp-block-navigation__responsive-container-open { background: #043CEB; color: #FFFFFF; border-radius: 10px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
  .m-section { padding: 52px 16px !important; }
  .m-hero { padding-top: 36px !important; padding-bottom: 40px !important; }
  .m-btns { flex-direction: column; align-items: stretch !important; }
  .m-btns .wp-block-button, .m-btns .wp-block-button__link { width: 100%; text-align: center; }
  .m-stats { gap: 10px !important; }
  .m-stats .has-x-small-font-size { font-size: 11px !important; line-height: 1.3; }
  .m-stats .afritan-stat { font-size: 15px !important; line-height: 1.3; }
  .m-art img { max-width: 300px; margin: 0 auto; display: block; }
  .m-grid2 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
  .m-grid2 > .wp-block-column > .wp-block-group { padding: 16px !important; height: 100%; }
  .m-grid2 h3, .m-grid2 h4 { font-size: 15px !important; line-height: 1.3; }
  .m-grid2 p { font-size: 13px !important; line-height: 1.45; }
  .m-grid2 .afritan-icon img { width: 28px !important; }
  p.m-swipe { display: block; }
  .m-values { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
  .m-values > .wp-block-columns { display: contents !important; }
  .m-values > * { margin: 0 !important; }
  .m-scroll { flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px !important; padding: 4px 16px 12px; gap: 14px !important; }
  .m-scroll > .wp-block-column { flex: 0 0 78% !important; scroll-snap-align: start; }
  .m-scroll > .wp-block-column > .wp-block-group { padding: 22px !important; height: 100%; }
  .m-figs > .wp-block-column > .wp-block-group { padding: 18px !important; height: 100%; }
  .m-figs .afritan-big { font-size: 34px !important; }
  .m-figs .has-small-font-size { font-size: 13px !important; }
  .m-why > .wp-block-column > .wp-block-group, .m-steps > .wp-block-column > .wp-block-group { padding: 20px !important; }
  .m-why .has-x-large-font-size, .m-steps .has-x-large-font-size { font-size: 26px !important; line-height: 1; }
  .afritan-list li { padding: 12px 16px; font-size: 15px; }
  .afritan-checks li { padding: 12px 14px 12px 46px; font-size: 14px; }
  .afritan-form { padding: 22px; }
  .m-bar.wp-block-buttons { display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 10px !important; padding: 10px 12px; margin: 0 !important; background: #FFFFFF; box-shadow: 0 -4px 16px rgba(6,33,127,.15); flex-wrap: nowrap; }
  .m-bar .wp-block-button { flex: 1 1 0; }
  .m-bar .wp-block-button__link { width: 100%; text-align: center; padding: 14px 8px; font-size: 16px; }
  .m-bar .is-style-outline .wp-block-button__link { color: #043CEB; border-color: #043CEB; padding: 12.5px 8px; }
}
