/**
 * Smart Gear Select - Complete Styling Fix
 * Header + Footer + Typography + Layout
 * Production Ready - Copy Entire File
 */

/* ═════════════════════════════════════════════════════════════ */
/* 1. CORE VARIABLES & RESET */
/* ═════════════════════════════════════════════════════════════ */
:root {
  --sgs-primary: #6366f1;
  --sgs-primary-dark: #4f46e5;
  --sgs-dark: #0f172a;
  --sgs-text: #243244;
  --sgs-gray: #64748b;
  --sgs-light: #f8fafc;
  --sgs-border: #e2e8f0;
  --sgs-white: #ffffff;
}

/* Light mode enforcement */
body {
  background: #ffffff !important;
  color: var(--sgs-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═════════════════════════════════════════════════════════════ */
/* 2. HEADER FIX - Logo & Navigation */
/* ═════════════════════════════════════════════════════════════ */

/* Logo sizing */
.site-header .custom-logo,
.site-header .site-logo img,
.site-branding img {
  height: 45px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain;
}

/* Header container alignment */
.ast-header .ast-container,
.site-header .ast-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 20px;
  background: #ffffff;
}

/* Navigation menu */
.main-header-menu .menu-item > a {
  color: var(--sgs-dark) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1.2rem 0.8rem;
  transition: color 0.2s;
}
.main-header-menu .menu-item > a:hover {
  color: var(--sgs-primary) !important;
}

/* Mobile adjustments */
@media (max-width: 921px) {
  .site-header .custom-logo,
  .site-header .site-logo img {
    height: 35px !important;
    max-width: 140px !important;
  }
  .ast-header .ast-container {
    padding: 0.75rem 1rem;
  }
}

/* ═════════════════════════════════════════════════════════════ */
/* 3. FOOTER - Dark Background + White Content Box */
/* ═════════════════════════════════════════════════════════════ */

/* Main footer - dark background */
.ast-footer,
.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  padding: 0 !important;
  margin-top: 4rem;
}

/* Footer container - white box */
.ast-footer .ast-container,
.site-footer .ast-container {
  background: #ffffff !important;
  padding: 3rem 2.5rem !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
  max-width: 1200px;
  margin: 0 auto;
}

/* Footer grid layout - 4 columns */
.ast-footer .ast-footer-sitemap,
.site-footer .footer-widgets,
.ast-footer .ast-footer-widget-area {
  display: grid !important;
  grid-template-columns: 1.8fr 1fr 1fr 1fr !important;
  gap: 3rem !important;
  align-items: start;
}

/* Footer section titles */
.ast-footer h2,
.ast-footer h3,
.ast-footer h4,
.footer-widget-title,
.site-footer h4 {
  color: var(--sgs-dark) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 1.2rem !important;
  padding-bottom: 0.6rem !important;
  border-bottom: 2px solid var(--sgs-border) !important;
}

/* Footer description text */
.ast-footer p,
.site-footer p {
  color: var(--sgs-gray) !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  margin-bottom: 1.5rem !important;
}

/* Footer links */
.ast-footer a,
.site-footer a {
  color: var(--sgs-gray) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  display: block;
  padding: 0.3rem 0;
  transition: all 0.2s ease;
}
.ast-footer a:hover,
.site-footer a:hover {
  color: var(--sgs-primary) !important;
  padding-left: 5px;
}

/* Footer lists */
.ast-footer ul,
.site-footer ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ast-footer li,
.site-footer li {
  margin-bottom: 0.5rem !important;
}

/* Footer bottom bar */
.ast-footer .ast-footer-bar,
.footer-bottom-bar {
  border-top: 1px solid var(--sgs-border) !important;
  margin-top: 3rem !important;
  padding-top: 1.5rem !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.ast-footer .ast-footer-copy {
  font-size: 0.85rem;
  color: var(--sgs-gray) !important;
}

/* Mobile footer */
@media (max-width: 768px) {
  .ast-footer .ast-footer-sitemap,
  .site-footer .footer-widgets {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .ast-footer .ast-container {
    padding: 2rem 1.5rem !important;
  }
  .ast-footer .ast-footer-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* ═════════════════════════════════════════════════════════════ */
/* 4. TYPOGRAPHY */
/* ═════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  color: var(--sgs-dark) !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }

p {
  color: var(--sgs-text);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

a {
  color: var(--sgs-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
a:hover {
  color: var(--sgs-primary-dark);
}

/* ═════════════════════════════════════════════════════════════ */
/* 5. HERO SECTIONS */
/* ═════════════════════════════════════════════════════════════ */

.ast-hero,
.page-header,
.sgs-hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ast-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.ast-hero .ast-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}
.ast-hero h1 {
  color: #ffffff !important;
  margin-bottom: 1rem;
}
.ast-hero p {
  color: rgba(255,255,255,0.9) !important;
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ═════════════════════════════════════════════════════════════ */
/* 6. BUTTONS */
/* ═════════════════════════════════════════════════════════════ */

.sgs-btn,
.wp-block-button__link,
button,
input[type="submit"] {
  background: linear-gradient(135deg, var(--sgs-primary) 0%, var(--sgs-primary-dark) 100%) !important;
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1.8rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.sgs-btn:hover,
.wp-block-button__link:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ═════════════════════════════════════════════════════════════ */
/* 7. CARDS & COMPONENTS */
/* ═════════════════════════════════════════════════════════════ */

.sgs-card,
.method-box,
.expert-profile {
  background: #ffffff;
  border: 1px solid var(--sgs-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.sgs-card:hover,
.method-box:hover,
.expert-profile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* ═════════════════════════════════════════════════════════════ */
/* 8. TABLES */
/* ═════════════════════════════════════════════════════════════ */

.sgs-product-table,
.product-table,
.wp-block-table table,
.entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin: 2rem 0;
}
.sgs-product-table th,
.product-table th,
.wp-block-table table th {
  background: linear-gradient(135deg, var(--sgs-primary) 0%, var(--sgs-primary-dark) 100%);
  color: #ffffff !important;
  font-weight: 600;
  padding: 1.2rem 1.5rem;
  text-align: left;
  border: none;
}
.sgs-product-table td,
.product-table td,
.wp-block-table table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--sgs-border);
  background: #ffffff;
  color: var(--sgs-text);
}
.sgs-product-table tbody tr:hover td {
  background: var(--sgs-light);
}
.sgs-product-table tbody tr:last-child td {
  border-bottom: none;
}

/* ═════════════════════════════════════════════════════════════ */
/* 9. RESPONSIVE */
/* ═════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  body { font-size: 0.95rem; }
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.5rem !important; }
  
  .ast-hero, .page-header, .sgs-hero {
    padding: 3rem 1.5rem;
  }
  
  .sgs-btn, button {
    width: 100%;
    justify-content: center;
  }
  
  .sgs-product-table th,
  .sgs-product-table td {
    padding: 1rem;
    font-size: 0.9rem;
  }
}

/* ═════════════════════════════════════════════════════════════ */
/* 10. UTILITIES */
/* ═════════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 3px solid var(--sgs-primary);
  outline-offset: 2px;
}

button, a, input, select, textarea {
  min-height: 44px;
  min-width: 44px;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  .no-print { display: none; }
}