/*
Theme Name: EC Maina & Associates
Theme URI: https://ecmaina.co.ke
Author: EC Maina & Associates CPA(K)
Description: A professional Full Site Editing (FSE) WordPress block theme for EC Maina & Associates CPA(K), Nairobi. Fully editable via the Site Editor, Gutenberg blocks and Customizer.
Version: 2.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecmaina
Tags: full-site-editing, block-theme, business, professional, responsive, audit, accounting, one-page
*/

/* ── Base resets not handled by theme.json ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ── Utility classes used across block patterns ── */
.ecm-navy  { background-color: #0a1f5c; }
.ecm-red   { background-color: #c0152a; }
.ecm-light { background-color: #f4f7ff; }
.text-white { color: #ffffff; }
.text-gold  { color: #c9a84c; }

/* ── Nav overrides for wp_nav_menu inside header part ── */
.ecm-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 5%; height: 70px; background: rgba(10,31,92,0.97); border-bottom: 2px solid #c0152a; position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(12px); }
.ecm-nav .wp-block-navigation { gap: 28px; }
.ecm-nav .wp-block-navigation a { color: rgba(255,255,255,.8) !important; font-size: 13px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; }
.ecm-nav .wp-block-navigation a:hover { color: #c9a84c !important; }
.ecm-nav .wp-block-navigation .current-menu-item a { color: #c9a84c !important; }
.ecm-logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ecm-logo-icon { width: 42px; height: 42px; border-radius: 8px; background: linear-gradient(135deg,#c0152a,#e8192f); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0; }
.ecm-logo-text span { display: block; font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: #fff; line-height: 1.3; }
.ecm-logo-text small { font-size: 10px; color: rgba(255,255,255,.55); letter-spacing: 2px; text-transform: uppercase; }
.ecm-nav-cta { background: #c0152a; color: #fff !important; padding: 9px 22px; border-radius: 6px; font-size: 13px; font-weight: 600; letter-spacing: .5px; transition: background .2s; white-space: nowrap; }
.ecm-nav-cta:hover { background: #e8192f !important; }

/* ── Hero ── */
.ecm-hero { min-height: 92vh; background: linear-gradient(135deg,#0a1f5c 0%,#1a3fa0 55%,#1a2a6e 100%); display: flex; align-items: center; position: relative; overflow: hidden; }
.ecm-hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/svg%3E"); }
.ecm-hero-inner { max-width: 1200px; margin: 0 auto; padding: 80px 5%; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.ecm-hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: 6px 16px; border-radius: 30px; margin-bottom: 24px; color: #c9a84c; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.ecm-hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #c9a84c; display: inline-block; }
.ecm-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(36px,5vw,58px); line-height: 1.1; color: #fff; margin-bottom: 16px; }
.ecm-hero h1 em { color: #c9a84c; font-style: normal; }
.ecm-hero-sub { font-size: 16px; color: rgba(255,255,255,.65); margin-bottom: 28px; line-height: 1.75; max-width: 480px; }
.ecm-hero-stats { display: flex; gap: 32px; margin-bottom: 40px; }
.ecm-stat-num { font-family: 'Playfair Display', serif; font-size: 32px; color: #fff; font-weight: 700; line-height: 1; }
.ecm-stat-num span { color: #e8192f; }
.ecm-stat-label { font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
.ecm-hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.ecm-btn-primary { background: #c0152a; color: #fff; padding: 14px 32px; border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: .5px; box-shadow: 0 8px 24px rgba(192,21,42,.35); transition: .2s; }
.ecm-btn-primary:hover { background: #e8192f; transform: translateY(-2px); }
.ecm-btn-outline { border: 1.5px solid rgba(255,255,255,.3); color: #fff; padding: 14px 32px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: .2s; }
.ecm-btn-outline:hover { border-color: #c9a84c; color: #c9a84c; }
.ecm-hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.ecm-hero-card img { width: 100%; height: 300px; object-fit: cover; object-position: top center; }
.ecm-hero-card-body { padding: 24px; }
.ecm-card-name { font-family: 'Playfair Display', serif; font-size: 22px; color: #fff; margin-bottom: 4px; }
.ecm-card-role { font-size: 12px; color: #c9a84c; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.ecm-card-detail { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.6; }
.ecm-card-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ecm-cbadge { background: rgba(192,21,42,.2); border: 1px solid rgba(192,21,42,.3); color: rgba(255,255,255,.8); font-size: 10px; padding: 4px 10px; border-radius: 20px; letter-spacing: .5px; }

/* ── Trust Bar ── */
.ecm-trust-bar { background: #c0152a; padding: 18px 5%; }
.ecm-trust-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ecm-trust-item { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; font-weight: 500; }
.ecm-trust-icon { width: 32px; height: 32px; background: rgba(255,255,255,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ecm-trust-divider { width: 1px; height: 30px; background: rgba(255,255,255,.25); }

/* ── Section base ── */
.ecm-section { padding: 90px 5%; }
.ecm-section-inner { max-width: 1200px; margin: 0 auto; }
.ecm-section-tag { display: inline-block; color: #c0152a; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
.ecm-section-tag::before { content: '— '; }
.ecm-section-tag.gold { color: #c9a84c; }
.ecm-section-tag.gold::before { color: #c9a84c; }
.ecm-section-title { font-family: 'Playfair Display', serif; font-size: clamp(28px,4vw,42px); color: #0a1f5c; line-height: 1.2; margin-bottom: 16px; }
.ecm-section-title em { color: #c0152a; font-style: normal; }
.ecm-section-title.light { color: #fff; }
.ecm-section-title.light em { color: #c9a84c; }
.ecm-section-lead { font-size: 16px; color: #6b7280; line-height: 1.8; max-width: 620px; }
.ecm-section-lead.light { color: rgba(255,255,255,.55); }
.ecm-divider { width: 60px; height: 3px; background: linear-gradient(90deg,#c0152a,#1a3fa0); border-radius: 2px; margin: 20px 0; }

/* ── About ── */
.ecm-about { background: #f4f7ff; }
.ecm-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ecm-about-img-block { position: relative; padding-bottom: 20px; }
.ecm-about-img { width: 100%; aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; object-fit: cover; }
.ecm-about-badge { position: absolute; bottom: 0; right: -10px; background: #c0152a; color: #fff; border-radius: 14px; padding: 20px 24px; text-align: center; box-shadow: 0 10px 30px rgba(192,21,42,.35); }
.ecm-about-badge-num { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; line-height: 1; }
.ecm-about-badge-text { font-size: 11px; opacity: .85; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
.ecm-about-content p { font-size: 15px; line-height: 1.85; color: #4b5563; margin-bottom: 16px; }
.ecm-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.ecm-highlight { background: #fff; border-left: 3px solid #c0152a; border-radius: 0 8px 8px 0; padding: 12px 16px; font-size: 13px; font-weight: 500; color: #0a1f5c; box-shadow: 0 2px 8px rgba(0,0,0,.05); }

/* ── Services ── */
.ecm-services { background: #fff; }
.ecm-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; margin-top: 48px; }
.ecm-service-card { background: #f4f7ff; border-radius: 14px; padding: 32px 28px; border-top: 4px solid #c0152a; transition: .3s; }
.ecm-service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.ecm-service-icon { font-size: 32px; margin-bottom: 16px; }
.ecm-service-title { font-family: 'Playfair Display', serif; font-size: 18px; color: #0a1f5c; margin-bottom: 10px; }
.ecm-service-desc { font-size: 14px; color: #6b7280; line-height: 1.7; }
.ecm-service-img { width: 100%; height: 180px; border-radius: 10px; object-fit: cover; margin-bottom: 20px; }

/* ── Timeline ── */
.ecm-timeline-section { background: #fff; }
.ecm-timeline { position: relative; margin-top: 48px; padding-left: 30px; }
.ecm-timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom,#1a3fa0,#c0152a); }
.ecm-tl-item { position: relative; margin-bottom: 36px; }
.ecm-tl-dot { position: absolute; left: -39px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #c0152a; border: 3px solid #fff; box-shadow: 0 0 0 2px #c0152a; }
.ecm-tl-year { font-size: 11px; font-weight: 700; color: #c0152a; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.ecm-tl-title { font-family: 'Playfair Display', serif; font-size: 18px; color: #0a1f5c; margin-bottom: 6px; }
.ecm-tl-body { font-size: 14px; color: #6b7280; line-height: 1.7; }

/* ── Sectors ── */
.ecm-sectors { background: #0a1f5c; }
.ecm-sectors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 20px; margin-top: 48px; }
.ecm-sector-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 28px 24px; transition: .3s; }
.ecm-sector-card:hover { background: rgba(255,255,255,.09); transform: translateY(-4px); }
.ecm-sector-num { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.2); letter-spacing: 2px; margin-bottom: 12px; }
.ecm-sector-icon { font-size: 28px; margin-bottom: 14px; }
.ecm-sector-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.ecm-sector-desc { font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.6; }

/* ── Credentials ── */
.ecm-credentials { background: #f4f7ff; }
.ecm-cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; margin-top: 48px; }
.ecm-cred-card { background: #fff; border-radius: 14px; padding: 32px 24px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.06); border-top: 4px solid #c0152a; transition: .25s; }
.ecm-cred-card:hover { transform: translateY(-4px); }
.ecm-cred-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; background: linear-gradient(135deg,#1a3fa0,#0a1f5c); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ecm-cred-title { font-family: 'Playfair Display', serif; font-size: 17px; color: #0a1f5c; margin-bottom: 6px; }
.ecm-cred-sub { font-size: 12px; color: #6b7280; line-height: 1.6; }

/* ── Contact ── */
.ecm-contact { background: #fff; }
.ecm-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.ecm-contact-info { margin-top: 32px; }
.ecm-contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.ecm-c-icon { min-width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg,#1a3fa0,#0a1f5c); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ecm-c-label { font-size: 11px; color: #6b7280; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.ecm-c-value { font-size: 15px; font-weight: 600; color: #0a1f5c; }
.ecm-c-value a { color: #0a1f5c; }
.ecm-contact-form-wrap { background: #f4f7ff; border-radius: 16px; padding: 36px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
.ecm-contact-form-wrap h3 { font-family: 'Playfair Display', serif; font-size: 22px; color: #0a1f5c; margin-bottom: 24px; }
.ecm-success { color: #16a34a; background: #f0fdf4; border: 1px solid #bbf7d0; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.ecm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ecm-form-group { margin-bottom: 16px; }
.ecm-form-group label { display: block; font-size: 12px; font-weight: 600; color: #0a1f5c; letter-spacing: .5px; margin-bottom: 6px; text-transform: uppercase; }
.ecm-form-group input,
.ecm-form-group textarea,
.ecm-form-group select { width: 100%; padding: 12px 16px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; color: #111827; background: #fff; outline: none; transition: border .2s; }
.ecm-form-group input:focus,
.ecm-form-group textarea:focus,
.ecm-form-group select:focus { border-color: #2d5be3; box-shadow: 0 0 0 3px rgba(45,91,227,.1); }
.ecm-form-group textarea { resize: vertical; min-height: 100px; }
.ecm-submit-btn { width: 100%; background: linear-gradient(135deg,#c0152a,#e8192f); color: #fff; padding: 14px; border: none; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; letter-spacing: .5px; transition: opacity .2s, transform .2s; }
.ecm-submit-btn:hover { opacity: .92; transform: translateY(-2px); }

/* ── Map/Location Banner ── */
.ecm-map-banner { background: #0a1f5c; padding: 50px 5%; text-align: center; }
.ecm-map-banner h3 { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; margin-bottom: 8px; }
.ecm-map-banner p { color: rgba(255,255,255,.6); font-size: 14px; margin-bottom: 20px; }
.ecm-map-embed { border-radius: 12px; overflow: hidden; max-width: 860px; margin: 0 auto; border: 2px solid rgba(255,255,255,.1); }

/* ── Footer ── */
.ecm-footer { background: #0a1f5c; border-top: 3px solid #c0152a; padding: 60px 5% 30px; }
.ecm-footer-inner { max-width: 1200px; margin: 0 auto; }
.ecm-footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.ecm-footer-brand p { color: rgba(255,255,255,.5); font-size: 13px; line-height: 1.7; margin: 16px 0; }
.ecm-footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #c0152a; }
.ecm-footer-col ul { list-style: none; padding: 0; margin: 0; }
.ecm-footer-col ul li { margin-bottom: 10px; }
.ecm-footer-col ul li a { color: rgba(255,255,255,.5); text-decoration: none; font-size: 13px; transition: color .2s; }
.ecm-footer-col ul li a:hover { color: #c9a84c; }
.ecm-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ecm-footer-bottom p { color: rgba(255,255,255,.35); font-size: 12px; }
.ecm-footer-badges { display: flex; gap: 10px; }
.ecm-fbadge { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.4); font-size: 10px; padding: 5px 12px; border-radius: 20px; letter-spacing: 1px; }

/* ── Page Hero (inner pages) ── */
.ecm-page-hero { background: linear-gradient(135deg,#0a1f5c,#1a3fa0); padding: 80px 5% 60px; text-align: center; }
.ecm-page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(32px,5vw,52px); color: #fff; margin-bottom: 12px; }
.ecm-breadcrumb { color: rgba(255,255,255,.5); font-size: 13px; }
.ecm-breadcrumb a { color: #c9a84c; }
.ecm-page-content { max-width: 860px; margin: 60px auto; padding: 0 5%; }
.ecm-page-content h2, .ecm-page-content h3 { font-family: 'Playfair Display', serif; color: #0a1f5c; margin: 28px 0 12px; }
.ecm-page-content p { font-size: 15px; line-height: 1.85; color: #4b5563; margin-bottom: 16px; }
.ecm-page-content ul, .ecm-page-content ol { padding-left: 24px; margin-bottom: 16px; }
.ecm-page-content li { font-size: 15px; line-height: 1.8; color: #4b5563; }
.ecm-page-content img { border-radius: 10px; margin: 20px 0; }
.ecm-page-content a { color: #2d5be3; text-decoration: underline; }
.wp-block-post-content { max-width: 860px; margin: 60px auto; padding: 0 5%; font-size: 15px; line-height: 1.85; color: #4b5563; }

/* ── 404 ── */
.ecm-404 { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 5%; background: #f4f7ff; }
.ecm-404 h1 { font-family: 'Playfair Display', serif; font-size: 120px; color: #c0152a; line-height: 1; margin-bottom: 16px; }
.ecm-404 h2 { font-family: 'Playfair Display', serif; font-size: 28px; color: #0a1f5c; margin-bottom: 16px; }
.ecm-404 p { color: #6b7280; font-size: 16px; margin-bottom: 28px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .ecm-hero-inner, .ecm-about-grid, .ecm-contact-grid { grid-template-columns: 1fr; }
  .ecm-hero-card { display: none; }
  .ecm-footer-top { grid-template-columns: 1fr 1fr; }
  .ecm-about-badge { right: 0; }
}
@media (max-width: 600px) {
  .ecm-nav .wp-block-navigation, .ecm-nav-cta { display: none; }
  .ecm-trust-divider { display: none; }
  .ecm-footer-top { grid-template-columns: 1fr; }
  .ecm-form-row { grid-template-columns: 1fr; }
}