/* HRCEF Grant Highlights - WordPress Plugin Styles */

/* Container */
.hrcef-grants-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Full width alignment */
.hrcef-grants-container.alignfull {
    max-width: 100%;
    padding: 60px 40px;
}

/* Wide alignment */
.hrcef-grants-container.alignwide {
    max-width: 1600px;
}

/* Header */
.hrcef-grants-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 32px;
}

.hrcef-grants-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0066B3, #008B8B);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hrcef-grants-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 179, 0.3);
}

.hrcef-grants-refresh:active {
    transform: translateY(0);
}

.hrcef-grants-refresh svg {
    transition: transform 0.6s ease;
}

.hrcef-grants-refresh.spinning svg {
    animation: spin 0.6s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Grants Grid */
.hrcef-grants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Grant Card */
.grant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeIn 0.5s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grant Image */
.grant-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #e0e0e0;
}

.grant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grant-card:hover .grant-image img {
    transform: scale(1.05);
}

/* Grant Title */
.grant-title {
    padding: 20px 24px 16px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.grant-title h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0066B3;
    line-height: 1.4;
}

/* Grant Content */
.grant-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grant-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Grant Attribution */
.grant-attribution {
    background: linear-gradient(135deg, #0066B3, #008B8B);
    padding: 16px 24px;
    color: white;
}

.grant-school {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.grant-meta {
    font-size: 0.875rem;
    opacity: 0.95;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grant-teacher {
    font-style: italic;
}

.grant-year {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hrcef-grants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    /* Hide 3rd card and beyond on tablet */
    .grant-card:nth-child(n+3) {
        display: none;
    }
}

@media (max-width: 768px) {
    .hrcef-grants-container {
        padding: 40px 16px;
    }

    .hrcef-grants-header {
        justify-content: center;
    }

    .hrcef-grants-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grant-description {
        min-height: auto;
    }
    
    /* Hide 2nd card and beyond on mobile */
    .grant-card:nth-child(n+2) {
        display: none;
    }
}

/* Loading State */
.hrcef-grants-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}
