/* ============================================
   Immigration New Zealand - Custom Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;700&family=Roboto+Slab:wght@400;700&display=swap');

:root {
  --nz-black: #1a1a1a;
  --nz-white: #ffffff;
  --nz-navy: #1c3660;
  --nz-blue: #2253a3;
  --nz-blue-dark: #163a7a;
  --nz-orange: #e8521a;
  --nz-orange-hover: #c94012;
  --nz-light-bg: #f5f7fa;
  --nz-border: #dce3ef;
  --nz-text: #2d2d2d;
  --nz-muted: #5a6474;
  --nz-link: #2253a3;
  --nz-footer-bg: #1c2a45;
  --nz-alert-bg: #d44000;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  color: var(--nz-text);
  background: var(--nz-white);
  margin: 0;
  padding: 0;
}

a {
  color: var(--nz-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--nz-blue-dark);
}

/* ---- ALERT BANNER ---- */
.alert-banner {
  background: var(--nz-alert-bg);
  color: #fff;
  font-size: 0.875rem;
  padding: 10px 0;
}

.alert-banner a {
  color: #ffe0d0;
  text-decoration: underline;
}

.alert-banner .alert-icon {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--nz-white);
  border-bottom: 1px solid var(--nz-border);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.site-header .logo-img {
  height: 48px;
  width: auto;
}

.header-top-links a {
  font-size: 0.82rem;
  color: var(--nz-muted);
  margin-left: 18px;
}

.header-top-links a:hover {
  color: var(--nz-blue);
}

.btn-login {
  background: var(--nz-navy);
  color: #fff !important;
  border-radius: 4px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-login:hover {
  background: var(--nz-blue);
  color: #fff !important;
  text-decoration: none;
}

/* ---- MAIN NAV ---- */
.main-nav {
  background: var(--nz-white);
  border-top: 1px solid var(--nz-border);
}

.main-nav .nav-link {
  color: var(--nz-navy) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 18px !important;
  position: relative;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--nz-blue) !important;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--nz-orange);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
  transform: scaleX(1);
}

.search-btn {
  background: none;
  border: none;
  color: var(--nz-navy);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 10px 12px;
}

/* ---- HERO ---- */
.hero-section {
  background: linear-gradient(135deg, var(--nz-navy) 0%, var(--nz-blue) 60%, #2f6bbf 100%);
  color: #fff;
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -80px;
  width: 420px;
  height: 420px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: 60px;
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 10px;
}

.hero-section h1 {
  font-family: 'Roboto Slab', serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 540px;
}

.hero-btn {
  background: var(--nz-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
}

.hero-btn:hover {
  background: var(--nz-orange-hover);
  color: #fff;
  text-decoration: none;
}

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  background: #fff;
  border: 1px solid var(--nz-border);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  padding: 18px 22px;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 580px;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.cookie-banner h6 {
  font-weight: 700;
  color: var(--nz-navy);
  margin-bottom: 4px;
  font-size: 1rem;
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--nz-muted);
  margin: 0 0 6px;
}

.cookie-banner a {
  font-size: 0.82rem;
  margin-right: 12px;
}

.btn-accept {
  background: var(--nz-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-accept:hover {
  background: var(--nz-orange-hover);
}

/* ---- ANNOUNCEMENTS ---- */
.section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--nz-navy);
  margin-bottom: 24px;
}

.announcements-section {
  background: var(--nz-light-bg);
  padding: 54px 0;
}

.announcement-card {
  background: #fff;
  border: 1px solid var(--nz-border);
  border-radius: 6px;
  padding: 22px;
  height: 100%;
  transition: box-shadow 0.2s;
}

.announcement-card:hover {
  box-shadow: 0 4px 18px rgba(34,83,163,0.12);
}

.announcement-date {
  font-size: 0.78rem;
  color: var(--nz-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.announcement-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nz-navy);
  margin-bottom: 10px;
  line-height: 1.4;
}

.announcement-card p {
  font-size: 0.88rem;
  color: var(--nz-muted);
  line-height: 1.6;
}

.badge-tag {
  display: inline-block;
  background: #e5edf8;
  color: var(--nz-blue);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 3px 10px;
  margin-right: 6px;
  margin-top: 8px;
}

.btn-all {
  background: var(--nz-blue);
  color: #fff;
  border-radius: 4px;
  padding: 9px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  transition: background 0.2s;
  display: inline-block;
}

.btn-all:hover {
  background: var(--nz-blue-dark);
  color: #fff;
  text-decoration: none;
}

/* ---- TOP VISAS ---- */
.visas-section {
  padding: 54px 0;
  background: #fff;
}

.visa-card {
  border: 1px solid var(--nz-border);
  border-radius: 6px;
  padding: 22px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.visa-card:hover {
  border-color: var(--nz-blue);
  box-shadow: 0 4px 18px rgba(34,83,163,0.10);
}

.visa-card-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.visa-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nz-navy);
  margin: 0;
}

.visa-card p {
  font-size: 0.875rem;
  color: var(--nz-muted);
  line-height: 1.55;
  margin: 0;
  flex-grow: 1;
}

.visa-card a.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nz-blue);
}

/* ---- FIND A VISA ---- */
.find-visa-section {
  background: linear-gradient(90deg, var(--nz-navy) 0%, var(--nz-blue) 100%);
  padding: 52px 0;
  color: #fff;
}

.find-visa-section h2 {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.find-visa-section p {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 20px;
}

.find-visa-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.find-visa-label {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.9;
}

.find-visa-select {
  background: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 36px 10px 14px;
  font-size: 1rem;
  color: var(--nz-navy);
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c3660' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 180px;
}

/* ---- CATEGORY CARDS ---- */
.categories-section {
  padding: 54px 0;
  background: var(--nz-light-bg);
}

.category-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  height: 240px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  transition: transform 0.2s;
}

.category-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
  transition: filter 0.3s;
}

.category-card:hover img {
  filter: brightness(0.6);
}

.category-card-body {
  position: relative;
  z-index: 2;
  padding: 18px 20px;
  width: 100%;
}

.category-card-arrow {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.category-card h4 {
  color: #fff;
  font-family: 'Roboto Slab', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-card p {
  color: rgba(255,255,255,0.88);
  font-size: 0.84rem;
  margin: 0;
  line-height: 1.4;
}

/* ---- VISA LOOKUP ---- */
.visa-lookup-section {
  background: var(--nz-footer-bg);
  padding: 52px 0 36px;
}

.visa-lookup-section h2 {
  font-family: 'Roboto Slab', serif;
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 20px;
}

.lookup-input-wrap {
  display: flex;
  max-width: 360px;
}

.lookup-input {
  flex-grow: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 4px 0 0 4px;
  font-size: 0.95rem;
}

.lookup-input::placeholder {
  color: rgba(255,255,255,0.45);
}

.lookup-input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
}

.lookup-btn {
  background: var(--nz-orange);
  border: none;
  color: #fff;
  padding: 0 18px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.lookup-btn:hover {
  background: var(--nz-orange-hover);
}

.footer-links-col h6 {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-links-col a {
  display: block;
  color: rgba(255,255,255,0.82);
  font-size: 0.88rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: #fff;
  text-decoration: none;
}

/* ---- FOOTER ---- */
.site-footer {
  background: #111d2e;
  padding: 22px 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer a {
  color: rgba(255,255,255,0.6);
  margin-right: 16px;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-brand img {
  height: 38px;
  filter: brightness(0) invert(1) opacity(0.7);
}

.footer-copyright {
  text-align: right;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .main-nav .navbar-collapse {
    background: #fff;
    border-top: 1px solid var(--nz-border);
    padding: 10px 0;
  }

  .category-card {
    height: 200px;
  }
}

@media (max-width: 767px) {
  .hero-section {
    padding: 44px 0 36px;
  }

  .hero-section h1 {
    font-size: 1.7rem;
  }

  .find-visa-select-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copyright {
    text-align: left;
    margin-top: 10px;
  }

  .cookie-banner {
    flex-direction: column;
  }
}


/* ---- MEGA MENU ---- */
.maori-label {
  font-weight: 300;
  font-style: italic;
  opacity: 0.75;
  margin-left: 2px;
}

.chev-icon {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.mega-item {
  position: static !important;
}

.mega-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #1c2a45;
  z-index: 1000;
  border-top: 3px solid var(--nz-orange);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  padding: 36px 0 40px;
}

.mega-item.open > .mega-menu {
  display: block;
}

.mega-item.open > .mega-toggle .chev-icon {
  transform: rotate(180deg);
}

.mega-inner {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.mega-left {
  min-width: 260px;
  max-width: 300px;
  flex-shrink: 0;
}

.mega-left h3 {
  font-family: 'Roboto Slab', serif;
  font-size: 1.7rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.mega-left h3 span {
  font-weight: 300;
  font-style: italic;
  opacity: 0.7;
}

.mega-left p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.mega-right {
  display: flex;
  gap: 40px;
  flex-grow: 1;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 200px;
}

.mega-col a {
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.18s, text-decoration-color 0.18s;
}

.mega-col a:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.5);
}

/* overlay when mega open */
.mega-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0,0,0,0.35);
}

.mega-overlay.show {
  display: block;
}