/*
Theme Name: TopGhana
Theme URI: https://topghana.com
Author: Buoyant Innovation
Author URI: https://topghana.com
Description: Content-first media, rankings and business directory theme for TopGhana.com. Built for Buoyant Innovation – ideas to power your brand. Features homepage for rankings, directory listings, content features and premium packages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: topghana
Tags: custom-logo, custom-menu, featured-images, theme-options, blog, e-commerce, directory
*/

/* ==========================================================================
   CSS Variables – Brand Colours from Logo
   ========================================================================== */
:root {
  --tg-red: #C8102E;
  --tg-green: #006B3F;
  --tg-gold: #FCD116;
  --tg-black: #1a1a1a;
  --tg-dark: #111111;
  --tg-light: #f8f9fa;
  --tg-white: #ffffff;
  --tg-gray: #6c757d;
  --tg-border: #e9ecef;
  --tg-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --tg-radius: 12px;
  --tg-font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tg-font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--tg-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tg-dark);
  background: var(--tg-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tg-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--tg-red); }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--tg-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--tg-dark);
}
ul, ol { list-style: none; }

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 60px 0;
}
.section-title {
  font-size: 2rem;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--tg-red), var(--tg-gold), var(--tg-green));
  margin-top: 8px;
  border-radius: 2px;
}
.section-subtitle {
  color: var(--tg-gray);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--tg-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-logo img {
  max-height: 70px;
  width: auto;
}
.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tg-dark);
  letter-spacing: -0.5px;
}
.site-title .top { color: var(--tg-red); }
.site-title .ghana { color: var(--tg-green); }

.main-navigation ul {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-navigation a {
  font-weight: 600;
  color: var(--tg-dark);
  font-size: 0.95rem;
  position: relative;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--tg-green);
}
.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--tg-gold);
  transition: width 0.25s;
}
.main-navigation a:hover::after {
  width: 100%;
}

.header-cta {
  background: linear-gradient(135deg, var(--tg-red), #a00d25);
  color: white !important;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(200,16,46,0.3);
}
.header-cta:hover {
  background: linear-gradient(135deg, #a00d25, var(--tg-red));
  color: white !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--tg-dark);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, #0d1f17 0%, #1a3a2a 50%, #0d1f17 100%);
  color: white;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 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='none' fill-rule='evenodd'%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-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-logo {
  max-width: 320px;
  margin: 0 auto 30px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: white;
  margin-bottom: 16px;
  font-weight: 800;
}
.hero h1 span.highlight {
  background: linear-gradient(90deg, var(--tg-gold), #ffe066);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--tg-red), #a00d25);
  color: white;
  box-shadow: 0 6px 20px rgba(200,16,46,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,16,46,0.45);
  color: white;
}
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  color: white;
}

/* ==========================================================================
   Rankings / Cards Grid
   ========================================================================== */
.rankings-grid,
.directory-grid,
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: white;
  border-radius: var(--tg-radius);
  overflow: hidden;
  box-shadow: var(--tg-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--tg-border);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.card-image {
  height: 180px;
  background: linear-gradient(135deg, #e8f5e9, #fff8e1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--tg-gold);
  color: var(--tg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-body {
  padding: 20px;
}
.card-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.card-meta {
  font-size: 0.85rem;
  color: var(--tg-gray);
  margin-bottom: 12px;
}
.card-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 16px;
}
.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--tg-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover { color: var(--tg-red); }

/* Rank number style */
.rank-number {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: var(--tg-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Directory Search Bar
   ========================================================================== */
.directory-search {
  background: var(--tg-light);
  padding: 40px 0;
  border-bottom: 1px solid var(--tg-border);
}
.search-box {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.search-box input,
.search-box select {
  flex: 1;
  min-width: 180px;
  padding: 14px 18px;
  border: 1px solid var(--tg-border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}
.search-box button {
  padding: 14px 28px;
  background: var(--tg-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.search-box button:hover {
  background: #005a34;
}

/* ==========================================================================
   Featured / CTA Sections
   ========================================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--tg-green) 0%, #004d2c 100%);
  color: white;
  text-align: center;
  padding: 70px 20px;
}
.cta-section h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 16px;
}
.cta-section p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.package-card {
  background: white;
  color: var(--tg-dark);
  border-radius: var(--tg-radius);
  padding: 28px 24px;
  text-align: left;
  box-shadow: var(--tg-shadow);
  position: relative;
  border: 2px solid transparent;
}
.package-card.popular {
  border-color: var(--tg-gold);
  transform: scale(1.03);
}
.package-card .popular-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--tg-gold);
  color: var(--tg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.package-name {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.package-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--tg-green);
  margin-bottom: 16px;
}
.package-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tg-gray);
}
.package-features {
  margin-bottom: 24px;
}
.package-features li {
  padding: 6px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.package-features li::before {
  content: '✓';
  color: var(--tg-green);
  font-weight: 700;
}

/* ==========================================================================
   Blog / Features List
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}
.post-card {
  background: white;
  border-radius: var(--tg-radius);
  overflow: hidden;
  box-shadow: var(--tg-shadow);
  transition: transform 0.25s;
}
.post-card:hover { transform: translateY(-4px); }
.post-thumbnail {
  height: 200px;
  background: #eee;
  overflow: hidden;
}
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-content {
  padding: 22px;
}
.post-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tg-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.post-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.post-excerpt {
  color: var(--tg-gray);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.post-meta {
  font-size: 0.85rem;
  color: #999;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--tg-dark);
  color: #ccc;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img {
  max-height: 60px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.85;
}
.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col a {
  color: #bbb;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--tg-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}
.footer-bottom a { color: var(--tg-gold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .main-navigation {
    display: none;
  }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 50px 0 70px; }
  .section { padding: 40px 0; }
  .packages-grid { grid-template-columns: 1fr; }
  .package-card.popular { transform: none; }
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.sticky { }
.bypostauthor { }
.gallery-caption { }
.entry-content img { border-radius: 8px; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2, .entry-content h3 { margin: 1.5em 0 0.6em; }

/* Single post */
.single-post .entry-header {
  margin-bottom: 30px;
}
.single-post .entry-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.single-post .entry-meta {
  color: var(--tg-gray);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.single-post .entry-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Page */
.page-header {
  background: var(--tg-light);
  padding: 40px 0;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--tg-border);
}
.page-title {
  font-size: 2rem;
}
