/* =============================================================================
   SERVICES SECTION - All service-related styles
   ============================================================================= */

/* Custom Services Grid */
.services-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 30px 0;
}

.services-grid-custom .wp-block-group {
    text-align: center;
    padding: 20px;
}

.services-grid-custom .wp-block-group ul {
    list-style: disc;
    text-align: left;
}

/* Service Buttons */
.service-button {
    background: #0F0814;
    color: #F8F8F8;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.service-button:hover {
    background: #1a1022;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Service Description with smooth transitions */
.service-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, padding 0.3s ease, opacity 0.3s ease;
    background: var(--wp--preset--color--background, var(--color-bg, #fff));
    padding: 0 1rem;
    margin-top: 1rem;
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
}

/* Support both .active and .expanded classes for flexibility */
.service-description.active,
.service-description.expanded {
    max-height: 600px;
    padding: 1rem;
    opacity: 1;
}

.service-description p {
    margin: 0 0 1em;
}

/* Ensure last paragraph has proper spacing but doesn't add excessive margin */
.service-description p:last-child {
    margin-bottom: 0.25em;
}

/* Style lists inside service descriptions */
.service-description ul {
    margin: 0.75em 0;
    padding-left: 1.5em;
    list-style: disc;
}

.service-description ul:last-child {
    margin-bottom: 0;
}

.service-description li {
    margin: 0.5em 0;
    line-height: 1.6;
}

.service-description li:last-child {
    margin-bottom: 0.25em;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.service-button:focus-visible {
    outline: 2px solid #0F0814;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(15, 8, 20, 0.15);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* Tablets */
@media (max-width: 768px) {
    .services-grid-custom {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-button {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Fix service icons being too big on mobile */
    .services-grid-custom img {
        max-width: 50px !important;
    }

    /* Fix services grid padding override */
    .services-grid-custom[style*="padding-right: 0"],
    .services-grid-custom[style*="padding-left: 0"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .services-grid-custom {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Even smaller service icons for very small screens */
    .services-grid-custom img {
        max-width: 40px !important;
        height: auto !important;
    }
}