/* Intranet styles — extends ../styles.css */

/* ── Page background — subtle grid pattern over light gray ───── */
body {
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(0, 51, 102, 0.06), transparent 60%),
    radial-gradient(900px 500px at 100% -5%, rgba(255, 136, 0, 0.05), transparent 55%),
    var(--light-gray);
}

.container {
  max-width: 1180px;
}

/* ── Header ───────────────────────────────────────────────────── */
.intranet-header {
  position: relative;
  overflow: hidden;
  padding: 44px 32px 36px;
  background:
    linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #00599e 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
  margin-bottom: 24px;
}

.header-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 110%, rgba(255, 136, 0, 0.18), transparent 45%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 14px
    );
  pointer-events: none;
}

.header-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  z-index: 1;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-text {
  text-align: left;
}

.header-text h1 {
  font-size: 2.6rem;
  margin: 0;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.header-text .tagline {
  margin-top: 6px;
  font-size: 0.95rem;
  opacity: 0.88;
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* ── Navigation pills ─────────────────────────────────────────── */
.intranet-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.intranet-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.intranet-nav a:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

/* ── Status Bar ───────────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #f0faf1, #e8f5e9);
  border: 1px solid #c5e1c8;
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(46, 125, 50, 0.08);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #43a047;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.05); }
}

.status-text {
  font-size: 0.85rem;
  color: #1f5723;
  font-weight: 400;
  flex-grow: 1;
}

.status-text strong {
  font-weight: 600;
  color: #2e7d32;
}

.status-meta {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: #5a7a5d;
  background: rgba(255, 255, 255, 0.6);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

/* ── Section Headers ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-lead {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: #6a737d;
}

.section-subtitle {
  font-size: 0.72rem;
  color: #888;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--light-gray);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e6e8eb;
  white-space: nowrap;
  align-self: center;
}

/* ── Tool Cards ───────────────────────────────────────────────── */
.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8ebee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

/* Top accent bar — colored per category */
.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent, var(--primary));
  opacity: 0.85;
  transition: opacity 0.25s ease, height 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  color: inherit;
  border-color: transparent;
}

.tool-card:hover::before {
  height: 6px;
  opacity: 1;
}

.tool-card--pm        { --accent: #003366; --accent-soft: rgba(0, 51, 102, 0.08); }
.tool-card--design    { --accent: #2e7d32; --accent-soft: rgba(46, 125, 50, 0.08); }
.tool-card--ai        { --accent: #00796b; --accent-soft: rgba(0, 121, 107, 0.08); }
.tool-card--data      { --accent: #ef6c00; --accent-soft: rgba(239, 108, 0, 0.08); }
.tool-card--estimator { --accent: #cc6d00; --accent-soft: rgba(204, 109, 0, 0.08); }

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}

.tool-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tool-card:hover .tool-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.tool-card-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-pm        { background: #e6eef5; color: #003366; }
.tag-design    { background: #e8f5e9; color: #2e7d32; }
.tag-ai        { background: #e0f2f1; color: #00796b; }
.tag-data      { background: #fff3e0; color: #ef6c00; }
.tag-estimator { background: #ffebcc; color: #cc6d00; }

.tool-card-body {
  flex-grow: 1;
}

.tool-card-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

.tool-card p {
  color: #5a6470;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 18px 0;
}

.tool-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent, var(--primary));
  font-size: 0.88rem;
  font-weight: 600;
  align-self: flex-start;
  text-decoration: none;
}

.tool-card-action .action-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.tool-card:hover .tool-card-action .action-arrow {
  transform: translateX(4px);
}

/* ── Policy Cards ─────────────────────────────────────────────── */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.policy-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eef0f2;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.policy-card:hover {
  background: #fafbfd;
  border-color: #c8d3df;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.07);
  color: inherit;
  transform: translateY(-1px);
}

.policy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.policy-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.policy-icon--core { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.policy-icon--ops  { background: linear-gradient(135deg, #cc6d00, #ff8800); }
.policy-icon--hr   { background: linear-gradient(135deg, #1e4976, #003366); }

.policy-info {
  flex-grow: 1;
  min-width: 0;
}

.policy-title {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--dark-gray);
  margin-bottom: 3px;
  line-height: 1.3;
}

.policy-desc {
  font-size: 0.8rem;
  color: #8a929c;
  line-height: 1.4;
}

.policy-arrow {
  width: 18px;
  height: 18px;
  color: #c4ccd5;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.policy-card:hover .policy-arrow {
  color: var(--secondary);
  transform: translateX(4px);
}

/* ── Resources Footer ─────────────────────────────────────────── */
.resources-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, #fff, var(--light-gray)),
    radial-gradient(circle at 100% 0%, rgba(0, 51, 102, 0.05), transparent 50%);
  background-blend-mode: overlay;
  padding: 28px 32px;
  border-radius: 12px;
  border: 1px solid #e6e8eb;
  margin-top: 50px;
}

.resources-section h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.resources-section h2::after {
  display: none;
}

.resources-text p {
  margin: 0;
  color: #6a737d;
  font-size: 0.92rem;
}

.resources-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 24px;
  text-decoration: none;
  border: 1.5px solid var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.15);
}

.resource-btn svg {
  width: 16px;
  height: 16px;
}

.resource-btn:hover {
  background: var(--primary-light);
  color: #fff;
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.resource-btn--outline {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.resource-btn--outline:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .intranet-header {
    padding: 32px 20px 28px;
  }

  .header-brand {
    flex-direction: column;
    text-align: center;
  }

  .header-text {
    text-align: center;
  }

  .header-text h1 {
    font-size: 2rem;
  }

  .tool-cards {
    grid-template-columns: 1fr;
  }

  .policy-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .intranet-nav a {
    font-size: 0.72rem;
    padding: 5px 14px;
  }

  .resources-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px;
  }

  .resources-grid {
    justify-content: center;
  }

  .resource-btn {
    text-align: center;
    justify-content: center;
  }

  .status-bar {
    flex-wrap: wrap;
  }

  .status-meta {
    font-size: 0.68rem;
  }
}

/* ── Scroll behavior ──────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 20px;
}
