/** ./src/css/intranet-layout.css */

/* =====================================================
   10. HEADER / NAVEGACIÓN SUPERIOR
===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.site-header-inner {
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
}

.site-logo .site-logo__link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
}

.site-logo img {
  width: 140px;
  height: auto;
  display: block;
}

.site-logo span {
  display: none;
  font-size: var(--font-size-base);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-transform: uppercase;
  font-weight: 600;
}

.site-nav a:hover {
  text-decoration: none;
}

.site-nav a.active {
  border-color: var(--en-green);
  background: var(--en-green);
  color: var(--en-white);
}

.site-nav a:hover:not(.active) {
  border-color: var(--border-color);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header-actions .btn-primary.active,
.site-header-actions a.active {
  border-color: var(--en-green);
  background: var(--en-green);
  color: var(--en-white);
}

.profile-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
}

.profile-icon-link:hover {
  background: var(--en-blue);
}

.profile-icon-link:hover .profile-icon-avatar {
  border-color: var(--en-white);
}

.profile-icon-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--en-black);
}

.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
}

.site-nav-toggle:focus-visible {
  outline: 2px solid var(--en-blue);
  outline-offset: 2px;
}

.site-nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 12px;
}

.site-nav-toggle-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--en-black);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-nav-toggle-bar-top {
  top: 0;
}

.site-nav-toggle-bar-middle {
  top: 5px;
}

.site-nav-toggle-bar-bottom {
  bottom: 0;
}

body.nav-open .site-nav-toggle-bar-top {
  transform: translateY(5px) rotate(45deg);
}

body.nav-open .site-nav-toggle-bar-middle {
  opacity: 0;
}

body.nav-open .site-nav-toggle-bar-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

/* =====================================================
   12. SECCIONES GENÉRICAS Y DASHBOARD SECTION HEADERS
===================================================== */
.section-block,
.home-section {
  margin: 2rem auto;
}

.section-header,
.home-section-header {
  margin-bottom: 10px;
}

.section-header-tight,
.home-section-header-tight {
  margin-bottom: 8px;
}

.section-title,
.home-section-title {
  margin-bottom: 0;
  line-height: 1;
  font-size: 1.5rem;
  font-weight: 600;
}

.section-subtitle,
.home-section-subtitle {
  max-width: 560px;
  margin: 0.5rem 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.section-subtitle .enernav-chip-row,
.home-section-subtitle .enernav-chip-row {
  margin: 0.5rem 0;
}

/* =====================================================
   13. HERO REUTILIZABLE / PANEL LATERAL
===================================================== */
.hero-layout,
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 1rem;
  padding: 18px 20px 18px;
  border-radius: var(--border-radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.hero-layout__main,
.home-hero-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-layout__eyebrow,
.home-hero-eyebrow {
  margin: 0;
  font-size: var(--font-size-2xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-layout__title,
.home-hero-title {
  margin: 0;
  font-size: var(--font-size-4xl);
  font-weight: 600;
}

.hero-layout__text,
.home-hero-text {
  max-width: 600px;
  margin: 0;
  font-size: var(--font-size-base);
}

.hero-layout__actions,
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hero-layout__meta,
.home-hero-meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.hero-meta-item {
  border-radius: var(--border-radius-md);
  border: 1px dashed var(--border-soft);
  padding: 8px 10px;
  background: var(--bg-surface-muted);
}

.hero-meta-label {
  display: block;
  font-size: var(--font-size-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.hero-meta-value {
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.hero-meta-note {
  display: block;
  margin-top: 3px;
  font-size: var(--font-size-2xs);
  line-height: 1.25;
  color: var(--text-muted-strong);
}

.hero-meta-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: var(--font-size-2xs);
  font-weight: 700;
  line-height: 1.2;
}

.hero-meta-link:hover {
  background: var(--en-blue);
  border-color: var(--en-blue);
  color: var(--en-white);
}

.hero-meta-item--time-clock {
  border-style: solid;
}

.hero-meta-item--time-clock-status-green {
  border-color: var(--status-green-border);
  background: var(--status-green-bg);
}

.hero-meta-item--time-clock-status-green .hero-meta-label,
.hero-meta-item--time-clock-status-green .hero-meta-value,
.hero-meta-item--time-clock-status-green .hero-meta-link {
  color: var(--status-green-text);
}

.hero-meta-item--time-clock-status-yellow {
  border-color: var(--status-yellow-border);
  background: var(--status-yellow-bg);
}

.hero-meta-item--time-clock-status-yellow .hero-meta-label,
.hero-meta-item--time-clock-status-yellow .hero-meta-value,
.hero-meta-item--time-clock-status-yellow .hero-meta-link {
  color: var(--status-yellow-text);
}

.hero-meta-item--time-clock-status-red {
  border-color: var(--status-red-border);
  background: var(--status-red-bg);
}

.hero-meta-item--time-clock-status-red .hero-meta-label,
.hero-meta-item--time-clock-status-red .hero-meta-value,
.hero-meta-item--time-clock-status-red .hero-meta-link {
  color: var(--status-red-text);
}

.ena-hero-panel,
.home-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-muted);
}

.ena-hero-panel-title,
.home-hero-panel-title {
  margin: 0 0 4px;
  font-size: var(--font-size-base);
  font-weight: 600;
}

.ena-hero-panel-item,
.ena-hero-news-item {
  border-top: 1px solid #e0e0e0;
  padding-top: 0.5rem;
}

.ena-hero-panel-item:first-of-type,
.ena-hero-news-item:first-of-type {
  padding-top: 0;
  border-top: none;
}

.ena-hero-panel-item a,
.ena-hero-news-item a {
  color: inherit;
  text-decoration: none;
}

.ena-hero-panel-kicker,
.ena-hero-news-kicker {
  margin-bottom: 2px;
  font-size: var(--font-size-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ena-hero-panel-headline {
  margin: 0;
  line-height: var(--line-height-snug);
  font-size: var(--font-size-base);
  font-weight: 600;
}

.ena-hero-news-title {
  margin: 0;
  line-height: var(--line-height-snug);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.ena-hero-panel-copy,
.ena-hero-news-meta {
  margin-top: 2px;
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

.ena-hero-panel-link,
.ena-hero-news-link {
  align-self: flex-start;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: var(--font-size-2xs);
  background: var(--bg-surface);
  cursor: pointer;
}

.ena-hero-panel-link:hover,
.ena-hero-news-link:hover {
  background: var(--en-blue);
  color: var(--en-white);
}

.ena-hero-news-item--with-thumb {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: start;
}

.ena-hero-news-thumb {
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface-soft-alt);
}

.ena-hero-news-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ena-hero-news-thumb-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.02));
}

.ena-hero-news-body {
  min-width: 0;
}

/* Final public page layout helpers.
   Scoped to specific page/module classes only. */
.enernav-it-archive__news-card--full {
  grid-column: 1 / -1;
}

.page-directory .page-directory__sidebar-hint {
  margin-top: 6px;
}

/* Document archive layout helpers.
   Scoped to the document archive only. */
.enernav-document-archive__news-card--full {
  grid-column: 1 / -1;
}

.enernav-document-archive__sidebar-hint {
  margin-top: 6px;
}

/* Employee profile layout helpers.
   Scoped to the employee single profile template only. */
.enernav-employee-profile__meta-line-offset {
  margin-top: 6px;
}

.enernav-employee-profile__table-wrap {
  margin-top: 12px;
}

/* =====================================================
   PHASE 13 HEADER MENU STRUCTURE
   Desktop wrapper for nav + authenticated actions.
===================================================== */

.site-header-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-left: auto;
}

.site-header-menu .site-header-actions {
  flex: 0 0 auto;
}
