/* ============================================================
   MARITIME DAILY — style.css
   ============================================================ */

/* ------------------------------------------------------------
   FONTS
   ------------------------------------------------------------ */
   @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@400;600&display=swap');


   /* ------------------------------------------------------------
      CUSTOM PROPERTIES
      ------------------------------------------------------------ */
   :root {
     /* Brand colours */
     --navy:          #0d1e38;
     --navy-mid:      #152a4a;
     --navy-border:   #1e3860;
     --accent:        #2563a8;
     --accent-light:  #e8f0fb;
   
     /* Page */
     --page-bg:       #f0f2f5;
     --card-bg:       #ffffff;
     --border:        #dce0e8;
     --border-subtle: #eaedf2;
     --divider:       #0d1e38;
   
     /* Text */
     --text-primary:   #0d1e38;
     --text-secondary: #3d4f63;
     --text-muted:     #7a8899;
     --text-link:      #2563a8;
   
     /* Typography */
     --font-sans:  'IBM Plex Sans', system-ui, sans-serif;
     --font-serif: 'IBM Plex Serif', Georgia, serif;
   
     /* Spacing */
     --space-xs:  4px;
     --space-sm:  8px;
     --space-md:  16px;
     --space-lg:  24px;
     --space-xl:  40px;
   
     /* Radii */
     --radius-sm: 2px;
     --radius-md: 4px;
   
     /* Layout */
     --max-width: 1200px;
     --header-h:  56px;
   }
   
   
   /* ------------------------------------------------------------
      RESET & BASE
      ------------------------------------------------------------ */
   *, *::before, *::after {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
   }
   
   html {
     font-size: 16px;
     -webkit-text-size-adjust: 100%;
   }
   
   body {
     font-family: var(--font-sans);
     font-size: 14px;
     line-height: 1.5;
     color: var(--text-primary);
     background: var(--page-bg);
     min-height: 100vh;
   }
   
   a {
     color: var(--text-link);
     text-decoration: none;
   }
   
   a:hover {
     text-decoration: underline;
   }
   
   ul {
     list-style: none;
   }
   
   
   /* ------------------------------------------------------------
      SITE HEADER
      ------------------------------------------------------------ */
   .site-header {
     background: var(--navy);
     height: var(--header-h);
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 0 var(--space-lg);
     position: sticky;
     top: 0;
     z-index: 100;
     border-bottom: 1px solid var(--navy-border);
   }
   
   .site-header__brand {
     display: flex;
     align-items: baseline;
     gap: 12px;
   }
   
   .site-header__name {
     font-family: var(--font-serif);
     font-size: 20px;
     font-weight: 600;
     color: #ffffff;
     letter-spacing: 0.01em;
   }
   
   .site-header__tagline {
     font-size: 11px;
     font-weight: 400;
     color: #7a96b8;
     text-transform: uppercase;
     letter-spacing: 0.08em;
     display: none; /* shown at wider breakpoint */
   }
   
   .site-header__meta {
     text-align: right;
   }
   
   .site-header__date {
     font-size: 12px;
     color: #7a96b8;
     font-weight: 400;
   }
   
   .site-header__updated {
     font-size: 11px;
     color: #4e6a8a;
     margin-top: 1px;
   }
   
   @media (min-width: 640px) {
     .site-header__tagline {
       display: inline;
     }
   }
   
   
   /* ------------------------------------------------------------
      NAVIGATION / CATEGORY FILTER BAR
      ------------------------------------------------------------ */
   .nav-bar {
     background: var(--navy-mid);
     border-bottom: 1px solid var(--navy-border);
     overflow-x: auto;
     -webkit-overflow-scrolling: touch;
     scrollbar-width: none;
   }
   
   .nav-bar::-webkit-scrollbar {
     display: none;
   }
   
   .nav-bar__inner {
     display: flex;
     padding: 0 var(--space-lg);
     min-width: max-content;
   }
   
   .nav-bar__item {
     font-size: 11px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.08em;
     color: #6a88aa;
     padding: 10px 14px;
     cursor: pointer;
     border-bottom: 2px solid transparent;
     white-space: nowrap;
     transition: color 0.15s, border-color 0.15s;
     user-select: none;
   }
   
   .nav-bar__item:hover {
     color: #b8ccdf;
   }
   
   .nav-bar__item.is-active {
     color: #ffffff;
     border-bottom-color: #4a8fd4;
   }
   
   
   /* ------------------------------------------------------------
      PAGE LAYOUT
      ------------------------------------------------------------ */
   .page-content {
     max-width: var(--max-width);
     margin: 0 auto;
     padding: var(--space-lg) var(--space-md);
   }
   
   @media (min-width: 640px) {
     .page-content {
       padding: var(--space-lg);
     }
   }
   
   
   /* ------------------------------------------------------------
      SECTION HEADERS
      ------------------------------------------------------------ */
   .section-header {
     display: flex;
     align-items: center;
     gap: var(--space-sm);
     margin-bottom: 12px;
   }
   
   .section-header__label {
     font-size: 10px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.1em;
     color: var(--text-muted);
   }
   
   .section-header__line {
     flex: 1;
     height: 1px;
     background: var(--border-subtle);
   }
   
   .section-header__accent {
     width: 20px;
     height: 2px;
     background: var(--navy);
     border-radius: 1px;
   }
   
   .news-section {
     margin-bottom: var(--space-xl);
   }
   
   
   /* ------------------------------------------------------------
      FEATURED CARD GRID  (top stories — 2 or 3 columns)
      ------------------------------------------------------------ */
   .featured-grid {
     display: grid;
     grid-template-columns: 1fr;
     gap: 10px;
     margin-bottom: var(--space-xl);
   }
   
   @media (min-width: 640px) {
     .featured-grid {
       grid-template-columns: repeat(2, minmax(0, 1fr));
     }
   }
   
   @media (min-width: 1024px) {
     .featured-grid {
       grid-template-columns: repeat(3, minmax(0, 1fr));
     }
   }
   
   /* Featured card */
   .card--featured {
     background: var(--card-bg);
     border: 0.5px solid var(--border);
     border-radius: var(--radius-md);
     padding: var(--space-md);
     display: flex;
     flex-direction: column;
     gap: var(--space-sm);
     transition: border-color 0.15s;
   }
   
   .card--featured:hover {
     border-color: var(--accent);
   }
   
   .card__meta-top {
     display: flex;
     align-items: center;
     gap: var(--space-sm);
   }
   
   .card__timestamp {
     font-size: 11px;
     color: var(--text-muted);
     margin-left: auto;
   }
   
   .card__headline {
     font-family: var(--font-serif);
     font-size: 15px;
     font-weight: 600;
     line-height: 1.4;
     color: var(--text-primary);
   }
   
   .card__summary {
     font-size: 12px;
     line-height: 1.6;
     color: var(--text-secondary);
     flex: 1;
   }
   
   .card__footer {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-top: auto;
     padding-top: var(--space-sm);
     border-top: 0.5px solid var(--border-subtle);
   }
   
   .card__source {
     font-size: 10px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.06em;
     color: var(--text-muted);
   }
   
   .card__region {
     font-size: 10px;
     color: var(--text-muted);
   }
   
   .card__read-link {
     font-size: 11px;
     font-weight: 500;
     color: var(--text-link);
   }
   
   .card__read-link:hover {
     text-decoration: none;
     color: var(--navy);
   }
   
   
   /* ------------------------------------------------------------
      LIST CARD  (standard stories — compact row)
      ------------------------------------------------------------ */
   .card-list {
     display: flex;
     flex-direction: column;
     gap: 0;
     border: 0.5px solid var(--border);
     border-radius: var(--radius-md);
     overflow: hidden;
     background: var(--card-bg);
   }
   
   .card--list {
     display: flex;
     align-items: flex-start;
     gap: 12px;
     padding: 12px var(--space-md);
     border-bottom: 0.5px solid var(--border-subtle);
     transition: background 0.1s;
   }
   
   .card--list:last-child {
     border-bottom: none;
   }
   
   .card--list:hover {
     background: #f8f9fc;
   }
   
   .card--list__tag-col {
     flex-shrink: 0;
     padding-top: 2px;
   }
   
   .card--list__body {
     flex: 1;
     min-width: 0;
   }
   
   .card--list__headline {
     font-family: var(--font-serif);
     font-size: 13px;
     font-weight: 600;
     line-height: 1.45;
     color: var(--text-primary);
     margin-bottom: 3px;
   }
   
   .card--list__summary {
     font-size: 12px;
     color: var(--text-secondary);
     line-height: 1.5;
     margin-bottom: 5px;
   
     /* Clamp to 2 lines on desktop */
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
   }
   
   .card--list__meta {
     font-size: 10px;
     color: var(--text-muted);
     display: flex;
     align-items: center;
     gap: 6px;
   }
   
   .card--list__meta-sep {
     color: var(--border);
   }
   
   .card--list__link {
     flex-shrink: 0;
     align-self: center;
     font-size: 11px;
     font-weight: 500;
     color: var(--text-link);
     white-space: nowrap;
   }
   
   
   /* ------------------------------------------------------------
      CATEGORY TAGS
      ------------------------------------------------------------ */
   .tag {
     display: inline-block;
     font-size: 9px;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.08em;
     padding: 2px 7px;
     border-radius: var(--radius-sm);
     white-space: nowrap;
     line-height: 1.6;
   }
   
   /* Each category has a background and dark text in the same colour family */
   .tag--general {
     background: #e8ecf2;
     color: #2d3f55;
   }
   
   .tag--container {
     background: #ddeeff;
     color: #0a3d7a;
   }
   
   .tag--dry-bulk {
     background: #e4f4e8;
     color: #1a5230;
   }
   
   .tag--tankers {
     background: #fef0e0;
     color: #7a3800;
   }
   
   .tag--ports {
     background: #ede8f8;
     color: #3d1f7a;
   }
   
   .tag--geopolitics {
     background: #fde8e8;
     color: #7a1a1a;
   }
   
   
   /* ------------------------------------------------------------
      TICKER / LAST UPDATED BAR
      ------------------------------------------------------------ */
   .status-bar {
     background: var(--navy);
     padding: 5px var(--space-lg);
     display: flex;
     align-items: center;
     gap: var(--space-sm);
   }
   
   .status-bar__dot {
     width: 6px;
     height: 6px;
     border-radius: 50%;
     background: #3aaa6a;
     flex-shrink: 0;
   }
   
   .status-bar__text {
     font-size: 11px;
     color: #6a88aa;
   }
   
   
   /* ------------------------------------------------------------
      EMPTY STATE
      ------------------------------------------------------------ */
   .empty-state {
     padding: var(--space-xl) var(--space-md);
     text-align: center;
     color: var(--text-muted);
     font-size: 13px;
   }
   
   
   /* ------------------------------------------------------------
      FOOTER
      ------------------------------------------------------------ */
   .site-footer {
     background: var(--navy);
     border-top: 1px solid var(--navy-border);
     padding: var(--space-lg);
     text-align: center;
     margin-top: var(--space-xl);
   }
   
   .site-footer__text {
     font-size: 11px;
     color: #4e6a8a;
     line-height: 1.8;
   }
   
   .site-footer__text a {
     color: #6a88aa;
   }
   
   .site-footer__text a:hover {
     color: #b8ccdf;
     text-decoration: none;
   }
   /* ------------------------------------------------------------
   SITE HEADER — CONTROLS (search + meta grouped)
   ------------------------------------------------------------ */
.site-header__controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}


/* ------------------------------------------------------------
   SEARCH INPUT
   ------------------------------------------------------------ */
.search-input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  height: 30px;
  padding: 0 10px;
  width: 180px;
  outline: none;
  transition: border-color 0.15s, background 0.15s, width 0.2s ease;
  -webkit-appearance: none;
}

.search-input::placeholder {
  color: #4e6a8a;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
  width: 220px;
}

/* Remove browser default clear button on search inputs */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* Mobile — collapse to icon-width by default, expand on focus */
@media (max-width: 639px) {
  .search-input {
    width: 120px;
    font-size: 11px;
  }

  .search-input:focus {
    width: 150px;
  }
}