/*
Theme Name: Uganda Smart District Theme
Theme URI: https://example.com/
Author: OpenAI
Description: Mobile-first district portal theme with customizable Uganda header, mayor section, map support, and editable footer.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: uganda-smart-district
*/

:root{
  --usd-black:#111111;
  --usd-yellow:#f4c300;
  --usd-red:#c8102e;
  --usd-green:#1b5e20;
  --usd-light:#f6f7f9;
  --usd-text:#1f2937;
  --usd-muted:#6b7280;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--usd-text);background:#fff;line-height:1.6}
a{color:var(--usd-red);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{width:min(1140px,92%);margin:0 auto}
.flag-strip{height:12px;background:linear-gradient(90deg,var(--usd-black) 0 33.33%,var(--usd-yellow) 33.33% 66.66%,var(--usd-red) 66.66% 100%)}
.site-header{background:#fff;color:var(--usd-text);border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:50}
.topbar{padding:14px 0}
.branding{display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand-left{display:flex;align-items:center;gap:14px;min-width:0}
.site-emblem img,.site-emblem .fallback-logo{width:64px;height:64px;object-fit:contain;border-radius:8px;background:#fff;padding:4px;border:1px solid #ececec}
.site-title{font-size:30px;font-weight:800;line-height:1.1;margin:0;color:var(--usd-black)}
.site-tagline{font-size:14px;color:var(--usd-muted);margin-top:4px}
.main-nav ul{display:flex;gap:16px;list-style:none;padding:0;margin:0;flex-wrap:wrap;align-items:center}
.main-nav a{color:var(--usd-black);font-weight:700}
.header-actions{display:flex;gap:12px;flex-wrap:wrap}
.btn,.button,button,input[type=submit]{display:inline-block;background:var(--usd-red);color:#fff;padding:12px 20px;border:none;border-radius:8px;font-weight:700;cursor:pointer}
.btn.outline{background:#fff;color:var(--usd-black);border:2px solid var(--usd-yellow)}
.btn:hover,.button:hover,button:hover,input[type=submit]:hover{text-decoration:none;opacity:.93}
.hero{background:linear-gradient(135deg,#fff7cc,#fff);padding:54px 0 44px;border-bottom:4px solid var(--usd-yellow)}
.hero-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:28px;align-items:center}
.hero h1{font-size:44px;line-height:1.08;margin:0 0 12px;color:var(--usd-black)}
.hero p{font-size:18px;max-width:720px;margin:0 0 18px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.hero-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(0,0,0,.05)}
.section{padding:42px 0}.section.alt{background:var(--usd-light)}
.section h2{font-size:32px;margin:0 0 18px;color:var(--usd-black)}
.metrics,.services-grid,.news-grid,.forms-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:20px;box-shadow:0 8px 24px rgba(0,0,0,.04)}
.metric-number{font-size:34px;font-weight:800;color:var(--usd-red)}
.services-grid .card h3,.news-grid .card h3{margin-top:0}
.mayor-box{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:start}
.mayor-photo img,.mayor-photo .placeholder{width:100%;max-width:180px;height:180px;border-radius:18px;object-fit:cover;background:#e5e7eb;display:flex;align-items:center;justify-content:center;font-weight:700;color:#666}
.map-placeholder,.wpgmza_map,.wpgmza-container{border-radius:14px;overflow:hidden}
.map-placeholder{min-height:420px;background:linear-gradient(135deg,#dde7f5,#f7fafc);border:2px dashed #9ca3af;display:flex;align-items:center;justify-content:center;text-align:center;padding:30px}
.notice{background:#fffbe6;border-left:4px solid var(--usd-yellow);padding:16px;border-radius:8px}
.usdp-form input[type=text],.usdp-form input[type=email],.usdp-form input[type=date],.usdp-form input[type=time],.usdp-form input[type=file],.usdp-form textarea,.usdp-form select{width:100%;padding:12px;border:1px solid #d1d5db;border-radius:8px}
.usdp-form label{font-weight:700;display:block;margin-bottom:8px}
.usdp-form .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.footer-widgets{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px;align-items:start}
.site-footer{background:var(--usd-black);color:#fff;padding:34px 0;margin-top:40px}
.site-footer a{color:#fff}
.footer-bottom{margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.15);text-align:center;color:#e5e7eb}
.small{font-size:14px;color:var(--usd-muted)}
@media(max-width:900px){.hero-grid,.mayor-box,.footer-widgets{grid-template-columns:1fr}.branding{align-items:flex-start;flex-direction:column}.site-title{font-size:26px}}
@media(max-width:700px){.hero h1{font-size:34px}.usdp-form .grid{grid-template-columns:1fr}}


/* Version 1.3 emblem defaults */
.site-emblem img{object-fit:contain;background:#fff;padding:4px;border-radius:8px;}

.section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.blog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}
.blog-card{display:flex;flex-direction:column;height:100%}
.blog-card .blog-thumb{width:100%;aspect-ratio:16/9;border-radius:12px;object-fit:cover;margin-bottom:12px;background:#eceff1}
.blog-card .meta{font-size:13px;color:var(--usd-muted);margin-bottom:10px}
.blog-card h3{margin:0 0 10px;font-size:22px;line-height:1.25}
.blog-card p{margin:0 0 12px}
.blog-card .read-more{margin-top:auto;font-weight:700}
.page-header{padding:28px 0 10px}
.page-header h1{margin:0 0 8px;font-size:38px}
.single-post .entry-thumb img{width:100%;height:auto;border-radius:16px;margin:16px 0 22px}
.single-post .entry-meta{color:var(--usd-muted);font-size:14px;margin-bottom:14px}
.entry-content{font-size:17px}
@media(max-width:700px){.page-header h1{font-size:30px}}
