/* ------------------------------
   General Styles
------------------------------- */
body {
    font-family: Arial, sans-serif;
    background: #f8f5f0; /* soft off-white */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #111; /* black for text */
}

header {
    background: #bfa44c; /* Vegas Gold */
    color: #111; /* black text */
    padding: 2rem 1rem;
    text-align: center;
}

h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

p {
    margin: 0;
    font-size: 1.1rem;
}

/* ------------------------------
   Controls (Search + Dropdown)
------------------------------- */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    flex-wrap: wrap;
}

#searchBar, #categoryFilter {
    padding: 0.5rem;
    font-size: 1rem;
    width: 200px;
    border-radius: 5px;
    border: 1px solid #bfa44c;
}

/* ------------------------------
   Add Resource Button
------------------------------- */
.add-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #bfa44c; /* Vegas Gold */
    color: #111; /* black text */
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}

.add-button:hover {
    background: #a68f3f; /* slightly darker on hover */
}

/* Header buttons container */
.header-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center overall */
    gap: 0.5rem 1rem;
    margin-top: 1rem;
}

/* All header buttons */
.header-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #bfa44c; /* Vegas Gold */
    color: #111;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.header-btn:hover {
    background: #a68f3f;
    transform: translateY(-2px);
}

/* Smaller buttons */
.header-btn.small-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}


/* ------------------------------
   Category Blocks
------------------------------- */
.category-block {
    margin: 2rem auto;
    max-width: 1200px; /* limits width like a Word doc */
    padding: 0 1rem; /* side padding for margins */
}

.category-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* ------------------------------
   Resource Grid
------------------------------- */
.resource-grid {
    display: grid;
    gap: 1rem;
    /* Default for large screens */
    grid-template-columns: repeat(7, 1fr);
}

/* ------------------------------
   Cards
------------------------------- */
.card {
    background: #fff8e7; /* soft Vegas Gold tint */
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    /* Make card wider than tall */
    width: 100%; /* grid handles width */
    max-height: 180px; /* keeps height shorter */
    min-height: 140px; /* reasonable minimum height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Text and link styles */
.card h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.card p {
    font-size: 0.95rem;
}

.card a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #bfa44c; /* Vegas Gold link */
    text-decoration: none;
    font-weight: bold;
}

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


/* ------------------------------
   Modal Styles
------------------------------- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff8e7;
    margin: 5% auto; 
    padding: 2rem;
    border-radius: 10px;
    max-width: 450px;
    position: relative;
    border: 2px solid #bfa44c;
}

.close {
    color: #111;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover { color: #555; }

#addResourceForm label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

#addResourceForm input, 
#addResourceForm textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 3px;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #bfa44c;
    background: #fff8e7;
}

#addResourceForm button {
    margin-top: 10px;
    padding: 0.5rem 1rem;
    background: #bfa44c;
    color: #111;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#addResourceForm button:hover {
    background: #a68f3f;
}


#addResourceForm select {
    width: 100%;
    padding: 0.5rem;
    margin-top: 3px;
    border-radius: 5px;
    border: 1px solid #bfa44c;
    background: #fff8e7;
}


/* ------------------------------
   Responsive Layout
------------------------------- */

/* Large screens: 7 cards per row (default above) */
@media (max-width: 1400px) {
    .resource-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 1200px) {
    .resource-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 992px) {
    .resource-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .resource-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
    .resource-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
    .resource-grid { grid-template-columns: 1fr; }
}
