/* AMRANI ENGINEERING & PROJECT MANAGEMENT AS — Unique Clean Nordic-Corporate Design 2026 (FIXED & IMPROVED) */
:root {
  --bg: #F8F6F1;
  --surface: #FFFFFF;
  --text: #1F2A36;
  --text-muted: #5C6B7A;
  --primary: #1E4D6B;
  --accent: #A8C5B8;
  --accent-dark: #7B9A8A;
  --border: #D9D4CC;
  --radius: 8px;
  --shadow: 0 4px 12px -2px rgba(31, 42, 54, 0.08);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Strong base typography */
h1 { font-size: 3.1rem; letter-spacing: -0.03em; font-weight: 700; line-height: 1.1; }
h2 { font-size: 2rem; letter-spacing: -0.025em; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }

p { margin-bottom: 1.15rem; }

a { color: var(--primary); transition: color .2s ease; }
a:hover { color: var(--accent-dark); }

/* Buttons — improved */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all .2s ease;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: #163C55;
  border-color: #163C55;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(30,77,107,0.04);
}

/* Sticky Sidebar Navigation — polished */
.sidebar-nav {
  position: sticky;
  top: 90px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.sidebar-nav a {
  display: block;
  padding: 0.55rem 1rem;
  margin: 0.1rem 0;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all .15s ease;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: #F0EDE6;
  color: var(--primary);
}

/* Cards — clean with good hover */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-image {
  overflow: hidden;
  position: relative;
}
.card-image img {
  transition: transform .6s cubic-bezier(0.23, 1, 0.32, 1);
  display: block;
  width: 100%;
}
.card:hover .card-image img {
  transform: scale(1.07);
}

/* Header */
header {
  background: rgba(248, 246, 241, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #F8F6F1 0%, #E8F0F7 100%);
}

/* Forms — better focus */
input, textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.1);
}

/* Article content — excellent readability */
.article-content {
  max-width: 720px;
  font-size: 1.08rem;
  line-height: 1.75;
}
.article-content h2 {
  margin-top: 2.8rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  font-size: 1.65rem;
}
.article-content ul, .article-content ol {
  margin: 1.3rem 0 1.3rem 1.4rem;
}
.article-content li {
  margin-bottom: 0.55rem;
}

/* Footer */
footer {
  background: #1F2A36;
  color: #C8C2B8;
}
footer a { color: #C8C2B8; }
footer a:hover { color: var(--accent); }

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* Category tags */
.tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: #E8F0F7;
  color: var(--primary);
  display: inline-block;
  width: fit-content;
}

/* Container utilities */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }

.prose {
  max-width: 65ch;
}
.prose p {
  margin-bottom: 1.15rem;
}

/* Additional polish */
.leading-tight { line-height: 1.15; }
.tracking-tight { letter-spacing: -0.025em; }