/*
 Theme Name: SMEInnovationHub
 Theme URI: https://smeinnovationhub.co.za
 Author: SMEInnovationHub
 Description: Lightweight custom theme for SME Innovation Hub with custom header, hero and navigation.
 Version: 1.0
*/

:root {
  --primary: #1A237E;
  --accent: #2962FF;
  --light: #F7F9FC;
  --text: #263238;
  --radius: 16px;
}

/* GLOBAL */
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  margin: 0;
  background: var(--light);
}

h1,h2,h3,h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  margin-top: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #00BFA5; }

/* ---------- NAV BAR ---------- */

.sme-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sme-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sme-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

/* Menu generated by wp_nav_menu */
.sme-menu {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.sme-menu li a {
  color: #fff;
  font-weight: 500;
}

.sme-menu li a:hover {
  color: #BBDEFB;
}

/* Hamburger (mobile) */
.sme-menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: none; /* only on mobile */
}

/* ---------- LAYOUT WRAPPER ---------- */

.site-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- HERO / HOMEPAGE SECTIONS ---------- */

.sme-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* HERO */
.sme-hero {
  position: relative;
  background-image: url('https://smeinnovationhub.co.za/wp-content/uploads/2025/11/E-com-strategy.jpg');
  background-size: cover;
  background-position: center;
  padding: 160px 20px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  margin-top: 0; /* nav is sticky, not fixed */
}

.sme-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(26,35,126,0.7), rgba(41,98,255,0.6));
  z-index: 0;
}

.sme-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
}

.sme-eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #BBDEFB;
  margin-bottom: 14px;
}

.sme-hero-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
}

.sme-hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #E3F2FD;
  margin-bottom: 32px;
}

.sme-cta-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: background 0.3s ease;
  cursor: pointer;
}

.sme-cta-btn:hover { background: #00BFA5; }

/* SECTION WRAPPER */
.sme-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

.sme-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.sme-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

/* CATEGORY & ARTICLE GRID */
.sme-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.sme-theme-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
}

.sme-theme-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.sme-theme-card strong {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.sme-theme-card p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* CTA SECTION */
.sme-cta {
  max-width: 1160px;
  margin: 60px auto;
  background: linear-gradient(135deg, #1A237E, #2962FF);
  color: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.sme-cta strong {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 8px;
}

.sme-cta a {
  background: #00BFA5;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.sme-cta a:hover { background: #009688; }

/* FOOTER */
.sme-footer {
  background: var(--primary);
  color: #E0E0E0;
  padding: 40px 20px;
  text-align: center;
  font-size: 0.95rem;
}

.sme-footer a { color: #fff; opacity: 0.8; }
.sme-footer a:hover { opacity: 1; }

/* ---------- MOBILE MENU BEHAVIOR ---------- */
@media (max-width: 768px) {
  .sme-menu-toggle {
    display: block;
    background: #00BFA5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 22px;
    padding: 10px 14px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 9999;
  }

  .sme-menu {
    display: none;
    flex-direction: column;
    background: #1A237E;
    position: absolute;
    top: 70px;
    right: 10px;
    width: 230px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9998;
  }

  .sme-menu.menu-open {
    display: flex !important;
  }

  .sme-menu a {
    color: #fff;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .sme-menu a:last-child {
    border-bottom: none;
  }
}
/* ---------- PREMIUM ANIMATION UPGRADE (SAFE) ---------- */
@media (max-width: 768px) {
  .sme-menu {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
  }

  .sme-menu.menu-open {
    opacity: 1;
    transform: translateY(0);
  }

  .sme-menu li {
    transition: transform 0.2s ease-in-out;
  }

  .sme-menu li:hover {
    transform: translateX(5px);
  }
}
