/* ============================================
   Instrukcja obsługi Joomla - Style
   ============================================ */

:root {
  --blue: #1a4a8a;
  --blue-light: #2c6eb5;
  --blue-pale: #e8f0fb;
  --green: #2e7d32;
  --orange: #e65100;
  --gray: #666;
  --gray-light: #f5f5f5;
  --border: #ddd;
  --text: #222;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: #f8f9fa;
}

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

/* HEADER */
.site-header {
  background: var(--blue);
  color: #fff;
  padding: 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 10px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.2s;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.2);
}

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.1rem;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: #fff;
  padding: 50px 30px;
  border-radius: var(--radius);
  margin: 30px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 25px;
}

/* WYSZUKIWARKA */
.search-box input {
  width: 100%;
  max-width: 500px;
  padding: 14px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 30px;
  outline: none;
  box-shadow: var(--shadow);
}

/* KATEGORIE */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.category-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border-top: 4px solid var(--blue);
}

.category-title {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

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

.faq-item {
  border-bottom: 1px dotted var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 5px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.faq-item a:hover {
  color: var(--blue);
}

.faq-title {
  flex: 1;
}

/* POZIOM TRUDNOŚCI */
.difficulty-dot {
  font-size: 0.7rem;
  letter-spacing: -2px;
  margin-left: 8px;
}

.difficulty-latwe { color: var(--green); }
.difficulty-srednie { color: #f57f00; }
.difficulty-zaawansowane { color: #c62828; }

/* LEGENDA */
.legend {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin: 10px 0 30px;
}

/* ARTYKUŁ FAQ */
.faq-article {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin: 20px 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 15px;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.faq-header h1 {
  font-size: 1.8rem;
  color: var(--blue);
  margin-bottom: 10px;
}

.faq-desc {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 10px;
}

.faq-meta {
  margin-bottom: 25px;
}

.badge {
  display: inline-block;
  background: var(--blue-pale);
  color: var(--blue);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 8px;
  font-weight: 600;
}

/* TREŚĆ FAQ */
.faq-content {
  border-top: 2px solid var(--blue-pale);
  padding-top: 25px;
}

.faq-content h2 {
  color: var(--blue);
  font-size: 1.3rem;
  margin: 25px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--blue);
}

.faq-content h3 {
  color: #444;
  font-size: 1.1rem;
  margin: 20px 0 8px;
}

.faq-content p {
  margin-bottom: 15px;
}

.faq-content ul, .faq-content ol {
  margin: 10px 0 15px 25px;
}

.faq-content li {
  margin-bottom: 6px;
}

.faq-content img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 15px 0;
  border: 1px solid var(--border);
}

.faq-content strong {
  color: var(--blue);
}

/* OSTRZEŻENIA I WSKAZÓWKI */
.faq-content blockquote {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 15px 0;
}

/* TIP - użyj > 💡 tekst */
.faq-content blockquote p {
  margin: 0;
}

/* KROKI */
.faq-content ol li {
  padding: 4px 0;
  font-size: 1rem;
}

/* KOMENDY/KOD */
.faq-content code {
  background: var(--gray-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #c62828;
}

.faq-content pre {
  background: #1e1e1e;
  color: #f0f0f0;
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 15px 0;
}

.faq-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* NAWIGACJA FAQ */
.faq-nav {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-weight: 600;
}

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

.btn-home:hover {
  background: var(--blue-light);
}

/* TABELA FAQ */
.faq-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-table th {
  background: var(--blue);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
}

.faq-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

.faq-table tr:hover td {
  background: var(--blue-pale);
}

.faq-table a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

/* WYNIKI WYSZUKIWANIA */
#search-results h2 {
  color: var(--blue);
  margin: 20px 0 10px;
}

#search-list {
  list-style: none;
}

#search-list li {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

#search-list a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

/* MAIN CONTENT */
.main-content {
  padding: 20px 0 50px;
  min-height: calc(100vh - 200px);
}

/* FOOTER */
.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--blue);
    padding: 10px;
    z-index: 200;
  }
  .main-nav.open { display: flex; }
  .categories-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .faq-article { padding: 20px 15px; }
  .faq-header h1 { font-size: 1.4rem; }
}
