/* Main Styles for WordPress Training Website */

:root {
  --primary-color: #2271b1;
  --secondary-color: #135e96;
  --accent-color: #72aee6;
  --text-color: #333;
  --light-gray: #f0f0f1;
  --medium-gray: #dcdcde;
  --dark-gray: #50575e;
  --success-color: #00a32a;
  --warning-color: #dba617;
  --error-color: #d63638;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: Consolas, Monaco, monospace;
}

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

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

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
  max-width: 100%;
  overflow-x: hidden;
}

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

h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--medium-gray);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  background-color: var(--light-gray);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

pre {
  background-color: var(--light-gray);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
  color: var(--dark-gray);
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 1.5rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.logo:hover {
  color: white;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0 0 0 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  color: var(--light-gray);
  text-decoration: none;
}

main {
  padding: 2rem 0;
  min-height: calc(100vh - 60px - 100px);
}

.sidebar {
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  padding-right: 1rem;
}

.content {
  padding-left: 1rem;
}

footer {
  background-color: var(--light-gray);
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--medium-gray);
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  flex: 1 0 0%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-3 {
  flex: 0 0 25%;
  max-width: 25%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-9 {
  flex: 0 0 75%;
  max-width: 75%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Components */
.card {
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card h3 {
  margin-top: 0;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--medium-gray);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--dark-gray);
  color: white;
}

.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.alert-info {
  background-color: #e5f5fa;
  border-left: 4px solid var(--accent-color);
}

.alert-success {
  background-color: #edfaef;
  border-left: 4px solid var(--success-color);
}

.alert-warning {
  background-color: #fcf9e8;
  border-left: 4px solid var(--warning-color);
}

.alert-error {
  background-color: #fcebec;
  border-left: 4px solid var(--error-color);
}

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

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--medium-gray);
}

th {
  background-color: var(--light-gray);
  font-weight: 600;
}

tr:hover {
  background-color: #f8f8f8;
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

/* Navigation Sidebar */
.sidebar-nav {
  list-style: none;
  padding-left: 0;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.sidebar-nav a:hover {
  background-color: var(--light-gray);
  text-decoration: none;
}

.sidebar-nav a.active {
  background-color: var(--accent-color);
  color: white;
}

.sidebar-nav .section-title {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
}

/* Code Highlighting */
.highlight {
  background-color: #f8f8f8;
  border-radius: 5px;
  margin-bottom: 1.5rem;
}

.highlight pre {
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .col-3, .col-4, .col-8, .col-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .sidebar {
    position: static;
    height: auto;
    margin-bottom: 2rem;
  }
  
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    flex-direction: column;
    margin-top: 1rem;
  }
  
  nav li {
    margin: 0.5rem 0 0 0;
  }
}

/* Print Styles */
@media print {
  header, footer, .sidebar {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .col-3, .col-4, .col-8, .col-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  a {
    color: var(--text-color);
    text-decoration: none;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
  }
  
  a[href^="#"]:after {
    content: "";
  }
  
  img {
    page-break-inside: avoid;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid var(--medium-gray);
  }
}
