/* client/public/css/public.css
   MSPCL Public Website Design System
   Updated: full-site consistent live design
*/

:root{
  /* Brand palette */
  --brand: #1f7a35;
  --brand-2: #005b2e;
  --brand-3: #63b32e;
  --brand-4: #eaf6e8;
  --brand-5: #f4fbf2;
  --accent: #b08d57;
  --accent-soft: #f4ede2;

  /* Surfaces */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7faf7;
  --surface-3: #f8fcf7;

  /* Text */
  --text: #0b2e1a;
  --text-2: #2f4f3a;
  --muted: #5f7568;

  /* Border / shadow */
  --border: rgba(0, 91, 46, 0.14);
  --border-strong: rgba(0, 91, 46, 0.24);
  --shadow-xs: 0 8px 18px rgba(0, 91, 46, 0.06);
  --shadow-sm: 0 12px 30px rgba(0, 91, 46, 0.10);
  --shadow-md: 0 18px 40px rgba(0, 91, 46, 0.14);
  --shadow-lg: 0 24px 60px rgba(0, 91, 46, 0.18);

  /* Radius */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  /* Link */
  --link: #1f7a35;
  --link-hover: #005b2e;

  --header-h: 76px;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

html, body{
  height: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-h);
}

img{
  max-width: 100%;
  display: block;
}

a{
  color: var(--link);
  text-decoration: none;
  transition: color .25s ease;
}

a:hover{
  color: var(--link-hover);
}

a.link-underline:hover,
main a:not(.btn):not(.navbar-brand):hover,
footer a:not(.btn):hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.container{
  width: min(1150px, calc(100% - 2rem));
  margin-inline: auto;
}

.section{
  padding: 4rem 0;
}

.section-sm{
  padding: 2.5rem 0;
}

.section-lg{
  padding: 5.5rem 0;
}

h1, h2, h3, h4, h5, h6{
  margin: 0 0 .75rem 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

p{
  margin: 0 0 1rem 0;
  color: var(--text-2);
}

.lead{
  font-size: 1.08rem;
  color: var(--text-2);
}

.small-muted{
  font-size: .95rem;
  color: var(--muted);
}

.text-secondary{
  color: var(--muted) !important;
}

.min-w-0{
  min-width: 0;
}

.h-display{
  letter-spacing: -0.03em;
}

/* =========================
   Navbar
========================= */
.navbar{
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: none !important;
  box-shadow: 0 4px 18px rgba(0, 91, 46, 0.06);
}

.navbar .container,
.navbar .container-fluid{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand{
  display: inline-flex !important;
  align-items: center;
  gap: .8rem;
  color: var(--text) !important;
  text-decoration: none !important;
}

.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand *{
  text-decoration: none !important;
}

.brand-logo-img{
  height: 110px;
  width: auto;
  object-fit: contain;
  transition: transform .3s ease;
  margin-left: 40px; /* 👈 moves logo to the right */
}

.navbar-brand:hover .brand-logo-img{
  transform: scale(1.03);
}

.brand-short{
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-2);
}

.brand-full{
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.1;
}

.navbar-nav{
  gap: .25rem;
}

.navbar .nav-link{
  position: relative;
  color: var(--text-2) !important;
  font-weight: 600;
  padding: .55rem .8rem !important;
  border-radius: 12px;
  transition: all .25s ease;
}

.navbar .nav-link:hover{
  background: rgba(31, 122, 53, .08);
  color: var(--brand-2) !important;
  text-decoration: none !important;
}

.navbar .nav-link.active{
  background: rgba(31, 122, 53, .12);
  color: var(--brand-2) !important;
}

.navbar .nav-link.active::after{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--brand);
  border-radius: 999px;
}

.navbar-toggler{
  border-radius: 12px;
  border: 1px solid var(--border) !important;
}

.navbar-toggler:focus{
  box-shadow: 0 0 0 .2rem rgba(31, 122, 53, .14) !important;
}

/* =========================
   Buttons
========================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.05rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none !important;
  user-select: none;
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}

.btn:hover{
  transform: translateY(-1px);
}

.btn-primary{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(0, 91, 46, 0.18);
}

.btn-primary:hover{
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 91, 46, 0.22);
}

.btn-soft{
  background: rgba(31, 122, 53, .06);
  border: 1px solid rgba(31, 122, 53, .14);
  color: var(--brand-2);
}

.btn-soft:hover{
  background: rgba(31, 122, 53, .10);
  border-color: rgba(31, 122, 53, .22);
  color: var(--brand-2);
}

.btn-outline-brand{
  background: #fff;
  color: var(--brand-2);
  border: 1px solid rgba(31, 122, 53, .22);
}

.btn-outline-brand:hover{
  background: var(--brand-4);
  color: var(--brand-2);
  border-color: rgba(31, 122, 53, .35);
}

/* =========================
   Form elements
========================= */
input, select, textarea{
  width: 100%;
  padding: .8rem .95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:focus,
select:focus,
textarea:focus{
  border-color: rgba(31, 122, 53, .55);
  box-shadow: 0 0 0 .2rem rgba(31, 122, 53, .12);
}

::placeholder{
  color: rgba(100,116,139,.85);
}

/* =========================
   Cards
========================= */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card .card-body{
  padding: 1.25rem;
}

.card-shadow{
  box-shadow: 0 14px 34px rgba(0, 91, 46, .10);
}

.card-hover,
.live-card{
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease, background .32s ease;
  will-change: transform;
}

.card-hover:hover,
.live-card:hover{
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-hover img,
.live-card img{
  transition: transform .38s ease;
}

.card-hover:hover img,
.live-card:hover img{
  transform: scale(1.04);
}

.card-accent{
  border-top: 4px solid var(--brand);
}

.card-soft{
  background: linear-gradient(180deg, #fff 0%, var(--surface-3) 100%);
}

/* Product / announcement style helpers */
.card-media{
  overflow: hidden;
  background: var(--surface-2);
}

.card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title{
  margin-bottom: .45rem;
  font-weight: 700;
}

.card-copy{
  color: var(--muted);
  margin-bottom: 0;
}

/* =========================
   Badges
========================= */
.badge{
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .45rem .7rem;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .01em;
}

.badge-soft-gray{
  background: rgba(11, 46, 26, 0.06);
  border: 1px solid rgba(11, 46, 26, 0.12);
  color: var(--text-2) !important;
}

.badge-soft-green{
  background: rgba(99, 179, 46, 0.14);
  border: 1px solid rgba(31, 122, 53, 0.20);
  color: var(--brand-2) !important;
}

.badge-soft-gold{
  background: rgba(176, 141, 87, 0.14);
  border: 1px solid rgba(176, 141, 87, 0.24);
  color: #7a5b2e;
}

/* =========================
   Hero / backgrounds
========================= */
.pattern-soft{
  background:
    radial-gradient(circle at top left, rgba(99, 179, 46, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(31, 122, 53, 0.10), transparent 35%),
    linear-gradient(180deg, #f8fcf7 0%, #ffffff 100%);
}

.pattern-brand{
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 122, 53, .10), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(176, 141, 87, .12), transparent 22%),
    linear-gradient(180deg, #fbfdfb 0%, #f5fbf4 100%);
}

.glass-soft{
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow-xs);
  border-radius: 18px;
}

/* =========================
   Section helpers
========================= */
.section-head{
  margin-bottom: 1.5rem;
}

.section-kicker{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  color: var(--brand-2);
  font-weight: 700;
  font-size: .88rem;
}

.section-title{
  margin-bottom: .5rem;
}

.section-copy{
  max-width: 70ch;
  color: var(--muted);
}

/* =========================
   Grid helpers
========================= */
.grid{
  display: grid;
  gap: 1rem;
}

.grid-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================
   Tables / alerts
========================= */
.alert{
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.alert-danger{
  background: rgba(220, 38, 38, .08);
  border-color: rgba(220, 38, 38, .18);
  color: #991b1b;
}

.alert-light{
  background: #fff;
}

.table{
  --bs-table-bg: transparent;
}

.table > :not(caption) > * > *{
  border-bottom-color: rgba(0, 91, 46, .08);
}

/* =========================
   Footer
========================= */
.footer{
  border-top: 1px solid var(--border);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fcf7 100%);
}

.footer a{
  text-decoration: none;
}

.footer a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

#footerQuickLinks li a{
  color: var(--text-2);
}

/* =========================
   Skip link
========================= */
.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(2,6,23,.12);
}

.skip-link:focus{
  left: 12px;
}

/* =========================
   Image wrappers
========================= */
.media-cover{
  overflow: hidden;
  border-radius: 18px;
}

.media-cover img{
  transition: transform .4s ease;
}

.media-cover:hover img{
  transform: scale(1.06);
}

/* =========================
   Timeline / process
========================= */
.timeline{
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline-item{
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
}

.timeline-item::before{
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 1.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(31, 122, 53, .12);
}

.timeline-item::after{
  content: "";
  position: absolute;
  left: 1.62rem;
  top: 2rem;
  bottom: -1rem;
  width: 2px;
  background: rgba(31, 122, 53, .14);
}

.timeline-item:last-child::after{
  display: none;
}

/* =========================
   Counters / stat cards
========================= */
.stat-card{
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-value{
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--brand-2);
  line-height: 1;
}

.stat-label{
  margin-top: .45rem;
  color: var(--muted);
  font-weight: 600;
}

/* =========================
   Reveal animation support
========================= */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.show{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Product / announcement specific polish
========================= */
#productsGrid .card,
#announcementsGrid .card{
  height: 100%;
}

#productsGrid .card:hover,
#announcementsGrid .card:hover{
  border-color: rgba(31, 122, 53, .24);
  box-shadow: var(--shadow-md);
}

.card-img-top{
  transition: transform .38s ease;
}

.card:hover .card-img-top{
  transform: scale(1.04);
}

/* =========================
   Utility
========================= */
.rounded-2xl{
  border-radius: 22px !important;
}

.shadow-soft{
  box-shadow: var(--shadow-sm) !important;
}

.border-soft{
  border: 1px solid var(--border) !important;
}

.bg-soft{
  background: var(--surface-2) !important;
}

.text-brand{
  color: var(--brand-2) !important;
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px){
  .brand-full{
    display: none;
  }

  .navbar-collapse{
    background: rgba(255,255,255,.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .75rem;
    margin-top: .6rem;
    box-shadow: 0 16px 40px rgba(2,6,23,.10);
  }

  .section{
    padding: 3rem 0;
  }

  .section-lg{
    padding: 4rem 0;
  }

  .grid-4{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  :root{
    --header-h: 68px;
  }

  body{
    padding-top: 68px;
  }

  .grid-2,
  .grid-3,
  .grid-4{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px){
  .container{
    width: min(100% - 1rem, 1150px);
  }

  .btn{
    padding: .68rem .95rem;
  }

  .card .card-body{
    padding: 1rem;
  }

  .section{
    padding: 2.4rem 0;
  }

  .brand-logo-img{
    height: 40px;
  }
}

/* Slider image */
.brand-hero-wrap{
  position: absolute;
  top: 110px;
  right: 130px;
  z-index: 2;
}

/* .brand-hero-img{
  max-height: 110px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.45s ease, transform 0.45s ease;
  opacity: 1;
} */

.brand-hero-img{
  max-height: 110px;
  width: auto;
  object-fit: contain;
  display: block;

  transition: opacity 0.45s ease, transform 0.45s ease;
  opacity: 1;

  /* 🔥 fade edges */
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}

.brand-hero-img.is-fading{
  opacity: 0;
  transform: translateX(10px);
}

@media (max-width: 1200px){
  .brand-hero-wrap{
    top: 120px;
    right: 40px;
  }

  .brand-hero-img{
    max-height: 95px;
  }
}

@media (max-width: 992px){
  .brand-hero-wrap{
    position: static;
    margin-top: 1rem;
    text-align: right;
  }

  .brand-hero-img{
    max-height: 80px;
    margin-left: auto;
  }
}

@media (max-width: 576px){
  .brand-hero-wrap{
    text-align: left;
  }

  .brand-hero-img{
    max-height: 64px;
    margin-left: 0;
  }
}