/* Agenda d'activitats i formulari d'inscripció — Grup Pedra Seca d'Oristà */

.pso-agenda {
    --pso-accent: #D2691E;
    --pso-accent-dark: #8B4513;
    --pso-text: #2c3e50;
    --pso-muted: #6c757d;
    --pso-border: #e3e3e3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin: 0 0 24px;
}

.pso-buit {
    padding: 24px;
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ---------- Targeta (imatge a dalt, text a sota) ---------- */
.pso-activitat {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--pso-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.pso-activitat-img {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f1f1f1;
    overflow: hidden;
}
.pso-activitat-img .pso-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pso-activitat-cos {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pso-titol {
    margin: 0;
    font-size: 1.35em;
    line-height: 1.25;
    color: var(--pso-text);
}
.pso-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.95em;
    color: var(--pso-muted);
}
.pso-meta li { margin: 0; }
.pso-meta-data { color: var(--pso-accent-dark); font-weight: 600; }
.pso-ico { margin-right: 2px; }

/* Dates de l'activitat (una o diverses) */
.pso-dates {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.95em;
    color: var(--pso-accent-dark);
    font-weight: 600;
}
.pso-dates li { margin: 0; }
.pso-data-passada { color: var(--pso-muted); font-weight: 400; text-decoration: line-through; }
.pso-data-passada .pso-data-nota { text-decoration: none; font-size: 0.9em; }

.pso-text { color: var(--pso-text); line-height: 1.55; }
.pso-text > :first-child { margin-top: 0; }
.pso-text > :last-child { margin-bottom: 0; }

.pso-accions {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.pso-places { font-size: 0.9em; color: var(--pso-muted); }
.pso-estat {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #f1f1f1;
    color: var(--pso-muted);
    font-size: 0.95em;
}

/* ---------- Botó ---------- */
.pso-btn {
    display: inline-block;
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    border-radius: 6px;
    background: var(--pso-accent, #D2691E);
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s;
}
.pso-btn:hover, .pso-btn:focus-visible { background: var(--pso-accent-dark, #8B4513); color: #fff; }
.pso-btn:disabled, .pso-btn-complet { background: #adb5bd; cursor: not-allowed; }

/* ---------- Modal ---------- */
.pso-modal {
    --pso-accent: #D2691E;
    --pso-accent-dark: #8B4513;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pso-modal[hidden] { display: none; }
.pso-modal-fons {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.pso-modal-caixa {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    padding: 28px 28px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.pso-modal-tancar {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}
.pso-modal-tancar:hover { color: #000; background: transparent; }
.pso-modal-sup {
    margin: 0;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}
#pso-modal-titol {
    margin: 2px 40px 16px 0;
    font-size: 1.3em;
    line-height: 1.25;
    color: #2c3e50;
}
body.pso-modal-obert { overflow: hidden; }

/* ---------- Formulari ---------- */
#pso-form { display: flex; flex-direction: column; gap: 14px; }
.pso-camp { display: flex; flex-direction: column; gap: 4px; }
.pso-camp label { font-weight: 600; font-size: 0.95em; color: #2c3e50; }
.pso-req { color: #d63638; }
.pso-camp input[type="text"],
.pso-camp input[type="email"],
.pso-camp input[type="tel"],
.pso-camp textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
    color: #2c3e50;
    background: #fff;
}
.pso-camp textarea { min-height: 84px; resize: vertical; }
.pso-camp input:focus, .pso-camp textarea:focus {
    outline: none;
    border-color: var(--pso-accent, #D2691E);
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.15);
}
.pso-camp-check label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
    line-height: 1.4;
}
.pso-camp-check input { margin-top: 4px; flex: 0 0 auto; }
.pso-camp-check a { color: var(--pso-accent-dark, #8B4513); text-decoration: underline; }
/* Tria de dates (només si l'activitat en té més d'una) */
.pso-camp-dates {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.pso-camp-dates[hidden] { display: none; }
.pso-camp-dates legend {
    padding: 0;
    font-weight: 600;
    font-size: 0.95em;
    color: #2c3e50;
}
.pso-ajuda { margin: 0 0 4px; font-size: 0.9em; color: #6c757d; }
.pso-dates-opcions { display: flex; flex-direction: column; gap: 6px; }
.pso-data-opcio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
}
.pso-data-opcio:has(input:checked) {
    border-color: var(--pso-accent, #D2691E);
    background: rgba(210, 105, 30, 0.06);
}
.pso-data-opcio input { margin: 0; flex: 0 0 auto; }
.pso-data-text { flex: 1 1 auto; }
.pso-data-lliures { flex: 0 0 auto; font-size: 0.85em; color: #6c757d; white-space: nowrap; }
.pso-data-plena { color: #6c757d; background: #f5f5f5; cursor: not-allowed; }
.pso-data-plena .pso-data-text { text-decoration: line-through; }
.pso-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pso-form-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fdecea;
    color: #b02a37;
    font-size: 0.95em;
}
.pso-form-error[hidden] { display: none; }
.pso-btn-enviar { align-self: flex-start; }
.pso-ok {
    margin: 0;
    padding: 14px 16px;
    border-radius: 6px;
    background: #e6f4ea;
    color: #1e6b34;
    line-height: 1.5;
}

/* ---------- Mòbil ---------- */
@media (max-width: 768px) {
    .pso-agenda { grid-template-columns: 1fr; gap: 20px; }
    .pso-activitat-cos { padding: 16px; }
    .pso-modal-caixa { padding: 24px 18px 20px; }
    .pso-btn-enviar { align-self: stretch; }
}
