/* =============================================
   Tech Dads Life — Main Stylesheet
   Brand colours:
     Charcoal:  #333333
     Light grey:#CCCCCC
     Teal:      #0099CC
     Blue:      #2E9FFF
     Orange:    #FF6900
============================================= */

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

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

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  background: #f5f5f5;
  line-height: 1.7;
}

a { color: #0099CC; text-decoration: none; }
a:hover { color: #FF6900; text-decoration: underline; }

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #333333;
}

/* --- Layout --- */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* --- Header --- */
.site-header {
  background: #000;
  border-bottom: 3px solid #0099CC;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
}

.site-logo img { height: 50px; width: auto; }

.logo-text { display: none; }

.site-nav { display: flex; align-items: center; }

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-menu li a {
  display: block;
  padding: 20px 14px;
  color: #CCCCCC;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #fff;
  background: #0099CC;
}

.nav-menu .nav-cta a {
  background: #FF6900;
  color: #fff;
  border-radius: 4px;
  margin-left: 8px;
}

.nav-menu .nav-cta a:hover { background: #e55f00; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #111;
    display: none;
    border-top: 2px solid #0099CC;
  }
  .site-nav.open { display: block; }
  .nav-menu { flex-direction: column; }
  .nav-menu li a { padding: 14px 20px; border-bottom: 1px solid #222; }
  .nav-menu .nav-cta a { margin: 10px 20px; border-radius: 4px; }
}

/* --- Hero Banner (home) --- */
.hero {
  background: linear-gradient(135deg, #000 0%, #0099CC 100%);
  padding: 60px 20px;
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.2rem;
  color: #CCCCCC;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-block;
  background: #FF6900;
  color: #fff;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-cta:hover { background: #e55f00; color: #fff; text-decoration: none; }

/* --- Category Filter Bar --- */
.category-bar {
  background: #fff;
  border-bottom: 1px solid #CCCCCC;
  padding: 0;
  overflow-x: auto;
}

.category-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 0;
}

.category-bar a {
  display: block;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333333;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.category-bar a:hover,
.category-bar a.active {
  color: #0099CC;
  border-color: #0099CC;
  text-decoration: none;
}

/* --- Article Cards Grid --- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* Featured first post takes full width */
.posts-grid .post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.posts-grid .post-card:first-child .card-image {
  border-radius: 8px 0 0 8px;
  height: 100%;
}

.posts-grid .post-card:first-child .card-image img {
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
}

.posts-grid .post-card:first-child .card-body {
  border-radius: 0 8px 8px 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.posts-grid .post-card:first-child .card-title {
  font-size: 1.6rem;
}

@media (max-width: 700px) {
  .posts-grid .post-card:first-child {
    grid-template-columns: 1fr;
  }
  .posts-grid .post-card:first-child .card-image,
  .posts-grid .post-card:first-child .card-image img {
    border-radius: 8px 8px 0 0;
    height: 220px;
  }
  .posts-grid .post-card:first-child .card-body {
    border-radius: 0 0 8px 8px;
  }
}

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}

.card-image {
  overflow: hidden;
  height: 200px;
  background: #1a1a1a;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .card-image img { transform: scale(1.03); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0099CC, #333333);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-placeholder span {
  font-size: 3rem;
  color: rgba(255,255,255,0.3);
}

.card-body { padding: 20px; }

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: #0099CC;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  text-decoration: none;
}

.card-category:hover { background: #FF6900; color: #fff; text-decoration: none; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-title a { color: #333333; text-decoration: none; }
.card-title a:hover { color: #0099CC; }

.card-excerpt {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 14px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: #999;
}

.card-meta time { color: #999; }

.read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FF6900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.read-more:hover { color: #0099CC; }

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333333;
  text-decoration: none;
  background: none;
  border: none;
  transition: color 0.2s;
}

.pagination a:hover { color: #0099CC; text-decoration: none; }
.pagination .current {
  color: #fff;
  background: #0099CC;
  border-radius: 4px;
}

/* Hide any li wrappers if internal template bleeds through */
.pagination li { list-style: none; display: inline; }

/* --- Single Article --- */
.article-header {
  background: #000;
  padding: 50px 20px 40px;
  text-align: center;
  color: #fff;
}

.article-header .article-cats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 2rem;
  color: #fff;
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.875rem;
  color: #CCCCCC;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-featured-image {
  max-height: 500px;
  overflow: hidden;
  background: #1a1a1a;
}

.article-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-content h1,
.article-content h2 {
  color: #333333;
  margin: 1.8em 0 0.6em;
  padding-bottom: 8px;
  border-bottom: 2px solid #0099CC;
}

.article-content h3,
.article-content h4 {
  color: #333333;
  margin: 1.4em 0 0.5em;
}

.article-content h1:first-child,
.article-content h2:first-child { margin-top: 0; }

.article-content p { margin-bottom: 1.3em; }

.article-content ul,
.article-content ol {
  margin: 0 0 1.3em 1.5em;
}

.article-content li { margin-bottom: 0.4em; }

.article-content blockquote {
  border-left: 4px solid #0099CC;
  padding: 12px 20px;
  margin: 1.5em 0;
  background: #f0f8fc;
  border-radius: 0 6px 6px 0;
  color: #555;
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.article-content th {
  background: #333333;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
}

.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #CCCCCC;
}

.article-content tr:nth-child(even) td { background: #f9f9f9; }

.article-content img {
  border-radius: 6px;
  margin: 1.2em auto;
}

.article-content a { color: #0099CC; font-weight: 500; }
.article-content a:hover { color: #FF6900; }

/* Affiliate link styling */
.article-content a[href*="amzn.to"] {
  background: #FF6900;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 700;
}

.article-content a[href*="amzn.to"]:hover {
  background: #e55f00;
  color: #fff;
  text-decoration: none;
}

/* --- Article Share Bar --- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid #CCCCCC;
  margin-top: 30px;
  flex-wrap: wrap;
}

.share-bar span { font-weight: 700; font-size: 0.875rem; color: #666; }

.share-btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.85; color: #fff; text-decoration: none; }
.share-btn.twitter { background: #000; }
.share-btn.facebook { background: #1877F2; }

/* --- Newsletter CTA Box --- */
.newsletter-cta {
  background: linear-gradient(135deg, #0099CC, #2E9FFF);
  color: #fff;
  padding: 36px 32px;
  border-radius: 8px;
  text-align: center;
  margin: 36px 0;
}

.newsletter-cta h3 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.newsletter-cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.newsletter-cta .btn-subscribe {
  display: inline-block;
  background: #FF6900;
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}

.newsletter-cta .btn-subscribe:hover {
  background: #e55f00;
  color: #fff;
  text-decoration: none;
}

/* --- Sidebar --- */
.sidebar { }

.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 28px;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0099CC;
  border-bottom: 2px solid #0099CC;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.recent-post-thumb {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a1a;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info { flex: 1; }

.recent-post-info a {
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  text-decoration: none;
}

.recent-post-info a:hover { color: #0099CC; }

.recent-post-info time {
  display: block;
  font-size: 0.72rem;
  color: #999;
  margin-top: 3px;
}

.category-list { list-style: none; }

.category-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
  font-size: 0.875rem;
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.category-list a:hover { color: #0099CC; }

.category-list .cat-count {
  font-size: 0.75rem;
  background: #f0f0f0;
  color: #666;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Ad placeholder */
.ad-placeholder {
  background: #f5f5f5;
  border: 2px dashed #CCCCCC;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  color: #999;
  font-size: 0.8rem;
  text-align: center;
}

/* --- Category / Archive Pages --- */
.page-header {
  background: linear-gradient(135deg, #000, #0099CC);
  padding: 50px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 0;
}

.page-header h1 { color: #fff; font-size: 2rem; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.8); }

/* --- About / Static Pages --- */
.page-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-content h1, .page-content h2 { color: #0099CC; margin-bottom: 16px; }
.page-content p { margin-bottom: 1.2em; }

/* --- Footer --- */
.site-footer {
  background: #111;
  color: #CCCCCC;
  padding: 48px 20px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: #999; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222;
  color: #CCCCCC;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover { background: #0099CC; color: #fff; }

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #999; font-size: 0.875rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #0099CC; }

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #666;
}

.footer-bottom a { color: #666; text-decoration: none; }
.footer-bottom a:hover { color: #0099CC; }

/* --- Utilities --- */
.text-teal { color: #0099CC; }
.text-orange { color: #FF6900; }
.bg-dark { background: #333333; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 3px;
}

.badge-teal { background: #0099CC; color: #fff; }
.badge-orange { background: #FF6900; color: #fff; }

/* Hype Cycle box */
.hype-cycle {
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 24px 0;
}

.hype-cycle h4 { color: #0099CC; margin-bottom: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.hype-cycle p { color: #CCCCCC; font-size: 0.9rem; margin-bottom: 0.6em; }
.hype-cycle strong { color: #FF6900; }

/* =============================================
   Amazon Product Cards
============================================= */
.amz-product-section {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border: 2px solid #0099CC;
  border-radius: 10px;
}

.amz-section-title {
  font-size: 1.2rem;
  color: #333333;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #CCCCCC;
  padding-bottom: 0.75rem;
}

.amz-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.amz-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fafafa;
}

.amz-card:hover {
  box-shadow: 0 4px 16px rgba(0,153,204,0.18);
  transform: translateY(-2px);
}

.amz-card-img-link {
  display: block;
  background: #fff;
  text-align: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.amz-card-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.amz-card-img-placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.amz-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}

.amz-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #333333;
  line-height: 1.3;
  text-decoration: none;
}

.amz-card-name:hover { color: #0099CC; text-decoration: none; }

.amz-card-desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
  flex: 1;
}

.amz-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: #FF6900;
  color: #fff !important;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.amz-card-btn:hover { background: #cc5400; color: #fff !important; }

.amz-disclaimer {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.5rem;
  font-style: italic;
}

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