/* NMER Conservative Visual Upgrade, 2026-10-19
   This stylesheet is purely presentational. Existing Bootstrap, page templates,
   content, data tables, forms and scripts remain unchanged.
   To roll back: remove the stylesheet link from includes/header.php and
   the two independent verification templates. Contact additions remain.
*/
:root { color-scheme: light; }

/* Public site: bounded changes with the .nmer-public class to avoid admin pages. */
body.nmer-public {
  --nmer-primary: #c5a268;
  --nmer-dark: #85522d;
  --nmer-text: #30343b;
  --nmer-nav: #fffaf1;
  --nmer-ui-border: #e9e2d6;
  --nmer-ui-shadow: 0 10px 30px rgba(47,37,25,.075);
  background: #fffefa;
  color: var(--nmer-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.nmer-public :where(h1,h2,h3,h4,h5,h6) {
  letter-spacing: -.015em;
  line-height: 1.24;
  text-wrap: balance;
}
body.nmer-public :where(p, li) { overflow-wrap: break-word; }
body.nmer-public :where(a,button,input,textarea,select):focus-visible,
.nmer-whatsapp-fab:focus-visible,
.nmer-verify-phone:focus-visible {
  outline: 3px solid #3075ba;
  outline-offset: 3px;
}

/* Top contact bar: clear click-to-call; preserve email, location, social links. */
body.nmer-public .topbar {
  background: #82522d;
  font-size: .9rem;
  padding-block: .38rem !important;
}
body.nmer-public .nmer-topbar__contact { column-gap: 1.35rem; row-gap: .25rem; }
body.nmer-public .nmer-topbar__contact a:first-child { font-weight: 800; white-space: nowrap; }
body.nmer-public .topbar a:hover { color: #ffe6b6; }
body.nmer-public .topbar .btn-nmer {
  background: #f1dbad;
  border: 0;
  color: #422b17;
  border-radius: 8px;
  font-weight: 800;
}

/* Header and navigation: institution-first, uncluttered and tap-friendly. */
body.nmer-public .navbar {
  background: #fffaf1;
  border-bottom: 1px solid #ecdfcb;
  box-shadow: 0 4px 20px rgba(38,32,24,.055);
  padding-block: .78rem;
}
body.nmer-public .navbar .nav-link {
  color: #393a3d;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.32;
  padding: .65rem .48rem;
  border-radius: 7px;
  transition: background-color .2s ease,color .2s ease;
}
body.nmer-public .navbar .nav-link:hover,
body.nmer-public .navbar .nav-link.active {
  background: #f4e8d4;
  color: #8b551f !important;
}
body.nmer-public .navbar-toggler {
  border-color: #e0cba6;
  border-radius: 9px;
  padding: .5rem .65rem;
}
body.nmer-public .page-banner {
  background: linear-gradient(115deg,#fcf4e6 0%,#fffefa 83%);
  border-bottom: 1px solid #eee1ce;
}
body.nmer-public .page-banner .wrap { padding-block: clamp(1.75rem,3.5vw,3.15rem); }
body.nmer-public .page-banner h1 { color: #302b25; }
body.nmer-public .breadcrumbs { color: #6a635a; }

/* More useful first screen on large desktops, but retain all three existing slide images. */
body.nmer-public .hero-carousel .carousel-item {
  height: clamp(400px,43vw,610px);
  max-height: none;
}
body.nmer-public .hero-carousel .carousel-caption {
  border-radius: 14px;
  background: rgba(27,26,25,.69);
  box-shadow: 0 8px 26px rgba(0,0,0,.1);
  max-width: 740px;
  margin-inline: auto;
  padding: 1.15rem 1.5rem;
}
body.nmer-public .hero-carousel .carousel-caption :where(h2,p) { color:#fff; }

/* Sections and cards: consistent depth, radii and border hierarchy. */
body.nmer-public .section { padding-block: clamp(2.2rem,4vw,3.75rem); }
body.nmer-public .feature-card,
body.nmer-public .sidebar-card,
body.nmer-public .contact-card,
body.nmer-public .nmer-card,
body.nmer-public .course-cards .course-card {
  border-radius: 17px;
  box-shadow: var(--nmer-ui-shadow);
}
body.nmer-public .feature-card,
body.nmer-public .sidebar-card,
body.nmer-public .contact-card { border: 1px solid rgba(166,143,115,.15); }
body.nmer-public .nmer-card { border-width: 2px; }
body.nmer-public .feature-card:hover,
body.nmer-public .course-cards .course-card:hover {
  box-shadow: 0 14px 32px rgba(48,39,30,.12);
}
body.nmer-public .feature-icon {
  border-radius: 15px;
  box-shadow: inset 0 0 0 1px #e2d3b5;
}
body.nmer-public .card :where(h3,h4,h5,h6) { color: #2b3036; }

/* Forms: visual refinement only — POST paths, names and validations unchanged. */
body.nmer-public .form-control,
body.nmer-public .form-select {
  border: 1px solid #dcdcd7;
  border-radius: 9px;
  background-color: #fff;
  min-height: 44px;
  padding: .65rem .85rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
body.nmer-public .form-control:focus,
body.nmer-public .form-select:focus {
  border-color: #a97d45;
  box-shadow: 0 0 0 .24rem rgba(195,161,98,.18);
}
body.nmer-public .form-label { font-weight: 700; color:#33383e; }
body.nmer-public .btn-nmer {
  border-radius: 9px;
  padding: .62rem 1.12rem;
  background: #c5a268;
  border-color: #c5a268;
  color: #25201a;
  font-weight: 800;
  transition: background-color .18s ease,box-shadow .18s ease, transform .18s ease;
}
body.nmer-public .btn-nmer:hover {
  color: #25201a;
  background: #b99156;
  border-color: #b99156;
  box-shadow: 0 7px 16px rgba(156,109,49,.14);
}

/* Course table: readable hierarchy with horizontal scrolling on small screens. */
body.nmer-public .table-responsive { border: 1px solid #ebe1d5; border-radius: 13px; }
body.nmer-public .table { margin-bottom: 0; }
body.nmer-public .table thead th { color: #463826; background: #f5ecd9; font-weight:800; }
body.nmer-public #coursesTable { min-width: 650px; }
body.nmer-public #coursesTable :where(th,td) { vertical-align: middle; padding-block: .8rem; }

/* Footer with clear tap targets. */
body.nmer-public footer { border-top: 3px solid #c6a369; }
body.nmer-public footer a { color: #f2d29a; text-underline-offset: 3px; }
body.nmer-public footer a:hover { color: #fff; }
body.nmer-public footer .nmer-footer-phone a { font-weight: 800; }
body.nmer-public .contact-info .nmer-contact-phone a { font-weight: 800; }

/* Single fixed WhatsApp contact widget, inserted before the footer in markup.
   Uses inline SVG (no new script, plugin, font, or external dependency). */
.nmer-whatsapp-fab {
  position: fixed;
  right: max(20px,env(safe-area-inset-right));
  bottom: max(22px,env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 12px 17px;
  color: #fff;
  background: #168c58;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(16,93,62,.24);
  font: 800 14px/1.2 'Lato',system-ui,sans-serif;
  text-decoration: none;
  z-index: 1030;
  transition: background-color .2s ease, transform .2s ease,box-shadow .2s ease;
}
.nmer-whatsapp-fab:is(:hover,:focus-visible) {
  color: #fff;
  background: #0b7344;
  transform: translateY(-2px);
  box-shadow: 0 13px 34px rgba(16,93,62,.30);
}
.nmer-whatsapp-icon { display: block; flex-shrink: 0; }
.nmer-whatsapp-label { white-space: nowrap; }
/* Standalone verification pages: preserve their existing design and small top return bar. */
.top-return .nmer-verify-phone {
  display: inline-block;
  margin-left: 10px;
  color: #272117;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255,255,255,.9);
  border-radius: 8px;
  padding: 6px 13px;
  font-size: .9rem;
}
.top-return .nmer-verify-phone:hover { background:#fff; color:#272117; }

@media (max-width:1399.98px) {
  body.nmer-public .navbar-collapse { padding-top: .85rem; }
  body.nmer-public .navbar-nav { gap: .06rem; }
  body.nmer-public .navbar .nav-link { padding: .69rem .85rem; }
}
@media (max-width:767.98px) {
  body.nmer-public .topbar .container { align-items: stretch !important; row-gap: .45rem !important; }
  body.nmer-public .topbar .nmer-topbar__contact { column-gap: 1rem; }
  body.nmer-public .topbar .container > .d-flex:last-child { justify-content: space-between; }
  body.nmer-public .navbar { padding-block: .65rem; }
  body.nmer-public .hero-carousel .carousel-item { height: 350px; max-height: none; }
  body.nmer-public .page-banner .wrap { padding: 24px 18px; }
  body.nmer-public .contact-card { padding: 1.3rem !important; }
  body.nmer-public .nmer-ring-wrap { max-width: 350px; }
  body.nmer-public .nmer-ring { border-width: 6px; }
  .nmer-whatsapp-fab {
    right: max(14px,env(safe-area-inset-right));
    bottom: max(14px,env(safe-area-inset-bottom));
    min-width: 52px;
    width: 52px;
    height: 52px;
    padding: 12px;
    justify-content: center;
  }
  .nmer-whatsapp-label { display: none; }
  .top-return .nmer-verify-phone { margin: 4px 0 0 6px; padding: 5px 10px; font-size: .81rem; }
}
@media (max-width:399.98px) {
  body.nmer-public .hero-carousel .carousel-item { height: 270px; max-height: none; }
  body.nmer-public .topbar .btn-nmer { margin-left: 0 !important; }
}
@media (prefers-reduced-motion:reduce) {
  .nmer-whatsapp-fab,
  body.nmer-public .feature-card,
  body.nmer-public .course-cards .course-card { transition:none !important; }
}


/* NMER desktop slider image alignment fix */
/* Mobile and third slider remain unchanged */

@media (min-width: 992px) {
  body.nmer-public #hero
  .carousel-item:nth-child(1) .slide-bg,
  body.nmer-public #hero
  .carousel-item:nth-child(2) .slide-bg {
    background-position: var(--fx, 50%) top !important;
  }
}
