/*
Theme Name: HarborModel v3
Version: 3
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600&family=Literata:wght@400;500;600&display=swap');

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

body {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: #1a2b3c;
  background: #f7f9fb;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Literata', serif;
  color: #1a3a5c;
  margin-bottom: 0.75rem;
}

p { margin-bottom: 1rem; line-height: 1.6; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(143, 161, 178, 0.95);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

/* Shrink on scroll */
.site-header.shrink {
  background: rgba(143, 161, 178, 0.85);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: padding 0.25s ease;
}

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

.site-logo {
  font-weight: 600;
  text-decoration: none;
  color: #1a2b3c;
  font-size: 1rem;
}

.site-title {
  display: none; /* hide title to match your screenshot */
}

.main-nav {
  width: 100%;
}

.main-nav ul {
  display: flex;
  gap: 1.75rem;
  justify-content: center;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.9rem;
  color: #1a2b3c;
  font-weight: 500;
}

/* subtle underline animation */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: #1a2b3c;
  transition: width 0.25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav li {
  list-style: none;
}

.main-nav a:hover { color: #000; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  position: absolute;
  right: 1.5rem;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #1a2b3c;
  transition: all 0.3s ease;
}

/* Animate to X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* HERO IMAGE */
.site-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* PAGE HEADER - REMOVED */
/*.page-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #1a3a5c;
  padding-bottom: 1rem;
}*/

.page-header h1 { font-size: 1.75rem; }
.page-header p { color: #4a6278; font-size: 0.9rem; }

/* CONTROLS */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.controls label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4a6278;
}

.controls select {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  border: 1px solid #c0cdd8;
  border-radius: 4px;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
}

/* TABLE */
.table-wrap {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #c0cdd8;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead tr {
  background: #1a3a5c;
  color: #fff;
}

thead th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid #e8edf2;
  transition: background 0.12s ease-in-out;
}

tbody tr:last-child {
  border-bottom: none;
}

/* HOVER EFFECT (this was missing) */
tbody tr:hover {
  background: #f0f5fa;
}

/* SECTION HEADER ROWS */
tbody tr.section-header {
  background: #dce8f2;
  border-bottom: 1px solid #b0c8dc;
}

tbody tr.section-header td {
  font-family: 'Literata', serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a3a5c;
  padding: 0.6rem 1rem;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.table-controls-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.table-controls label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.table-controls input,
.table-controls select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 160px;
}

#resetFilters {
    padding: 6px 12px;
    border: none;
    background: #444;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

#resetFilters:hover {
    background: #222;
}

.table-controls-right {
    font-weight: 600;
    font-size: 14px;
}

/* TABLE CELLS */
tbody td {
  padding: 0.7rem 1rem;
  vertical-align: top;
  color: #1a2b3c;
  line-height: 1.45;
}

/* COLUMN WIDTHS */
.col-year  { width: 90px; white-space: nowrap; color: #4a6278; font-size: 0.82rem; }
.col-type  { width: 155px; }
.col-loc   { width: 145px; white-space: nowrap; }
.col-client{ width: 210px; }
.col-desc  { }

:not(#menu-main-menu) > ul {
  list-style-type: none;
  padding-left: 0;
}

:not(#menu-main-menu) > li {
  display: flex; /* Flexbox prevents the "new row" wrapping issue */
  align-items: flex-start; /* Keeps bullet at the top */
  margin-bottom: 10px;
}

:not(#menu-main-menu) > li::before {
  content: "\2388";
  font-size: 12px;
  color: #999;
  margin-right: 10px; /* Creates the space between bullet and text */
  flex-shrink: 0; /* Prevents the bullet from squishing on small screens */
  line-height: 1.6; /* Adjust this to match your theme's text line-height */
}

/* Target all links in both unvisited and visited states */
a:not(#menu-main-menu a), 
a:not(#menu-main-menu a):visited {
  font-weight: 600;
  color: #0a2a4c;
  text-decoration: none;
}

a:not(#menu-main-menu a):hover {
    color: #FFFFFF;
	background-color: #124f8f;
}

/* SORT INDICATORS */
#projects-table th {
    cursor: pointer;
    position: relative;
    padding-right: 18px;
}

#projects-table th::after {
    content: "⇅";
    position: absolute;
    right: 6px;
    font-size: 10px;
    opacity: 0.4;
}

#projects-table th.sorted-asc::after {
    content: "▲";
    opacity: 1;
}

#projects-table th.sorted-desc::after {
    content: "▼";
    opacity: 1;
}

/* TYPE BADGES (full set restored) */
.type-badge {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
  margin-bottom: 4px;
}

.type-rate       { background: #dce8f2; color: #1a3a5c; }
.type-feasibility{ background: #d6ede8; color: #0d4035; }
.type-bca        { background: #f5e8d0; color: #5a3000; }
.type-strategic  { background: #e8e0f2; color: #3a1a6a; }
.type-business   { background: #fde8e0; color: #6a1a0a; }
.type-economic   { background: #e0f0e8; color: #0a3a1a; }
.type-regulatory { background: #f0e8e0; color: #5a3010; }
.type-other      { background: #e8e8e8; color: #2a2a2a; }

/* REGION BADGE */
.region-badge {
    padding: 4px 8px;
    border-radius: 4px;
    background: #e5eef5;
    font-size: 12px;
    margin-right: 4px;
}

/* FOOTER */
.site-footer {
  margin-top: 3rem;
  background: #fff;
  border-top: 1px solid #c0cdd8;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #6a8298;
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(143,161,178,0.98);
    backdrop-filter: blur(8px);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 80px 0 20px;
    gap: 0;
  }

  .main-nav li {
    text-align: center;
    padding: 14px 0;
    font-size: 1rem;
  }
}

.active-filters {
    margin-bottom: 10px;
}

.filter-tag {
    display: inline-block;
    background: #eee;
    padding: 5px 10px;
    margin-right: 6px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

##projects-table thead th {
    position: sticky;
    top: 0;
    background: #1a3a5c; /* restore blue */
    color: #fff;
    z-index: 5;
    border-bottom: 2px solid #c0cdd8;
}
}

/* BETTER COLUMN BALANCE */
#projects-table td:nth-child(1) { width: 90px; }   /* Year */
#projects-table td:nth-child(2) { width: 160px; }  /* Client */
#projects-table td:nth-child(3) {
	width: 320px;
	font-weight: 600;}  /* Project Name (bigger) */
#projects-table td:nth-child(4) { width: 140px; }  /* Type (smaller) */
#projects-table td:nth-child(5) { width: 160px; }  /* Location */
#projects-table td:nth-child(6) { width: 140px; }  /* Region */

/* Expandable rows */
.details-row {
    display: table-row;
}

.details-row td {
    padding: 0;
    border: none;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0 15px; /* only horizontal padding when closed */
    background: #f9f9f9;
    border-left: 4px solid #ddd;
}

.details-row.open .project-details {
    max-height: 500px; /* adjust if needed */
    padding: 15px;     /* add vertical padding when open */
}

/* Row hover */
.data-row {
    cursor: pointer;
}

.data-row:hover {
    background: #f5f5f5;
}

/* Sticky header */
#projects-table thead th {
    position: sticky;
    top: 0;
    background: #1a3a5c; /* restore blue */
    color: #fff;
    z-index: 5;
    border-bottom: 2px solid #c0cdd8;
}

  /* Animate hamburger into "X" */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

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

.project-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.project-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.project-short {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 20px;
}

.project-image img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.project-meta {
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.project-description {
  line-height: 1.6;
  margin-bottom: 30px;
}

.project-links .btn {
  display: inline-block;
  margin-right: 10px;
  padding: 10px 16px;
  background: #1a2b3c;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.project-links .btn.secondary {
  background: #777;
}

.project-header {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.project-left {
  flex: 1;
}

.project-right img {
  max-width: 300px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .project-header {
    flex-direction: column;
  }
}