/* =========================================================
   Dept. of Urban Development & Housing, Arunachal Pradesh
   Modern Govt. of India inspired visual theme (style only).
   This file layers on top of Bootstrap 5.0.2 without changing
   any markup, content or links.
   ========================================================= */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Merriweather:wght@400;700&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --ud-primary: #0b4f7a;
  --ud-primary-dark: #073a5a;
  --ud-primary-darker: #052a42;
  --ud-accent: #c49a2c;        /* muted gold */
  --ud-saffron: #ff9933;
  --ud-green:   #138808;
  --ud-ink:     #1f2937;
  --ud-muted:   #55657a;
  --ud-bg:      #f5f7fb;
  --ud-surface: #ffffff;
  --ud-border:  #e3e8ef;
  --ud-shadow-sm: 0 2px 6px rgba(15, 40, 70, .06);
  --ud-shadow-md: 0 8px 24px rgba(15, 40, 70, .08);
  --ud-shadow-lg: 0 18px 48px rgba(15, 40, 70, .14);
  --ud-radius:   10px;
  --ud-radius-lg: 16px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ud-ink);
  background: var(--ud-bg)
    radial-gradient(1200px 500px at 10% -10%, rgba(11, 79, 122, .08), transparent 60%),
    radial-gradient(900px 400px at 110% 10%, rgba(255, 153, 51, .08), transparent 60%);
  background-attachment: fixed;
  line-height: 1.65;
}

/* Tricolour strip above everything — purely decorative */
body::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--ud-saffron) 0 33.33%,
    #ffffff 33.33% 66.66%,
    var(--ud-green) 66.66% 100%
  );
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Merriweather", "Poppins", Georgia, serif;
  color: var(--ud-primary-darker);
  font-weight: 700;
  letter-spacing: .2px;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.02rem; }

/* Headings followed by <hr> get a colored underline accent */
h1 + hr, h2 + hr, h3 + hr, h4 + hr, h5 + hr {
  border: 0;
  height: 3px;
  width: 68px;
  opacity: 1;
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-accent));
  border-radius: 3px;
  margin-top: .35rem;
  margin-bottom: 1rem;
}

p { color: var(--ud-ink); }
a { color: var(--ud-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ud-primary-dark); text-decoration: underline; }

hr { color: var(--ud-border); opacity: .6; }

/* ---------- Header photo ---------- */
body > div:first-of-type > img[src*="header2.jpg"],
body > div > img[src*="header2.jpg"] {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
  box-shadow: inset 0 -40px 60px -40px rgba(0, 0, 0, .45);
}

/* ---------- Navbar ---------- */
.navbar.navbar-dark {
  /* Deep navy → primary blue with a subtle diagonal highlight overlay */
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(90deg, var(--ud-primary-darker) 0%, var(--ud-primary) 60%, #0d5f8f 100%) !important;
  box-shadow: 0 10px 28px rgba(5, 42, 66, .25);
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 0;
  padding-top: .3rem;
  padding-bottom: .3rem;
  backdrop-filter: saturate(140%);
}

/* Thin gold rule + tricolour hairline above the bottom edge — purely decorative */
.navbar.navbar-dark::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0, rgba(255, 255, 255, .18) 12%,
    rgba(255, 255, 255, .18) 88%, transparent 100%
  );
}
.navbar.navbar-dark::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--ud-saffron) 0 33.33%,
    var(--ud-accent) 33.33% 66.66%,
    var(--ud-green) 66.66% 100%
  );
  opacity: .9;
}

.navbar .container-fluid {
  gap: .35rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* --- Brand (home icon) --- */
.navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-right: .35rem;
  color: var(--ud-primary-darker);
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .25),
    0 6px 14px rgba(0, 0, 0, .18);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus-visible {
  background: #fff;
  transform: translateY(-1px) rotate(-4deg);
  box-shadow:
    0 0 0 3px var(--ud-accent),
    0 10px 22px rgba(0, 0, 0, .25);
}
.navbar .navbar-brand svg {
  width: 22px;
  height: 22px;
  color: var(--ud-primary-darker);
}

/* --- Toggler (mobile) --- */
.navbar .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, .35);
  padding: .35rem .55rem;
  border-radius: 8px;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.navbar .navbar-toggler:hover { background: rgba(255, 255, 255, .08); }
.navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(196, 154, 44, .45);
  border-color: var(--ud-accent);
}
.navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23fff' stroke-width='2' stroke-linecap='round' d='M4 8h22M4 15h22M4 22h22'/%3E%3C/svg%3E");
}

/* --- Nav items --- */
.navbar .navbar-nav { gap: .15rem; }

.navbar .nav-item { position: relative; }

.navbar .nav-link {
  --pad-x: 1rem;
  color: rgba(255, 255, 255, .92) !important;
  font-weight: 500;
  font-size: .94rem;
  letter-spacing: .35px;
  padding: .55rem var(--pad-x) !important;
  border-radius: 8px;
  position: relative;
  transition:
    background-color .2s ease,
    color .2s ease,
    transform .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* Sliding gold underline (always present, grows on hover/active) */
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 4px;
  height: 2px;
  background: var(--ud-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease, opacity .25s ease;
  opacity: .9;
}
.navbar .nav-link:hover::after,
.navbar .nav-link:focus-visible::after,
.navbar .nav-item:hover > .nav-link::after,
.navbar .nav-item.show > .nav-link::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, .10);
}
.navbar .nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 154, 44, .55);
}
.navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, .14);
}
.navbar .nav-item.show > .nav-link {
  background: rgba(255, 255, 255, .14);
}

/* Caret tweak */
.navbar .dropdown-toggle::after {
  margin-left: .45rem;
  border-top-color: var(--ud-accent);
  border-right-color: transparent;
  border-left-color: transparent;
  vertical-align: middle;
  transition: transform .2s ease;
}
.navbar .nav-item.show > .dropdown-toggle::after { transform: rotate(180deg); }

/* --- Dropdown menus --- */
.navbar .dropdown-menu {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--ud-shadow-lg);
  padding: .45rem;
  margin-top: .5rem;
  min-width: 17rem;
  background: #ffffff;
  position: relative;
  overflow: visible;
  animation: udDropdownIn .18s ease-out;
}
.navbar .dropdown-menu::before {
  /* pointer arrow */
  content: "";
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 6px rgba(15, 40, 70, .04);
  border-top-left-radius: 3px;
}
.navbar .dropdown-menu::after {
  /* top accent bar */
  content: "";
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 3px;
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-accent));
  border-radius: 3px;
}

@keyframes udDropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.navbar .dropdown-item {
  border-radius: 8px;
  padding: .55rem .8rem;
  font-size: .92rem;
  line-height: 1.35;
  color: var(--ud-ink);
  white-space: normal;
  position: relative;
  transition: background-color .15s ease, color .15s ease, padding-left .15s ease;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background: rgba(11, 79, 122, .08);
  color: var(--ud-primary-darker);
  padding-left: 1.1rem;
}
.navbar .dropdown-item:hover::before,
.navbar .dropdown-item:focus::before {
  content: "";
  position: absolute;
  left: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--ud-accent);
  border-radius: 3px;
}
.navbar .dropdown-item + .dropdown-item {
  margin-top: 1px;
}

/* --- "Dept of UD&H..." pill label (right side) --- */
.navbar form.d-flex .btn,
.navbar form.d-flex .btn-outline-success {
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  font-weight: 600;
  font-size: .86rem;
  letter-spacing: .4px;
  border-radius: 999px;
  padding: .4rem 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    0 4px 10px rgba(0, 0, 0, .18);
  white-space: nowrap;
  position: relative;
}
.navbar form.d-flex .btn::before {
  /* small gold dot, official feel */
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--ud-accent);
  border-radius: 50%;
  margin-right: .55rem;
  box-shadow: 0 0 0 2px rgba(196, 154, 44, .25);
  vertical-align: middle;
}

/* ---------- Containers / layout ---------- */
.container, .container-fluid { position: relative; }

.container > .row > [class*="col-"] > h2,
.container > .row > [class*="col-"] > h3 {
  scroll-margin-top: 90px;
}

/* Soften the big content blocks with subtle card feel on wider pages */
.container.my-4 > .row:first-child {
  padding-top: .25rem;
}

/* ---------- Notifications (marquee) card ---------- */
marquee {
  display: block;
  max-height: 320px;
  padding: .5rem .25rem;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  border: 1px solid var(--ud-border);
  border-left: 4px solid var(--ud-saffron);
  border-radius: var(--ud-radius);
  box-shadow: var(--ud-shadow-sm);
}

marquee .nav-link {
  color: var(--ud-ink);
  border-bottom: 1px dashed var(--ud-border);
  padding: .55rem .65rem;
  border-radius: 4px;
  transition: background-color .15s ease;
}
marquee .nav-link:last-child { border-bottom: 0; }
marquee .nav-link:hover {
  background: rgba(11, 79, 122, .06);
  color: var(--ud-primary-dark);
  text-decoration: none;
}
marquee .nav-link svg { color: var(--ud-primary); margin-right: 2px; }

/* ---------- Carousel ---------- */
.carousel {
  border-radius: var(--ud-radius-lg);
  overflow: hidden;
  box-shadow: var(--ud-shadow-md);
  border: 1px solid var(--ud-border);
  background: #0b1220;
}
.carousel .carousel-item img {
  width: 100%;
  object-fit: cover;
  max-height: 440px;
}
.carousel-control-prev, .carousel-control-next { width: 8%; }
.carousel-control-prev-icon, .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, .45);
  border-radius: 50%;
  padding: 1.15rem;
  background-size: 55% 55%;
}

/* ---------- Cards / sections ---------- */
.container .row > .col-lg-8 > h3,
.container .row > .col-lg-4 > h3,
.container .row > .col-lg-4 > h4,
.container .row > .col-lg-3 > h5,
.container .row > .col-lg-6 > h5 {
  position: relative;
  padding-bottom: .25rem;
}

/* Wrap-style surface for the main text column on content pages */
main, .container .row > .col-lg-8 > p,
.container .row > .col-lg-8 > ul,
.container .row > .col-lg-8 > ol {
  font-size: 1rem;
}

/* List polish */
ul, ol { padding-left: 1.25rem; }
ul li, ol li { margin-bottom: .35rem; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ud-primary);
  border-color: var(--ud-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--ud-primary-dark);
  border-color: var(--ud-primary-dark);
  box-shadow: 0 6px 16px rgba(11, 79, 122, .25);
}

.btn-outline-danger {
  border-color: #c0392b;
  color: #c0392b;
  font-weight: 600;
}
.btn-outline-danger:hover {
  background: #c0392b;
  border-color: #c0392b;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--ud-border);
  padding: .55rem .8rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ud-primary);
  box-shadow: 0 0 0 .2rem rgba(11, 79, 122, .15);
}
.form-label { font-weight: 500; color: var(--ud-ink); }

/* ---------- Tables ---------- */
.table {
  --bs-table-bg: transparent;
  background: var(--ud-surface);
  border: 1px solid var(--ud-border);
  border-radius: var(--ud-radius);
  overflow: hidden;
  box-shadow: var(--ud-shadow-sm);
  margin-bottom: 1.25rem;
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  background: linear-gradient(180deg, var(--ud-primary), var(--ud-primary-dark));
  color: #fff;
  border-bottom: 0;
  font-weight: 600;
  letter-spacing: .3px;
  padding: .9rem .85rem;
  vertical-align: middle;
}
.table tbody td {
  padding: .75rem .85rem;
  vertical-align: middle;
  border-top: 1px solid var(--ud-border);
  color: var(--ud-ink);
}
.table tbody tr:nth-of-type(even) td {
  background: #f7fafc;
}
.table tbody tr:hover td {
  background: #eef4f9;
}
.table a svg {
  color: var(--ud-primary);
  transition: transform .15s ease, color .15s ease;
}
.table a:hover svg {
  color: var(--ud-primary-dark);
  transform: translateY(1px);
}

/* ---------- Badges ---------- */
.badge.bg-danger {
  background: linear-gradient(135deg, #e53935, #b71c1c) !important;
  box-shadow: 0 2px 8px rgba(183, 28, 28, .25);
  letter-spacing: .4px;
  padding: .35em .65em;
}

/* ---------- Nav lists in footer/sidebar ---------- */
.nav.flex-column .nav-link {
  color: var(--ud-ink);
  padding: .45rem .25rem;
  border-bottom: 1px dashed var(--ud-border);
  border-radius: 4px;
  transition: padding-left .15s ease, background-color .15s ease, color .15s ease;
}
.nav.flex-column .nav-link:last-child { border-bottom: 0; }
.nav.flex-column .nav-link:hover {
  background: rgba(11, 79, 122, .06);
  color: var(--ud-primary-dark);
  padding-left: .75rem;
  text-decoration: none;
}

/* ---------- SWM Portal spinner box ---------- */
.spinner-border.text-danger {
  width: 1rem;
  height: 1rem;
  border-width: .18em;
  vertical-align: middle;
  margin-right: .25rem;
}

/* ---------- Footer (main) ---------- */
footer.bg-dark {
  /* Deep navy with a subtle spotlight to lift the footer line */
  background:
    radial-gradient(1200px 260px at 50% 0%, rgba(11, 79, 122, .35), transparent 70%),
    linear-gradient(180deg, #0b1b2b 0%, #081422 100%) !important;
  color: #cdd6df;
  margin-top: 3rem;
  border-top: 0;
  position: relative;
  overflow: hidden;
}

/* Tricolour hairline on top edge */
footer.bg-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--ud-saffron) 0 33.33%,
    #ffffff 33.33% 66.66%,
    var(--ud-green) 66.66% 100%
  );
  z-index: 2;
}

/* Gold glow rule just under the tricolour */
footer.bg-dark::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0,
    rgba(196, 154, 44, .55) 15%,
    rgba(196, 154, 44, .9) 50%,
    rgba(196, 154, 44, .55) 85%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(196, 154, 44, .35);
}

/* Use the inner <.container> as a flex row */
footer.bg-dark > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.25rem;
  padding-top: 1.1rem !important;
  padding-bottom: 1rem !important;
  position: relative;
}

/* The credit / copyright line */
footer.bg-dark p,
footer.bg-dark .text-muted {
  color: #d5dde6 !important;
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .3px;
  line-height: 1.65;
  margin: 0 !important;
}

footer.bg-dark .text-muted {
  order: 1;
  flex: 1 1 360px;
  padding-left: 2rem;
  position: relative;
}

/* Decorative © medallion before the credit line */
footer.bg-dark .text-muted::before {
  content: "\00A9";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ud-accent), #8f6a16);
  color: #10212e;
  font-weight: 800;
  font-size: .78rem;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 0 0 2px rgba(196, 154, 44, .2),
    0 4px 10px rgba(0, 0, 0, .35);
}

/* Soften the "||" separators already present in the text */
footer.bg-dark .text-muted {
  /* using a slightly brighter base color and letting monospace-ish tracking make pipes look tidier */
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

/* Links inside the credit line (covers the NIC link) */
footer.bg-dark a { color: #e9eef4; }
footer.bg-dark a:hover { color: #fff; text-decoration: none; }

footer.bg-dark .text-muted a {
  display: inline-block;
  margin-left: .2rem;
  padding: .1rem .7rem;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
}
footer.bg-dark .text-muted a:hover,
footer.bg-dark .text-muted a:focus-visible {
  background: linear-gradient(135deg, var(--ud-primary), #0d5f8f);
  border-color: var(--ud-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(11, 79, 122, .45);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Visitor counter widget (injected by js/site.js) */
footer.bg-dark .site-visitor {
  order: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .9rem .35rem .75rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #e9eef4;
  font-size: .8rem;
  letter-spacing: .3px;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 10px rgba(0, 0, 0, .25);
  animation: udVisitorFadeIn .35s ease-out both;
}

@keyframes udVisitorFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

footer.bg-dark .site-visitor svg {
  color: var(--ud-accent);
  flex: 0 0 auto;
  filter: drop-shadow(0 0 4px rgba(196, 154, 44, .35));
}

footer.bg-dark .site-visitor__label {
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .9px;
  font-weight: 700;
  color: #c6d0db;
}

footer.bg-dark .site-visitor__count {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  padding-left: .55rem;
  margin-left: .1rem;
  border-left: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(135deg, #fff1c5, var(--ud-accent));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Back-to-top button (originally .float-end <p>) */
footer.bg-dark .float-end {
  float: none !important;
  order: 3;
  margin: 0 !important;
}

footer.bg-dark .float-end a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  transition: transform .2s ease, background-color .2s ease,
              border-color .2s ease, box-shadow .2s ease;
  position: relative;
}
footer.bg-dark .float-end a::after {
  /* soft ring on hover */
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px dashed rgba(196, 154, 44, 0);
  transition: border-color .25s ease, transform .25s ease;
}
footer.bg-dark .float-end a:hover,
footer.bg-dark .float-end a:focus-visible {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--ud-primary), #0d5f8f);
  border-color: var(--ud-primary);
  box-shadow: 0 10px 22px rgba(11, 79, 122, .45);
  outline: none;
}
footer.bg-dark .float-end a:hover::after {
  border-color: rgba(196, 154, 44, .55);
  transform: rotate(15deg);
}
footer.bg-dark .float-end a svg { color: #fff; width: 22px; height: 22px; }

/* Responsive: stack neatly on small screens */
@media (max-width: 575.98px) {
  footer.bg-dark > .container {
    justify-content: center;
    text-align: center;
    gap: 1rem;
  }
  footer.bg-dark .text-muted {
    order: 3;
    flex: 1 1 100%;
    padding-left: 0;
    padding-top: 2.25rem;
  }
  footer.bg-dark .text-muted::before {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }
  footer.bg-dark .site-visitor {
    order: 2;
    margin: 0 auto;
  }
  footer.bg-dark .float-end {
    order: 1;
    margin: 0 auto !important;
  }
}

/* ---------- Page feature container baseline ---------- */
.container.my-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* ---------- Images ---------- */
img.rounded { border-radius: var(--ud-radius) !important; }
.container img.img-fluid { border-radius: 6px; }

/* Keep header photo square as original (no border-radius) */
body > div > img[src*="header2.jpg"] { border-radius: 0 !important; }

/* ---------- iframes (Google map) ---------- */
iframe {
  border-radius: var(--ud-radius);
  box-shadow: var(--ud-shadow-sm);
  min-height: 320px;
  background: #f3f5f9;
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(11, 79, 122, .85);
  color: #fff;
}

/* ---------- Scrollbars (webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #c6d1dc;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ud-primary); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
  .navbar.navbar-dark { padding-top: .4rem; padding-bottom: .4rem; }

  .navbar .navbar-collapse {
    margin-top: .5rem;
    padding: .5rem;
    background: rgba(0, 0, 0, .22);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .navbar .navbar-nav { gap: 0; }
  .navbar .nav-link {
    padding: .65rem .85rem !important;
    border-radius: 8px;
  }
  .navbar .nav-link::after { display: none; }
  .navbar .nav-link:hover,
  .navbar .nav-link.active,
  .navbar .nav-item.show > .nav-link {
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 3px 0 0 var(--ud-accent);
  }

  .navbar .dropdown-menu {
    box-shadow: none;
    border-top: 0;
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .15);
    margin: .25rem .25rem .5rem;
    padding: .25rem;
    animation: none;
  }
  .navbar .dropdown-menu::before,
  .navbar .dropdown-menu::after { display: none; }
  .navbar .dropdown-item { color: #f1f5f9; }
  .navbar .dropdown-item:hover,
  .navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, .12);
    color: #fff;
  }
  .navbar .dropdown-item:hover::before,
  .navbar .dropdown-item:focus::before { background: var(--ud-accent); }

  .navbar form.d-flex { width: 100%; margin-top: .75rem; }
  .navbar form.d-flex .btn {
    width: 100%;
    white-space: normal;
    font-size: .82rem;
  }

  body > div > img[src*="header2.jpg"] { max-height: 160px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
}

@media (max-width: 575.98px) {
  .container.my-4 { padding-left: .85rem; padding-right: .85rem; }
  .table thead th, .table tbody td { padding: .6rem .55rem; font-size: .92rem; }
}

/* ---------- Print ---------- */
@media print {
  body::before, .navbar, footer, .carousel-control-prev, .carousel-control-next { display: none !important; }
  body { background: #fff; }
  a { color: #000; text-decoration: none; }
}
