/* =========================================================
   Shared design tokens
   ========================================================= */

:root {
  --calco-primary: #00796b;
  --calco-primary-dark: #004d40;
  --calco-primary-soft: rgba(0, 121, 107, 0.1);

  --calco-bg: #e8f5e9;
  --calco-bg-blue: #e0f7fa;
  --calco-bg-soft: #f4fffc;

  --calco-text: #0b3143;
  --calco-heading: #004d40;
  --calco-muted: #4d6863;

  --calco-border: rgba(0, 77, 64, 0.12);
  --calco-surface: rgba(255, 255, 255, 0.92);

  --calco-radius-md: 1rem;
  --calco-radius-lg: 1.5rem;
  --calco-radius-xl: 2rem;

  --calco-shadow-sm: 0 0.45rem 1.25rem rgba(0, 77, 64, 0.05);
  --calco-shadow-md: 0 0.85rem 2.2rem rgba(0, 77, 64, 0.07);
  --calco-shadow-lg: 0 1.15rem 3rem rgba(0, 77, 64, 0.12);
}

body {
    background: var(--calco-bg);
    color: var(--calco-heading);
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

/* =========================================================
   Layout Containers
   ========================================================= */

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    color: #004d40;
    padding-bottom: .25em;
}

.site-title a,
.site-title a:link,
.site-title a:visited,
.site-title a:hover,
.site-title a:active {
    text-decoration: none;
    color: inherit;
}

.bi {
    vertical-align: middle;
}

/* Footer */
.site-footer {
    background-color: #ffffffee;
    border-top: 1px solid #b2dfdb;
    color: #004d40;
}

.site-footer a {
    color: #004d40;
    text-decoration: none;
    margin: 0 0.5rem;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* =========================================================
   Shared page hero
   ========================================================= */

.page-hero {
  border-radius: var(--calco-radius-xl);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--calco-border);
}

.page-hero--soft {
  background:
    radial-gradient(circle at top left, rgba(0, 121, 107, 0.18), transparent 35%),
    linear-gradient(135deg, rgba(224, 247, 250, 0.95), rgba(232, 245, 233, 0.95));
}

.page-hero--plain {
  background: var(--calco-surface);
}

.page-hero--dark {
  background: linear-gradient(135deg, var(--calco-primary-dark), var(--calco-primary));
  color: #ffffff;
}

.page-hero--dark .page-title,
.page-hero--dark .page-lead {
  color: #ffffff;
}

.page-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--calco-primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-title {
  max-width: 980px;
  color: var(--calco-heading);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.page-lead {
  max-width: 860px;
  color: var(--calco-muted);
  font-size: 1.2rem;
  margin-bottom: 0;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}


/* =========================================================
   Shared section headers
   ========================================================= */

.section-header {
  max-width: 900px;
}

.section-title {
  color: var(--calco-heading);
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
}

.section-lead {
  color: var(--calco-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}


/* =========================================================
   Shared cards
   ========================================================= */

.surface-card {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--calco-radius-lg);
  border: 1px solid var(--calco-border);
  background: var(--calco-surface);
  box-shadow: var(--calco-shadow-md);
  color: var(--calco-text);
  text-decoration: none;
}

.surface-card--interactive {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.surface-card--interactive:hover,
.surface-card--interactive:focus {
  transform: translateY(-2px);
  box-shadow: var(--calco-shadow-lg);
  border-color: rgba(0, 121, 107, 0.35);
  color: var(--calco-text);
}

.surface-card--featured {
  border: 2px solid rgba(0, 121, 107, 0.55);
  box-shadow: 0 1rem 2.6rem rgba(0, 121, 107, 0.13);
}

.surface-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.surface-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--calco-primary-soft);
  color: var(--calco-primary);
  font-size: 1.25rem;
  margin: 0;
}

.surface-card__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.surface-card__title {
  color: var(--calco-heading);
  font-weight: 700;
  margin: 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.surface-card__subtitle {
  color: var(--calco-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.surface-card__body {
  color: var(--calco-muted);
  margin-bottom: .35rem;
}

.surface-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  color: var(--calco-primary);
  font-weight: 700;
}


/* =========================================================
   Shared CTA panel
   ========================================================= */

.cta-panel {
  border-radius: var(--calco-radius-xl);
  margin-top: 4rem;
}

.cta-panel--dark {
  background: linear-gradient(135deg, var(--calco-primary-dark), var(--calco-primary));
  color: #ffffff;
}

.cta-panel--light {
  background: var(--calco-surface);
  border: 1px solid var(--calco-border);
  box-shadow: var(--calco-shadow-md);
}

.cta-panel__title {
  color: inherit;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
}

.cta-panel__text {
  color: rgba(255, 255, 255, 0.86);
}

.cta-panel--light .cta-panel__text {
  color: var(--calco-muted);
}


/* =========================================================
   Shared empty state
   ========================================================= */

.empty-state {
  border-radius: var(--calco-radius-lg);
  background: var(--calco-surface);
  border: 1px solid var(--calco-border);
  box-shadow: var(--calco-shadow-sm);
}

.empty-state__icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--calco-primary-soft);
  color: var(--calco-primary);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}


/* =========================================================
   Legal document pages
   ========================================================= */

.legal-document {
  margin: 0 auto;
}

.legal-document h2 {
  color: var(--calco-heading);
  font-weight: 750;
  letter-spacing: -0.015em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document h3 {
  color: var(--calco-heading);
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.legal-document p,
.legal-document li,
.legal-document dd {
  color: var(--calco-muted);
}

.legal-document dl {
  margin-bottom: 0;
}

.legal-document dt {
  color: var(--calco-heading);
  font-weight: 700;
}

.legal-document dd {
  margin-bottom: 1rem;
}

.legal-document .legal-note {
  border-left: 4px solid var(--calco-primary);
  background: rgba(0, 121, 107, 0.06);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
}


/* =========================================================
   Old layout components
   ========================================================= */



/* ===============================
   Global Branding Additions
================================= */

/* Features Section - used, for instance, in clacui*/
.features .feature-card {
  background-color: #ffffffee;
  border-radius: 1rem;
  padding: 2rem 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid #b2dfdb;
  height: 100%;
}

.features .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.features i {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: #00796b;
}

/* Buttons */
.btn-primary {
    background-color: #00796b;
    border-color: #00796b;
}

.btn-primary:hover {
    background-color: #004d40;
    border-color: #004d40;
}

.btn-custom {
    background-color: #00796b;
    color: white;
}

.btn-custom:hover {
    background-color: #004d40;
    color: white;
}

.btn-outline-custom {
    border: 2px solid #00796b;
    color: #00796b;
}

.btn-outline-custom:hover {
    background-color: #00796b;
    color: #fff;
}

.lang-dropdown .btn-outline-secondary {
    border-width: 2px;
}

/* Utilities */
.rounded {
    border-radius: 1rem !important;
}

/* =========================================================
   Landing Page: Hero, Transforming Nav, Sections, Offcanvas
   (Safe to append at end of your existing styles.css)
========================================================= */

/* Smooth anchor scroll + sticky offset when nav is docked on top */
:root { scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; } /* adjust if you change nav height */


/* ===== Transforming Nav Bar (bottom -> top sticky) ===== */
/* Footer-inside-hero; becomes fixed header when .stuck */

/* Ensure the nav spans full viewport width while inside the hero */
.site-header.sticky-top{
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: auto;
  border-top: none;
  border-bottom: 1px solid #b2dfdb;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  background-color: #ffffffee;
  border-bottom: 1px solid #b2dfdb;
  backdrop-filter: saturate(120%) blur(4px);
  width: 100%;
  justify-self: stretch; /* stretch across the grid */
  align-self: end;       /* sit at the bottom row */
}
.landing-nav{
  position: sticky;
  bottom: 0;
  z-index: 1030;
  background-color: #ffffffee;
  border-top: 1px solid #b2dfdb;
  border-bottom: 1px solid #b2dfdb;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  backdrop-filter: saturate(120%) blur(4px);
  transition: box-shadow .3s ease, border-color .3s ease, transform .25s ease;
  width: 100%;
  justify-self: stretch; /* stretch across the grid */
  align-self: end;       /* sit at the bottom row */
}
.landing-nav .container-wide,
.site-header .container-wide{
  display:flex;align-items:center;justify-content:space-between;min-height:64px;gap:.75rem;
}
.landing-nav .nav-logo,
.site-header .nav-logo {
  height: 30px;
}
.landing-nav.stuck{
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: auto;
  border-top: none;
  border-bottom: 1px solid #b2dfdb;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nav-spacer{height:0}
.nav-spacer.push-down{min-height:65px;}

/* Brand + menu */
.landing-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.landing-menu a.nav-link {
  color: #004d40;
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: .5rem;
}
.landing-menu a.nav-link:hover {
  background-color: #e0f7fa;
}

/* Right controls */
.landing-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.btn-outline-custom i,
.btn-primary i {
  vertical-align: -2px;
  margin-right: .35rem;
}

/* ===== Sections (below hero) ===== */
section.section {
  padding: 4rem 0;
}



/* ===== Offcanvas (mobile menu) ===== */
.landing-toggler {
  display: none; /* shown on md- and below via media query */
}

@media (max-width: 1024px) {
  .landing-menu {
    display: none !important; /* hidden on mobile; use offcanvas instead */
  }
  .landing-toggler {
    display: inline-flex;
  }
  .landing-nav .site-title,
  .site-header .site-title {
    font-size: 2rem;
  }
}

/* ===== Nav active state + underline ===== */
.landing-menu a.nav-link.active,
.offcanvas .nav-link.active {
  color: #00796b;
  position: relative;
}

.landing-menu a.nav-link.active::after,
.offcanvas .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* Optional: subtle transition for hover/active */
.landing-menu a.nav-link,
.offcanvas .nav-link {
  transition: color .15s ease, background-color .15s ease;
}

/* --- Mega hover menu --- */
.mega-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1070; }
.mega-layer[aria-hidden="true"] { display: none; }

.mega-panel {
  position: fixed; /* we compute top/left/width in JS */
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 15px 20px rgba(0,0,0,.12);
  border-radius: .5rem;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: auto;
  width: 100%;
  left: 0px;
  right: 0px;
  /* height: 190px; */
  max-height: 350px;
}
.mega-panel.to-top { box-shadow: 0 -15px 20px rgba(0,0,0,.12); }

.mega-panel.is-open { opacity: 1; transform: translateY(0); }

.mega-inner { padding: 1rem 1.25rem 1.25rem; }
.mega-tagline { margin: 0 0 .75rem; font-size: 1.05rem; color: #344; }
.mega-grid {
  display: grid; gap: 1rem 1.25rem;
  grid-template-columns: repeat(3, minmax(200px,1fr));
}
.mega-grid h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; margin: .15rem 0 .5rem; color: #445; }
.mega-grid a { text-decoration: none; color: #004d40; }
.mega-grid a:hover { text-decoration: underline; }

@media (max-width: 992px) { /* desktop-only pattern */
  .mega-layer { display: none !important; }
}

/* Utility for screen readers only */
.visually-hidden {
  position: absolute !important; height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
