/* RÖK 5 - Stýringaráfangi Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #1a5f7a;
  --primary-light: #2e8eb8;
  --primary-dark: #0d3d4d;
  --accent: #57c5b6;
  --accent-light: #a6ede5;
  --warning: #f0a500;
  --success: #2d6a4f;
  --bg-light: #f8fafb;
  --bg-card: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #5a6672;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(26, 95, 122, 0.08);
  --shadow-hover: 0 8px 30px rgba(26, 95, 122, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* Navigation */
.nav {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.nav-brand svg {
  width: 36px;
  height: 36px;
}

.nav-brand span {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.nav-links a.active {
  background: var(--accent);
  color: var(--primary-dark);
}

/* Hamburger menu for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  padding: 4rem 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero .subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Page Header (for sub-pages) */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 3rem 2rem;
  color: white;
}

.page-header-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-header .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb a {
  color: white;
  text-decoration: none;
}

.page-header .breadcrumb a:hover {
  text-decoration: underline;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header .lead {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Main Content */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.main-narrow {
  max-width: 900px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

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

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 1rem;
}

/* Content Sections */
.content-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.content-section h2 .icon {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 1.5rem 0 0.75rem;
}

.content-section p {
  margin-bottom: 1rem;
}

.content-section ul, .content-section ol {
  margin: 1rem 0 1rem 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* Info Box */
.info-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.info-box.theory {
  background: #e8f5e9;
  border-left-color: var(--success);
}

.info-box.warning {
  background: #fff8e1;
  border-left-color: var(--warning);
}

.info-box-title {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.info-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* Skill Requirements */
.requirements-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.requirements-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.requirements-list li:last-child {
  border-bottom: none;
}

.requirements-list .check {
  width: 24px;
  height: 24px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.requirements-list .check svg {
  width: 14px;
  height: 14px;
  stroke: var(--primary-dark);
}

/* Delivery Box */
.delivery-box {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.delivery-box h3 {
  color: white;
  margin-top: 0;
}

.delivery-box ol {
  margin-left: 1.25rem;
}

.delivery-box li {
  margin-bottom: 0.5rem;
}

/* Navigation Cards */
.nav-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.nav-card:hover {
  background: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.nav-card.prev {
  justify-content: flex-start;
}

.nav-card.next {
  justify-content: flex-end;
  text-align: right;
}

.nav-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-card .title {
  font-weight: 600;
  color: var(--primary-dark);
}

/* Project Cards (L5) */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.project-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-image svg {
  width: 64px;
  height: 64px;
  stroke: white;
  opacity: 0.8;
}

.project-card-content {
  padding: 1.5rem;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: auto;
}

.footer p {
  opacity: 0.8;
  font-size: 0.9rem;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-cards {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 3rem 1.5rem;
  }
  
  .main {
    padding: 2rem 1rem;
  }
  
  .content-section {
    padding: 1.5rem;
  }
}

/* Code blocks */
code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-light);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Print styles */
@media print {
  .nav, .footer, .nav-cards {
    display: none;
  }
  
  .main {
    max-width: 100%;
    padding: 0;
  }
  
  .content-section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
