/* General Reset */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    overflow-x: hidden;
  }
  
  /* Container */
  .container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
  }
  
  /* Header */
  header {
    background-color: transparent;
    padding: 0;
  }
  
  .header-bar {
    background-color: #fff;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid #ccc;
  }
  
  .site-title h1 {
    margin: 0;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    color: #004080;
  }
  
  .site-icon {
    width: 50px;
    height: 50px;
    margin-right: 0.5rem;
  }
  
  
  
  /* Main Content */
  main {
    margin: 2rem 0;
  }
  
  /* Article Cards */
.article-card {
  display: flex;
  align-items: flex-start;
  background-color: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  gap: 1rem;
}

.article-card .thumbnail {
  width: 140px;
  height: auto;
  max-height: 120px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.article-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.article-date {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.5rem 0 !important;
  font-weight: 500;
}

.article-card p {
  margin: 0;
}

.article-card .mobile-text {
  display: none;
}

.article-card .desktop-text {
  display: block;
}

.article-card div {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .article-card {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
  }
  
  .article-card .thumbnail {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    margin: 0;
    object-fit: cover;
  }
  
  .article-card div {
    flex: 1;
    overflow: visible;
  }

  .article-card h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
  }

  .article-date {
    font-size: 0.75rem;
    margin: 0 !important;
  }

  .article-card .desktop-text {
    display: none;
  }
}

  
  .article-card h2 a {
    text-decoration: none;
    color: #004080;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .article-card h2 a:hover {
    background-color: #eef3fa;
    color: #002855;
  }

  .article-link {
    text-decoration: none;
    color: inherit;
    display: block;
  }
  
  .article-link:hover .article-card {
    background-color: #eef3fa;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  }

  /* full article */

  .article-banner {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin: 1rem 0;
  }
  
  
  /* navigation menu */
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    z-index: 999;
    width: 40px; /* Add width and height */
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  
  
.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .nav-links > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
        width: 100%;
    }

    .nav-links > li:last-child {
        border-bottom: none;
    }

    .nav-links > li > a {
        font-size: 1.1rem;
        padding: 20px;
        width: 100%;
        text-align: center;
        position: relative;
    }

    .dropdown > a {
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        transition: all 0.3s ease-in-out;
    }
}@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        background-color: transparent;
        color: #fff;
        font-size: 1.8rem;
        padding: 8px;
        margin: 0;
        cursor: pointer;
        border: none;
        outline: none;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .menu-toggle:hover {
        color: #E28928;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: #004080;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li a {
        padding: 15px 20px;
        display: block;
        text-align: center;
    }

    .dropdown.active > a::after {
        transform: rotate(180deg);
    }

    .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.1);
        box-shadow: none;
    }

    .dropdown-content.show {
        display: block;
    }

    .dropdown-content li a {
        padding-left: 40px;
        text-align: center;
    }

    /* Mobile specific styles */
    @media (max-width: 768px) {
        .nav-bar {
            padding: 1.5rem 0;
        }
        
        .dropdown-content {
            display: none;
            background-color: #003366;
        }
        
        .dropdown-content.show {
            display: block;
        }

        .nav-links li a {
            color: #fff;
            font-size: 1.1rem;
            padding: 1rem 1.5rem;
        }

        .dropdown-content li a {
            background-color: #003366;
            padding-left: 2.5rem;
        }

        /* Override desktop hover behavior */
        .dropdown:hover .dropdown-content {
            display: none;
        }
    }
}    
  nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin-top: 0.5rem;
  }
  
  nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
  }
  
  nav ul li a:hover {
    color: #E28928;
  }
  

.nav-bar {
    background-color: #004080;
    padding: 1rem 0;
    position: relative;
}
  
.nav-links {
    align-items: center;
}

.nav-bar .container {
    position: relative;
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 0;
    }
    
    .nav-bar .container {
        min-height: 60px;
        display: flex;
        align-items: center;
    }

    .nav-links li a {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 50px;
        position: relative;
        padding: 15px 20px;
    }

    .dropdown > a::after {
        position: absolute;
        right: 25px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    .dropdown.active > a::after {
        transform: translateY(-50%) rotate(180deg);
    }
}  /* --- Dropdown Menu Styles --- */

/* Desktop Dropdown Styles */
@media (min-width: 769px) {
    .dropdown {
        position: relative;
    }

    /* Removed arrow indicator */

    .dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #003366;
        min-width: 180px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 100;
        padding: 0;
        margin: 0;
        list-style-type: none;
        border-top: 1px solid #004080;
    }

    /* Show dropdown on hover for desktop only */
    .dropdown:hover .dropdown-content {
        display: block !important;
    }
}

/* Dropdown links */
.dropdown-content li {
  width: 100%;
}

.dropdown-content li a {
  color: #fff;
  padding: 12px 16px;
  text-decoration: none;
  display: block; /* Makes the entire area clickable */
  font-weight: normal; /* Less bold than main nav links */
  transition: background-color 0.3s;
  white-space: nowrap; /* Prevent sub-menu links from wrapping */
}

.dropdown-content li a:hover {
  background-color: #E28928; /* Highlight on hover */
  color: #000;
}

/* 3. Show the dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* --- Mobile Menu Adjustments --- */

@media (max-width: 768px) {
    .dropdown > a {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.1);
        box-shadow: none;
        border: none;
        min-width: auto;
    }
    
    .dropdown-content.show {
        display: block;
    }
    
    .dropdown-content li a {
        padding: 15px 20px;
        text-align: center;
        background-color: rgba(0, 0, 0, 0.2);
    }
    
    .dropdown-content li:first-child a {
        border-top: none;
    }
    
    .dropdown:hover .dropdown-content {
        display: none;
    }
}

  .thumbnail {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.75rem;
  }
 
  
  /* Footer */
  footer {
    background-color: #eee;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
  }

  /* Price Page */
  .price-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ddd;
  }

  .price-page-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
  }

  .price-unit {
    margin: 0;
    color: #666;
    font-size: 1rem;
  }

  .chart-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .chart-container h2 {
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .table-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
  }

  .table-container h2 {
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
  }

  .price-table thead {
    background-color: #f5f5f5;
    border-bottom: 2px solid #ddd;
  }

  .price-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #333;
  }

  .price-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
  }

  .price-table tbody tr:hover {
    background-color: #fafafa;
  }

  .price-row.up {
    border-left: 3px solid #10b981;
  }

  .price-row.down {
    border-left: 3px solid #ef4444;
  }

  @media (max-width: 768px) {
    .price-table tbody tr[data-href] {
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
    }

    .price-table tbody tr[data-href]:active {
      background-color: #e8f0f7;
      opacity: 0.9;
    }

    .price-table tbody tr[data-href]:hover {
      background-color: #f0f7ff;
    }
  }

  .commodity-name {
    font-weight: 600;
    color: #333;
  }

  .commodity-link {
    color: #004080;
    text-decoration: none;
    transition: color 0.3s;
  }

  .commodity-link:hover {
    color: #002855;
    text-decoration: underline;
  }

  .price-value {
    font-weight: 500;
  }

  .price-change-cell {
    text-align: right;
  }

  .change-percent {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
  }

  .price-date {
    font-weight: 500;
    color: #333;
  }

  .price-value {
    font-weight: 600;
    color: #004080;
  }

  .price-change.positive {
    color: #10b981;
    font-weight: 500;
  }

  .price-change.negative {
    color: #ef4444;
    font-weight: 500;
  }

  .price-percent.positive {
    color: #10b981;
    font-weight: 600;
  }

  .price-percent.negative {
    color: #ef4444;
    font-weight: 600;
  }

  .price-unit-cell {
    color: #666;
    font-size: 0.9rem;
  }

  @media (max-width: 768px) {
    .price-page-header h1 {
      font-size: 1.5rem;
    }

    .chart-container,
    .table-container {
      padding: 1rem;
      margin-bottom: 1.5rem;
    }

    .price-table {
      font-size: 0.85rem;
    }

    .price-table th,
    .price-table td {
      padding: 0.5rem;
    }
  }