/* styles.css */
.property-management-widget {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Clean default font */
    transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
}

.property-management-widget h2 {
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    transition: color 0.3s, typography 0.3s;
}

.service-boxes {
    display: grid;
    /* Uses --grid-columns set by the PHP Control, defaults to 4 if not set */
    grid-template-columns: repeat(var(--grid-columns, 4), 1fr);
    gap: 20px;
}

.service-box {
    /* Styles are handled by Widget Controls now (Transparency, Borders) */
    /* This sets the structural base */
    padding: 40px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

/* Staggered Entrance Animation */
/* Only triggers if the class is present */
.has-entrance-animation .service-box {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    /* Delay based on index */
    animation-delay: calc(var(--animation-order) * 0.1s);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects (Handled by Controls mostly, but ensuring smoothness) */
.service-box:hover {
    z-index: 2;
    /* Bring to front */
}

/* Full Card Link Overlay */
.service-box-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    cursor: pointer;
}

/* --- Icon Styling --- */
.service-box-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    margin-bottom: 25px;
}

.service-box-icon i,
.service-box-icon svg {
    display: block;
    transition: all 0.3s ease;
}

/* Icon Views */
.elementor-view-stacked .service-box-icon {
    padding: 0.6em;
    background-color: #C5A035;
    /* Gold Default */
    color: #fff;
}

.elementor-view-framed .service-box-icon {
    padding: 0.6em;
    background-color: transparent;
    border: 2px solid #C5A035;
    /* Gold Default */
    color: #C5A035;
}

/* Icon Shapes */
.elementor-shape-circle .service-box-icon {
    border-radius: 50%;
}

.elementor-shape-square .service-box-icon {
    border-radius: 4px;
    /* Soft square */
}

/* --- Content Styling --- */
.service-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
    line-height: 1.4;
    white-space: pre-line;
}

.service-description {
    font-size: 0.9rem;
    color: inherit;
    /* Inherit color (useful for white text on gold bg) */
    opacity: 0.9;
    /* High contrast for white text on gold */
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Optional: Slight Gradient Overlay on Hover for a more premium feel if no background set */
.service-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
    /* Below link overlay */
}

.service-box:hover::after {
    opacity: 1;
}

/* --- Mobile Slider / Swiper Integration --- */

/* Ensure Grid layout persists on Desktop/Tablet even if Swiper classes are present */
@media (min-width: 768px) {
    .property-management-widget .service-boxes.swiper-wrapper {
        display: grid !important; /* Override Swiper's flex */
        transform: none !important; /* Disable Swiper transform */
        width: 100% !important;
        box-sizing: border-box; 
    }
    
    .property-management-widget .service-box.swiper-slide {
        height: auto !important; /* Reset swiper height */
        width: auto !important; /* Reset swiper width */
        margin-right: 0 !important; /* Reset swiper gap */
    }
}

/* Mobile Slider Styling */
@media (max-width: 767px) {
    .property-management-widget[data-mobile-slider="yes"] .service-boxes {
        display: flex; /* Swiper needs flex */
        gap: 0 !important; /* Swiper handles gap via spaceBetween */
    }
    
    .property-management-widget[data-mobile-slider="yes"] .service-box {
        height: auto; /* Allow auto height */
    }

    /* Adjust pagination position */
    .property-management-widget .swiper-pagination {
        position: relative;
        bottom: 0;
        margin-top: 20px;
    }

    /* Pagination Bullets - Gold Theme */
    .property-management-widget .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        background: #fff;
        opacity: 0.4;
        transition: all 0.3s ease;
    }

    .property-management-widget .swiper-pagination-bullet-active {
        width: 24px;
        border-radius: 4px;
        background: #fff; /* or Gold #C5A035 if preferred */
        opacity: 1;
    }
}