/* =========================================
   1. CORE VARIABLES & THEMES
   ========================================= */
:root {
  --primary: #007a33; /* Katsina State Official Green */
  --primary-glow: rgba(0, 122, 51, 0.35);
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --text: #1a2a1f;
  --text-muted: #4a5a4e;
  --bg: #f0f7f2;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body.dark {
  --glass: rgba(15, 25, 20, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #eefdf4;
  --text-muted: #a1b0a6;
  --bg: #050a06;
}

/* =========================================
   2. GLOBAL STYLES
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.5s ease;
  background-image: radial-gradient(circle at top right, rgba(0, 122, 51, 0.08), transparent),
                    radial-gradient(circle at bottom left, rgba(0, 122, 51, 0.08), transparent);
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* =========================================
   3. NEWS TICKER
   ========================================= */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1001;
  border-bottom: 1px solid var(--glass-border);
}

.ticker-label {
  background: var(--primary);
  color: white;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 1px;
  position: relative;
  z-index: 5;
}

.ticker {
  display: flex;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 40s linear infinite;
}

.ticker:hover { animation-play-state: paused; }

.ticker__item {
  display: inline-block;
  padding: 0 40px;
  font-size: 0.9rem;
  font-weight: 600;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* =========================================
   4. NAVIGATION & HERO
   ========================================= */
.topbar {
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--primary);
}

.logo img {
  height: 45px;
  background: white;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

nav a:hover { color: var(--primary); }

button#langToggle, button#themeToggle {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  transition: 0.3s;
}

button:hover { background: var(--primary); color: white; }

.hero {
  padding: 90px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--primary), #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   5. SERVICE CARDS GRID
   ========================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.card {
  padding: 35px;
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px var(--primary-glow);
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-shadow: 0 8px 15px var(--primary-glow);
}

.icon-wrapper svg { width: 30px; height: 30px; }

.btn-text {
  color: var(--primary);
  font-weight: 700;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================
   6. STANDALONE & MODAL CALCULATOR
   ========================================= */
.calculator-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 30px;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
}

.modal-content {
  width: 95%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header, .calc-tabs {
  padding: 20px 30px;
  flex-shrink: 0;
}

.calc-tabs {
  display: flex;
  gap: 10px;
  padding-top: 0;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: rgba(0,0,0,0.05);
  color: var(--text);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.modal-body {
  padding: 0 30px 30px 30px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Custom Scrollbar */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.grid-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.input-group input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 1rem;
}

.calc-primary-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.results-grid {
  display: grid;
  gap: 12px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
}

.result-item.highlight {
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  transform: scale(1.02);
}

/* =========================================
   7. WHATSAPP, TRUST & FOOTER
   ========================================= */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wa-tooltip {
  position: absolute;
  right: 80px;
  background: var(--glass);
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.whatsapp-float:hover .wa-tooltip { opacity: 1; right: 90px; }

.trust { padding: 40px 0; text-align: center; }
.glass-pill {
  display: inline-block;
  padding: 10px 24px;
  margin: 6px;
  background: var(--glass);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
}

footer {
  padding: 60px 0;
  text-align: center;
}

.footer-logo img {
  height: 60px;
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

/* =========================================
   8. HELP & FAQ STYLES
   ========================================= */
details {
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
}

details:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

summary {
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker { display: none; }

/* =========================================
   9. RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
    /* Help Page Grid Adjustment */
    .grid-inputs, main div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

@media (max-width: 600px) {
  .logo span { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .modal-content { width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
  .grid { padding: 20px 0; }
  .card { padding: 25px; }
}