/* === IT Assistance Hub | Microsoft Docs Style Theme (Light + Dark Mode) === */

/* === ROOT VARIABLES === */
:root {
  /* LIGHT MODE */
  --bg: #f8f9fb;
  --header-bg: #0a2540;
  --text-main: #1e293b;
  --text-secondary: #475569;
  --link: #2563eb;
  --accent: #3b82f6;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --radius: 10px;
  --font: "Inter", "Segoe UI", sans-serif;
}

/* === GLOBAL === */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

/* === HEADER === */
header {
  background:
    linear-gradient(rgba(10, 37, 64, 0.85), rgba(10, 37, 64, 0.85)),
    url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1600&q=80")
    center/cover no-repeat;
  color: #fff;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

header nav a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* === MAIN CONTENT === */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

section h2 {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--text-main);
}

/* === SEARCH === */
#search {
  text-align: center;
}

#search input {
  width: 70%;
  max-width: 480px;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  margin-right: 0.5rem;
}

#search button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#search button:hover {
  background: var(--link);
}

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.card a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card a:hover {
  text-decoration: underline;
}

/* === FOOTER === */
footer {
  background:
    linear-gradient(rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.9)),
    url("https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1600&q=80")
    center/cover no-repeat;
  background-blend-mode: overlay;
  color: #e2e8f0;
  text-align: center;
  padding: 1.8rem 1rem;
  font-size: 0.9rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* === ALERT BOXES === */
.warning-box {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  margin: 1.2rem 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
}
.warning-box::before { content: "⚠️ "; margin-right: 0.3rem; }

.info-box {
  background: #e0f2fe;
  border-left: 4px solid #3b82f6;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  margin: 1.2rem 0;
  color: #1e3a8a;
  font-size: 0.95rem;
  line-height: 1.6;
}
.info-box::before { content: "💡 "; margin-right: 0.3rem; }

.success-box {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  margin: 1.2rem 0;
  color: #065f46;
  font-size: 0.95rem;
  line-height: 1.6;
}
.success-box::before { content: "✅ "; margin-right: 0.3rem; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header nav {
    margin-top: 1rem;
  }

  #search input {
    width: 100%;
    margin-bottom: 0.6rem;
  }

  #search button {
    width: 100%;
  }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: #334155;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    --link: #60a5fa;
    --accent: #3b82f6;
  }

  body {
    background: var(--bg);
    color: var(--text-main);
  }

  section,
  .card {
    background: var(--card-bg);
    border-color: var(--border);
  }

  footer {
    background:
      linear-gradient(rgba(10, 37, 64, 0.95), rgba(10, 37, 64, 0.95)),
      url("https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1600&q=80")
      center/cover no-repeat;
    color: #cbd5e1;
  }

  .warning-box {
    background: #3b2f0b;
    border-left: 4px solid #fbbf24;
    color: #fde68a;
  }

  .info-box {
    background: #1e3a8a;
    border-left: 4px solid #60a5fa;
    color: #dbeafe;
  }

  .success-box {
    background: #064e3b;
    border-left: 4px solid #34d399;
    color: #a7f3d0;
  }
}
