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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 3rem 0;
}

.search-section {
    margin-bottom: 3rem;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background-color: var(--secondary-color);
}

.search-results {
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-result-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.search-result-item:hover {
    box-shadow: var(--shadow-lg);
}

.search-result-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.search-result-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    color: var(--text-light);
    padding: 1rem;
}

.categories {
    margin-bottom: 3rem;
}

.categories h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

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

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.category-card p {
    color: var(--text-light);
}

.guides-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.guides-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

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

.guide-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.guide-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.guide-card .meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.guide-card .category-tag {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

footer {
    background: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .category-grid,
    .guides-list {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }
}
/* ==========================================================================
   MOBILE & TABLET RESPONSIVE OVERRIDES
   Append this to the very bottom of your global stylesheet
   ========================================================================== */

/* 1. TABLET & LARGE PHONES (Breakpoints smaller than 768px) */
@media screen and (max-width: 768px) {
  
  /* Reset layout grids/flexboxes to single column */
  .site-wrapper, 
  .main-content-layout {
    display: block;
    width: 100%;
    padding: 0 15px; /* Keeps content from hugging the glass edge */
  }

  /* Stack sidebars or navigation panels below/above main text */
  aside, .sidebar, .navigation-panel {
    width: 100%;
    float: none;
    margin: 20px 0;
  }

  /* Optimize technical typography for readability */
  body {
    font-size: 16px; /* Great baseline for mobile scanning */
    line-height: 1.6;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  /* Ensure step-by-step tutorial lists or how-to steps have plenty of breathing room */
  ol, ul {
    padding-left: 20px;
  }
  
  li {
    margin-bottom: 12px; /* Easier to read steps on small displays */
  }

  /* Force technical tables to scroll horizontally instead of squishing text */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */    margin-bottom: 20px;
  }
  
  table {
    min-width: 500px; /* Prevents columns from choking */
  }
}

/* 2. SMALL PHONES (Breakpoints smaller than 480px) */
@media screen and (max-width: 480px) {
  
  /* Make buttons massive touch targets */
  .btn, button, .cta-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    box-sizing: border-box;
    font-size: 1.1rem;
  }
  
  /* Adjust images so they never overflow the viewport */
  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
  }
}

