/* WordPress Tutorial Series - Main Stylesheet */
/* Reset and Base Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Trebuchet MS', 'Lucida Sans Unicode', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  padding: 0;
  margin: 0;
}

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
}

/* Navigation Bar */
.tutorial-navigation {
  background: linear-gradient(135deg, #0073aa 0%, #21759b 100%);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tutorial-navigation a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: rgba(255,255,255,0.1);
}

.tutorial-navigation a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.nav-home {
  font-weight: bold;
}

.nav-previous::before {
  content: "←";
}

.nav-next::after {
  content: "→";
}

@media (max-width: 768px) {
  .tutorial-navigation {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .tutorial-navigation a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Headers */
header, .hero {
  background: linear-gradient(135deg, #0073aa 0%, #21759b 100%);
  color: white;
  text-align: center;
  padding: 60px 40px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.3;
  margin: 1.5rem 0 1rem 0;
}

h1 {
  font-size: 2.5rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin: 0 0 20px 0;
}

h2 {
  font-size: 1.8rem;
  color: #0073aa;
  padding: 15px 0;
  border-bottom: 2px solid #f0f0f0;
}

h3 {
  font-size: 1.4rem;
  color: #21759b;
  margin-top: 2rem;
}

h4 {
  font-size: 1.2rem;
  color: #333;
}

header h1 {
  margin-bottom: 10px;
}

header p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin: 0;
}

/* Main Content Area */
main {
  padding: 40px;
  background: white;
}

section {
  margin-bottom: 3rem;
}

/* Paragraphs and Text */
p {
  margin: 1rem 0;
  color: #555;
  line-height: 1.8;
}

strong {
  font-weight: 600;
  color: #333;
}

em {
  font-style: italic;
}

/* Links */
a {
  color: #0073aa;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #005a87;
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 1rem 0 1rem 2rem;
}

ul li, ol li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

ul li {
  list-style-type: disc;
}

ol li {
  list-style-type: decimal;
}

/* Code Blocks */
pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 5px;
  padding: 20px;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
}

code {
  background: #f8f9fa;
  color: #d63384;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

pre code {
  background: none;
  color: #2d3748;
  padding: 0;
}

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

table, td, tr, th {
  border: 1px solid #dee2e6;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  padding: 12px;
  text-align: left;
}

td {
  padding: 10px;
}

/* Canvas Responsive Container */
.canvas-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 2rem auto;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
}

/* Responsive Canvas Wrapper */
.responsive-canvas {
  position: relative;
  width: 100%;
  padding-bottom: 60%; /* Aspect ratio 5:3 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
}

.responsive-canvas canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Tutorial Cards Grid */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  padding: 40px;
}

.tutorial-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #f0f0f0;
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  border-color: #0073aa;
}

.tutorial-header {
  padding: 25px 25px 20px 25px;
  border-bottom: 2px solid #f0f0f0;
}

.tutorial-number {
  background: linear-gradient(135deg, #0073aa, #21759b);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 15px;
}

.tutorial-card h2 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.4em;
  border: none;
  padding: 0;
}

.tutorial-card h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.tutorial-card h2 a:hover {
  color: #0073aa;
  text-decoration: none;
}

.tutorial-description {
  color: #666;
  font-size: 0.95em;
  line-height: 1.5;
  margin: 0;
}

.tutorial-content {
  padding: 20px 25px;
}

.tutorial-topics {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.tutorial-topics li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  font-size: 0.9em;
  margin: 0;
}

.tutorial-topics li:last-child {
  border-bottom: none;
}

.tutorial-topics li::before {
  content: "✓";
  color: #4caf50;
  font-weight: bold;
  margin-right: 8px;
}

.tutorial-footer {
  background: #f9f9f9;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.difficulty {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
}

.difficulty.beginner {
  background: #e8f5e8;
  color: #2e7d32;
}

.difficulty.intermediate {
  background: #fff3e0;
  color: #f57c00;
}

.difficulty.advanced {
  background: #ffebee;
  color: #d32f2f;
}

.duration {
  color: #666;
  font-size: 0.9em;
}

/* Progress Section */
.progress-section {
  background: #f9f9f9;
  padding: 40px;
  text-align: center;
}

.progress-title {
  font-size: 1.8em;
  margin-bottom: 30px;
  color: #333;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.stat-card {
  background: rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Footer */
footer, .footer-section {
  background: #333;
  color: white;
  padding: 30px 40px;
  text-align: center;
}

footer p {
  color: white;
  margin: 0.5rem 0;
}

/* Mermaid Diagrams */
.mermaid {
  margin: 2rem auto;
  padding: 20px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-align: center;
  overflow-x: auto;
}

/* Blockquotes */
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-left: 4px solid #0073aa;
  color: #555;
  font-style: italic;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    margin: 20px;
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }
  
  .container {
    margin: 0;
    border-radius: 0;
  }
  
  header, .hero {
    padding: 40px 20px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  main {
    padding: 20px;
  }
  
  .tutorials-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  pre {
    padding: 15px;
    font-size: 0.85em;
  }
  
  .responsive-canvas {
    padding-bottom: 75%; /* Adjust aspect ratio for mobile */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .tutorial-card {
    margin: 0 10px;
  }
  
  .tutorials-grid {
    gap: 20px;
    padding: 15px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  
  .container {
    box-shadow: none;
    border-radius: 0;
  }
  
  .tutorial-navigation {
    display: none;
  }
  
  .tutorial-card {
    page-break-inside: avoid;
  }
}