.category {
    background: #ffffff !important;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* The Header Banner */
.category-header {
    background-color: #3D261A !important; /* Chosen: Deep Espresso Brown */
    color: #FFFFFF !important;            /* Pure White Text */
    padding: 15px 20px;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
    border-radius: 8px 8px 0 0;           /* Rounds top corners to match the category wrapper */
}

/* Your Present White Resource Cards */
.resource-card {
    background: #ffffff !important;       /* Your crisp white cards */
    border: 1px solid #e2e8f0;            /* Soft gray border so white cards stand out on cream */
    padding: 20px;
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* Very subtle depth shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.resource-name {
    font-size: 1.2rem;
    font-weight: 700;                 /* Clear, thick bolding */
    color: #22120B !important;        /* Near-Black Espresso for maximum punch */
    margin-bottom: 8px;
    line-height: 1.3;
}

.resource-details {
    font-size: 0.95rem;
    font-weight: 400;                 /* Regular weight for long reading */
    color: #433E3B !important;        /* Dark Muted Charcoal reduces eye strain */
    line-height: 1.5;                 /* Healthy line spacing between rows */
    margin-bottom: 16px;              /* Pushes contact info neatly away */
}

.resource-contact {
    font-size: 0.92rem;
    font-weight: 600;                 /* Crisp, clean baseline for numbers */
    color: #60534E !important;        /* Warm Medium Brown frames the line nicely */
    display: flex;
    align-items: center;
    gap: 6px;                         /* Even spacing between emoji and number */
}

.resource-contact a {
    color: #9E4733 !important;        /* Deep Terracotta / Rust */
    text-decoration: underline;        /* Keep underlines for clean accessibility */
    text-underline-offset: 3px;        /* Adds professional breathing room under text */
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.resource-contact a:hover {
    color: #3D261A !important;
}

.resource-contact a:active {
    color: #702E20 !important;        /* Dark Crimson feedback click */
}

/* 4. Focus State: For users navigating via keyboard (Accessibility) */
.resource-contact a:focus {
    outline: 2px dashed #9E4733;
    outline-offset: 3px;
}

/* When hovering anywhere on the white card */
.resource-card:hover {
    transform: translateY(-3px);       /* Gently lifts the card up */
    box-shadow: 0 10px 20px rgba(74, 53, 37, 0.08); /* Casts a soft, warm brown shadow */
    border-color: #cbd5e1;             /* Slightly darkens the card border */
}

/* --- FIXED BASE RULES FOR THE GRID --- */
.resource-list,
.resources-layout .resource-list,
.middle-col-content.resources-layout .resource-list {
/*    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; /* Strict 3 column max layout
    gap: 20px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;*/
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Opens up the middle column room ONLY on this specific page template */
.middle-col-content.resources-layout {
   max-width: 1600px !important;
   width: 100%;
}

/* Forces container wide enough to stretch into the newly available real estate */
.resources-layout .container {
    max-width: 1600px !important;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.resources-layout .intro-section {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 10px 0 25px 0;
    margin-bottom: 25px;
    box-sizing: border-box;
    width: 100%;
}

.resources-layout .intro-image-box {
    width: 25%;
    min-width: 220px;
    background-color: #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.resources-layout .intro-image-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.resources-layout .intro-text-box {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.resources-layout .intro-text-box h2 {
    margin: 0 0 10px 0;
    color: #008080;
}

/* --- FIXED RESPONSIVE MEDIA QUERIES --- */
/*media (max-width: 1024px) {
    .resource-list,
    .resources-layout .resource-list,
    .middle-col-content.resources-layout .resource-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* Forces 2 columns on tablet
    }
}*/
@media (max-width: 1024px) {
    .resource-list,
    .resources-layout .resource-list,
    .middle-col-content.resources-layout .resource-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 650px) {
    .resource-list,
    .resources-layout .resource-list,
    .middle-col-content.resources-layout .resource-list {
        grid-template-columns: 1fr !important;
    }

    .resources-layout .intro-section {
        flex-direction: column !important;
    }
    .resources-layout .intro-image-box {
        width: 100% !important;
        height: 200px;
    }
    .resources-layout .intro-text-box {
        width: 100% !important;
        margin-top: 15px;
    }
}


/*@media (max-width: 650px) {
    /* Fixed the combined rules layout bug here
    .resource-list,
    .resources-layout .resource-list,
    .middle-col-content.resources-layout .resource-list {
        grid-template-columns: 1fr !important; /* Stack cards cleanly on mobile
    }*/
    /* Mobile: Clean single-column stack


    .resources-layout .intro-section {
        flex-direction: column !important; /* Vertically stacks intro images on mobile
    }

    .resources-layout .intro-image-box {
        width: 100% !important;
        height: 200px;
    }

    .resources-layout .intro-text-box {
        width: 100% !important;
        margin-top: 15px;
    }
}*/
