/* ==============================================
   RESOURCES PAGE - CLEANED & ORGANIZED STYLES
   (This version is visually identical to the original)
   ============================================== */

.resources-page main {
    background-color: #f8f9fa; /* A subtle background for the page */
}

.resources-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.resources-header {
    text-align: center;
    margin-bottom: 4rem;
}

.resources-header h1 {
/*    font-family: 'Lora', serif;*/
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.resources-header h1::after {
    content: '';
    display: block;
    width: 185px;
    height: 4px;
    background-color: #C0A062; /*var(--overview-top-color); /* Your golden accent color */
    margin-top: 1.25rem; /* Space between text and line */
    /* ADD THESE TWO LINES TO CENTER THE LINE UNDER THE HEADING */
    margin-left: auto;
    margin-right: auto;
}

.resources-header p {
    font-size: 1.15rem;
    color: #555;
    max-width: 1100px; /* Constrain subtitle width */
    margin: 0 auto;
}

/* --- The Main Resource Grid --- */
.resource-grid {
    column-count: 3; /* The fast initial layout */
    column-gap: 0.75rem;
}

/* --- The Individual Resource Card --- */
.resource-card {
    /* This is the key: it prevents a single card from being
       split across the bottom of one column and the top of the next. */
    break-inside: avoid;
    
    /* We add margin-bottom here to create vertical space between cards in the SAME column. */
    margin-bottom: 0.5rem;
    
    /* --- Your existing card styles --- */
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    /*transition: transform 0.3s ease, box-shadow 0.3s ease;*/ /*do not use this as this causes flicker in column two*/

/* We will now transition the box-shadow instead of the transform */
    transition: box-shadow 0.3s ease; /* Only transition the shadow */
}

.resource-card:hover {
/*    transform: translateY(-6px);*/
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* The icon at the top of the card */
.card-icon {
    text-align: center;
    padding: 1rem 0 0; /* Top | Left/Right | Bottom */
    font-size: 3rem;
    color: var(--accent-color-hover); /* Your site's accent color */
}

.card-icon i {
    /* This forces the icon's line box to be the same height as the icon itself */
    line-height: 0;
    
    /* This helps ensure consistent vertical alignment */
    vertical-align: middle;
}

/* The main text content of the card */
.card-content {
    padding: 0 2rem 1.5rem;
    /*flex-grow: 1;*/ /* This is the key: it pushes the footer down This line can be safely deleted */
}

.card-content h3 {
    font-family: 'Lora', serif;
    text-align: center;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

/* The main text content of the card */
.card-content-github {
    padding: 0 2rem 1.5rem;
    /*flex-grow: 1;*/ /* This is the key: it pushes the footer down This line can be safely deleted */
}

.card-content-github h3 {
    font-family: 'Lora', serif;
    text-align: center;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* The main text content of the card */
.card-content-lecture {
    padding: 0 2rem 1.5rem;
    /*flex-grow: 1;*/ /* This is the key: it pushes the footer down This line can be safely deleted */
    /* ADD THIS LINE to create space below the thumbnail */
    margin-top: 0rem; /* Adjust this value (e.g., 1.5rem) as needed */
    text-align: center;
}

.card-content-lecture h3 {
    font-family: 'Lora', serif;
    text-align: center;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.card-content p {
    line-height: 1.7;
    color: #34495e;
    text-align: center;
}

/* The footer of the card, containing the button */
.card-footer {
    padding: 1.5rem 2rem;
    /*margin-top: auto;*/ /* Pushes the footer to the bottom This line can be safely deleted */
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.card-button {
    /* --- Layout & Box Model --- */
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #2c3e50; /* Add border width here for consistency */
    
    /* --- Typography --- */
    text-decoration: none; /* Crucial for <a> tags */
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit; /* CRITICAL: Forces <button> to use the main page font */
    text-align: center;   /* CRITICAL: Centers text in <button> elements */
    
    /* --- Appearance --- */
    cursor: pointer;
    background-color: #2c3e50;
    color: #fff;
    border-radius: 50px; /* Pill shape */
    
    /* --- Animation --- */
    transition: all 0.3s ease;
}

.card-button:hover {
    background-color: transparent;
    color: #2c3e50;
    transform: translateY(-2px);
}

/*@media (max-width: 768px) {*/
/*    */
/*    .resource-grid {*/
/*        /* Switch to a single column on screens 768px or less */
/*        grid-template-columns: 1fr;*/
/*    }*/
/*}*/


/* In resources.css, find this block at the end of the file */

/* --- 6. Responsive Design --- */

/* This rule will apply to any screen with a width of 768px or less */
@media (max-width: 768px) {
    
    .resource-grid {
        /* On smaller screens, switch from two columns to a single column */
        column-count: 1;
    }

    /* It's also good practice to reduce the overall padding on mobile */
    .resources-container {
        padding: 3rem 1.5rem;
    }

    .resources-header h1 {
        font-size: 2.2rem;
    }
}


/* ==============================================
   ADD THIS to resources.css before the @media queries
   - Minimal styles for the new lecture series card.
   ============================================== */

/* --- Styles for Lecture Series Card --- */

/* The thumbnail image at the top of the card */
.card-thumbnail {
    width: 100%; /* Make the image fill the width of the card */
/*    height: 340px; /* Give it a consistent height */*/
    object-fit: cover; /* Ensures the image covers the area without distortion */
/*    margin-bottom: 1rem;*/
}

/* =============================================================
   IN resources.css, REPLACE your old .lecture-links styles
   with this new, improved "pill button" grid design.
   ============================================================= */

/* The list of lecture links */
.lecture-links {
    list-style: none;
    padding-left: 0;
/*    margin-top: 1rem;*/
/*    padding-top: 1rem; /* Add space above the list */
/*    border-top: 1px solid #e0e0e0;*/
    
    /* This creates the button grid */
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap to the next line if needed */
    gap: 0.75rem; /* The space between the buttons */
    
    /* ADD THIS LINE to center the buttons */
    justify-content: center;
}

/* This styles the list item, which is now just a container */
.lecture-links li {
    padding: 0;
    border: none;
}

/* This is the main style for the "pill button" */
.lecture-links a {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    
    /* Sizing and Shape */
    padding: 5px 10px;
    border-radius: 50px; /* This creates the "pill" shape */
    
    /* Colors */
    /*background-color: #eef2f7;*/ /* A subtle, light gray background */
/*    color: #34495e;*/
/*    border: 1px solid #d0dbe5;*/

/* --- CHANGE THESE LINES --- */
    background-color: #16a085; /* The new sea green color */
    border: 1px solid #16a085; /* A matching border color */
    color: #fff;               /* Change text to white for better contrast */
    
    transition: all 0.2s ease-in-out;
}

/* The hover effect */
/*.lecture-links a:hover {*/
/*    background-color: var(--accent-color-hover);*/
/*    border-color: var(--accent-color-hover);*/
/*    color: #fff;*/
/*    transform: translateY(-2px);*/
/*    box-shadow: 0 4px 10px rgba(0,0,0,0.1);*/
/*}*/

/* In resources.css, replace the old hover rule */

.lecture-links a:hover {
    /* On hover, the background becomes transparent */
    background-color: transparent;
    
    /* The border color remains, which is now visible */
    border-color: #16a085;
    
    /* The text color changes to match the border */
    color: #16a085;
    
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* ADD THIS LINE to prevent the underline */
      text-decoration: none;
}
