/* ============================================================
   ACF Repeater Widget - Frontend Styles
   ============================================================ */

/* ── Aviso en el editor ─────────────────────────────────── */
.acf-rep-notice {
    padding: 12px 16px;
    background: #f0f6ff;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

/* ── Lista vertical ─────────────────────────────────────── */
.acf-rep-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Grid de cards ──────────────────────────────────────── */
.acf-rep-grid {
    display: grid;
    gap: 20px;
}

.acf-rep-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.acf-rep-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.acf-rep-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .acf-rep-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .acf-rep-grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .acf-rep-grid-cols-2,
    .acf-rep-grid-cols-3,
    .acf-rep-grid-cols-4 { grid-template-columns: 1fr; }
}

/* ── Item base ──────────────────────────────────────────── */
.acf-rep-item {
    box-sizing: border-box;
}

/* ── Título ─────────────────────────────────────────────── */
.acf-rep-title {
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* ── Descripción (WYSIWYG) ──────────────────────────────── */
.acf-rep-description {
    line-height: 1.6;
}

.acf-rep-description p:last-child {
    margin-bottom: 0;
}

.acf-rep-description ul,
.acf-rep-description ol {
    padding-left: 1.5em;
}

.acf-rep-description img {
    max-width: 100%;
    height: auto;
}

/* ── Acordeón ───────────────────────────────────────────── */
.acf-rep-accordion-item {
    overflow: hidden;
}

.acf-rep-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: background-color 0.2s ease;
}

.acf-rep-accordion-header:hover {
    background: #ebebeb;
}

.acf-rep-accordion-header.is-active {
    background: #e0e0e0;
}

.acf-rep-accordion-header .acf-rep-title {
    margin: 0;
    flex: 1;
}

.acf-rep-accordion-icon {
    display: inline-block;
    font-size: 12px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.acf-rep-accordion-header.is-active .acf-rep-accordion-icon {
    transform: rotate(180deg);
}

.acf-rep-accordion-content {
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.acf-rep-accordion-content:not([hidden]) {
    padding: 16px;
}
