/* 4-column-cards.css */
/* This file contains all class-based custom styles, including column layouts and card styling. */

/* Row container adjustments */
.row {
    margin: 0 -5px; /* Adjusts for negative margins from Bootstrap's gutters, if applicable */
}

/* Clear floats after the columns (still relevant for non-flex fallbacks or if floats are used elsewhere) */
.row:after {
    content: "";
    display: table;
    clear: both;
}

/* This rule specifically targets .column elements when they are inside a .row.
   This increased specificity is critical to override Bootstrap's .row > * rule. */
.row .column {
    flex: 0 0 25% !important;     /* flex-grow:0, flex-shrink:0, flex-basis:25% */
    max-width: 25% !important;    /* Ensures it doesn't expand beyond 25% */
    width: 25% !important;        /* Keep this for good measure */
    padding: 0 5px !important;   /* UPDATED: Reduced horizontal padding to make cards wider */
}

/* Your general .column rule (if you use .column elsewhere not within a .row) */
.column {
    float: left; /* Keep if you use .column on its own (not in a .row) */
}

/* Responsive columns - one column layout (vertical) on small screens */
@media screen and (max-width: 600px) {
    .row .column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        margin-bottom: 20px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Your .card, .grid-container, and .container rules */
.card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    padding: 16px;
    text-align: center;
    background-color: #f1f1f1;
}

/* Styles for H3 elements specifically within a .card */
.card h3 {
    color: #9D3E12;
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    font-weight: bold;
    padding-left: 17px;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    letter-spacing: normal;
}

/* Styles for paragraph text within a .card */
.card p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 1em;
}

/* Styles for links within a .card */
.card a {
    font-size: 15px;
    color: #007bff;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

/* Ensure words wrap and do not split in the middle of a word within card text */
.card h3,
.card p,
.card a {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.grid-container {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 5px;
    background-color: #ffffff;
    padding: 5px;
}

.grid-container > div {
    background-color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 18px;
}

.container {
    position: relative;
}