/* FAM Services Widget */

.fam-services {
    width: 100%;
    padding: 60px 0;
}

.fam-services-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fam-services-header {
    margin-bottom: 32px;
}

.fam-services-title {
    font-size: 32px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0;
}

/* Grid layout */
.fam-services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Card */
.fam-service-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25);
    background-color: #000000;
}

.fam-service-card-link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
}

.fam-service-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fam-service-card-media img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

/* Overlay (şəffaf gradyan) */
.fam-service-card-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
}

/* Content – text overlay, alt kısma yakın */
.fam-service-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px 18px;
}

.fam-service-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}

.fam-service-card-desc {
    font-size: 14px;
    margin: 0;
}

/* Bottom button */
.fam-services-footer {
    text-align: center;
}

.fam-services-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    border: 1.5px solid #111827;
    background-color: #ffffff;
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fam-services-button:hover {
    box-shadow: 0 10px 20px rgba(15,23,42,0.2);
    transform: translateY(-1px);
}

/* Responsive grid breakpoints */
@media (max-width: 1199px) {
    .fam-services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .fam-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobil karusel (scroll-snap) */
@media (max-width: 767px) {
    .fam-services.fam-services--mobile-carousel .fam-services-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .fam-services.fam-services--mobile-carousel .fam-service-card {
        min-width: 260px;
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .fam-services.fam-services--mobile-carousel .fam-services-grid::-webkit-scrollbar {
        display: none;
    }

    .fam-services.fam-services--mobile-carousel .fam-services-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

@media (max-width: 600px) {
    .fam-services {
        padding: 40px 0;
    }

    .fam-services-inner {
        padding: 0 16px;
    }

    .fam-services-title {
        font-size: 24px;
    }
}
