/* Global Variables */
:root {
  --bg-color: #f8f9fa;
  --text-color: #333333;
  --heading-color: #1a1a1a;
  --accent-color: #007bff; /* Tech Blue */
  --secondary-color: #ffffff;
  --link-color: #007bff;
  --link-hover: #0056b3;
  --border-color: #e0e0e0;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-base);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }

p {
  margin-bottom: 1.2rem;
}

ul, ol {
  margin-bottom: 1.2rem;
  padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Layout */
header {
  background-color: var(--secondary-color);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  padding: 0;
  margin: 0;
  justify-content: flex-end; /* Modern right-aligned nav */
}

nav a {
  font-weight: 600;
  text-transform: capitalize;
  color: var(--heading-color);
  font-size: 1.1rem;
}

nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

main {
  flex: 1;
  padding: 3rem 0;
  background-color: var(--bg-color);
}

footer {
  background-color: var(--heading-color); /* Dark footer */
  color: #aaa;
  padding: 3rem 0;
  text-align: center;
  margin-top: auto;
}

footer p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

footer a {
    color: var(--footer-text);
}

footer a:hover {
    color: var(--accent-color);
}

/* Components */
.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--footer-text);
  padding: 0.8rem 2rem;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  text-transform: none;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 6px rgba(0,123,255,0.2);
}

.btn:hover {
  background-color: var(--link-hover);
  color: var(--footer-text);
  text-decoration: none;
  transform: translateY(-2px);
}

.card {
  border: 1px solid var(--border-color);
  padding: 2rem;
  margin-bottom: 2rem;
  background-color: var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* AdSense CLS Armor (Mandatory) */
.ad-container-leaderboard {
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
  background-color: #f1f3f5;
  border-radius: 4px;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
}
@media (max-width: 768px) {
  .ad-container-leaderboard {
    min-height: 250px;
  }
  nav ul {
      flex-direction: column;
      gap: 10px;
      align-items: center;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Article specific styling */
article h2 {
    color: var(--accent-color);
    border-bottom: none; /* Articles might want cleaner headings */
}
code {
    background-color: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: #d63384;
}
/* Monetization Styles */
.ad-container-in-article {
    margin: 30px 0;
    text-align: center;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 8px;
    min-height: 250px; /* Prevent CLS */
}

.affiliate-disclosure {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: -15px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.affiliate-storefront {
    margin: 40px 0;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.store-item {
    text-align: center;
}

.store-item img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.btn-affiliate {
    background-color: #ff9900; /* Amazon-like color for conversion */
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-affiliate:hover {
    background-color: #e68a00;
}
/* 2026 UX/UI Upgrades */
:root {
    --bg-color: #f8f9fa;
    --text-color: var(--text-color);
    --card-bg: #ffffff;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --border-color: #dee2e6;
    --nav-bg: #ffffff;
    --footer-bg: #343a40;
    --footer-text: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --card-bg: #1e1e1e;
        --primary-color: #4da3ff;
        --primary-hover: #80c1ff;
        --border-color: var(--text-color);
        --nav-bg: #1e1e1e;
        --footer-bg: #111;
        --footer-text: #ccc;
        --glass-bg: rgba(30, 30, 30, 0.9);
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Subtle Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header a {
    color: var(--text-color);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn {
    background-color: var(--primary-color);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.02);
}

.btn-affiliate {
    background-color: #ff9900;
    color: var(--footer-text);
}

.btn-affiliate:hover {
    background-color: #e68a00;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    border-top: none;
}

footer a {
    color: var(--primary-color);
}

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

/* Article Hero Images */
.hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    background-color: var(--border-color); /* Placeholder background */
}

/* Typography refinements */
h1, h2, h3 {
    color: var(--text-color);
}

a {
    color: var(--primary-color);
}
