/* Modern CSS Framework for SaaS Affiliate Site */

/* CSS Variables - True Wired.com Magazine Style */
:root {
  --primary-color: #FF6600;
  --primary-dark: #E55A00;
  --secondary-color: #000000;
  --secondary-dark: #333333;
  --accent-color: #0066CC;
  --accent-dark: #004499;
  --highlight-color: #00FF00;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-muted: #666666;
  --text-inverse: #FFFFFF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F8F8;
  --bg-accent: #000000;
  --border-color: #DDDDDD;
  --border-dark: #000000;
  --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-medium: 0 2px 8px rgba(0,0,0,0.15);
  --border-radius: 0;
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-headline: 'Inter', system-ui, sans-serif;
  --container-max-width: 1200px;
  --grid-gap: 1rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
}

/* Dark mode variables (for future implementation) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e9ecef;
    --text-secondary: #ced4da;
    --text-muted: #adb5bd;
    --bg-primary: #212529;
    --bg-secondary: #343a40;
    --border-color: #495057;
    --border-light: #495057;
  }
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.4;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

/* Container system */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1rem;
}

/* Typography - Wired.com Magazine Style */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headline);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Button system - Bold Wired.com style */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-medium);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--bg-accent);
  border-color: var(--bg-accent);
  text-decoration: none;
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--bg-accent);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  text-decoration: none;
  color: var(--bg-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 3px solid var(--text-primary);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Grid system */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col {
  flex: 1;
  padding: 0 0.75rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

/* Card system - Wired.com Style */
.card {
  background: var(--bg-primary);
  border: 3px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0;
  box-shadow: var(--shadow-medium);
  transition: all 0.2s ease;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.card:hover {
  box-shadow: var(--shadow-heavy);
  transform: translateY(-6px);
  border-color: var(--primary-color);
}

.card-header {
  padding: 2rem 2rem 1rem;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border-light);
  background: var(--bg-secondary);
}

.card-header h3 {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0;
}

.card-body {
  padding: 2rem;
}

.card-footer {
  padding: 1.5rem 2rem 2rem;
  margin-top: 0;
  border-top: 2px solid var(--border-light);
  background: var(--bg-secondary);
}

/* Form elements */
.form-group {
  margin-bottom: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.25);
}

select.form-control {
  background: white;
  cursor: pointer;
}

/* Filter and search components */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--bg-secondary);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.search-bar {
  flex: 1;
  min-width: 200px;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

/* Navigation styles - Wired.com Magazine Style */
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
}

.logo a {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo a:hover {
  color: var(--primary-color);
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--spacing-xl);
}

.main-nav li {
  position: relative;
}

.nav-link {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Dropdown menus */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-medium);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.main-nav li:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-dropdown a:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.nav-link.highlight {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-radius: 0;
}

.nav-link.highlight:hover {
  background: var(--primary-dark);
  color: var(--text-inverse);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Footer styles */
.site-footer {
  background: var(--bg-dark);
  color: #ddd;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin: 0.5rem 0;
}

.footer-col a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: white;
  text-decoration: underline;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subscribe-form input {
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.subscribe-form button {
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.subscribe-form button:hover {
  background: var(--primary-dark);
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  margin-right: 1rem;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Responsive breakpoints */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    box-shadow: var(--shadow-light);
  }
  
  .main-nav ul.open {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .row {
    margin: 0;
  }
  
  .col {
    padding: 0;
  }
  
  [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .hero-btn {
    width: 100% !important;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .filters,
  .btn,
  .subscribe-form {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1 { font-size: 18pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 14pt; }
}