/* ============================================
   Affiliate Unplugged - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --navy: #0a1628;
  --navy-light: #152238;
  --green: #00d4aa;
  --green-dark: #00b894;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

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

a:hover {
  color: var(--green-dark);
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--green);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: var(--navy);
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--gray-300);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--green);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    display: none;
    border-top: 1px solid var(--navy-light);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--navy-light);
    padding-bottom: 0.75rem;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=1200') center/cover;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-300);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--green);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--navy);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 4rem 0;
}

.section-gray {
  background: var(--gray-100);
}

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ============================================
   Cards
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 32px;
  height: 32px;
  color: var(--navy);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--green);
}

.card-link svg {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.card-link:hover svg {
  transform: translateX(5px);
}

/* ============================================
   Article Cards
   ============================================ */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.article-card-content {
  padding: 1.5rem;
}

.article-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.article-card h3 a {
  color: var(--navy);
}

.article-card h3 a:hover {
  color: var(--green);
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

/* ============================================
   Tool Cards
   ============================================ */
.tool-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  text-align: center;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}

.tool-card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.tool-card-icon svg {
  width: 40px;
  height: 40px;
  color: var(--green);
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ============================================
   Tool Page Styles
   ============================================ */
.tool-page {
  padding: 2rem 0;
}

.tool-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.tool-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: var(--gray-300);
  font-size: 1.125rem;
}

/* Tool Form */
.tool-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Results Area */
.results-area {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  display: none;
}

.results-area.active {
  display: block;
}

.results-area h3 {
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--green);
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.result-value {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.125rem;
}

.result-highlight {
  background: var(--green);
  color: var(--navy);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  margin-top: 1rem;
}

.result-highlight .value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.result-highlight .label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Charts */
.chart-container {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.chart-container canvas {
  max-width: 100%;
}

/* ============================================
   Article Page Styles
   ============================================ */
.article-page {
  padding: 2rem 0;
}

.article-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.article-header .container {
  max-width: 900px;
}

.article-header h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--gray-300);
  font-size: 0.9375rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta svg {
  width: 18px;
  height: 18px;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.0625rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.article-content img {
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.article-sidebar {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.article-sidebar h4 {
  margin-bottom: 1rem;
}

.article-sidebar ul {
  list-style: none;
}

.article-sidebar li {
  margin-bottom: 0.5rem;
}

.article-sidebar a {
  color: var(--navy);
  font-weight: 500;
}

.article-sidebar a:hover {
  color: var(--green);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1.5rem;
  background: var(--gray-100);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-top: 3rem;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  margin-bottom: 0.25rem;
}

.author-info p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--gray-600);
}

.breadcrumbs a:hover {
  color: var(--green);
}

.breadcrumbs span {
  color: var(--gray-400);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--navy);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer h4 {
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid var(--navy-light);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
}

.footer-bottom-links a {
  color: var(--gray-400);
}

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
  padding: 3rem 0;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 0.5rem;
}

.legal-content .last-updated {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.contact-info {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--white);
}

.contact-info h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--green);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 24px;
  height: 24px;
  color: var(--navy);
}

.contact-item h4 {
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--gray-300);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   404 Page
   ============================================ */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h1 {
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ============================================
   About Page
   ============================================ */
.about-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.about-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.about-hero p {
  color: var(--gray-300);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-content {
  padding: 4rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.value-item {
  text-align: center;
  padding: 2rem;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
}

.value-item h3 {
  margin-bottom: 0.75rem;
}

.value-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Homepage Sections
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  color: var(--navy);
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.stats-section {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item .number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--green);
  font-family: 'Playfair Display', serif;
}

.stat-item .label {
  font-size: 1rem;
  color: var(--gray-300);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--navy);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  opacity: 0.9;
}

.cta-section .btn {
  background: var(--navy);
  color: var(--white);
}

.cta-section .btn:hover {
  background: var(--navy-light);
}

/* ============================================
   Comparison Table
   ============================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.comparison-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.comparison-table tr:hover {
  background: var(--gray-100);
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-green { color: var(--green); }
.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; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
