/* ============================================================
   CBS Holdings — stylesheet
   Palette: clean white, light cyan accents, green text
   No external fonts, no third-party requests — matches the
   site's privacy policy (no cookies, nothing sent to third
   parties on load).
   ============================================================ */

:root {
  --green: #1f6b4a;
  --green-dark: #164f38;
  --blue: #163a5c;
  --cyan: #12a8be;
  --cyan-light: #cff3f7;
  --cyan-pale: #f2fcfd;
  --white: #ffffff;
  --charcoal: #223028;
  --muted: #62726b;
  --line: #dcecee;

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; border: 0; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 36px;
}

/* ---------- Header ----------
   Mobile-first. Base styles = phone (hamburger menu).
   min-width: 900px = tablet landscape / desktop (full inline nav, 3-column grid).
------------------------------------------------------------ */

header.site {
  background: var(--cyan-light);
  border-bottom: 1px solid var(--cyan);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 20px 0;
  column-gap: 16px;
}

.brand {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
  text-align: center;
}

.brand img { height: 44px; width: auto; }

.brand-text { font-family: var(--font-display); line-height: 1.15; }

.brand-text strong {
  display: block;
  font-size: 17px;
  color: var(--green-dark);
  letter-spacing: 0.01em;
}

.brand-text span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hamburger toggle button — visible on phone/tablet-portrait only */
.hamburger {
  grid-column: 2;
  justify-self: end;
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Collapsible panel — holds both nav links and the lang/login extras on phone/tablet */
.nav-collapse {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--cyan);
}

.nav-collapse.open { display: flex; }

nav.links { display: flex; flex-direction: column; gap: 2px; }

nav.links a {
  font-size: 15px;
  color: var(--green-dark);
  padding: 10px 10px;
  border-radius: 6px;
}

nav.links a:hover { background: var(--white); }

nav.links a[aria-current="page"] {
  color: var(--green-dark);
  font-weight: 700;
  background: var(--white);
}

.nav-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.lang-switch a { padding: 4px 6px; border-radius: 4px; color: var(--muted); }
.lang-switch a.active { color: var(--green-dark); background: var(--white); }
.lang-switch a:hover { color: var(--green-dark); }
.lang-switch .sep { color: var(--muted); opacity: 0.5; }

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green-dark);
  border: 1px solid var(--cyan);
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--white);
}

.login-btn:hover { background: var(--cyan-pale); }
.login-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ----- Tablet landscape / desktop: full 3-column inline header ----- */
@media (min-width: 900px) {
  .site-nav {
    grid-template-columns: auto 1fr auto;
    column-gap: 24px;
    padding: 18px 0;
  }

  .hamburger { display: none; }

  .brand { justify-self: start; text-align: left; }

  /* Unwrap the collapse panel so its children become direct grid items */
  .nav-collapse {
    display: contents;
  }

  nav.links {
    grid-column: 2;
    justify-self: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  nav.links a { padding: 8px 12px; font-size: 14px; }

  .nav-extras {
    grid-column: 3;
    justify-self: end;
  }
}

/* ---------- Main / hero ---------- */

main { flex: 1 0 auto; }

.hero {
  background: var(--white);
  color: var(--charcoal);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  padding-top: 64px;
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  flex: 0 1 auto;
  max-width: 180px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.18;
  margin: 0 0 18px;
  max-width: 15ch;
  color: var(--blue);
}

.hero p.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--blue);
  max-width: 56ch;
  margin: 0 0 40px;
}

/* Skyline signature graphic */
.skyline { display: block; width: 100%; height: auto; }
.skyline .bg { fill: var(--cyan-pale); }
.skyline .fg { fill: var(--cyan-light); }
.skyline .accent { fill: var(--cyan); }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
.hero { padding: 0; }

.section-head { max-width: 62ch; margin: 0 0 40px; }
.section-head .eyebrow { color: var(--cyan); }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--green-dark);
  margin: 0 0 12px;
}

.section-head p { color: var(--muted); line-height: 1.6; margin: 0; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.pillar:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 168, 190, 0.12);
}

.pillar .icon { width: 42px; height: 42px; margin: 0 0 18px; color: var(--cyan); }

.pillar h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--green-dark);
  margin: 0;
}

.pillar p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 0; }

.band { background: var(--cyan-pale); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Simple content pages (legal, careers) ---------- */

.page-head {
  background: var(--cyan-pale);
  color: var(--charcoal);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 10px;
  color: var(--green-dark);
}

.page-head .updated { font-size: 13px; color: var(--cyan); font-weight: 600; }

.updated-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

.prose { max-width: 74ch; line-height: 1.7; font-size: 15.5px; color: var(--charcoal); }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--green-dark);
  margin: 36px 0 12px;
}

.prose p { margin: 0 0 16px; }
.prose a { color: var(--green-dark); text-decoration: underline; }

.notice {
  background: var(--cyan-pale);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 6px;
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 14.5px;
  color: var(--muted);
}

.empty-state {
  background: var(--cyan-pale);
  border: 1px dashed var(--cyan);
  border-radius: 10px;
  padding: 40px 32px;
  text-align: left;
  max-width: 60ch;
}

.empty-state h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--green-dark);
  margin: 0 0 10px;
}

.empty-state p { color: var(--muted); line-height: 1.6; margin: 0 0 18px; }

.job-status {
  color: var(--muted);
  font-size: 14.5px;
  padding: 20px 0;
}

.job-list {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.job-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.job-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--green-dark);
  margin: 0 0 8px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.job-meta span {
  background: var(--cyan-pale);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 12px;
  border-radius: 12px;
}

.job-card p { font-size: 14.5px; color: var(--charcoal); line-height: 1.6; margin: 0; }

/* ---------- Digital business card ---------- */

@font-face {
  font-family: "Great Vibes";
  src: url("files/GreatVibes-Regular.ttf") format("truetype");
  font-display: swap;
}

.card-page {
  min-height: 100%;
  background: var(--cyan-pale);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.card-wrap { width: 100%; max-width: 460px; }

.biz-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 28px 20px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(18, 40, 60, 0.1);
}

.biz-mark { width: 38px; height: auto; margin: 0 auto 10px; display: block; }

.biz-card h1 {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: 30px;
  color: #1a1a1a;
  margin: 0 0 2px;
  line-height: 1.1;
}

.biz-title {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.biz-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 12px;
}

.biz-org {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  margin: 0 0 5px;
  text-align: left;
}

.biz-info {
  text-align: left;
  font-size: 11.5px;
  color: var(--charcoal);
  line-height: 1.5;
}

.biz-info .row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.biz-info .label { color: var(--muted); min-width: 30px; }

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.card-actions button, .card-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid var(--line);
  background: var(--cyan-pale);
  color: var(--green-dark);
  cursor: pointer;
}

.card-actions button:hover, .card-actions a:hover { background: var(--cyan-light); }

.card-actions .primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  grid-column: 1 / -1;
}

.card-actions .primary:hover { background: var(--green); border-color: var(--green); }

.card-actions svg { width: 16px; height: 16px; flex-shrink: 0; }

.quick-contact {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.quick-contact a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green-dark);
}

.quick-contact a:hover { background: var(--cyan-pale); border-color: var(--cyan); }
.quick-contact svg { width: 18px; height: 18px; }

.qr-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.qr-block p { font-size: 12.5px; color: var(--muted); margin: 10px 0 12px; }
#qrcode-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.card-footer {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
}

/* ---------- Admin panel ---------- */

.admin-page { min-height: 100%; background: var(--cyan-pale); }

.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-topbar .who { font-size: 13.5px; color: var(--muted); }
.admin-topbar .who strong { color: var(--green-dark); }

.admin-signin {
  max-width: 380px;
  margin: 80px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 28px;
  text-align: center;
}

.admin-signin h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--green-dark);
  margin: 0 0 10px;
}

.admin-signin p { color: var(--muted); font-size: 14px; margin: 0 0 22px; line-height: 1.6; }

.admin-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
}

.admin-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--green-dark);
  margin: 0 0 18px;
}

.admin-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-item:last-child { border-bottom: none; }

.admin-item .info h4 { margin: 0 0 4px; font-size: 15px; color: var(--charcoal); }
.admin-item .info p { margin: 0; font-size: 12.5px; color: var(--muted); }
.admin-item .info .inactive-tag { color: #b23; font-weight: 600; }

.admin-item .actions { display: flex; gap: 6px; flex-shrink: 0; }

.admin-item .actions button {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--cyan-pale);
  color: var(--green-dark);
  cursor: pointer;
}

.admin-item .actions button.danger { background: #fdeeee; border-color: #f3c8c8; color: #b23; }
.admin-item .actions button:hover { filter: brightness(0.96); }

.admin-form { display: grid; gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }

.admin-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 560px) {
  .admin-form .field-row { grid-template-columns: 1fr; }
}

.admin-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--charcoal);
}

.admin-form textarea { min-height: 70px; resize: vertical; }

.admin-form .checkbox-row { display: flex; align-items: center; gap: 8px; }
.admin-form .checkbox-row input { width: auto; }

.admin-form .submit-btn {
  justify-self: start;
  background: var(--cyan);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-form .submit-btn:hover { background: var(--green); }

.admin-note {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--cyan-pale);
  border-left: 3px solid var(--cyan);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  background: var(--cyan);
  color: #fff;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.btn:hover { background: var(--green); }

.contact-section {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.contact-watermark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

.contact-section .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--green-dark);
  margin: 0 0 18px;
}

.contact-card dl { margin: 0; display: grid; gap: 14px; }

.contact-card dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-weight: 700;
}

.contact-card dd { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: var(--charcoal); }

/* ---------- Footer ---------- */

footer.site {
  flex-shrink: 0;
  background: var(--white);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer.site nav a { font-size: 13.5px; color: var(--green-dark); }
footer.site nav a:hover { color: var(--cyan); }
footer.site .copyright { font-size: 13px; color: var(--green); font-weight: 600; }

/* ---------- Responsive ----------
   Mobile-first tiers used across the site:
   base    = phone            (< 640px)
   sm      = large phone      (>= 480px)
   md      = tablet portrait  (>= 640px)
   lg      = tablet landscape (>= 900px)   — header switches to inline nav here too
   xl      = desktop          (>= 1200px)
------------------------------------------------------------ */

/* Base (phone) adjustments */
@media (max-width: 420px) {
  .wrap { padding: 0 22px; }
}

/* sm: large phones */
@media (min-width: 480px) {
  .card-actions { grid-template-columns: 1fr 1fr; }
}

/* md: tablet portrait (e.g. iPad portrait ~768px) */
@media (min-width: 640px) {
  section { padding: 56px 0; }
  .hero .wrap { padding-top: 56px; }
  .contact-card { padding: 32px; }
  .footer-inner { flex-direction: row; align-items: center; }

  /* Hero: text and logo sit side by side once there's enough width */
  .hero-inner { flex-direction: row; justify-content: space-between; text-align: left; gap: 48px; }
  .hero-text { display: block; align-items: normal; flex: 1 1 420px; }
  .hero h1, .hero p.lede { margin-left: 0; margin-right: 0; }
  .hero-logo { margin: 0; max-width: 220px; flex: 0 1 220px; }
}

/* lg: tablet landscape / small desktop (e.g. iPad landscape ~1024px) */
@media (min-width: 900px) {
  section { padding: 72px 0; }
  .two-col { grid-template-columns: 1.1fr 0.9fr; }
  .hero-logo { max-width: 260px; flex-basis: 260px; }
}

/* xl: desktop */
@media (min-width: 1200px) {
  .wrap { padding: 0 40px; }
  section { padding: 88px 0; }
}

@media (max-width: 899px) {
  .two-col { grid-template-columns: 1fr; }
}
