/*
 Theme Name: BestGrowthApps Child
 Theme URI: https://bestgrowthapps.com
 Description: Child theme for Astra, optimized for SEO + affiliate content
 Author: BestGrowthApps
 Template: astra
 Version: 1.0.0
 Text Domain: astra-bestgrowthapps
*/

/* Import parent theme styles */
@import url("../astra/style.css");

/* CSS Variables */
:root {
  --bga-blue: #0A66C2;
  --bga-green: #2ECC71;
  --bga-text: #1F2937;
  --bga-bg: #F7F9FC;
  --bga-muted: #6B7280;
  --bga-radius: 16px;
  --bga-gap: 24px;
  --bga-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --bga-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--bga-text);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Hero Section */
.hero-section {
  background: var(--bga-bg);
  padding: 4rem 0;
  border-radius: var(--bga-radius);
  margin: 2rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Fix header overlap */
.site-content {
  margin-top: 0;
  padding-top: 0;
}

/* WordPress admin bar adjustments - More aggressive approach */
body.admin-bar .site-header {
  top: 32px !important;
  position: fixed !important;
  width: 100% !important;
  z-index: 9999 !important;
}

body.admin-bar .site .hero-section {
  margin-top: 0 !important;
  padding-top: 2rem !important;
  margin-bottom: 0 !important;
  position: relative !important;
  top: 100px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px !important;
  }
  
  body.admin-bar .hero-section {
    margin-top: 0 !important;
    padding-top: 2rem !important;
    position: relative !important;
    top: 120px !important;
  }
  
  /* Mobile hero section adjustments */
  .hero-section {
    top: 80px !important;
  }
  
  body.admin-bar .hero-section {
    top: 120px !important;
  }
}

/* Additional admin bar fixes */
body.admin-bar #wpadminbar {
  position: fixed !important;
  top: 0 !important;
  z-index: 99999 !important;
}

body.admin-bar .site {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* HERO SECTION FIX - Exact values from working console command */
.hero-section {
  position: relative !important;
  top: 100px !important;
  margin-top: 0 !important;
  padding-top: 2rem !important;
  margin-bottom: 0 !important;
  padding-bottom: 4rem !important;
  z-index: 10 !important;
}

/* When no admin bar is present */
body:not(.admin-bar) .hero-section {
  top: 60px !important;
}


/* Ensure hero content is properly positioned */
.site .hero-section .hero-content {
  position: relative;
  z-index: 2;
}

/* Force hero heading to be fully visible */
.site .hero-section .hero-content h1 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  line-height: 1.1 !important;
  position: relative;
  z-index: 3;
  transform: translateY(0) !important;
  overflow: visible !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

/* Ensure the hero content container doesn't clip the heading */
.site .hero-section .hero-content {
  overflow: visible !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 2rem 0 !important;
}

/* Force the container to not clip content */
.site .hero-section .container {
  overflow: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Override any potential overflow issues */
.site .hero-section {
  overflow: visible !important;
  min-height: 200px !important;
}

/* Ensure the site content doesn't interfere */
.site #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Force the main element to not interfere */
.site #main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure body and html don't interfere */
body.admin-bar {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Final override for any remaining issues */
.site .hero-section .hero-content h1:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
  position: static !important;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--bga-text);
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.hero-content .subhead {
  font-size: 1.25rem;
  color: var(--bga-muted);
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: var(--bga-blue);
  color: #fff;
  border: none;
  border-radius: var(--bga-radius);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background: #084a8a;
  transform: translateY(-1px);
  box-shadow: var(--bga-shadow-hover);
}

.btn-outline {
  border: 2px solid var(--bga-blue);
  color: var(--bga-blue);
  background: transparent;
  border-radius: var(--bga-radius);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--bga-blue);
  color: #fff;
  transform: translateY(-1px);
}

/* Trust Badges - Exact value from working console command */
.trust-badges {
  padding: 3rem 0;
  background: #fff;
  margin-top: 6rem !important;
  position: relative;
  z-index: 1;
}

.trust-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  text-align: center;
}

.trust-badge {
  flex: 0 0 calc(33.333% - 1.33rem);
  max-width: 300px;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--bga-radius);
  box-shadow: var(--bga-shadow);
  transition: transform 0.3s ease;
}

.trust-badge:hover {
  transform: translateY(-4px);
}

.trust-badge-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: var(--bga-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.trust-badge h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--bga-text);
}

.trust-badge p {
  color: var(--bga-muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Featured Articles */
.featured-articles {
  padding: 4rem 0;
  background: #fff;
}

.featured-articles h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bga-text);
  margin: 0 0 3rem 0;
}

.articles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.articles-grid .bga-card {
  flex: 0 0 calc(33.333% - 1.33rem);
  max-width: 350px;
  background: #fff;
  border-radius: var(--bga-radius);
  box-shadow: var(--bga-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.articles-grid .bga-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bga-shadow-hover);
}

.articles-grid .bga-card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
}

.articles-grid .bga-card-content {
  padding: 1.5rem;
}

.articles-grid .bga-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bga-text);
}

.articles-grid .bga-card p {
  margin: 0 0 1rem 0;
  color: var(--bga-muted);
  line-height: 1.6;
}

.pill {
  background: rgba(10, 102, 194, 0.08);
  color: var(--bga-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* Categories Grid */
.categories-grid {
  padding: 4rem 0;
  background: var(--bga-bg);
}

.categories-grid h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bga-text);
  margin: 0 0 3rem 0;
}

.grid-4 {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.grid-4 .category-card {
  flex: 0 0 calc(25% - 1.5rem);
  max-width: 250px;
  background: #fff;
  padding: 2rem;
  border-radius: var(--bga-radius);
  text-align: center;
  text-decoration: none;
  color: var(--bga-text);
  transition: all 0.3s ease;
  box-shadow: var(--bga-shadow);
}

.grid-4 .category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bga-shadow-hover);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.grid-4 .category-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.grid-4 .category-card p {
  color: var(--bga-muted);
  margin: 0;
}

/* Newsletter CTA */
.newsletter-cta {
  background: var(--bga-blue);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  margin: 3rem 0;
  border-radius: var(--bga-radius);
}

.newsletter-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.newsletter-cta p {
  font-size: 1.125rem;
  margin: 0 0 2rem 0;
  opacity: 0.9;
}

.newsletter-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: var(--bga-radius);
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: calc(var(--bga-radius) - 4px);
  font-size: 1rem;
  background: #fff;
  color: var(--bga-text);
}

.newsletter-form .btn-primary {
  white-space: nowrap;
  background: #fff;
  color: var(--bga-blue);
  border: none;
}

.newsletter-form .btn-primary:hover {
  background: #f8fafc;
  color: var(--bga-blue);
}

/* About Snippet */
.about-snippet {
  padding: 4rem 0;
  text-align: center;
  background: #fff;
  margin: 0;
}

.about-snippet h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bga-text);
  margin: 0 0 2rem 0;
}

.about-snippet p {
  font-size: 1.125rem;
  color: var(--bga-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--bga-text);
  color: #fff;
  margin-top: 4rem;
}

.footer-main {
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-brand {
  flex: 0 0 calc(40% - 1rem);
  min-width: 300px;
}

.footer-links {
  flex: 0 0 calc(20% - 1rem);
  min-width: 150px;
}

.footer-newsletter {
  flex: 0 0 calc(30% - 1rem);
  min-width: 250px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #fff;
}

.footer-brand p {
  color: #9ca3af;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--bga-blue);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #fff;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-newsletter h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #fff;
}

.footer-newsletter p {
  color: #9ca3af;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.footer-newsletter .newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.footer-newsletter input[type="email"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #374151;
  color: #fff;
  font-size: 0.9rem;
}

.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--bga-blue);
}

.footer-newsletter .btn-primary {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.footer-bottom {
  background: #111827;
  padding: 1rem 0;
  border-top: 1px solid #374151;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

.footer-bottom p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Header Menu Fixes */
.main-navigation {
  position: relative;
  z-index: 100;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--bga-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--bga-blue);
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-menu li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li {
  margin: 0;
}

.nav-menu .sub-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--bga-text);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.nav-menu .sub-menu a:hover {
  background: var(--bga-bg);
  color: var(--bga-blue);
}

/* Remove any potential dividers or lines */
.newsletter-cta *,
.about-snippet * {
  border: none !important;
  box-shadow: none !important;
}

.newsletter-cta::before,
.newsletter-cta::after,
.about-snippet::before,
.about-snippet::after {
  display: none !important;
}

/* Ensure clean sections */
.newsletter-cta {
  position: relative;
  overflow: hidden;
}

.about-snippet {
  position: relative;
  overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Hero section mobile adjustments */
  .hero-section {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-content .subhead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-ctas {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .hero-ctas .btn-primary,
  .hero-ctas .btn-outline {
    width: 100%;
    max-width: 280px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Trust badges mobile */
  .trust-badges {
    padding: 2rem 1rem;
    margin-top: 4rem;
  }
  
  .trust-badges-grid {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  .trust-badges-grid .trust-badge {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
  }
  
  .trust-badge-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
  }
  
  .trust-badge h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .trust-badge p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Articles grid mobile */
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .articles-grid .bga-card {
    flex: none;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
  }
  
  .articles-grid .bga-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .articles-grid .bga-card-content {
    padding: 1.25rem;
  }
  
  .articles-grid .bga-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }
  
  .articles-grid .bga-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }
  
  .articles-grid .pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  /* Categories grid mobile */
  .grid-4 {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .grid-4 .category-card {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .grid-4 .category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .grid-4 .category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }
  
  .grid-4 .category-card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Newsletter form mobile */
  .newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .newsletter-form input[type="email"] {
    width: 100%;
  }
  
  /* Typography mobile */
  .featured-articles h2,
  .categories-grid h2,
  .about-snippet h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  /* Footer mobile */
  .footer-brand,
  .footer-links,
  .footer-newsletter {
    flex: none;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Container mobile */
  .container {
    padding: 0 1rem;
  }
  
  /* Additional mobile improvements */
  .trust-badges {
    background: #f8f9fa;
  }
  
  .trust-badges h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  /* Better mobile card shadows */
  .trust-badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Mobile-specific spacing */
  .trust-badges-grid .trust-badge:not(:last-child) {
    margin-bottom: 0;
  }
}
