/* ===== AooPower Global Styles ===== */
/* Single source of truth for all pages */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #7c3aed;
  --success: #059669;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); margin: 2rem 0 1rem; }
h3 { font-size: clamp(1rem, 2.5vw, 1.4rem); margin: 1.5rem 0 0.75rem; }

p, li, td, th, span, label, input, select, textarea {
  font-size: max(0.875rem, 14px);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--border-light);
  border-radius: 8px;
  padding: 2px;
}

.lang-switch a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.lang-switch a.active {
  color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0.75rem auto 0;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.5rem; }

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; opacity: 0.95; margin-bottom: 2rem; }

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  display: block;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.tool-card .tool-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.tool-card .tool-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.tool-card .tool-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }
.tool-card .tool-category {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 1rem;
  margin-top: 0.75rem;
  font-weight: 500;
}

/* ===== RELATED TOOLS GRID ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  min-height: 44px;
}
.related-link:hover {
  border-color: var(--primary);
  background: #eff6ff;
}
.related-icon { font-size: 1.5rem; }
.related-name { font-weight: 500; font-size: 0.9rem; }

/* ===== BLOG GRID ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ===== AD CONTAINER ===== */
.ad-container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* ===== SEARCH ===== */
.search-section {
  max-width: 800px;
  margin: -2rem auto 2rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}
.search-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  transition: border-color 0.3s;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.9);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .footer-logo { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.85rem; opacity: 0.7; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { opacity: 1; color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; opacity: 0.6; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: rgba(255,255,255,0.6); font-size: 0.8rem; text-decoration: none; }
.footer-bottom-links a:hover { opacity: 1; color: #fff; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-inner { height: 52px; padding: 0 1rem; }
  
  .navbar.open .nav-center {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .navbar.open .nav-links {
    flex-direction: column;
    gap: 0;
  }
  .navbar.open .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }

  .hero h1 { font-size: 1.75rem; }
  
  .tools-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Touch targets */
  button, .btn, [type="submit"], .related-link {
    min-height: 44px;
    min-width: 44px;
  }

  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

/* ===== SEO CONTENT ===== */
.seo-content h2 { color: var(--text); margin-top: 2.5rem; }
.seo-content h3 { color: var(--text); }
.seo-content p { color: var(--text-light); margin-bottom: 1rem; }
.seo-content ul, .seo-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-light);
}
.seo-content li { margin-bottom: 0.5rem; }
.seo-content strong { color: var(--text); }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
