/* --- DYNAMIC BUILDER BLOCKS --- */

/* Rich Text Block */
.rich-text-content {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.rich-text-content h2,
.rich-text-content h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.rich-text-content ul,
.rich-text-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.rich-text-content li {
    margin-bottom: 0.5rem;
}

/* Features Block */
.feature-card {
    padding: 2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.feature-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    font-size: 1.5rem;
}

/* Gallery Grid Adjustments */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    height: 300px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* -- MOBILE RESPONSIVENESS -- */
@media (max-width: 768px) {

    /* Rich Text: Reduce size and spacing */
    .rich-text-content {
        font-size: 1rem;
        padding: 0 1rem;
        /* Ensure text doesn't hit edges */
    }

    .rich-text-content h2 {
        font-size: 1.8rem !important;
    }

    .rich-text-content h3 {
        font-size: 1.4rem !important;
    }

    /* Features: Force 1 column if grid doesn't handle it (JS usually handles grid classes, but just in case) */
    /* The JS renderer uses 'grid' class which style.css handles with !important 1fr. 
       So feature-card will already stack. We just add spacing tweaks. */
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Gallery: Adjust min size for small screens */
    .gallery-grid {
        grid-template-columns: 1fr;
        /* Full width on mobile */
        gap: 1rem;
    }

    .gallery-item {
        height: 250px;
        /* Smaller height */
    }
}