.wp-block-gutenberg-test-programs .programs-section {
    padding: calc(var(--wp--custom--spacing--xl) * 2) 0;
    background-color: var(--wp--preset--color--gray);
}

.wp-block-gutenberg-test-programs .container {
    max-width: var(--wp--style--global--content-size);
    margin: 0 auto;
    padding: 0 var(--wp--custom--spacing--outer);
}

.wp-block-gutenberg-test-programs .section-header {
    text-align: center;
    margin-bottom: var(--wp--custom--spacing--xl);
}

.wp-block-gutenberg-test-programs .section-header h2 {
    color: var(--wp--preset--color--primary);
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: var(--wp--custom--spacing--md);
}

.wp-block-gutenberg-test-programs .section-header p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: rgba(0, 0, 0, 0.7);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid básico con diseño responsive */
.programs-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

/* Configuración para diferentes números de tarjetas por fila */
.programs-grid.cards-per-row-1 {
    grid-template-columns: 1fr;
}

.programs-grid.cards-per-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.programs-grid.cards-per-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.programs-grid.cards-per-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Ajustes responsive para mantener la usabilidad en pantallas pequeñas */
@media (max-width: 1200px) {
    .programs-grid.cards-per-row-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .programs-grid.cards-per-row-3,
    .programs-grid.cards-per-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .programs-grid {
        grid-template-columns: 1fr !important;
    }
}

.wp-block-gutenberg-test-programs .program-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform var(--wp--custom--transition--normal);
}

.wp-block-gutenberg-test-programs .program-card:hover {
    transform: translateY(-5px);
}

.wp-block-gutenberg-test-programs .program-card:hover img {
    transform: scale(1.1);
}

.wp-block-gutenberg-test-programs .program-card:hover .program-content {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

@media (max-width: 576px) {
    .wp-block-gutenberg-test-programs .program-card {
        height: 300px;
    }
}

.wp-block-gutenberg-test-programs .program-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--wp--custom--transition--normal);
}

.wp-block-gutenberg-test-programs .program-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    padding: var(--wp--custom--spacing--lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: background var(--wp--custom--transition--normal);
    color: var(--wp--preset--color--white);
}

.wp-block-gutenberg-test-programs .program-content h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: var(--wp--custom--spacing--md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wp-block-gutenberg-test-programs .program-content p {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    margin-bottom: var(--wp--custom--spacing--lg);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--wp--custom--transition--normal);
}

.wp-block-gutenberg-test-programs .program-content.active p,
.wp-block-gutenberg-test-programs .program-card:hover .program-content p {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .wp-block-gutenberg-test-programs .program-content p {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-block-gutenberg-test-programs .action-link {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--custom--spacing--sm);
    color: var(--wp--preset--color--white);
    font-weight: 500;
    padding: var(--wp--custom--spacing--sm) var(--wp--custom--spacing--md);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all var(--wp--custom--transition--fast);
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(20px);
}

.wp-block-gutenberg-test-programs .program-content.active .action-link,
.wp-block-gutenberg-test-programs .program-card:hover .action-link {
    opacity: 1;
    transform: translateY(0);
}

.wp-block-gutenberg-test-programs .action-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    gap: var(--wp--custom--spacing--md);
}

@media (max-width: 768px) {
    .wp-block-gutenberg-test-programs .action-link {
        opacity: 1;
        transform: translateY(0);
        width: 100%;
        justify-content: center;
    }
}

/* Editor styles */
.block-editor-block-list__block .wp-block-gutenberg-test-programs .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.125rem;
}

.wp-block-gutenberg-test-programs [data-rich-text-placeholder]::after {
    opacity: 0.5;
}