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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  font-size: 16px; /* Base font size for better mobile readability */
}

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

/* Header styles */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.site-logo { 
  display: flex; 
  align-items: center; 
  text-decoration: none; 
  color: #333; 
  font-size: 1.3rem; 
  font-weight: 700; 
}

.site-logo img { 
  max-height: 35px; 
  margin-right: 10px; 
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  padding: 8px;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
}

.mobile-menu-toggle:hover {
  background-color: #f8f9fa;
}

nav ul { 
  list-style: none; 
  display: flex; 
  gap: 20px; 
}

nav ul li a { 
  text-decoration: none; 
  color: #333; 
  font-weight: 500; 
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 4px;
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
}

nav ul li a:hover { 
  color: #007bff; 
  background-color: #f8f9fa;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 60px 0;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Search Container */
.search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

#search-input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #333;
  outline: none;
  min-height: 50px;
}

#search-input::placeholder {
  color: #666;
  opacity: 0.8;
}

#search-button {
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  min-height: 50px;
  min-width: 50px;
}

#search-button:hover {
  color: #007bff;
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: none;
  padding: 15px 20px;
  margin-top: 2px;
  z-index: 100;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
  font-size: 0.9rem;
}

.clear-search {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.clear-search:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Search Highlights */
mark {
  background-color: #fff3cd;
  color: #856404;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 500;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results-content h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.no-results-content p {
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.category-link {
  padding: 10px 20px;
  background-color: #f8f9fa;
  color: #007bff;
  text-decoration: none;
  border-radius: 25px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-link:hover {
  background-color: #007bff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Posts Section */
.posts-section {
  margin-top: 40px;
}

/* Post Grid Layout */
.post-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

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

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.post-card-content {
  padding: 25px;
}

.post-card-title {
  margin-bottom: 15px;
}

.post-card-title a {
  color: #222;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}

.post-card-title a:hover {
  color: #007bff;
}

.post-card-excerpt {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

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

.read-more {
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.read-more:hover {
  text-decoration: underline;
  background-color: #f8f9fa;
}

/* Page content styles */
.page-content {
  background-color: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  color: #222;
  line-height: 1.2;
}

.page-content h2 {
  font-size: 1.8rem;
  margin: 35px 0 20px;
  color: #222;
  line-height: 1.3;
}

.page-content h3 {
  font-size: 1.4rem;
  margin: 25px 0 15px;
  color: #222;
  line-height: 1.4;
}

.page-content h4 {
  font-size: 1.2rem;
  margin: 20px 0 10px;
  color: #222;
  line-height: 1.4;
}

.page-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.page-content ul,
.page-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.page-content ul li,
.page-content ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.page-content a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s;
}

.page-content a:hover {
  color: #0056b3;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .page-content {
    padding: 25px 20px;
  }
  
  .page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  
  .page-content h2 {
    font-size: 1.5rem;
    margin: 25px 0 15px;
  }
  
  .page-content h3 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
  }
  
  .page-content p {
    font-size: 1rem;
  }
}

/* Main content styles */
.main-content { 
  padding: 40px 0; 
}

article { 
  background-color: #fff; 
  padding: 40px; 
  border-radius: 12px; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
  max-width: 800px;
  margin: 0 auto;
}

h1 { 
  font-size: 2.5rem; 
  margin-bottom: 25px; 
  color: #222; 
  line-height: 1.2;
}

h2 { 
  font-size: 1.8rem; 
  margin: 35px 0 20px; 
  color: #222; 
  line-height: 1.3;
}

h3 { 
  font-size: 1.4rem; 
  margin: 25px 0 15px; 
  color: #222; 
  line-height: 1.4;
}

p { 
  margin-bottom: 20px; 
  font-size: 1.1rem; 
  line-height: 1.7;
}

a { 
  color: #007bff; 
  text-decoration: none; 
  transition: color 0.3s; 
}

a:hover { 
  color: #0056b3; 
  text-decoration: underline; 
}

ul, ol { 
  margin-bottom: 20px; 
  padding-left: 25px; 
}

ul li, ol li { 
  margin-bottom: 8px; 
  line-height: 1.6;
}

/* Code blocks */
code {
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
}

pre {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* FAQ Section */
.faq-section { 
  margin-top: 40px;
  margin-bottom: 40px;
}

.faq-item { 
  margin-bottom: 25px; 
  border: 1px solid #eee;
  border-left: 4px solid #007bff;
  border-radius: 8px;
  padding: 25px;
  background-color: #fafafa;
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question { 
  font-size: 1.2rem; 
  font-weight: 600; 
  margin-bottom: 15px; 
  margin-top: 0;
  color: #222;
  line-height: 1.4;
}

.faq-answer { 
  font-size: 1rem; 
  color: #444; 
  line-height: 1.7;
}

.faq-answer div[itemprop="text"] {
  margin-top: 10px;
}

/* Legacy FAQ support - keep for backward compatibility */
.wp-block-rank-math-faq-block { 
  margin-top: 40px; 
}

.rank-math-faq-item { 
  margin-bottom: 25px; 
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  background-color: #fafafa;
}

.rank-math-question { 
  font-size: 1.2rem; 
  font-weight: 600; 
  margin-bottom: 15px; 
  color: #222; 
}

.rank-math-answer { 
  font-size: 1rem; 
  color: #444; 
  line-height: 1.6;
}

/* Social Media Links */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: #444;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-height: 44px;
  white-space: nowrap;
}

.social-link:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.social-link.youtube:hover {
  background-color: #ff0000;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.social-link.twitter:hover {
  background-color: #1da1f2;
  box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.social-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 20px;
  }
  
  .social-link {
    justify-content: center;
    min-width: 140px;
  }
  
  .footer-section h3,
  .footer-section h4 {
    margin-bottom: 15px;
  }
}

/* Footer styles */
.site-footer { 
  background-color: #333; 
  color: #fff; 
  padding: 40px 0 20px; 
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: #007bff;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.footer-section h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-section p {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 15px;
}

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

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  padding: 5px 0;
}

.footer-section ul li a:hover {
  color: #007bff;
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p { 
  font-size: 0.9rem; 
  opacity: 0.8;
  margin-bottom: 15px;
}

.footer-bottom small {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
  .container {
    padding: 0 25px;
  }
  
  .post-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  /* Header responsive */
  .site-header {
    padding: 12px 0;
  }
  
  .site-header .container { 
    flex-direction: row;
    justify-content: space-between;
  }
  
  .site-logo {
    font-size: 1.2rem;
  }
  
  .site-logo img {
    max-height: 30px;
  }
  
  /* Search responsive */
  .search-container {
    padding: 0 20px;
  }
  
  .search-box {
    border-radius: 25px;
  }
  
  #search-input {
    padding: 14px 20px;
    font-size: 0.95rem;
    min-height: 44px;
  }
  
  #search-button {
    padding: 14px 18px;
    min-height: 44px;
    min-width: 44px;
  }
  
  .search-results {
    margin: 0 20px;
    left: 0;
    right: 0;
  }
  
  .category-links {
    flex-direction: column;
    align-items: center;
  }
  
  .category-link {
    min-width: 200px;
    text-align: center;
  }
  
  /* Mobile navigation */
  .mobile-menu-toggle {
    display: block;
  }
  
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
  }
  
  nav.active {
    display: block;
  }
  
  nav ul { 
    flex-direction: column;
    padding: 20px;
    gap: 0;
  }
  
  nav ul li {
    border-bottom: 1px solid #eee;
  }
  
  nav ul li:last-child {
    border-bottom: none;
  }
  
  nav ul li a {
    display: block;
    padding: 15px 0;
    color: #333;
  }
  
  /* Hero responsive */
  .hero {
    padding: 40px 0;
  }
  
  .hero h1 { 
    font-size: 2rem; 
    margin-bottom: 15px;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  /* Content responsive */
  .container { 
    padding: 0 15px; 
  }
  
  .main-content {
    padding: 25px 0;
  }
  
  article {
    padding: 25px 20px;
  }
  
  h1 { 
    font-size: 1.8rem; 
    margin-bottom: 20px;
  }
  
  h2 { 
    font-size: 1.5rem; 
    margin: 25px 0 15px;
  }
  
  h3 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
  }
  
  p {
    font-size: 1rem;
  }
  
  /* Post grid responsive */
  .post-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 25px;
  }
  
  .post-card-content {
    padding: 20px;
  }
  
  .post-card-title a {
    font-size: 1.15rem;
  }
  
  .post-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  /* Table responsive */
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  article {
    padding: 20px 15px;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  .post-card-content {
    padding: 15px;
  }
  
  .post-card-title a {
    font-size: 1.1rem;
  }
}

/* YouTube Integration Styles */
.youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 25px 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.youtube-button {
  display: inline-block;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 10px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.youtube-button:before {
  content: "\25B6";
  margin-right: 8px;
  font-size: 1.1em;
}

.youtube-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
  text-decoration: none;
  color: white;
}

.youtube-button:focus {
  outline: 2px solid #ff0000;
  outline-offset: 2px;
}

/* YouTube call-to-action sections */
.youtube-cta {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #ff0000;
  padding: 20px;
  margin: 30px 0;
  border-radius: 8px;
  text-align: center;
}

.youtube-cta h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.youtube-cta p {
  color: #666;
  margin-bottom: 20px;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .youtube-embed {
    margin: 20px 0;
  }
  
  .youtube-button {
    width: 100%;
    margin: 15px 0;
  }
  
  .youtube-cta {
    margin: 20px 0;
    padding: 15px;
  }
}

/* Amazon affiliate button styling */
.amazon-button {
  display: inline-block;
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 10px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.amazon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
  text-decoration: none;
  color: white;
}

.amazon-button:focus {
  outline: 2px solid #ff9500;
  outline-offset: 2px;
}

/* Affiliate disclosure styling */
.affiliate-disclosure {
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 15px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: #666;
  border-radius: 0 4px 4px 0;
}

/* Product comparison table */
.product-table {
  overflow-x: auto;
  margin: 20px 0;
}

.product-table table {
  width: 100%;
  min-width: 600px;
}

.product-table th {
  background-color: #007bff;
  color: white;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #333;
  color: white;
  padding: 15px 20px;
  display: none;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-banner-text a {
  color: #007bff;
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s;
  min-height: 44px;
}

.cookie-btn-accept {
  background-color: #007bff;
  color: white;
}

.cookie-btn-accept:hover {
  background-color: #0056b3;
}

.cookie-btn-decline {
  background-color: transparent;
  color: white;
  border: 1px solid #666;
}

.cookie-btn-decline:hover {
  background-color: #666;
}

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner-buttons {
    justify-content: center;
    width: 100%;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: 120px;
  }
}

/* Focus states for accessibility */
a:focus, button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .mobile-menu-toggle {
    display: none;
  }
  
  body {
    background-color: white;
    color: black;
  }
  
  article {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}