﻿/* Infotéka SQL Szerver Migráló - Modern Help Site Styles */

:root {
  --primary-color: #15487F;
  --secondary-color: #1E6BB8;
  --accent-color: #2E8BC0;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --medium-text: #495057;
  --border-color: #dee2e6;
  --sidebar-width: 280px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background: var(--light-bg);
}

.container {
  display: flex;
  min-height: 100vh;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

header h1 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 15px;
  letter-spacing: 0.3px;
}

/* Logo képfájl betöltése - ez lesz a fő logo display */
.logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  vertical-align: middle;
  display: block;
}

/* Fallback ha nincs kép - szöveges logo (CSS-ben rejtett img esetén) */
.logo-text {
  height: 40px;
  width: 40px;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #4A5F70;
  padding: 5px;
}

/* Cím és alcím konténer */
.header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-subtitle {
  font-size: 11px;
  font-weight: normal;
  opacity: 0.85;
  margin: 0;
}

/* Logo és cím közötti elválasztó vonal (opcionális elem) */
.header-separator {
  width: 1px;
  height: 35px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 5px;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: white;
  position: fixed;
  top: 85px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  padding: 1.5rem 0;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li {
  margin: 0.25rem 0;
}

.sidebar nav ul li a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--dark-text);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar nav ul li a:hover {
  background: var(--light-bg);
  border-left-color: var(--accent-color);
  color: var(--primary-color);
}

.sidebar nav ul li a.active {
  background: var(--light-bg);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
}

.sidebar nav ul li.submenu {
  margin-left: 1rem;
}

.sidebar nav ul li.submenu a {
  font-size: 0.9rem;
  padding: 0.5rem 1.5rem;
}

/* Main Content */
main {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: 85px;
  padding: 2rem;
  max-width: 1200px;
}

.content-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-color);
}

h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem 0;
}

h4 {
  color: var(--dark-text);
  font-size: 1.2rem;
  margin: 1rem 0 0.5rem 0;
}

p {
  margin-bottom: 1rem;
  color: var(--medium-text);
}

/* Cards/Boxes - egyszerűbb, klasszikus stílus */
.card {
  background: #F9F9F9;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 15px;
  margin: 15px 0;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}

.card h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
}

.card-icon {
  font-size: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

/* Info boxes - Infotéka stílusban */
.info-box {
  border: 1px solid #B8D4E8;
  background: #EBF4FA;
  padding: 12px 15px;
  margin: 15px 0;
  border-radius: 3px;
  border-left: 4px solid var(--primary-color);
}

.warning-box {
  border: 1px solid #FFD699;
  background: #FFF4E0;
  padding: 12px 15px;
  margin: 15px 0;
  border-radius: 3px;
  border-left: 4px solid var(--warning-color);
}

.danger-box {
  border: 1px solid #FFCCCC;
  background: #FFE6E6;
  padding: 12px 15px;
  margin: 15px 0;
  border-radius: 3px;
  border-left: 4px solid var(--danger-color);
}

.success-box {
  border: 1px solid #B8E6B8;
  background: #E6F9E6;
  padding: 12px 15px;
  margin: 15px 0;
  border-radius: 3px;
  border-left: 4px solid var(--success-color);
}

.box-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* Lists */
ul, ol {
  margin: 1rem 0 1rem 2rem;
  color: var(--medium-text);
}

ul li, ol li {
  margin: 0.5rem 0;
}

/* Code blocks */
code {
  background: var(--light-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  color: var(--danger-color);
}

pre {
  background: #282c34;
  color: #abb2bf;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table th {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

table tr:hover {
  background: var(--light-bg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Icons */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* Step indicators */
.step-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Breadcrumbs */
.breadcrumb {
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--medium-text);
  margin: 0 0.5rem;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  padding: 2rem;
  text-align: center;
  margin-left: var(--sidebar-width);
  margin-top: 2rem;
}

footer p {
  color: white;
  margin-bottom: 0.5rem;
}

footer a {
  color: white;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  main, footer {
    margin-left: 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  /* Kereső mobilon */
  .search-container {
    padding: 0.75rem 1rem;
  }
  
  .search-results {
    max-height: 250px;
  }
  
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--light-bg);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--medium-text);
}

/* Print styles */
@media print {
  .sidebar, header, footer {
    display: none;
  }
  
  main {
    margin: 0;
    padding: 0;
  }
  
  .content-section {
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ============================================
   ÚJDONSÁGOK - Vissza az elejére és keresés
   ============================================ */

/* Vissza az elejére gomb */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 999;
}

#back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

#back-to-top.show {
  display: flex;
  animation: fadeInUp 0.4s ease;
}

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

/* Keresés doboz a sidebar tetején */
.search-container {
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(21, 72, 127, 0.1);
  background: #FAFBFC;
}

.search-box input::placeholder {
  color: #999;
  font-style: italic;
}

.search-box .search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--medium-text);
  font-size: 18px;
  pointer-events: none;
}

.search-results {
  margin-top: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  display: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.search-result-item:hover {
  background: var(--light-bg);
}

.search-result-item .result-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.search-result-item .result-description {
  font-size: 0.8rem;
  color: var(--medium-text);
  margin: 0.25rem 0;
  line-height: 1.3;
}

.search-result-item .result-path {
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.25rem;
}

.search-result-item .result-excerpt {
  font-size: 0.8rem;
  color: var(--medium-text);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.search-highlight {
  background: #fff59d;
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 600;
}

.search-results-count {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--medium-text);
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--medium-text);
  font-style: italic;
  font-size: 0.9rem;
}

/* Breadcrumb fejlesztés - könnyebb navigáció */
.breadcrumb {
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Tartalomjegyzék automatikus generálás támogatása */
.toc-container {
  background: var(--light-bg);
  border-left: 3px solid var(--primary-color);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.toc-container h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin: 0.5rem 0;
}

.toc-list a {
  color: var(--dark-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
