/* ========================================
   SEO Network Site - Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #1a365d;
  --secondary-color: #2c5282;
  --accent-color: #ed8936;
  --text-color: #2d3748;
  --text-light: #718096;
  --bg-color: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --success-color: #38a169;
  --warning-color: #d69e2e;
  --font-heading: 'Prompt', sans-serif;
  --font-body: 'Sarabun', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

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

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

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

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

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.logo span {
  color: var(--accent-color);
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

.main-nav a:hover {
  color: #fff;
}

.main-nav a:hover::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 4rem 0;
  color: #fff;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
}

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

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb li::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb a {
  color: var(--text-light);
}

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

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.category-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.article-tag {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

/* Content Area */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  padding: 3rem 0;
}

.main-content {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 1rem;
}

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

.sidebar-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

/* Article Content */
.article-content {
  font-size: 1.05rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

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

.article-content ul, .article-content ol {
  margin: 1rem 0 1rem 2rem;
}

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

.article-content blockquote {
  background: var(--bg-color);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.faq-item {
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--border-color);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-light);
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.warning-box {
  background: linear-gradient(135deg, #fffaf0 0%, #fefcbf 100%);
  border-left: 4px solid var(--warning-color);
  padding: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

/* Table */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

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

.content-table th {
  background: var(--primary-color);
  color: #fff;
}

.content-table tr:hover {
  background: var(--bg-color);
}

/* Pros & Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.pros, .cons {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
}

.pros {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
}

.cons {
  background: #fff5f5;
  border: 1px solid #feb2b2;
}

.pros h4, .cons h4 {
  margin-bottom: 1rem;
}

.pros h4 { color: var(--success-color); }
.cons h4 { color: #e53e3e; }

.pros ul, .cons ul {
  list-style: none;
  margin: 0;
}

.pros li::before {
  content: '✓ ';
  color: var(--success-color);
  font-weight: bold;
}

.cons li::before {
  content: '✗ ';
  color: #e53e3e;
  font-weight: bold;
}

/* CTA Button */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background: #dd6b20;
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary-color);
  color: #fff;
}

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

/* CTA Button - Hero & Inline */
.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #f6ad55 0%, #ed8936 50%, #dd6b20 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: 1rem;
}

.cta-button:hover {
  background: linear-gradient(135deg, #dd6b20 0%, #c05621 50%, #9c4221 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(237, 137, 54, 0.5);
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  padding: 2.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-lg);
}

.cta-box h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
}

.cta-box .cta-button {
  margin-top: 0;
}

/* CTA Card */
.cta-card {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%) !important;
  color: #fff !important;
  border: none !important;
}

.cta-card .card-title,
.cta-card .card-excerpt {
  color: #fff !important;
}

.cta-card:hover {
  background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%) !important;
}

/* Footer */
.site-footer {
  background: var(--primary-color);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: rgba(255,255,255,0.7);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(44,82,130,0.1);
}

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

/* Section Spacing */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  
  .main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 2.2rem; }
  
  .main-content { padding: 1.5rem; }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .category-grid, .article-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Print Styles */
@media print {
  .site-header, .site-footer, .sidebar {
    display: none;
  }
  
  .main-content {
    box-shadow: none;
    padding: 0;
  }
}
