/* ==========================================================================
   AlloDentiste Benefits Widget
   ========================================================================== */

.allo-benefits-widget {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px var(--allo-gutter);
    box-sizing: border-box;
}

/* ----------------------------------
   Section Heading
---------------------------------- */
.allo-benefits-widget .benefits-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 32px 0;
    padding: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* ----------------------------------
   Grid
---------------------------------- */
.allo-benefits-widget .benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

/* ----------------------------------
   Cards
---------------------------------- */
.allo-benefits-widget .benefit-card {
    position: relative;
    min-height: 240px;
    border-radius: 12px;
    padding: 28px;
    box-sizing: border-box;
    cursor: default;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.allo-benefits-widget .benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Card colour variants */
.allo-benefits-widget .benefit-card.style-teal {
    background-color: #DCF0F2;
}

.allo-benefits-widget .benefit-card.style-cream {
    background-color: #F0EDE8;
}

/* Card inner layout */
.allo-benefits-widget .benefit-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ----------------------------------
   Card Title
---------------------------------- */
.allo-benefits-widget .benefit-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.35;
    margin: 0;
    padding: 0;
    transition: color 0.2s ease;
}

/* ----------------------------------
   Card Description — hidden by default,
   revealed on hover with CSS transition
---------------------------------- */
.allo-benefits-widget .benefit-card-description {
    font-size: 0.9rem;
    color: #333333;
    line-height: 1.65;
    margin: 0;
    padding: 0;

    /* Hidden state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.35s ease;
}

/* Revealed state on parent hover */
.allo-benefits-widget .benefit-card:hover .benefit-card-description {
    max-height: 400px; /* large enough to fit any description */
    opacity: 1;
    margin-top: 14px;
}

/* Only apply hover cursor when there is a description */
.allo-benefits-widget .benefit-card.has-description {
    cursor: pointer;
}

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

@media (max-width: 1200px) {
    .allo-benefits-widget .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .allo-benefits-widget {
        padding: 48px var(--allo-gutter);
    }

    .allo-benefits-widget .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .allo-benefits-widget .benefit-card {
        min-height: 200px;
    }
}

@media (max-width: 560px) {
    .allo-benefits-widget {
        padding: 36px var(--allo-gutter);
    }

    .allo-benefits-widget .benefits-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .allo-benefits-widget .benefit-card {
        min-height: 0;
    }

    /* Always show description on mobile (no hover on touch) */
    .allo-benefits-widget .benefit-card .benefit-card-description {
        max-height: none;
        opacity: 1;
        margin-top: 12px;
        overflow: visible;
    }
}

/* ==========================================================================
   Touch device: always show description
   ========================================================================== */
@media (hover: none) {
    .allo-benefits-widget .benefit-card .benefit-card-description {
        max-height: none;
        opacity: 1;
        margin-top: 12px;
        overflow: visible;
    }
}
