/* CraftSciences skeleton - derived from hallmarc 3col_leftNav.css conventions */

:root {
  --ink: #333;
  --link: #006699;
  --bg: #fff;
  --panel: #eeeeee;
  --border: #cccccc;
  --muted: #6b7c87;
}

* { box-sizing: border-box; }

body {
  font-family: Arial, sans-serif;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
  background: var(--bg);
}

a, a:visited { color: var(--link); text-decoration: none; }

a:hover { text-decoration: underline; }

/* sticky top menu */
#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

#topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 12px;
}

#brand {
  font-weight: bold;
  color: #334d55;
}

#topmenu a { font-size: 90%; margin-right: 10px; }

#masthead {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

/* logged-in user badge on top sticky menu */
#topright {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#topuser {
  font-size: 90%;
  white-space: nowrap;
}

#topuser .user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#topuser .user-name {
  font-weight: bold;
}

#topuser .user-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

#masthead h1 { margin: 0; font-size: 20px; color: #334d55; }
#masthead h2 { margin: 2px 0 0; font-size: 16px; color: var(--link); font-weight: normal; }

#layout {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 0;
}

#leftnav {
  border-right: 1px solid var(--border);
  background: var(--panel);
  padding: 10px;
  min-height: calc(100vh - 80px);
}

#right {
  border-left: 1px solid var(--border);
  padding: 10px;
  background: #fafafa;
}

#main {
  padding: 12px 14px;
}

.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px 0;
}

.hero {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
  margin: 0 0 12px 0;
}

.hero img { max-width: 100%; height: auto; display: block; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  border: 1px solid var(--border);
  padding: 10px;
  background: #fff;
}

.card img { width: 100%; height: 140px; object-fit: cover; object-position: center; display: block; border: 1px solid #e1e6ea; border-radius: 14px; }

#footer {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  #layout { grid-template-columns: 1fr; }
  #leftnav, #right { min-height: unset; border: none; }
  .cards { grid-template-columns: 1fr; }
}

#colophon {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  background: #ffffff;
}

#colophon .colophon-links {
  margin: 0 0 4px 0;
}

/* Management UI hints */
.manage-frame {
  border: 10px solid #7b1e1e;
}

.login-corner {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 6px 8px;
  font-size: 12px;
}

#topuser a.user-badge { color: inherit; text-decoration: none; }
#topuser a.user-badge:hover { text-decoration: none; }


/* Home hero (image + overlay text) */
.hero-home {
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
}

.hero-home .hero-media {
  position: relative;
  overflow: hidden;
}

.hero-home .hero-img {
  width: 100%;
  height: 360px;
  max-height: 75vh;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 18px;
}

/* Center overlay text matches hero-placeholder.svg typography/placement (x=80, y=150/210 on 1200x360) */
.hero-home .hero-overlay-center {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-home .hero-title {
  position: absolute;
  left: 6.7%;
  top: 41.7%;
  transform: translateY(-50%);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4.0vw, 48px);
  color: #334d55;
  text-shadow: 0 2px 6px rgba(255,255,255,0.85), 0 1px 2px rgba(0,0,0,0.25);
}

.hero-home .hero-subtitle {
  position: absolute;
  left: 6.7%;
  top: 58.3%;
  transform: translateY(-50%);
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 2.2vw, 26px);
  color: #6b7c87;
  text-shadow: 0 2px 6px rgba(255,255,255,0.85), 0 1px 2px rgba(0,0,0,0.18);
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,255,255,0.55);
  border-radius: 10px;
}

/* Bottom overlay restored (previous behavior) */
.hero-home .hero-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  background: rgba(255,255,255,0.82);
  border-top: 1px solid var(--border);
}

.hero-home .hero-overlay-bottom h3 { margin: 0 0 6px 0; }
.hero-home .hero-overlay-bottom p { margin: 0; }

/* Environment banner */
.env-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 6px 12px;
  font: 700 13px/1.2 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  background: rgba(255, 193, 7, 0.85);
  color: #1f2a30;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.env-banner-production { display: none; }
