/* --- GLOBAL GRID CONTAINER --- */
.curriculum-grid {
    display: grid;
    /* On mobile, stack them. On wider screens, fit 3-4 columns. */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 25px; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- INDIVIDUAL CARD STYLING --- */
.grade-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

/* Title styling */
.grade-card h3 {
    font-size: 1.15em;
    color: #1a5e85; 
    margin: 0 0 15px 0;
    min-height: 50px; 
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Book cover link */
.pdf-link {
    display: block;
    margin-bottom: 15px;
    max-width: 150px; 
}

/* Image styling */
.grade-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.grade-card img:hover {
    transform: translateY(-3px);
}

/* --- DOWNLOAD BUTTONS --- */

/* Base style for all buttons */
.slides-link, 
.download-link {
    display: block;
    width: 90%;
    padding: 10px 0;
    margin-top: 10px; 
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s; /* Added color transition */
    box-sizing: border-box;
}

/* Style for the primary Download Book link */
.download-link {
    background-color: #d3aa4e; /* Your specified gold color */
    color: white; /* Bright white text looks good on this darker gold */
}

.download-link:hover {
    background-color: #b58d3c; /* Darker shade on hover */
    color: white;
}

/* Style for the Lesson Slides link */
.slides-link {
    background-color: #e8c67c; /* Lighter shade of gold */
    color: #333333; /* **DARK GRAY TEXT for contrast on the light background** */
    border: 1px solid #d3aa4e; 
}

.slides-link:hover {
    background-color: #d3aa4e; /* Revert to the main color on hover */
    color: white; /* Switch to white text when the background darkens */
}

/* Style for the N/A (PK) entry remains the same */
.slides-link.unavailable {
    background-color: #ccc;
    color: #666;
    pointer-events: none;
    margin-top: auto; 
    width: 90%;
    border: none;
}

/* --- CONTAINER: Flexbox for alignment --- */
.resource-links-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    justify-content: center; /* Center items horizontally */
    gap: 20px; /* Space between the cards */
    padding: 20px 0;
    margin: 0 auto;
    max-width: 900px;
}

/* --- INDIVIDUAL CARD STYLING: Make the whole card clickable --- */
.resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align content to the top */
    text-align: center;
    text-decoration: none; /* Remove underline from the link */
    width: 250px; /* Base width for each card */
    padding: 20px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hover effect */
.resource-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    background-color: #f0f8ff; /* Light background change on hover */
}

/* --- ICON STYLING --- */
.resource-icon {
    width: 60px; /* Larger, more prominent icon size */
    height: auto;
    margin-bottom: 10px;
}

/* --- TEXT STYLING --- */
.resource-text {
    font-size: 1.1em;
    font-weight: bold;
    color: #1a5e85; /* Your specified color */
    line-height: 1.3;
}

/* Media Query: Stack items vertically on very small screens */
@media (max-width: 600px) {
    .resource-card {
        width: 100%; /* Full width on mobile */
        max-width: 300px; /* Limit max width in case of very wide phones */
    }
}