/* ==========================================================================
   KOTA RANKERS POINT (KRP) · LAYOUT & GLOBAL NAVIGATION
   ========================================================================== */

/* 1. ANNOUNCEMENT TOPBAR */
.announcement-bar {
  background-color: var(--navy-950);
  color: var(--on-navy-muted);
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
  overflow: hidden;
  max-width: 100%;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.announcement-bar.is-dismissed {
  display: none;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding-top: 4px;
  padding-bottom: 4px;
  gap: 1rem;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-500);
  color: var(--navy-950);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.announcement-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.announcement-contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

.announcement-contact a {
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.8125rem;
}

.announcement-contact a:hover {
  color: var(--gold-400);
}

@media (max-width: 640px) {
  .announcement-contact a {
    display: none;
  }
}

.announcement-close {
  background: transparent;
  border: none;
  color: var(--on-navy-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.announcement-close:hover {
  color: var(--white);
}

/* 2. SCROLL PROGRESS BAR */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--grad-gold);
  width: 0%;
  z-index: 9999;
  transition: width 0.08s ease-out;
}

/* 3. MAIN HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--white);
  border-bottom: 1px solid rgba(11, 27, 61, 0.08);
  box-shadow: 0 2px 12px rgba(6, 13, 43, 0.04);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  padding: 0.85rem 0;
}

/* When scrolled down: compact padding, elevated shadow, frosted backdrop */
.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(6, 13, 43, 0.08);
  padding: 0.6rem 0;
}

/* Container sizing specifically for sticky header */
.site-header .container {
  max-width: 1440px;
  padding-left: clamp(1rem, 2vw, 2.5rem);
  padding-right: clamp(1rem, 2vw, 2.5rem);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.brand-logo img,
.brand-logo svg {
  height: 46px;
  width: auto;
  display: block;
  vertical-align: middle;
}

/* Desktop Navigation Links */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

@media (min-width: 1040px) {
  .main-nav {
    display: flex;
  }
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.65rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--navy-900);
  position: relative;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
  white-space: nowrap !important; /* CRITICAL: Never break text into two lines */
  flex-shrink: 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.65rem;
  right: 0.65rem;
  height: 2px;
  background-color: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.nav-link.is-active {
  color: var(--royal-600);
}

/* Compact scaling for laptops and medium desktops (1040px - 1220px) */
@media (min-width: 1040px) and (max-width: 1220px) {
  .site-header {
    padding: 0.65rem 0;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .brand-logo img,
  .brand-logo svg {
    height: 40px;
    display: block;
    vertical-align: middle;
  }

  .main-nav {
    gap: 0.05rem;
  }

  .nav-link {
    padding: 0.4rem 0.45rem;
    font-size: 0.8125rem;
    gap: 0.2rem;
  }

  .nav-link::after {
    left: 0.45rem;
    right: 0.45rem;
  }

  .header-actions .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
  }
}

/* Mega Menu Dropdown */
.has-megamenu:hover .megamenu,
.has-megamenu:focus-within .megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.megamenu {
  position: absolute;
  top: 100%;
  left: -200px;
  width: 960px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 1.75rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 280px;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1050;
}

.megamenu-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.megamenu-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.megamenu-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: background-color 0.2s, transform 0.15s;
}

.megamenu-item:hover {
  background-color: var(--sky-50);
  color: var(--royal-600);
  transform: translateX(3px);
}

.megamenu-item-title {
  font-weight: 700;
  font-size: 0.875rem;
  display: block;
}

.megamenu-item-desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.3;
}

/* Featured Card in Megamenu */
.megamenu-featured {
  background: var(--grad-hero);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.megamenu-featured::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background-image: url('../svg/shield.svg');
  background-size: contain;
  opacity: 0.15;
}

.megamenu-featured h5 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.megamenu-featured p {
  font-size: 0.8125rem;
  color: var(--on-navy-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Header CTAs */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy-900);
  border-radius: var(--radius-sm);
}

@media (min-width: 1040px) {
  .mobile-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-logo img,
  .brand-logo svg {
    height: 38px;
  }

  .header-actions .btn {
    display: none;
  }
}

/* Mobile Nav Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background: var(--navy-950);
  color: var(--white);
  z-index: 2000;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.35s, box-shadow 0.35s;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 43, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-links a {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  display: block;
  padding: 0.35rem 0;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.is-active {
  color: var(--gold-400);
}

.mobile-sublinks {
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-left: 2px solid var(--navy-800);
}

.mobile-sublinks a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-navy-muted);
}

/* 4. INNER PAGE HERO */
.inner-hero {
  background: var(--grad-hero);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../svg/texture-grid.svg');
  opacity: 0.15;
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inner-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-align: center;
}

.inner-hero .lead {
  color: var(--on-navy-muted);
  margin-bottom: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
  text-align: center;
}

.inner-hero .eyebrow {
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
}

.inner-hero-content > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-navy-muted);
  margin-bottom: 1.25rem;
}

.inner-hero .breadcrumbs {
  justify-content: center;
}

.breadcrumbs a {
  color: var(--on-navy-muted);
}

.breadcrumbs a:hover {
  color: var(--gold-400);
}

.breadcrumbs-sep {
  opacity: 0.5;
}

.breadcrumbs-current {
  color: var(--gold-400);
  font-weight: 700;
}

/* 5. TRUST STRIP COMPONENT */
.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  box-shadow: 0 4px 16px rgba(6, 13, 43, 0.03);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trust-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--sky-50);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--royal-600);
}

.trust-item h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
  margin-bottom: 2px;
}

.trust-item p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.35;
  margin-bottom: 0;
}

/* 6. FOOTER CTA BAND */
.footer-cta-band {
  background: var(--navy-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--gold-500);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.footer-cta-band::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background-image: url('../svg/compass-rose.svg');
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
}

.footer-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .footer-cta-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
}

.footer-cta-band h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-cta-band p {
  color: var(--on-navy-muted);
  font-size: 1.125rem;
}

/* 7. MAIN FOOTER */
.site-footer {
  background-color: var(--navy-950);
  color: var(--on-navy-muted);
  padding: 4.5rem 0 2rem;
  font-size: 0.9375rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: var(--gold-500);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--on-navy-muted);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--gold-400);
  padding-left: 3px;
}

.footer-brand p {
  margin-top: 1rem;
  line-height: 1.6;
  font-size: 0.875rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.footer-contact-icon {
  color: var(--gold-500);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-map-preview {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-map-preview iframe {
  width: 100%;
  height: 130px;
  border: 0;
  display: block;
}

.footer-disclaimer-box {
  background: rgba(10, 26, 79, 0.5);
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--on-navy-muted);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

/* 8. FLOATING ACTIONS & MOBILE BOTTOM BAR */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 990;
}

@media (max-width: 480px) {
  .floating-actions {
    right: 16px;
    bottom: 16px;
  }
}

/* WhatsApp Floating Button */
.btn-float-wa {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background-color: var(--wa);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-decoration: none;
}

.btn-float-wa-text {
  display: none;
}

.btn-float-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
  color: var(--white);
}

.wa-pulse {
  animation: waPulse 8s infinite;
}

@keyframes waPulse {
  0%, 90%, 100% {
    transform: scale(1);
  }
  93% {
    transform: scale(1.15);
  }
  96% {
    transform: scale(0.96);
  }
}

/* Desktop Floating WhatsApp Button Centered */
@media (min-width: 768px) {
  .btn-float-wa {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 50px;
    padding: 0 24px 0 18px;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    z-index: 990;
  }

  .btn-float-wa svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .btn-float-wa-text {
    display: inline-block;
  }

  .btn-float-wa:not(:has(.btn-float-wa-text))::after {
    content: "Chat on WhatsApp";
    display: inline-block;
  }

  .btn-float-wa:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6), 0 4px 10px rgba(0, 0, 0, 0.2);
    color: var(--white);
  }

  .btn-float-wa.wa-pulse {
    animation: waPulseCenter 8s infinite;
  }

  @keyframes waPulseCenter {
    0%, 90%, 100% {
      transform: translateX(-50%) scale(1);
    }
    93% {
      transform: translateX(-50%) scale(1.05);
    }
    96% {
      transform: translateX(-50%) scale(0.98);
    }
  }
}

/* Scroll to top with progress ring */
.btn-scroll-top {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--navy-900);
  color: var(--gold-500);
  border: 1px solid rgba(255, 184, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
}

.btn-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.btn-scroll-top:hover {
  transform: translateY(-3px);
  background: var(--navy-800);
}

/* Sticky Mobile Action Bar */
.mobile-action-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-950);
  border-top: 1px solid rgba(255, 184, 0, 0.3);
  z-index: 1000;
  padding: 8px 12px;
  gap: 8px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-action-bar.is-visible {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .mobile-action-bar {
    display: none !important;
  }
}

.mobile-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.8125rem;
  text-decoration: none;
}

.mobile-action-call {
  background: var(--navy-800);
  color: var(--white);
  border: 1px solid var(--line-dark);
}

.mobile-action-wa {
  background: var(--wa);
  color: var(--white);
}

.mobile-action-enquire {
  background: var(--grad-gold);
  color: var(--navy-950);
}
