/* =========================================
       PREMIUM MARITIME THEME VARIABLES
    ========================================= */
:root {
  --navy-dark: #0A192F;
  --navy-mid: #112240;
  --navy-light: #1D3557;
  --gold: #F39C12;
  /* Logo accent */
  --gold-hover: #D68910;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --text-light: #E6F1FF;
  --text-gray: #8892B0;
  --text-dark: #334155;
  /* For readability on white */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: #EAECEF;

  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-gray);
  background-color: var(--navy-dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================
       TYPOGRAPHY
    ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 24px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--gold);
}

/* =========================================
       BUTTONS
    ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 12px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.btn-primary:hover {
  background-color: var(--gold-hover);
  transform: translateY(-2px);
}

/* =========================================
       HEADER / NAVBAR
    ========================================= */
.site-header {
  position: fixed;
  padding: 0 20px;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.site-header.scrolled {
  background: var(--navy-mid);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1001;
}

.logo img {
  height: 55px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--white);
}

.logo-text span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--white);
  border-radius: 2px;
  transition: var(--transition);
  margin: 6px 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: var(--gold);
}

.nav-arrow svg {
  width: 10px;
  height: 10px;
  transition: var(--transition);
}

.nav-item:hover .nav-arrow svg {
  transform: rotate(180deg);
}

/* --- Dropdown Fix: Invisible Bridge --- */
.nav-item.has-dropdown::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

/* Services Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(10px);
  background: var(--navy-mid);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  padding: 16px;
  min-width: 260px;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  z-index: 999;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-gray);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
  padding-left: 20px;
}

/* Ports Mega Menu (Centered) */
.mega-menu {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-mid);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  padding: 40px;
  width: 90vw;
  max-width: 1100px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  z-index: 999;
  max-height: 70vh;
  overflow-y: auto;
}

.nav-item.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu::-webkit-scrollbar {
  width: 6px;
}

.mega-menu::-webkit-scrollbar-track {
  background: transparent;
}

.mega-menu::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

.mega-menu::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

.mega-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.mega-header-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
}

.mega-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy-dark);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  width: 320px;
  border: 1px solid var(--border-color);
}

.mega-search input {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
  font-family: var(--font-body);
  color: var(--white);
}

.mega-search input::placeholder {
  color: var(--text-gray);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.mega-group h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 16px;
}

.mega-group a {
  display: block;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-gray);
  transition: var(--transition-fast);
}

.mega-group a:hover {
  color: var(--text-white);
  transform: translateX(5px);
}

/* =========================================
       SUBPAGE HERO
    ========================================= */
.subpage-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: var(--navy-dark);
  padding-top: 160px;
  padding-bottom: 80px;
  overflow: hidden;
}

.subpage-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 900px;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 24px;
  font-weight: 500;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--gold);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-gray);
  margin-bottom: 0;
  line-height: 1.8;
}

/* =========================================
       ARTICLE LAYOUT (WIDE EDITORIAL + BENTO)
    ========================================= */
.article-section {
  padding: 100px 0;
  background: var(--navy-mid);
  border-top: 1px solid var(--border-color);
}

/* The main white content card */
.article-card {
  background: var(--white);
  padding: 80px 100px;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  color: var(--text-dark);
  max-width: 1100px;
  margin: 0 auto;
}

.article-card h2 {
  font-size: 2.2rem;
  color: var(--navy-dark);
  margin: 60px 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  scroll-margin-top: 120px;
  /* Offset for sticky header */
}

.article-card h2:first-of-type {
  margin-top: 0;
}

.article-card p {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.8;
}

.article-card strong {
  color: var(--navy-dark);
  font-weight: 600;
}

/* --- NEW BENTO BULLET POINTS --- */
.article-card ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.article-card li {
  font-size: 0.95rem;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--off-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  line-height: 1.5;
}

.article-card li:hover {
  background: var(--white);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Custom numbered bullet style */
.article-card li::before {
  content: '\f00c';
  /* FontAwesome check */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--gold);
  font-size: 0.8rem;
  margin-top: 3px;
}

/* =========================================
       FLOATING TABLE OF CONTENTS
    ========================================= */
.toc-toggle {
  position: fixed;
  bottom: 40px;
  left: 40px;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(243, 156, 18, 0.4);
  z-index: 1000;
  border: none;
  transition: var(--transition);
}

.toc-toggle:hover {
  transform: translateY(-3px);
  background: var(--gold-hover);
}

.toc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.toc-overlay.active {
  opacity: 1;
  visibility: visible;
}

.toc-modal {
  background: var(--navy-mid);
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 40px;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.toc-modal::-webkit-scrollbar {
  width: 6px;
}

.toc-modal::-webkit-scrollbar-track {
  background: transparent;
}

.toc-modal::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

.toc-modal::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

.toc-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.toc-close:hover {
  color: var(--white);
  transform: rotate(90deg);
}

.toc-title-modal {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.toc-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: var(--transition);
}

.toc-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold);
}

.toc-link i {
  color: var(--gold);
  font-size: 0.8rem;
}

/* =========================================
       FOOTER
    ========================================= */
.site-footer {
  background: var(--navy-dark);
  color: var(--text-gray);
  padding: 100px 0 0;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand .logo-text strong {
  color: var(--text-white);
}

.footer-brand p {
  margin-top: 24px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-gray);
  max-width: 350px;
}

.footer-col h4 {
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 28px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links a {
  color: var(--text-gray);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 8px;
}

.footer-contact li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-gray);
  align-items: flex-start;
}

.footer-contact i {
  color: var(--gold);
  margin-top: 5px;
}

.footer-bottom {
  padding: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* =========================================
       FLOATING WHATSAPP
    ========================================= */
.whatsapp-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(10deg);
}

/* Footer WhatsApp Button */
.hero-whatsapp-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0B132B;
  padding: 10px 20px;
  border-radius: 50px;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid rgba(243, 156, 18, 0.15);
  max-width: fit-content;
  margin-top: 10px;
}

.hero-whatsapp-bar:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.25);
  border-color: rgba(243, 156, 18, 0.3);
}

.hero-whatsapp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #25D366;
  border-radius: 50%;
  color: white;
  flex-shrink: 0;
}

.hero-whatsapp-icon svg {
  width: 16px;
  height: 16px;
}

.hero-whatsapp-tag {
  color: #25D366;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-whatsapp-num {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.hero-whatsapp-arrow {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 4px;
}

/* =========================================
       RESPONSIVE DESIGN
    ========================================= */
@media (max-width: 1024px) {

  /* Mobile Navbar Padding Fix */
  .header-inner {
    padding: 16px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 120px 32px 40px;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    align-items: flex-start;
    gap: 20px;
  }

  .primary-nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 8px;
    align-items: flex-start;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 16px;
    font-size: 1.1rem;
    color: var(--text-white);
  }

  /* Mobile Dropdown Styles */
  .dropdown-menu,
  .mega-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0 0 16px !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    display: block !important;
    width: 100% !important;
    margin-top: 0;
  }

  .nav-item.open .dropdown-menu,
  .nav-item.open .mega-menu {
    max-height: 3000px !important;
    margin-top: 10px;
  }

  .nav-item.has-dropdown::after {
    display: none;
  }

  .dropdown-menu a,
  .mega-group a {
    padding: 12px !important;
    color: var(--text-gray) !important;
    font-size: 0.95rem !important;
  }

  .mega-header {
    display: none;
  }

  .mega-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mega-group h4 {
    color: var(--gold);
    margin-bottom: 8px;
    padding: 8px 12px;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Article Layout Adjustments */
  .article-card {
    padding: 40px;
  }

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

  .toc-links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .subpage-hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .article-card {
    padding: 24px;
  }

  .article-card h2 {
    font-size: 1.8rem;
  }

  .article-card p {
    font-size: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand p {
    margin: 24px auto 0;
  }

  .footer-contact li {
    justify-content: center;
    text-align: left;
  }

  .hero-whatsapp-bar {
    margin: 10px auto 0;
  }

  /* Adjust TOC button for mobile */
  .toc-toggle {
    bottom: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 0.8rem;
  }
}