.grp-archive {
    max-width: 1280px;
    margin: 0 auto;
}

.grp-filters {
    margin: 0 0 28px;
    padding: 18px;
    border-radius: 12px;
    background: #f6f6f6;
}

.grp-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.grp-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 16px;
}

.grp-search button {
    padding: 12px 18px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.grp-selects {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.grp-selects select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
}

.grp-reset {
    font-size: 14px;
}

/* PROGRAMMI */

.grp-program-picker {
    position: relative;
    min-width: 260px;
}

.grp-program-picker summary {
    list-style: none;
    cursor: pointer;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.grp-program-picker summary::-webkit-details-marker {
    display: none;
}

.grp-program-picker summary::after {
    content: "▾";
    margin-left: auto;
    opacity: .6;
}

.grp-program-options {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    left: 0;
    min-width: 300px;
    max-height: 380px;
    overflow: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 9px;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
    padding: 5px;
}

.grp-program-options a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
}

.grp-program-options a:hover {
    background: #f1f1f1;
}

.grp-program-image {
    width: 34px;
    height: 34px;
    display: block;
    flex: 0 0 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.grp-program-image-placeholder {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #eee;
    color: #777;
    font-size: 18px;
}

.grp-program-current-image {
    width: 30px;
    height: 30px;
    display: block;
    flex: 0 0 30px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

/* ICONA PODCAST GENERICA */

.grp-podcast-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
}

.grp-podcast-icon svg {
    width: 30px;
    height: 30px;
}

.grp-podcast-icon svg circle {
    fill: #eee;
    stroke: #bbb;
}

/* GRIGLIA */

.grp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.grp-card {
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    min-width: 0;
}

.grp-cover {
    display: block;
    aspect-ratio: 1 / 1;
    background: #eee;
}

.grp-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grp-cover span {
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.grp-card-body {
    padding: 14px;
}

.grp-program {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    opacity: .7;
}

.grp-card h2 {
    font-size: 17px;
    line-height: 1.25;
    margin: 8px 0;
}

.grp-card h2 a {
    text-decoration: none;
}

.grp-date {
    font-size: 13px;
    opacity: .7;
    margin-bottom: 12px;
}

.grp-card audio {
    width: 100%;
}

.grp-links {
    margin-top: 10px;
    font-size: 14px;
}

.grp-links a {
    margin-right: 12px;
}

.grp-pagination {
    margin: 30px 0;
    text-align: center;
}

.grp-empty {
    padding: 40px 0;
    text-align: center;
}

/* PAGINA SINGOLA */

.grp-single {
    max-width: 850px;
    margin: 0 auto;
}

.grp-single-image {
    display: block;
    width: min(100%, 650px);
    margin: 0 auto 24px;
    border-radius: 12px;
}

.grp-single-meta {
    font-size: 14px;
    opacity: .7;
    margin-bottom: 18px;
}

.grp-single-player {
    width: 100%;
    margin-bottom: 18px;
}

.grp-spotify {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 7px;
    background: #eee;
    text-decoration: none;
}

.grp-description {
    line-height: 1.7;
}

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

/* RESPONSIVE */

@media (max-width: 1100px) {

    .grp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {

    .grp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .grp-grid {
        grid-template-columns: 1fr;
    }

    .grp-search {
        flex-direction: column;
    }

    .grp-search button {
        width: 100%;
    }

    .grp-program-picker {
        width: 100%;
    }

    .grp-program-options {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   OVERRIDE RESPONSIVE: larghezza piena e markup corrente
   ========================================================= */
.grp-archive {
    width: 100vw;
    max-width: none !important;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    padding: 24px clamp(16px, 2.5vw, 48px);
}

.grp-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 18px;
    box-sizing: border-box;
}

.grp-search-form input[type="text"] {
    flex: 1 1 240px;
    min-width: 180px;
    max-width: 100%;
    box-sizing: border-box;
}

.grp-search-form select,
.grp-search-form button,
.grp-search-form a {
    max-width: 100%;
    box-sizing: border-box;
}

.grp-program-picker {
    width: 100%;
    min-width: 0;
    margin: 0 0 24px;
}

.grp-program-picker details { position: relative; }

.grp-program-picker summary {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

.grp-program-picker summary::-webkit-details-marker { display: none; }
.grp-program-picker summary::after {
    content: "▾";
    margin-left: auto;
    opacity: .65;
}

.grp-program-picker-list {
    position: absolute;
    z-index: 50;
    top: calc(100% + 5px);
    left: 0;
    width: min(420px, 100%);
    max-height: 380px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.grp-program-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.grp-program-item:hover,
.grp-program-item:focus { background: #f1f1f1; }

.grp-program-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: #eee;
}

.grp-program-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grp-grid {
    width: 100%;
    max-width: none !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    box-sizing: border-box;
}

.grp-card {
    width: 100%;
    min-width: 0;
    max-width: none !important;
    box-sizing: border-box;
}

.grp-card audio { display: block; width: 100%; max-width: 100%; }

@media (max-width: 1100px) {
    .grp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .grp-archive { padding: 20px 16px; }
    .grp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .grp-archive { padding: 16px 12px; }
    .grp-search-form { flex-direction: column; align-items: stretch; }
    .grp-search-form input,
    .grp-search-form select,
    .grp-search-form button,
    .grp-search-form a { width: 100%; min-width: 0; }
    .grp-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .grp-program-picker-list { width: 100%; min-width: 0; }
}
