/* =========================
   GRANTS SECTION
   ========================= */

.grants-section {
    width: 100%;
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
}

.grants-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #132153;
}


/* =========================
   GRANTS GRID
   ========================= */

.grants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    width: 100%;
}


/* =========================
   GRANT CARD
   ========================= */

.grant-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    background: #bbc2ee;
    border-radius: 12px;
    padding: 1.5rem !important;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);

    transition: transform 0.3s ease, box-shadow 0.3s ease;

    border-top: none;

    /* Prevent long email/URL text from breaking the card */
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

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


/* =========================
   GRANT NAME
   ========================= */

.grant-name {
    color: #132153;
    font-weight: 600;
    line-height: 1.4;
    font-size: 18px !important;

    margin-top: 0;
    margin-bottom: 0.5rem;

    overflow-wrap: anywhere;
}


/* =========================
   DESCRIPTION
   ========================= */

.grant-description {
    margin-top: 0;
    margin-bottom: 0.75rem !important;

    color: #132153;
    line-height: 1.5;
    font-size: 16px;

    overflow-wrap: anywhere;
}


/* =========================
   CONTACT INFORMATION
   ========================= */
/* =========================
   CONTACT INFORMATION
   ========================= */

.grant-contact-item {
    margin-top: 14px;
    line-height: 1.5;
    min-width: 0;
}

.grant-contact-item strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
    color: #222;
}

.grant-contact-item span {
    display: block;
    font-weight: 400;
    color: #555;
    line-height: 1.5;

    /* Preserve database line breaks */
    white-space: normal;
}


/* =========================
   LINKS
   ========================= */

.grant-card a {
    font-size: 15px !important;
    color: #0066cc;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.grant-card a:hover {
    color: #004a99;
    text-decoration: underline;
}

.grant-contact-item a {
    color: #0066cc;
}

.grant-contact-item a:hover {
    color: #004a99;
    text-decoration: underline;
}



/* Phone / Email / Website links */
.grant-contact-item a {
    color: #0066cc;
}

.grant-contact-item a:hover {
    color: #004a99;
    text-decoration: underline;
}



/* =========================
   TABLET
   ========================= */

@media (max-width: 768px) {

    .grants-section {
        padding: 1.25rem;
    }

    .grants-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .grant-card {
        padding: 1.25rem !important;
    }

    .grant-name {
        font-size: 18px !important;
    }

    .grant-description {
        font-size: 15px;
    }
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 480px) {

    .grants-section {
        padding: 1rem;
    }

    .grants-title {
        margin-bottom: 1.5rem;
    }

    .grants-grid {
        gap: 1rem;
    }

    .grant-card {
        padding: 1rem !important;
        border-radius: 10px;
    }

    .grant-name {
        font-size: 17px !important;
        line-height: 1.35;
    }

    .grant-description {
        font-size: 15px;
        line-height: 1.45;
    }

    .grant-contact-item {
        margin-top: 12px;
        font-size: 15px;
    }

    .grant-card a {
        font-size: 15px !important;
    }
}


/* =========================
   VERY SMALL PHONES
   ========================= */

@media (max-width: 360px) {

    .grants-section {
        padding: 0.75rem;
    }

    .grant-card {
        padding: 0.9rem !important;
    }

    .grant-name {
        font-size: 16px !important;
    }

    .grant-description,
    .grant-contact-item,
    .grant-card a {
        font-size: 14px !important;
    }
}
