/* Loop Grid Card Style (Light Theme) */
.my-cpt-grid-container {
    display: grid;
    /* Default fallback if no class is present - auto-fill */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    padding: 20px 0;
    width: 92vw;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Explicit Column Classes */
.my-cpt-grid-container.cols-1 {
    grid-template-columns: 1fr;
}

.my-cpt-grid-container.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.my-cpt-grid-container.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.my-cpt-grid-container.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .my-cpt-grid-container.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .my-cpt-grid-container.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .my-cpt-grid-container.cols-4,
    .my-cpt-grid-container.cols-3,
    .my-cpt-grid-container.cols-2 {
        grid-template-columns: 1fr;
    }
}

.mc-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    text-align: center;
    /* Removed hover transform */
}

/* Image Area - Background Image Version */
.mc-card-image-wrapper {
    background-color: #e5e5e5;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3/2;
    margin-bottom: 20px;
    position: relative;
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
}

/* Removed .mc-card-img styles as we are using bg image on wrapper now */

.mc-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdbdbd;
    font-size: 3rem;
    position: absolute;
    top: 0;
    left: 0;
}

/* Content Area */
.mc-card-content {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mc-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 5px;
    line-height: 1.3;
    /* Reset typography for readability */
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.mc-card-name a {
    text-decoration: none;
    color: inherit;
}

.mc-card-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    display: block;
}

.mc-card-cpf {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Button */
.mc-card-footer {
    width: 100%;
}

.mc-card-btn {
    display: block;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #111;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.mc-card-btn:hover {
    border-color: #000;
    background: #000;
    color: #fff;
}

/* Filters & Search Style */
.mc-filters-wrapper {
    margin-bottom: 40px;
    text-align: left;
}

.mc-search-container {
    position: relative;
    max-width: 400px;
    /* Limit width */
    width: 100%;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
}

.mc-search-form {
    display: flex;
    width: 100%;
    position: relative;
    margin: 0;
    gap: 5px;
    /* Reset theme margin */
}

.mc-search-field {
    width: 100%;
    padding: 15px 110px 15px 20px;
    /* Right padding for 'Chercher' button */
    border-radius: 10px !important;
    border: 1px solid #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    height: auto;
    /* Prevent theme height overrides */
    line-height: normal;
}

.mc-search-field:focus {
    border-color: #000;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mc-search-submit {
    position: absolute;
    right: 0;
    top: 0;
    background: var(--mc-submit-bg, #000) !important;
    /* Solid background */
    box-shadow: none !important;
    border: none !important;
    /* White text */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 25px !important;
    /* Adjust horizontal padding */
    margin: 0 !important;
    height: 100% !important;
    /* Full height */
    width: auto !important;
    min-width: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 0 50px 50px 0;
    /* Match input radius on right, square on left */
    color: #fff !important;
}

.mc-search-submit:hover {
    background: var(--mc-submit-bg, #333) !important;
    opacity: 0.9;
    color: #fff !important;
}

.mc-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.mc-filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #555;
}

.mc-filter-btn:hover,
.mc-filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* BLOG CARD SPECIFIC STYLES */
.blog-card {
    background-color: #f1f1f1;
    /* Light gray card background from screenshot */
    border-radius: 20px;
    /* Matching image radius or slightly larger */
    height: 100%;
}

.blog-card .mc-card-image-wrapper {
    border-radius: 0;
    /* Clear wrapper radius if card handles it, OR match top radius. 
                         Screenshot shows image is top part of card. 
                         Let's keep wrapper but remove bottom radius. */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    /* Remove margin, content sits directly below */
}

.blog-card .mc-card-content {
    background-color: #f1f1f1;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    padding: 25px;
    align-items: flex-start;
    /* Left align */
    text-align: left;
}

.blog-card .mc-blog-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
}

.mc-blog-cat-pill {
    background-color: #e0e0e0;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: capitalize;
}

.blog-card .mc-card-name {
    text-transform: uppercase;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 800;
    /* Ensure title doesn't overflow */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-card-excerpt {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-blog-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.mc-blog-read-more:hover {
    text-decoration: underline;
}

/* Override existing card footer for blog to remove width 100% constraints if needed */
.blog-card .mc-card-footer {
    width: auto;
    margin-top: auto;
    /* Push to bottom if flex column */
}