/* ==========================================
   Groundwater Education Resource Library
   ========================================== */

/* Reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Layout */

.container {
    width: min(1200px, 90%);
    margin: auto;
}

/* ==========================================
   Navigation Bar
   ========================================== */

.navbar{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:40px;
    background:#ffffff;
    padding:18px 0;
    border-bottom:2px solid #e5e5e5;
    position:sticky;
    top:0;
    z-index:1000;
}

.navbar a{
    color:#0b5e7a;       /* Same color as card titles */
    text-decoration:none;
    font-size:1rem;
    font-weight:700;
    transition:0.3s ease;
    padding:6px 10px;
}

.navbar a:hover{
    color:#1686a8;
}

.navbar a::after{
    content:"";
    display:block;
    width:0;
    height:2px;
    background:#0b5e7a;
    transition:0.3s ease;
    margin-top:4px;
}

.navbar a:hover::after{
    width:100%;
}

/* ==========================================
   Header
   ========================================== */

.hero {
    background: #0F4C5C;
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    max-width: 700px;
    margin: auto;
    line-height: 1.6;
}

/* ==========================================
   Filters
   ========================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0;
}

.filters input,
.filters select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.filters input {
    flex: 2;
    min-width: 250px;
}

.filters select {
    flex: 1;
    min-width: 180px;
}

/* ==========================================
   Results Header
   ========================================== */

#resultsInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

#resultsInfo h2 {
    color: #0F4C5C;
}

#resourceCount {
    color: #666;
}

/* ==========================================
   Resource Grid
   ========================================== */

#resourceContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* ==========================================
   Resource Card
   ========================================== */

.resource-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.resource-card h3 {
    color: #0F4C5C;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.organization {
    color: #666;
    margin-bottom: 15px;
    font-weight: bold;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.card-tags span {
    background: #d8eef3;
    color: #0F4C5C;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: bold;
}

.description {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
}

/* ==========================================
   Read More
   ========================================== */
.resource-description{
    color: #555;
    line-height: 1.6;
    margin: 15px 0;

    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;

    transition: all 0.3 ease;
}

.resource-description.expanded{
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.read-more-btn{
    display: block;
    margin: 10px auto 15px;
    background: none;
    border: none;
    color: #0F4C5C;
    font-weight: 600;
    cursor: pointer;
    font-size:0.95rem;
}

.read-more-btn:hover{
  text-decoration:underline;
}

/* ==========================================
   Buttons
   ========================================== */

.view-button {
    width: 100%;
    background: #0F4C5C;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease;
}

.view-button:hover {
    background: #0b3b48;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {

    .hero h1 {
        font-size: 2rem;
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    #resultsInfo {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.footer {
    text-align: center;
}

/* ==========================================
   Contact Section
   ========================================== */

#contact{
    max-width:1200px;
    margin:60px auto;
    padding:35px 40px;
    background:#ffffff;
    border-bottom:2px solid #e5e5e5;
    text-align:center;
}

#contact h2{
    color:#0b5e7a;
    font-size:1.8rem;
    font-weight:700;
    margin-bottom:15px;
}

#contact p{
    color:#333;
    max-width:800px;
    margin:0 auto 15px;
    line-height:1.6;
}

/* ==========================================
   Submit Resource Panel
   ========================================== */

#submit{
    max-width:1200px;
    margin:60px auto;
    padding:35px 40px;
    background:#ffffff;
    border-bottom:2px solid #e5e5e5;
    text-align:center;
}

#submit h2{
    color:#0b5e7a;
    font-size:1.8rem;
    font-weight:700;
    margin-bottom:15px;
}

#submit p{
    color:#333;
    max-width:800px;
    margin:0 auto 15px;
    line-height:1.6;
}

/* Submit Button */

.submit-button{
    display:inline-block;
    margin-top:20px;
    padding:10px 22px;
    color:#0b5e7a;
    background:white;
    border:2px solid #0b5e7a;
    border-radius:6px;
    text-decoration:none;
    font-weight:700;
    transition:0.3s ease;
}

.submit-button:hover{
    background:#0b5e7a;
    color:white;
}
