.jml-services {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 16px;
}

.jml-services-grid {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 16px;
}

.jml-services-columns-2 .jml-service {
    width: calc(50% - 12px);
}

.jml-services-columns-4 .jml-service {
    width: calc(25% - 18px);
}

.jml-service {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.wp-block-image.is-style-rounded {
    margin: 0 0 24px 0;
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.wp-block-image.is-style-rounded img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.jml-service-image-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.2s;
}

.jml-service-image-link:hover {
    opacity: 0.9;
}

.jml-service p {
    margin: 0;
}

.jml-service-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: center;
}

.jml-service-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-align: center;
}

.jml-service-title {
    font-size: 1rem;
    color: #666;
    margin: 0 0 16px 0;
    text-align: center;
}

.jml-service-paragraph {
    text-align: left;
    margin-bottom: 16px;
    line-height: 1.5;
    white-space: pre-line;
}

.jml-service-content .wp-element-button {
    margin-top: auto;
    align-self: center;
    border-radius: 50px !important;
    padding: 0.5em 1.5em;
    text-transform: none;
    font-size: 1rem;
}

.jml-service-content .wp-element-button.is-style-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.jml-service-content .wp-element-button.is-style-outline:hover {
    background: white;
    color: var(--wp--preset--color--contrast);
    border-color: white;
}

.jml-services-light .jml-service-content .jml-service-name,
.jml-services-light .jml-service-content .jml-service-title {
    color: #68705E;
}

.jml-services-light .jml-service-content .wp-element-button.is-style-outline {
    border-color: #68705E;
    color: #68705E;
}

.jml-services-light .jml-service-content .wp-element-button.is-style-outline:hover {
    background: #68705E;
    color: white;
    border-color: #68705E;
}

@media (max-width: 991px) {
    .jml-services,
    .jml-services-grid {
        display: block !important;
        padding: 0 16px;
    }
    
    .jml-service {
        width: 100% !important;
        margin-bottom: 32px;
    }
    
    .jml-service:last-child {
        margin-bottom: 0;
    }
}

/* Admin styles */
.jml-services-admin .form-field {
    max-width: 640px;
}

.jml-services-admin .wp-editor-wrap {
    max-width: 640px;
    width: 100%;
}

.jml-services-admin .wp-editor-area {
    min-height: 350px;
    height: 350px;
    resize: vertical;
}

.jml-services-admin .mce-edit-area iframe {
    min-height: 250px !important;
    height: auto !important;
}

.jml-service a:link,
.jml-service a:visited,
.jml-service a:hover,
.jml-service a:active {
    text-decoration: none !important;
}