/* ==========================================================================
   Family Card Widget — family-card-widget.css
   ========================================================================== */

/* ---- Grid ---- */
.fc-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.fc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* default; overridden by inline style */
    gap: var(--fc-row-gap, 20px) var(--fc-col-gap, 20px);
    width: 100%;
    box-sizing: border-box;
}

/* ---- Card ---- */
.fc-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
}

.fc-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.fc-card-link:hover .fc-image {
    transform: scale(1.04);
}

/* ---- Image ---- */
.fc-image-wrap {
    position: relative;
    width: 100%;
    height: 220px;           /* default; overridden by Elementor control */
    overflow: hidden;
    border-radius: 12px;
    flex-shrink: 0;
    background-color: #e8e8e8;
}

.fc-image-wrap img.fc-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
    border-radius: inherit;
}

/* ---- Title ---- */
.fc-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 14px 0 0 0;
    padding: 0;
    text-align: left;
    word-break: break-word;
}

.fc-card-link:hover .fc-card-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* ---- Large Tablet / Small Desktop (≤ 1200px) ---- */
@media (max-width: 1200px) {
    .fc-image-wrap {
        height: 200px;
    }

    .fc-card-title {
        font-size: 15px;
    }
}

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    /* columns are handled by the inline style injected from PHP/JS */
    .fc-image-wrap {
        height: 240px;
    }

    .fc-card-title {
        font-size: 15px;
    }
}

/* ---- Small Tablet (≤ 768px) ---- */
@media (max-width: 768px) {
    .fc-image-wrap {
        height: 220px;
    }

    .fc-card-title {
        font-size: 15px;
        margin-top: 12px;
    }
}

/* ---- Mobile (≤ 767px) ---- */
@media (max-width: 767px) {
    /* columns are handled by the inline style injected from PHP/JS */
    .fc-image-wrap {
        height: 220px;
    }

    .fc-card-title {
        font-size: 16px;
        margin-top: 12px;
    }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    .fc-image-wrap {
        height: 200px;
    }

    .fc-card-title {
        font-size: 15px;
        margin-top: 10px;
    }
}
