/* ====== RESET & BASE ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #000080;
  --secondary: #993300;
  --accent: #fc6e22;
  --dark: #352D2B;
  --light: #DCDCDC;
  --white: #ffffff;
  --border: #cccccc;
  --text: #333333;
  --link: #434E5C;
  --max-width: 1100px;  /* Increased from 750px */
}

body {
  font-family: Arial, sans-serif;
  font-size: 13px;  /* Slightly larger base font */
  color: var(--text);
  line-height: 1.6;  /* Better line spacing */
  background-color: var(--light);
  margin: 0;
  padding: 20px 0;
}

/* ====== MAIN CONTAINER ====== */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--white);
  border: 2px solid #3D322E;
}

/* ====== HEADER ====== */
.header {
  height: 130px;
  background-image: url('/assets/header.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 30px;
}

.header h1 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 32px;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 5px;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.header h2 {
  font-family: Arial, sans-serif;
  font-size: 18px;
  color: var(--secondary);
  font-variant: small-caps;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* ====== LINK UNIT (Top AdSense) ====== */
.link-unit {
  border-top: 1px solid #3D322E;
  border-bottom: 1px solid #3D322E;
  padding: 3px;
  min-height: 21px;
  text-align: center;
  background-color: var(--white);
}

/* ====== CONTENT WRAPPER ====== */
.content-wrapper {
  display: flex;
  width: 98%;
  margin: 15px auto;
  gap: 20px;  /* Better gap between columns */
}

/* ====== LEFT SIDEBAR ====== */
.left-sidebar {
  width: 180px;  /* Slightly wider */
  flex-shrink: 0;
}

.leftMenu {
  margin-bottom: 20px;
}

.leftMenu h4,
.rightMenu h4 {
  border: 3px outset var(--accent);
  background-color: #FABE99;
  padding: 4px 15px;
  font-weight: bold;
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 10px;
}

.leftMenu ul,
.rightMenu ul {
  list-style-type: none;
  padding: 0;
}

.leftMenu li,
.rightMenu li {
  line-height: 1.8;
  padding: 3px 5px;
}

.leftMenu a,
.rightMenu a {
  text-decoration: none;
  color: var(--link);
  font-size: 13px;
}

.leftMenu a:hover,
.rightMenu a:hover {
  text-decoration: underline;
  color: var(--primary);
}

/* ====== MAIN CONTENT ====== */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
}

/* Main page heading */
.main-content > h3:first-child {
  font-family: Arial, Verdana, sans-serif;
  color: var(--primary);
  font-size: 22px;
  border-bottom: 2px solid var(--accent);
  line-height: 1.4;
  text-align: left;
  padding: 10px 0;
  margin-bottom: 20px;
}

/* Article content headings */
.main-content h1 {
  font-size: 26px;
  color: var(--primary);
  margin: 25px 0 15px;
  line-height: 1.3;
}

.main-content h2 {
  font-size: 20px;
  color: var(--dark);
  margin: 20px 0 10px;
  line-height: 1.3;
}

.main-content h3 {
  font-size: 18px;
  color: var(--dark);
  margin: 15px 0 10px;
  line-height: 1.3;
}

.main-content h4 {
  font-size: 16px;
  color: var(--primary);
  margin: 15px 0 8px;
  font-weight: bold;
}

.main-content p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.main-content ul,
.main-content ol {
  margin: 15px 0 15px 30px;
  list-style-position: outside !important;
  padding-left: 0;
}

.main-content ul {
  list-style-type: disc !important;
}

.main-content ol {
  list-style-type: decimal !important;
  counter-reset: item;
}

.main-content ol li {
  display: list-item !important;
  list-style-type: decimal !important;
  margin: 5px 0;
  line-height: 1.6;
}

.main-content ul li {
  display: list-item !important;
  list-style-type: disc !important;
  margin: 5px 0;
  line-height: 1.6;
}

/* ====== RIGHT SIDEBAR ====== */
.right-sidebar {
  width: 200px;  /* Slightly wider */
  flex-shrink: 0;
}

.rightMenu {
  margin-top: 2em;
}

.rightMenu ul {
  list-style-type: square;
  list-style-position: inside;
}

.rightMenu li {
  line-height: 1.8;
  padding: 2px 0;
}

/* Affiliate widget in sidebar */
.widget.affiliate-widget {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  padding: 10px;
  margin-bottom: 20px;
}

.widget.affiliate-widget h4 {
  background: linear-gradient(135deg, #FABE99, #ffddcc);
  margin: -10px -10px 10px;
  padding: 8px 10px;
}

.product-item {
  margin-bottom: 15px;
  text-align: center;
}

.product-item h5 {
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 5px;
}

.product-item img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
}

.product-item p {
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.4;
}

/* ====== ADS CONTAINERS ====== */
.ad-container {
  text-align: center;
  margin: 20px 0;
  min-height: 90px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.ad-160x600 {
  min-height: 600px;
}

.ad-336x280 {
  min-height: 280px;
}

.ad-728x90 {
  min-height: 90px;
}

.ad-inline {
  margin: 20px 0;
  text-align: center;
}

/* ====== ARTICLE LISTINGS ====== */
#listings {
  margin: 20px 0;
}

#listings h4 {
  color: var(--primary);
  font-size: 16px;
  margin: 20px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

#listings a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
}

#listings a:hover {
  text-decoration: underline;
}

#listings small {
  color: #666;
  display: block;
  margin: 5px 0 10px;
  font-size: 12px;
  line-height: 1.4;
}

.article-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 0;
}

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

.featured-item {
  background: #f9f9f9;
  padding: 15px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
}

/* ====== TL;DR BOX ====== */
.tldr-box {
  background: linear-gradient(135deg, #fff9f0, #ffeedb);
  border-left: 4px solid var(--accent);
  padding: 12px 15px;
  margin: 15px 0 20px;
  font-size: 14px;
  line-height: 1.5;
}

.tldr {
  color: #666;
  font-style: italic;
  font-size: 12px;
}

/* ====== FAQ SECTION ====== */
.faq-section,
.home-faq-section {
  margin: 30px 0;
}

.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
}

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

.faq-question {
  color: var(--primary);
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: bold;
}

.faq-answer {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

/* ====== INTRO SECTION ====== */
.intro-section {
  background: linear-gradient(135deg, #f0f4ff, #e8efff);
  padding: 20px;
  margin: 20px 0;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.6;
}

/* ====== CATEGORY PAGES ====== */
.category-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 0;
}

.category-item h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.category-item h2 a {
  color: var(--primary);
  text-decoration: none;
}

.category-item h2 a:hover {
  text-decoration: underline;
}

.category-item .meta {
  color: #666;
  font-size: 12px;
  margin: 5px 0;
}

.category-item .description {
  margin: 10px 0;
  line-height: 1.6;
}

#readmore {
  text-align: right;
  margin-top: 10px;
}

#readmore a {
  color: var(--primary);
  font-weight: bold;
  font-size: 13px;
  text-decoration: none;
}

#readmore a:hover {
  text-decoration: underline;
}

/* ====== BREADCRUMBS ====== */
.breadcrumbs {
  font-size: 12px;
  color: #666;
  margin: 10px 0 15px;
  padding: 8px;
  background: #f9f9f9;
  border-left: 3px solid var(--accent);
}

.breadcrumbs a {
  color: var(--link);
  text-decoration: none;
}

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

/* ====== ARTICLE CONTENT ====== */
.article-content {
  font-size: 14px;
  line-height: 1.7;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content h2 {
  margin: 25px 0 15px;
}

.article-content h3 {
  margin: 20px 0 12px;
}

.article-meta {
  color: #666;
  font-size: 12px;
  margin: 10px 0 15px;
  padding: 10px;
  background: #f9f9f9;
  border-left: 3px solid #e0e0e0;
}

.tag {
  background: #e0e0e0;
  padding: 2px 6px;
  margin: 0 3px;
  font-size: 11px;
  border-radius: 3px;
}

/* ====== DISCLAIMER ====== */
.disclaimer {
  background: #fff9e6;
  border: 1px solid #ffd700;
  padding: 12px;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.5;
}

/* ====== AFFILIATE BOX ====== */
.affiliate-box {
  background: linear-gradient(135deg, #fff9f0, #ffeedb);
  border: 2px solid var(--accent);
  border-radius: 5px;
  padding: 20px;
  margin: 25px 0;
  position: relative;
}

.affiliate-box::before {
  content: "💡 Recommended";
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--white);
  padding: 0 10px;
  color: var(--accent);
  font-weight: bold;
  font-size: 12px;
}

.affiliate-box a {
  color: var(--primary);
  font-weight: bold;
}

/* ====== VIDEO WRAPPER ====== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 20px 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ====== ERROR PAGE ====== */
.error-page {
  text-align: center;
  padding: 50px;
}

.error-page h1 {
  color: var(--primary);
  font-size: 32px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  margin-top: 20px;
  border-radius: 3px;
}

.btn:hover {
  background: var(--dark);
}

/* ====== FOOTER ====== */
.footer {
  text-align: center;
  padding: 20px;
  border-top: 2px solid var(--border);
  font-size: 12px;
  color: #666;
  background: #f9f9f9;
  margin-top: 30px;
}

.footer a {
  color: var(--link);
  text-decoration: none;
  margin: 0 10px;
}

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

/* ====== RESPONSIVE ====== */
@media (max-width: 1120px) {
  :root {
    --max-width: 98%;
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .left-sidebar,
  .right-sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .main-container {
    margin: 0 10px;
  }
  
  .header h1 {
    font-size: 24px;
  }
  
  .header h2 {
    font-size: 14px;
  }
  
  .main-content {
    padding: 0 15px;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
}