:root {
  --primary: #0066cc;
  --ocean: #00aeef;
  --turquoise: #00c4b3;
  --white: #ffffff;
  --gray-50: #f5f7fa;
  --gray-100: #edf2f7;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --dark: #1f2937;
  --ink: #0f172a;
  --green: #0f9f6e;
  --amber: #c47f00;
  --coral: #e55353;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  --radius: 8px;
  --container: min(1180px, calc(100% - 40px));

  --nav-blue: #ffffff;
  --nav-blue-dark: rgba(255, 255, 255, 0.95);
  --nav-surface: rgba(0, 150, 160, 0.82);
  --nav-surface-strong: rgba(0, 130, 145, 0.96);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--dark);
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", system-ui, sans-serif;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 80px; /* Account for fixed header */
}

/* body.menu-open no longer sets overflow:hidden — doing so clips fixed dropdowns */

img,
video {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(0, 174, 239, 0.7);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  padding: 1.1rem 1.5rem;
  transition: padding 0.3s ease;
}

.site-header.scrolled {
  padding: 0.5rem 1.5rem;
}

/* ─── Nav shell: glassmorphism pill ─────────────────────────── */
.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 1.2rem;
  direction: rtl;
  background: rgba(0, 150, 160, 0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 32px rgba(0, 100, 120, 0.28),
    0 2px 8px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.18);
  padding: 0.55rem 1.2rem 0.55rem 0.9rem;
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.site-header.scrolled .nav-shell {
  background: rgba(0, 130, 145, 0.96);
  box-shadow: 0 6px 28px rgba(0,80,100,0.30);
}

/* ─── Brand ─────────────────────────────────────────────────── */
.brand {
  order: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.brand strong {
  display: block;
  color: #fff;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.brand small {
  display: block;
  direction: ltr;
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ─── Nav links ──────────────────────────────────────────────── */
.nav-actions {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin-inline: 0;
  position: relative;
  z-index: 3;
}

.nav-actions .nav-account {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-links {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links li {
  display: flex;
}

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.92);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s, color 0.22s, transform 0.18s;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  transform: translateY(-1px);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  background: rgba(255,255,255,0.95);
  color: #007a8a;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* ─── Dropdown nav item ──────────────────────────────────────── */
.has-dropdown {
  position: relative;
}

/* Keep desktop dropdowns open while the pointer crosses the visual gap. */
@media (min-width: 861px) {
  .has-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    inset-inline: -10px;
    height: 12px;
  }
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255,255,255,0.92);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s, color 0.22s;
}

.nav-dropdown-toggle:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.nav-dropdown-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.95);
  color: #007a8a;
}

.dropdown-arrow {
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: rgba(0, 140, 155, 0.98);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: 0 16px 48px rgba(0,80,100,0.35);
  z-index: 200;

  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.dropdown-menu li {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.18);
  transform: none;
}

.nav-links .nav-account {
  display: none !important;
  align-items: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.nav-links a.nav-login,
.nav-actions a.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #007a8a !important;
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700 !important;
  white-space: nowrap;
}

.nav-actions a.nav-login svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.nav-links a.nav-profile,
.nav-links button.nav-profile,
.nav-actions a.nav-profile,
.nav-actions button.nav-profile {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.20);
  box-shadow: 0 2px 10px rgba(0,0,0,0.16);
  flex: 0 0 42px !important;
  cursor: pointer;
}

.nav-links a.nav-profile:hover,
.nav-links button.nav-profile:hover,
.nav-links button.nav-profile[aria-expanded="true"],
.nav-actions a.nav-profile:hover,
.nav-actions button.nav-profile:hover,
.nav-actions button.nav-profile[aria-expanded="true"] {
  background: rgba(255,255,255,0.28);
  transform: translateY(-1px);
  color: inherit;
}

.nav-links a.nav-profile .nav-profile-photo,
.nav-links a.nav-profile .nav-profile-fallback,
.nav-links button.nav-profile .nav-profile-photo,
.nav-links button.nav-profile .nav-profile-fallback,
.nav-actions a.nav-profile .nav-profile-photo,
.nav-actions a.nav-profile .nav-profile-fallback,
.nav-actions button.nav-profile .nav-profile-photo,
.nav-actions button.nav-profile .nav-profile-fallback {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 50%;
  flex: 0 0 auto;
}

.nav-links a.nav-profile .nav-profile-photo,
.nav-links button.nav-profile .nav-profile-photo,
.nav-actions a.nav-profile .nav-profile-photo,
.nav-actions button.nav-profile .nav-profile-photo {
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.nav-actions a.nav-profile > svg,
.nav-actions button.nav-profile > svg {
  width: 22px;
  height: 22px;
  color: #fff;
  flex: 0 0 auto;
}

.nav-links a.nav-profile .nav-profile-fallback,
.nav-links button.nav-profile .nav-profile-fallback,
.nav-actions a.nav-profile .nav-profile-fallback,
.nav-actions button.nav-profile .nav-profile-fallback {
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #007a8a;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.nav-links button.nav-bell,
.nav-actions button.nav-bell {
  position: relative;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: visible;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.20);
  box-shadow: 0 2px 10px rgba(0,0,0,0.16);
  flex: 0 0 42px !important;
  color: #fff;
  cursor: pointer;
  transition: background 0.22s, transform 0.18s;
}

.nav-links button.nav-bell:hover,
.nav-links button.nav-bell[aria-expanded="true"],
.nav-actions button.nav-bell:hover,
.nav-actions button.nav-bell[aria-expanded="true"] {
  background: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.nav-bell-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.nav-bell-icon svg {
  width: 100%;
  height: 100%;
}

.nav-bell-badge {
  position: absolute;
  inset-block-start: -2px;
  inset-inline-end: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e55353;
  color: #fff;
  border: 2px solid rgba(0, 140, 155, 0.9);
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.profile-dropdown {
  min-width: 132px;
  padding: 0.45rem;
}

.profile-dropdown form {
  margin: 0;
}

.profile-dropdown svg,
.profile-logout svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.profile-logout {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.95);
  color: #007a8a;
  cursor: pointer;
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  transition: background 0.18s, color 0.18s;
}

.profile-logout:hover {
  background: #ffffff;
  color: #005f6c;
}

.portal-header {
  padding: 0;
  background: transparent;
}

.portal-header.scrolled {
  padding: 0;
}

.portal-nav {
  width: 100%;
  max-width: none;
  min-height: 58px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0 18px;
  gap: 18px;
  direction: ltr;
}

.site-header.scrolled .portal-nav {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.portal-left-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.portal-tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

.portal-tool:hover {
  background: #f1f5f9;
  color: #008a94;
}

.portal-bell strong {
  position: absolute;
  inset-block-start: -3px;
  inset-inline-end: -2px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #08a996;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
}

.portal-lang {
  border-radius: 8px;
}

.portal-links {
  justify-content: flex-end;
  gap: 0.45rem;
  direction: rtl;
}

.portal-links li {
  width: auto;
}

.portal-links a {
  min-height: 48px;
  gap: 0.34rem;
  color: #64748b;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.35rem 0.62rem;
  border-radius: 8px;
}

.portal-links a:hover {
  background: #f1f5f9;
  color: #008a94;
  transform: none;
}

.portal-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #64748b;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.portal-links a:hover .portal-icon {
  color: #008a94;
}

.portal-links em {
  align-self: flex-start;
  margin-inline-start: -2px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #08a996;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.58rem;
  font-style: normal;
  line-height: 1.35;
}

.portal-left-tools .nav-profile {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 !important;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  overflow: visible;
  box-shadow: none;
}

.portal-left-tools .nav-profile:hover,
.portal-left-tools .nav-profile[aria-expanded="true"] {
  background: transparent;
  color: #008a94;
  transform: none;
}

.portal-left-tools .nav-profile-photo,
.portal-left-tools .nav-profile-fallback {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.portal-left-tools .nav-profile-fallback {
  display: grid;
  place-items: center;
  background: #0ea5a5;
  color: #fff;
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.profile-caret {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1;
}

.portal-left-tools .profile-dropdown {
  top: calc(100% + 8px);
  inset-inline-start: 0;
  inset-inline-end: auto;
  min-width: 164px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.portal-left-tools .profile-dropdown a {
  color: #475569;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.portal-left-tools .profile-dropdown a:hover {
  background: #f1f5f9;
  color: #008a94;
}

.portal-left-tools .profile-logout {
  background: #f8fafc;
  color: #475569;
}

.portal-left-tools .profile-logout:hover {
  background: #eef2f7;
  color: #008a94;
}

/* ─── Menu toggle (mobile) ───────────────────────────────────── */
.menu-toggle {
  order: 0;
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  padding: 9px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.22);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: #fff;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* open state */
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {

  .site-header {
    padding: 0.75rem 1rem;
  }

  .nav-shell {
    flex-wrap: nowrap;
    border-radius: 999px;
    padding: 0.5rem 0.7rem 0.5rem 0.9rem;
    gap: 0.5rem;
  }

  .brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand small {
    display: none;
  }

  .menu-toggle {
    order: 0;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 10px;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
    margin: 0;
  }

  .nav-links {
    order: 4;
    position: fixed !important;
    top: 78px !important;
    left: 1rem !important;
    right: 1rem !important;
    bottom: auto !important;
    width: auto !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.25rem !important;
    padding: 0.9rem !important;
    margin: 0 !important;
    list-style: none !important;
    background: rgba(0, 140, 155, 0.98) !important;
    backdrop-filter: blur(20px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255,255,255,0.22) !important;
    box-shadow: 0 16px 50px rgba(0,80,100,0.40) !important;
    flex: none !important;
    /* hidden by default */
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-10px) scale(0.97) !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
  }

  .nav-links.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    justify-content: center !important;
    padding: 0.85rem 1.2rem !important;
    border-radius: 12px !important;
    font-size: 1.15rem !important;
    text-align: center !important;
    white-space: normal !important;
    color: #fff !important;
    min-height: 50px !important;
  }

  .nav-links a:hover {
    background: rgba(255,255,255,0.18) !important;
    transform: none !important;
  }

  .nav-links a.active,
  .nav-links a[aria-current="page"] {
    background: rgba(255,255,255,0.95) !important;
    color: #007a8a !important;
  }

  /* Mobile dropdown */
  .has-dropdown {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: center !important;
    padding: 0.85rem 1.2rem !important;
    border-radius: 12px !important;
    font-size: 1.15rem !important;
    text-align: center !important;
    color: #fff !important;
    min-height: 50px !important;
    background: transparent !important;
  }

  .nav-dropdown-toggle[aria-expanded="true"] {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
  }

  .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
    overflow: hidden;
    transition: none !important;
  }

  .has-dropdown.is-open .dropdown-menu {
    display: flex !important;
    flex-direction: column !important;
    padding: 0.3rem 0.5rem !important;
    margin-top: 0.25rem !important;
    pointer-events: auto !important;
  }

  .dropdown-menu a {
    justify-content: center !important;
    font-size: 0.95rem !important;
    padding: 0.5rem 0.8rem !important;
  }

  .nav-links .nav-account.nav-profile-menu,
  .nav-links .nav-account.nav-notifications {
    position: static !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .nav-links .nav-account {
    justify-content: center;
    margin-inline-start: 0 !important;
  }

  .nav-links a.nav-login {
    position: static !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    justify-content: center !important;
    font-size: 1rem !important;
    padding: 0.85rem 1.2rem !important;
    font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", system-ui, sans-serif;
  }

  .nav-actions {
    order: 2;
    gap: 0.35rem;
    margin-inline-start: 0;
    flex: 0 0 auto;
  }

  .nav-actions a.nav-login {
    min-height: 38px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
  }

  .nav-actions button.nav-bell,
  .nav-actions button.nav-profile {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex-basis: 38px !important;
  }

  .nav-actions .nav-notifications,
  .nav-actions .nav-profile-menu {
    display: flex;
  }

  .nav-actions .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    inset-inline-end: 0 !important;
    min-width: 176px !important;
    display: block !important;
    padding: 0.45rem !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,0.20) !important;
    border-radius: 14px !important;
    background: rgba(0, 140, 155, 0.98) !important;
    box-shadow: 0 16px 48px rgba(0,80,100,0.35) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) scale(0.97) !important;
  }

  .nav-actions .has-dropdown.is-open .dropdown-menu {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  .nav-actions .dropdown-menu a,
  .nav-actions .profile-logout {
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0.55rem 0.7rem !important;
    background: rgba(255,255,255,0.10) !important;
    color: #fff !important;
    font-size: 0.9rem !important;
  }
}

@media (min-width: 861px) {
  .menu-toggle {
    display: none !important;
  }
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-video,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
  z-index: 0;
}

.hero-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: auto;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 10, 26, 0.76), rgba(2, 10, 26, 0.42) 48%, rgba(0, 102, 204, 0.38)),
    linear-gradient(0deg, rgba(2, 10, 26, 0.74), rgba(2, 10, 26, 0.1) 42%);
  z-index: 1;
  pointer-events: none;
}

/* ─── Hero bottom wave ───────────────────────────────────────── */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: clamp(50px, 8vw, 100px);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: 120px 92px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--turquoise);
  font-family: Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9ffcf4;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 950px;
  margin: 0 auto 22px;
  font-size: clamp(2.15rem, 5.1vw, 5.15rem);
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 140px;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 18px 32px rgba(0, 102, 204, 0.28);
}

.btn-primary:hover {
  background: #0057ad;
}

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
}

.scroll-indicator {
  position: absolute;
  inset-block-end: 26px;
  inset-inline-start: 50%;
  z-index: 2;
  width: 28px;
  height: 48px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
}

.scroll-indicator span {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--white);
  animation: scrollDot 1.45s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.45; }
  50% { transform: translate(-50%, 17px); opacity: 1; }
}

.section {
  padding-block: clamp(72px, 9vw, 118px);
}

.section-heading {
  max-width: 720px;
  margin-block-end: 34px;
}

.section-heading h2,
.about-copy h2,
.map-copy h2,
.contact-info h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.2vw, 3.2rem);
  line-height: 1.28;
  letter-spacing: 0;
}

.section-heading p,
.about-copy > p,
.map-copy p,
.contact-info p {
  color: var(--gray-600);
}

.split-heading {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.text-link {
  color: var(--primary);
  font-weight: 800;
  border-block-end: 2px solid currentColor;
}

.quick-access {
  background: linear-gradient(180deg, var(--white), var(--gray-50));
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.service-card,
.stat-card,
.member-card,
.news-card,
.project-card,
.contact-card {
  border: 1px solid var(--gray-100);
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.service-card {
  min-height: 192px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 18px;
  border: 1px solid rgba(0,174,239,0.12);
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,100,130,0.07);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,174,239,0.06), rgba(0,196,179,0.10));
  opacity: 0;
  transition: opacity 0.25s;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,196,179,0.45);
  box-shadow: 0 16px 40px rgba(0,100,130,0.14);
}

.service-card:hover::before {
  opacity: 1;
}

/* assign unique accent colors per card */
.service-card:nth-child(1) .icon { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.service-card:nth-child(2) .icon { background: linear-gradient(135deg,#6366f1,#a78bfa); }
.service-card:nth-child(3) .icon { background: linear-gradient(135deg,#10b981,#34d399); }
.service-card:nth-child(4) .icon { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.service-card:nth-child(5) .icon { background: linear-gradient(135deg,#ec4899,#f9a8d4); }
.service-card:nth-child(6) .icon { background: linear-gradient(135deg,#00c4b3,#00aeef); }

.icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
}

.service-card h3,
.member-card h3,
.news-card h3,
.project-card h3 {
  margin: 12px 0 6px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.45;
}

.service-card p,
.news-card p,
project-card p {
  margin: 0;
  color: var(--gray-600);
}

.about-section {
  background: var(--white);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
}

.image-panel {
  position: relative;
  min-height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.image-badge {
  position: absolute;
  inset-block-end: 22px;
  inset-inline-start: 22px;
  min-width: 132px;
  padding: 16px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(0, 102, 204, 0.7);
  backdrop-filter: blur(14px);
}

.image-badge strong {
  display: block;
  font-size: 2.15rem;
  line-height: 1;
}

.mission-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mission-grid {
  margin-block: 26px;
}

.mission-grid article {
  padding: 18px;
  border-inline-start: 4px solid var(--turquoise);
  background: var(--gray-50);
  border-radius: var(--radius);
}

.mission-grid h3,
.mission-grid p {
  margin: 0;
}

.mission-grid p {
  color: var(--gray-600);
}

.stat-card {
  padding: 18px;
}

.api-about-facts .api-stat-text {
  max-width: 100%;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.api-about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(100deg, var(--primary), var(--turquoise));
  box-shadow: 0 10px 24px rgba(0, 102, 204, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.api-about-link:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 102, 204, .24);
}

.stat-card strong {
  display: block;
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.2;
  font-family: Arial, sans-serif;
}

.stat-card span {
  color: var(--gray-600);
}

.members-section,
.projects-section,
.contact-section {
  background: var(--gray-50);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.member-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(0,100,150,0.08);
  box-shadow: 0 4px 24px rgba(0,80,120,0.07);
  transition: transform 220ms ease, box-shadow 220ms ease;
  text-align: center;
}

.member-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,80,120,0.14);
}

.member-card img {
  width: 100%;
  aspect-ratio: 4 / 4.2;
  object-fit: cover;
  object-position: top;
  background: var(--gray-100);
}

.member-card div {
  padding: 20px 18px 22px;
}

.role,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.role {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--turquoise));
  box-shadow: 0 3px 10px rgba(0,174,239,0.3);
}

.member-card h3 {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: 1.1rem;
}

.member-card p,
.member-card a {
  display: block;
  margin: 5px 0 0;
  direction: ltr;
  text-align: center;
  color: var(--gray-600);
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
}

.member-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,174,239,0.12), rgba(0,196,179,0.15));
  color: var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.member-card a:hover {
  background: linear-gradient(135deg, rgba(0,174,239,0.22), rgba(0,196,179,0.25));
  transform: scale(1.04);
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
}

.featured-news,
.news-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.featured-news img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.featured-news div {
  padding: clamp(20px, 2.6vw, 30px);
}

.featured-news time,
.news-card time {
  color: var(--primary);
  font-weight: 800;
}

.featured-news h3 {
  margin: 10px 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  line-height: 1.35;
}

.featured-news p {
  color: var(--gray-600);
}

.featured-news a,
.news-card a {
  color: var(--primary);
  font-weight: 800;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  gap: 18px;
}

.news-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.news-card {
  align-self: start;
  padding-block-end: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.news-card time,
.news-card h3,
.news-card a {
  margin-inline: 18px;
}

.news-card time {
  display: block;
  margin-block-start: 14px;
}

.news-card.announcement {
  border-block-start: 4px solid var(--amber);
}

.news-card.event {
  grid-column: 1 / -1;
  border-block-start: 4px solid var(--turquoise);
}

.api-news-section .section-heading > div > p:last-child:not(.eyebrow) {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--gray-600);
}

.news-layout.news-layout-single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.news-grid-count-1 {
  grid-template-columns: 1fr;
}

.news-grid-count-1 .news-card img {
  height: 300px;
}

.news-media-link {
  display: block;
  overflow: hidden;
}

.featured-news img,
.news-card img {
  transition: transform .3s ease;
}

.featured-news:hover img,
.news-card:hover img {
  transform: scale(1.035);
}

.featured-news h3 a,
.news-card h3 a {
  margin: 0;
  color: var(--ink);
}

.news-card h3 {
  margin-block: 10px 12px;
  line-height: 1.55;
}

.featured-news .news-date,
.news-card .news-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 800;
}

.news-card .news-date {
  margin-block-start: 14px;
}

.news-date svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.news-image-placeholder {
  display: grid;
  width: 100%;
  min-height: 220px;
  place-items: center;
  color: var(--primary);
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.featured-news .news-image-placeholder {
  min-height: 340px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  overflow: hidden;
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--soft-shadow);
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-body {
  padding: 20px;
}

.status.active {
  color: var(--green);
  background: rgba(15, 159, 110, 0.1);
}

.status.review {
  color: var(--amber);
  background: rgba(196, 127, 0, 0.12);
}

.status.done {
  color: var(--primary);
  background: rgba(0, 102, 204, 0.1);
}

.progress {
  height: 10px;
  margin-block: 16px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--gray-100);
}

.progress span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--turquoise));
  transform-origin: right;
  animation: growBar 1s ease both;
}

@keyframes growBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-600);
}

.project-meta strong {
  color: var(--primary);
  font-family: Arial, sans-serif;
}

.gallery-section {
  background: var(--white);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--dark);
  padding: 7px 14px;
  cursor: pointer;
}

.tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 14px;
}

.gallery-item {
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--gray-100);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.gallery-item:hover img {
  transform: scale(1.045);
  filter: saturate(1.08);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.is-hidden {
  display: none;
}

.map-section {
  background:
    linear-gradient(180deg, rgba(0, 102, 204, 0.05), rgba(0, 196, 179, 0.08)),
    var(--gray-50);
}

.map-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
}

.facility-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.facility-list button {
  min-height: 38px;
  border: 1px solid rgba(0, 102, 204, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--primary);
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 800;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.facility-list button:hover,
.facility-list button.active {
  border-color: var(--primary);
  color: var(--white);
  background: var(--primary);
  transform: translateY(-1px);
}

.island-map {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(0, 102, 204, .12);
  border-radius: 22px;
  background: #dbeafe;
  box-shadow: var(--shadow);
}

.island-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-location-bar {
  position: absolute;
  inset-inline: 18px;
  inset-block-end: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, .78);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
  backdrop-filter: blur(14px);
}

.map-location-bar span {
  font-weight: 900;
}

.map-location-bar a {
  flex: none;
  padding: 7px 11px;
  border-radius: 9px;
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  background: var(--primary);
}

.map-location-bar a:hover {
  color: #fff;
  background: #0759ad;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 12px;
}

.contact-card {
  padding: 18px;
  background: var(--white);
}

.contact-card strong {
  color: var(--ink);
}

.contact-card p {
  margin: 6px 0 0;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--ink);
  padding: 12px 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  background: var(--white);
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.google-map {
  grid-column: 1 / -1;
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.site-footer {
  background: #102033;
  color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-block: 54px;
}

.footer-logo {
  width: 86px;
  margin-block-end: 16px;
  background: var(--white);
  border-radius: 50%;
  padding: 6px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.12rem;
}

.site-footer a {
  display: block;
  margin-block: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-links a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  font-family: Arial, sans-serif;
  text-transform: uppercase;
}

.social-links svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-block-start: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 10, 26, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: 84svh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox button {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* API-driven homepage sections */
.api-content-section:nth-of-type(even) {
  background: #f5f8fc;
}

.api-section-heading {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0 0 34px;
  text-align: right;
}

.api-section-heading > div {
  width: min(720px, 100%);
  max-width: 720px;
  margin-left: auto;
  text-align: right;
}

.api-writing-heading > div {
  width: min(720px, 100%);
  margin-left: auto;
  text-align: right;
}

.api-section-heading .eyebrow {
  color: #475569;
  font: 800 .82rem/1.4 Inter, sans-serif;
  letter-spacing: .08em;
}

.api-section-heading p {
  max-width: 720px;
  margin: 10px 0 0 auto;
  color: var(--muted, #64748b);
  line-height: 1.8;
}

.api-section-heading h2 {
  font-size: clamp(1.85rem, 3.2vw, 3.2rem);
  line-height: 1.28;
}

.api-view-more {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 0;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 2px;
  border: 0;
  border-bottom: 2px solid #0066cc;
  border-radius: 0;
  color: #0066cc;
  font-weight: 800;
  text-decoration: none;
  background: transparent;
}

.api-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: auto;
  gap: 20px;
  max-width: none;
  margin: 0;
}

.api-content-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}

.api-content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .13);
}

.api-card-media {
  display: block;
  height: 220px;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.api-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.api-content-card:hover .api-card-media img {
  transform: scale(1.04);
}

.api-card-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  color: #0369a1;
  font-size: 3rem;
  font-weight: 900;
}

.api-card-body {
  padding: 16px 18px;
}

.api-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font: 700 .72rem/1.4 Inter, sans-serif;
}

.api-card-meta span {
  color: #0066cc;
}

.api-card-body h3 {
  margin: 10px 0 7px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.api-card-featured {
  grid-column: auto;
  grid-row: auto;
}

.api-content-grid.api-items-1 .api-card-featured {
  grid-column: auto;
}

.api-card-featured .api-card-media {
  height: 220px;
}

.api-card-featured .api-card-body {
  padding: 16px 18px;
}

.api-card-featured .api-card-body h3 {
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.api-card-featured .api-card-body p {
  font-size: .93rem;
}

.api-card-wide {
  grid-column: auto;
}

.api-card-compact .api-card-body p,
.api-card-wide .api-card-body p { display: block; }

.api-card-body h3 a,
.api-card-link {
  color: inherit;
  text-decoration: none;
}

.api-card-body p {
  margin: 0 0 13px;
  color: #64748b;
  font-size: .85rem;
  line-height: 1.75;
}

.api-card-link {
  color: #0066cc;
  font-size: .82rem;
  font-weight: 900;
}

.api-committee-section {
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.api-member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 276px));
  justify-content: center;
  gap: 26px;
  margin-top: 0;
}

.api-member-card {
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  color: #0f172a;
  text-align: center;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.api-member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, .14);
}

.api-member-photo {
  height: 286px;
  overflow: hidden;
  background: linear-gradient(145deg, #eff6ff, #ecfeff);
}

.api-member-photo img,
.api-member-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  object-fit: cover;
  object-position: center top;
  place-items: center;
  color: #0066cc;
  font-size: 4rem;
  font-weight: 900;
}

.api-member-body {
  position: relative;
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 30px 18px 18px;
}

.api-member-role {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  max-width: calc(100% - 28px);
  padding: 7px 16px;
  overflow: hidden;
  border-radius: 999px;
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(90deg, #0284c7, #14b8a6);
  box-shadow: 0 7px 18px rgba(2, 132, 199, .25);
  transform: translate(50%, -50%);
}

.api-member-body h3 {
  margin: 5px 0 8px;
  font-size: 1.08rem;
  line-height: 1.5;
}

.api-member-party {
  margin: 0 0 8px;
  color: #64748b;
  font-size: .8rem;
}

.api-member-email,
.api-member-phone {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 7px auto 0;
  overflow-wrap: anywhere;
  color: #475569;
  font: 500 .8rem/1.4 Inter, sans-serif;
  text-decoration: none;
  white-space: normal;
}

.api-member-email {
  width: 100%;
  overflow: hidden;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-member-phone {
  margin-top: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #0369a1;
  font-weight: 800;
  background: #dff7f8;
}

@media (max-width: 1100px) {
  .api-section-heading {
    width: min(100%, calc(100vw - 48px));
  }

  .api-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .api-card-featured,
  .api-card-wide {
    grid-column: auto;
    grid-row: auto;
  }

  .api-content-grid.api-items-1 .api-card-featured {
    grid-column: auto;
  }

  .api-member-grid { grid-template-columns: repeat(2, minmax(0, 276px)); }
}

@media (max-width: 720px) {
  .api-section-heading {
    width: 100%;
    min-height: 0;
    text-align: right;
  }
  .api-section-heading > div,
  .api-writing-heading > div { width: 100%; margin: 0; text-align: right; }
  .api-view-more { position: static; margin-top: 8px; }
  .api-content-grid { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .api-card-featured,
  .api-card-wide { grid-column: auto; grid-row: auto; }
  .api-content-grid.api-items-1 .api-card-featured { grid-column: auto; }
  .api-member-grid { grid-template-columns: minmax(0, 330px); justify-content: center; }
  .api-card-media { height: 220px; }
  .api-card-featured .api-card-media { height: 220px; }
  .api-card-featured .api-card-body { padding: 16px 18px; }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessible visually-hidden text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* YouTube iframe as hero background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: auto; /* allow user to press Play */
}

@media (max-width: 1100px) {
  .service-grid,
  .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .brand small {
    display: none;
  }

  .hero-content {
    padding-block: 112px 82px;
  }

  /* member grid: 2 columns on tablet/mobile */
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .member-card {
    border-radius: 18px;
  }

  .member-card img {
    aspect-ratio: 1 / 1.1;
  }

  .member-card div {
    padding: 14px 12px 16px;
  }

  .member-card h3 {
    font-size: 1rem;
  }

  .member-card p {
    font-size: 0.78rem;
  }

  .service-grid,
  .news-layout,
  .project-grid,
  .map-layout,
  .contact-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .image-panel,
  .image-panel img {
    min-height: 420px;
  }

  .news-grid,
  .mission-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .masonry-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 150px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --container: min(100% - 28px, 1180px);
  }

  .nav-shell {
    width: calc(100% - 20px);
    height: 68px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-actions,
  .split-heading,
  .project-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .service-card {
    min-height: 150px;
    padding: 18px 14px;
    border-radius: 14px;
  }

  .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .icon svg {
    width: 22px;
    height: 22px;
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .masonry-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .island-map {
    min-height: 380px;
  }

  .map-location-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .map-location-bar a {
    text-align: center;
  }
}

@media (max-width: 860px) {
  .portal-header {
    padding: 0;
  }

  .portal-nav {
    width: 100%;
    height: 58px;
    min-height: 58px;
    border-radius: 0;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.98);
    gap: 10px;
  }

  .portal-left-tools {
    gap: 8px;
  }

  .portal-nav .menu-toggle {
    margin-inline-start: auto;
    border-color: rgba(15, 23, 42, 0.12);
    background: #f8fafc;
  }

  .portal-nav .menu-toggle span {
    background: #64748b;
  }

  .portal-links {
    top: 66px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
  }

  .portal-links li {
    width: 100%;
  }

  .portal-links a {
    color: #64748b !important;
    justify-content: space-between !important;
    min-height: 46px !important;
    padding: 0.7rem 0.95rem !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
  }

  .portal-links a:hover {
    background: #f1f5f9 !important;
    color: #008a94 !important;
  }

  .portal-left-tools .profile-dropdown {
    min-width: 150px;
  }
}

.website-auth-header {
  position: fixed !important;
  inset-block-start: 0 !important;
  inset-inline: 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10000 !important;
  padding: 14px 22px;
  pointer-events: none;
}

.website-auth-header.scrolled {
  padding: 8px 22px;
}

.website-auth-nav {
  width: min(1220px, 100%);
  min-height: 66px;
  margin: 0 auto;
  display: flex !important;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  direction: rtl;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  pointer-events: auto;
}

.website-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.website-auth-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  padding: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.website-auth-brand strong,
.website-auth-brand small {
  display: block;
}

.website-auth-brand strong {
  color: #0f766e;
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
}

.website-auth-brand small {
  direction: ltr;
  color: #64748b;
  font-family: Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.website-auth-links {
  position: static !important;
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  flex: 1 1 auto;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}

.website-auth-links li {
  display: flex;
}

.website-auth-links a {
  min-height: 42px;
  gap: 0.34rem;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  color: #526171;
  font-size: 0.98rem;
  font-weight: 800;
}

.website-auth-links a:hover {
  background: rgba(8, 173, 156, 0.10);
  color: #078477;
  transform: none;
}

.website-auth-icon,
.dropdown-arrow {
  color: currentColor !important;
  flex: 0 0 auto !important;
}

.website-auth-links em {
  align-self: flex-start;
  margin-inline-start: -3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #08a996;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.56rem;
  font-style: normal;
  line-height: 1.35;
}

.nav-login {
  background: rgba(255,255,255,0.95) !important;
  color: #007a8a !important;
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", system-ui, sans-serif !important;
  font-weight: 700 !important;
}

.website-auth-tools {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  direction: rtl !important;
  margin-inline-start: auto !important;
}

.writings-page {
  min-height: 100vh;
  background: #f7fafc;
}

.writings-header .nav-shell {
  background: rgba(0, 130, 145, 0.96);
}

.writings-main {
  padding-block-start: 104px;
}

.writings-hero {
  padding-block: clamp(46px, 7vw, 82px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 102, 204, 0.92), rgba(0, 150, 160, 0.92)),
    url("https://mulah.gov.mv/website/images/island/photo-1.jpeg") center / cover;
}

.writings-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.2;
}

.writings-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 14px 0 0;
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
}

.writings-section {
  background: #f7fafc;
}

.writings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.writings-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.writings-sidebar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-list a,
.category-list p {
  margin: 0;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: #475569;
  background: #f8fafc;
  font-weight: 800;
}

.category-list a {
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.category-list a:hover,
.category-list a.active {
  color: #fff;
  background: linear-gradient(135deg, #0066cc, #00a896);
  transform: translateY(-1px);
}

.writings-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.writing-count {
  min-width: 46px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 4px 12px;
  border-radius: var(--radius);
  color: #006b78;
  background: rgba(0, 196, 179, 0.13);
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.writing-list {
  display: grid;
  gap: 16px;
}

.writing-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.writing-card:not(:has(.writing-thumb)) {
  grid-template-columns: 1fr;
}

.writing-thumb {
  min-height: 210px;
  background: #e2e8f0;
}

.writing-thumb img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.writing-card-body {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: clamp(18px, 3vw, 28px);
}

.writing-card time {
  color: var(--primary);
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
}

.writing-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.35;
}

.writing-card p {
  margin: 0;
  color: var(--gray-600);
}

.writing-empty {
  padding: clamp(24px, 5vw, 44px);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.writing-empty h3,
.writing-empty p {
  margin: 0;
}

.writing-empty p {
  margin-block-start: 8px;
  color: var(--gray-600);
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-block-start: 8px;
}

.pagination-nav a {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 102, 204, 0.16);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.pagination-nav a:hover,
.pagination-nav a.active {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 860px) {
  .writings-main {
    padding-block-start: 84px;
  }

  .writings-layout {
    grid-template-columns: 1fr;
  }

  .writings-sidebar {
    position: static;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writing-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .writings-hero h1 {
    font-size: 2.2rem;
  }

  .category-list {
    grid-template-columns: 1fr;
  }
}

.mashvaraa-page {
  min-height: 100vh;
  background: #f5f7fa;
}

.mashvaraa-main {
  background: #f5f7fa;
  padding-block: 48px 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 140px 60px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #00707e 0%, #0066cc 100%);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://kamadhoo.gov.mv/KMD%20LOGO%20-%20PNG.png") center / 400px no-repeat;
  opacity: 0.04;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  color: #9ffcf4;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0 auto 14px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.28;
}

.page-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255,255,255,0.84);
}

.page-hero-wave {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  z-index: 1;
  line-height: 0;
}

.page-hero-wave svg {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 70px);
}

.mashvaraa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 36px;
  align-items: start;
}

.topics-section h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.75rem;
}

.topics-section > p {
  margin: 0 0 24px;
  color: var(--gray-600);
}

.search-box {
  position: relative;
  margin-block-end: 24px;
}

.search-box input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 2px solid var(--gray-300);
  border-radius: 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(0,196,179,0.12);
}

.search-box .search-icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: auto;
  inset-inline-end: 18px;
  color: var(--gray-600);
  font-size: 1.2rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-item {
  overflow: hidden;
  border: 1px solid rgba(0,100,140,0.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,80,120,0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.topic-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,80,120,0.12);
}

.topic-card-link {
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
  gap: 0;
  min-height: 190px;
  color: inherit;
}

.topic-photo,
.topic-icon {
  width: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0,174,239,0.12), rgba(0,196,179,0.16));
  color: var(--turquoise);
  font-size: 2rem;
}

.topic-photo img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.topic-info {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px);
}

.topic-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 3px 12px;
  border-radius: 999px;
  color: var(--turquoise);
  background: rgba(0,196,179,0.12);
  font-size: 0.82rem;
  font-weight: 800;
}

.topic-title {
  display: block;
  color: var(--ink);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.4;
}

.topic-description {
  display: block;
  color: var(--gray-600);
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--gray-600);
  font-size: 0.88rem;
}

.topic-meta span:last-child {
  color: var(--primary);
  font-weight: 800;
}

.sidebar-card {
  margin-block-end: 20px;
  padding: 28px 24px;
  border: 1px solid rgba(0,100,140,0.10);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 32px rgba(0,80,120,0.08);
}

.sidebar-card h3 {
  margin: 0 0 16px;
  padding-block-end: 10px;
  border-block-end: 2px solid var(--gray-100);
  color: var(--ink);
  font-size: 1.1rem;
}

.category-filter,
.submission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-filter a,
.sidebar-empty {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: 12px;
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: right;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.category-filter a:hover,
.category-filter a.active {
  border-color: var(--turquoise);
  background: rgba(0,196,179,0.12);
  color: var(--turquoise);
}

.submission-item {
  border-inline-start: 4px solid var(--turquoise);
  border-radius: 14px;
  background: var(--gray-50);
}

.submission-item a,
.submission-item > p {
  display: block;
  margin: 0;
  padding: 14px 16px;
}

.submission-item p {
  margin: 6px 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}

.submission-item time {
  display: block;
  color: var(--gray-600);
  direction: ltr;
  font-size: 0.78rem;
  text-align: left;
}

.submission-item .sub-category {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0,196,179,0.12);
  color: var(--turquoise);
  font-size: 0.75rem;
  font-weight: 800;
}

.no-results {
  padding: 60px 20px;
  color: var(--gray-600);
  text-align: center;
}

.no-results h3,
.no-results p {
  margin: 0;
}

.no-results p {
  margin-block-start: 10px;
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-block-start: 24px;
}

.pagination-nav a {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 102, 204, 0.16);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.pagination-nav a:hover,
.pagination-nav a.active {
  background: var(--primary);
  color: #fff;
}

.writing-detail-card {
  overflow: hidden;
  border: 1px solid rgba(0,100,140,0.10);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 32px rgba(0,80,120,0.08);
}

.writing-detail-photo {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  background: var(--gray-100);
}

.writing-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: clamp(22px, 4vw, 34px) clamp(22px, 4vw, 42px) 0;
}

.writing-detail-meta time {
  color: var(--primary);
  direction: ltr;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.writing-detail-card h2 {
  margin: 12px 0 0;
  padding-inline: clamp(22px, 4vw, 42px);
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.35;
}

.writing-detail-summary {
  margin: 12px 0 0;
  padding-inline: clamp(22px, 4vw, 42px);
  color: var(--gray-600);
  font-size: 1.05rem;
}

.writing-detail-body {
  padding: clamp(22px, 4vw, 42px);
  color: var(--dark);
  font-size: 1.08rem;
  line-height: 2;
}

.writing-detail-body :where(p, ul, ol, blockquote) {
  margin-block: 0 1.25em !important;
  background: transparent !important;
  color: var(--dark) !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.writing-detail-body img {
  height: auto;
  border-radius: var(--radius);
}

.writing-files {
  margin: 0 clamp(22px, 4vw, 42px) clamp(22px, 4vw, 42px);
  padding-block-start: clamp(18px, 3vw, 28px);
  border-block-start: 1px solid rgba(15, 23, 42, 0.08);
}

.writing-file-list {
  display: grid;
  gap: 12px;
}

.writing-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0,100,140,0.10);
  border-radius: 14px;
  background: var(--gray-50);
}

.writing-file-item strong,
.writing-file-item span {
  display: block;
}

.writing-file-item strong {
  color: var(--ink);
}

.writing-file-item span {
  color: var(--gray-600);
  direction: ltr;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  text-align: right;
}

.writing-file-item nav {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.writing-file-item nav a {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0,196,179,0.12);
  color: #007a8a;
  font-weight: 900;
}

.writing-file-item nav a:hover {
  background: var(--turquoise);
  color: #fff;
}

.feedback-card {
  border-color: rgba(0,196,179,0.18);
}

.feedback-login-copy,
.feedback-success,
.feedback-error {
  margin: 0 0 14px;
  color: var(--gray-600);
}

.feedback-success {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(15, 159, 110, 0.1);
  color: var(--green);
  font-weight: 800;
}

.feedback-error {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(229, 83, 83, 0.1);
  color: var(--coral);
  font-weight: 800;
}

.feedback-login-btn,
.feedback-submit {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #00aeef, #00c4b3);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(0,174,239,0.24);
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-submit:disabled {
  cursor: wait;
  opacity: 0.78;
}

.feedback-submit-loading {
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.feedback-submit-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: feedback-submit-spin 0.7s linear infinite;
}

@keyframes feedback-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.swal2-popup.website-swal {
  position: relative;
  width: min(430px, calc(100vw - 30px));
  padding: 34px 30px 26px;
  overflow: hidden;
  border: 1px solid rgba(0, 174, 239, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 196, 179, 0.12), transparent 38%),
    #fff;
  box-shadow: 0 24px 70px rgba(15, 42, 67, 0.22);
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", sans-serif;
}

.swal2-popup.website-swal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #0078d4, #00aeef 48%, #00c4b3);
}

.website-swal .website-swal-icon {
  margin: 8px auto 18px;
  transform: scale(0.88);
}

.website-swal .website-swal-title {
  padding: 0;
  color: #10233f;
  font-family: inherit;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.5;
}

.website-swal .website-swal-text {
  margin: 8px 0 0;
  padding: 0;
  color: #52657a;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.9;
}

.website-swal .website-swal-actions {
  margin: 24px 0 0;
}

.website-swal .website-swal-confirm {
  min-width: 130px;
  min-height: 44px;
  padding: 9px 24px;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: linear-gradient(135deg, #008bd2, #00c4b3);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 174, 239, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.website-swal .website-swal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(0, 174, 239, 0.34);
}

.website-swal .website-swal-confirm:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 196, 179, 0.2), 0 8px 22px rgba(0, 174, 239, 0.28);
}

.website-swal .swal2-success-ring {
  border-color: rgba(0, 196, 179, 0.25);
}

.website-swal .swal2-success-line-tip,
.website-swal .swal2-success-line-long {
  background-color: #00b8a9;
}

.website-swal.swal2-icon-warning .website-swal-icon,
.website-swal .swal2-warning {
  border-color: #f4b942;
  color: #f4a621;
}

@media (max-width: 520px) {
  .swal2-popup.website-swal {
    padding: 28px 20px 22px;
    border-radius: 20px;
  }

  .website-swal .website-swal-title {
    font-size: 1.4rem;
  }
}

.feedback-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1.5px solid var(--gray-300);
  border-radius: 12px;
  outline: none;
  background: var(--gray-50);
  color: var(--ink);
  padding: 11px 13px;
  resize: vertical;
}

.feedback-form select,
.feedback-form select option {
  font-family: Faruma, "MV Waheed", Aammu, "MV Faseyha", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: var(--turquoise);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,196,179,0.14);
}

.rating-field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.rating-field legend {
  color: var(--ink);
  font-weight: 800;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  direction: ltr;
}

.rating-options label {
  display: block;
}

.rating-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-options .rating-choice {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 7px 2px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #475569;
  font-family: Inter, Arial, sans-serif;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.rating-options .rating-choice:hover {
  transform: translateY(-3px);
  background: rgba(0,196,179,.07);
}

.rating-options .rating-emoji {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(15,23,42,.12));
}

.rating-options .rating-label {
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.rating-options input:focus-visible + .rating-choice {
  outline: 3px solid rgba(0,174,239,.24);
  outline-offset: 2px;
}

.rating-options input:checked + .rating-choice {
  border-color: var(--turquoise);
  background: rgba(0,196,179,.1);
  color: #007a8a;
  box-shadow: 0 8px 18px rgba(0,196,179,.16);
}

.feedback-thread {
  margin: 0 clamp(22px, 4vw, 42px) clamp(22px, 4vw, 42px);
  padding-block-start: clamp(18px, 3vw, 28px);
  border-block-start: 1px solid rgba(15, 23, 42, 0.08);
}

.feedback-thread-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 16px;
}

.feedback-thread-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.feedback-average {
  min-width: 48px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0,196,179,0.12);
  color: #007a8a;
  font-family: Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
}

.feedback-list {
  display: grid;
  gap: 14px;
}

.feedback-item {
  padding: 16px;
  border: 1px solid rgba(0,100,140,0.10);
  border-radius: 16px;
  background: var(--gray-50);
}

.feedback-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 8px;
}

.feedback-item header strong {
  color: var(--ink);
}

.feedback-item header span {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0,196,179,0.12);
  color: var(--turquoise);
  font-size: 0.78rem;
  font-weight: 900;
}

.feedback-stars {
  display: flex;
  gap: 2px;
  direction: ltr;
  color: #cbd5e1;
  font-family: Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1;
}

.feedback-stars .is-active {
  color: #f59e0b;
}

.feedback-item p {
  margin: 10px 0 0;
  color: var(--dark);
}

.feedback-item time {
  display: block;
  margin-block-start: 8px;
  color: var(--gray-600);
  direction: ltr;
  font-size: 0.78rem;
  text-align: left;
}

.feedback-reply {
  margin-block-start: 14px;
  padding: 13px 14px;
  border-inline-start: 4px solid var(--turquoise);
  border-radius: 12px;
  background: #fff;
}

.feedback-reply strong {
  color: var(--primary);
}

.feedback-empty {
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--gray-50);
  color: var(--gray-600);
}

.feedback-pagination {
  margin-block-start: 16px;
}

@media (max-width: 860px) {
  .page-hero {
    padding-block: 116px 52px;
  }

  .mashvaraa-layout {
    grid-template-columns: 1fr;
  }

  .topic-card-link {
    grid-template-columns: 1fr;
  }

  .topic-photo,
  .topic-icon,
  .topic-photo img {
    min-height: 220px;
  }

  .writing-file-item {
    align-items: stretch;
    flex-direction: column;
  }

  .writing-file-item nav a {
    flex: 1;
  }
}
