.home-community-section {
    font-family: 'Montserrat', sans-serif;
    background: #ffffff;
}

.home-community-section .hero-inner {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
}

.home-community-section .row > [class*="col-"] {
    display: flex;
}

.community-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid rgba(0, 68, 172, 0.2);
    background: linear-gradient(180deg, #f7faff 0%, #f2f7fd 100%);
}

.community-panel-has-border-title,
.community-panel-join {
    margin-top: 0.9rem;
}

.community-panel-title {
    color: #0044ac;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    line-height: 1.35;
}

.community-panel-title--on-border {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-bottom: 0;
    padding: 0.2rem 1.35rem;
    background: transparent;
    white-space: nowrap;
    z-index: 1;
}

.community-panel-title--on-border::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 4.5rem);
    height: calc(100% + 1.25rem);
    background:
        radial-gradient(
            ellipse at center,
            #ffffff 0%,
            rgba(255, 255, 255, 0.96) 42%,
            rgba(255, 255, 255, 0.55) 62%,
            rgba(255, 255, 255, 0) 100%
        );
    pointer-events: none;
    z-index: -1;
}

.community-panel-subtitle {
    color: #00266c;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    margin-top: -0.85rem;
    margin-bottom: 1.35rem;
    letter-spacing: 0.02em;
}

.community-panel-has-border-title {
    position: relative;
    padding-top: 1.9rem;
}

.community-features {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    flex: 1;
    align-items: stretch;
    min-height: 0;
}

.community-feature {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.55rem 0.35rem;
    border-radius: 14px;
    position: relative;
    cursor: default;
    transition: transform 0.25s ease, background 0.25s ease;
}

.community-feature:hover {
    transform: translateY(-4px);
    background: rgba(0, 68, 172, 0.06);
}

.community-feature:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 68, 172, 0.28) 20%,
        rgba(0, 68, 172, 0.28) 80%,
        transparent 100%
    );
}

.community-feature-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0044ac;
}

.community-feature-icon i {
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.community-feature:hover .community-feature-icon i {
    transform: scale(1.1);
}

.community-feature-label {
    display: block;
    color: #00266c;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: 132px;
    margin: 0 auto;
}

.community-feature-label-line {
    display: block;
    white-space: nowrap;
}

.community-panel-join {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.community-whatsapp-cta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: auto;
    padding: 1rem 1.1rem;
    background: #ffffff;
    border: 1px solid rgba(0, 68, 172, 0.12);
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.community-whatsapp-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 38, 108, 0.1);
    border-color: rgba(0, 68, 172, 0.22);
}

.community-whatsapp-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25d366;
}

.community-whatsapp-icon i {
    font-size: 2.15rem;
    line-height: 1;
}

.community-whatsapp-text {
    color: #0044ac;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.home-community-section + #packages {
    background: #ffffff;
    padding-top: 1.5rem !important;
    margin-top: 0;
    border-top: none;
    box-shadow: none;
}

@media (max-width: 1199.98px) {
    .community-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .community-feature:nth-child(3n)::after {
        display: none;
    }

    .community-feature-label {
        max-width: none;
    }
}

@media (max-width: 991.98px) {
    .community-panel {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .community-panel-has-border-title,
    .community-panel-join {
        margin-top: 0.75rem;
    }

    .community-panel-has-border-title {
        padding-top: 1.65rem;
    }

    .community-panel-title--on-border {
        padding: 0 0.85rem;
        font-size: 0.9rem;
        white-space: normal;
        max-width: calc(100% - 1.5rem);
    }
}

@media (max-width: 575.98px) {
    .community-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .community-feature::after {
        display: none;
    }

    .community-feature:nth-child(odd):not(:last-child)::after {
        display: block;
    }

    .community-feature:nth-child(2n)::after {
        display: none;
    }

    .community-whatsapp-text {
        font-size: 0.85rem;
    }
}
