/* =========================================================
FDM CANÇONS — CSS NET, FINAL I COHERENT
========================================================= */

/* =========================================================
RESET LOCAL
========================================================= */

.canco-archive-wrapper,
.canco-single-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================
ARCHIVE (GRID)
========================================================= */

.canco-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.canco-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.canco-archive-grid > * {
    min-width: 0;
}

/* =========================================================
CARD (TARGETA)
========================================================= */

.canco-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.canco-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* IMATGE TARGETA */
.canco-card__image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
    padding: 3%; /* aire interior */
    box-sizing: border-box;
    border-radius: 12px;
    min-height: 0;
    flex: 1 0 50%;
    display:flex;
    align-items: center;
    justify-content: center;
     object-fit: cover;

}


.canco-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    max-width: 320px;
    margin: 0 auto;

}

.canco-card__placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* TEXT TARGETA */
.canco-card__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px;
    text-align: center;
}


.canco-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #222 !important;
    line-height: 1.3;
    margin: 0;
  display: flex;
align-items: center;
justify-content: center;
min-height: 25%;

}

.canco-card__year {
    font-size: 0.75rem;
    font-weight: 600;
    color: #777 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
align-items: center;
justify-content: center;
min-height: 25%;
margin-top: 0;

}

/* =========================================================
RESPONSIVE ARCHIVE
========================================================= */

@media (max-width: 1024px) {
    .canco-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
SINGLE — FITXA COMPLETA
========================================================= */

/* MARC GLOBAL */
.canco-single-wrapper {
    max-width: 800px;
    margin: 8px auto 0;
    padding: 8px 24px 0;
    box-sizing: border-box;
}

/* TÍTOL */
.canco-single-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 32px;
    font-weight: 600;
}

/* LAYOUT 33 / 67 (DESKTOP) */
.canco-single-layout {
    display: grid;
    grid-template-columns: 33% 67%;
    gap: 32px;
    align-items: center;
}

/* IMATGE 4:3 CENTRADA */
.canco-single-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.canco-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CONTINGUT CENTRAT VERTICALMENT */
.canco-single-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    font-size: 1rem;
}

/* ETIQUETES + VALORS */
.canco-field {
    display: flex;
    gap: 6px;
    margin-bottom: 2px;
    line-height: 1.2;
}

/* DESCRIPCIÓ */
.canco-descripcio {
    margin: 0;
    padding: 0;
}

.canco-descripcio p {
    margin: 0;
    padding: 0;
}

.canco-descripcio p:empty,
.canco-descripcio p br:only-child {
    display: none;
}


.canco-label {
    font-weight: 600;
    opacity: 0.8;
}

/* =========================================================
LLETRA (TEXT AMAGAT)
========================================================= */

.canco-lletra {
    margin-top: 20px;
}

.lletra-text {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    font-size: 1rem;
    line-height: 1.35;
    color: #222;
    margin-top: 12px;
}

.lletra-expanded {
    max-height: 2000px;
}

.lletra-toggle {
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    color: #222;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.lletra-toggle::after {
    content: "▾";
    margin-left: 6px;
}

.lletra-toggle.active::after {
    content: "▴";
}

/* =========================================================
NAVEGADOR — CENTRAT SOTA LA FITXA (DESACTIVAT)
========================================================= */

.canco-nav {
    max-width: 800px;
    margin: 40px auto 0;
    text-align: center;
}

.canco-nav a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
}

.canco-nav a:hover {
    background: #f0f0f0;
}

/* =========================================================
ENLLAÇOS D'ESCOLTA (ICONS SVG)
========================================================= */

.canco-multi-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.canco-value.multi {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
}

.canco-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #000; /* IMPORTANT: els teus SVG usen currentColor */
}

.canco-value.multi:hover {
    opacity: 0.8;
}

/* =========================================================
BURGER
========================================================= */

.fdm-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
}

.fdm-burger span {
    width: 22px;
    height: 2px;
    background: #333;
}

.fdm-mobile-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    flex-direction: column;
    gap: 12px;
}

@media(max-width:768px){
    .fdm-center { display:none; }
    .fdm-burger { display:flex; }
}
/*.canco-single-content {
    color: red !important;
}
.canco-single-wrapper {
    background: yellow !important;
}*/
/*.canco-icon {
    color: #000 !important;
    width: 20px;
    height: 20px;
}*/
/*.canco-value.multi {
    background: yellow;
}*/
.canco-multi-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.canco-value.multi {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
}

.canco-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
/* =========================================================
NAVEGADOR CPT — SUBTIL, ZEN I 100% RESPONSIVE
========================================================= */

.fdm-cpt-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    max-width: 100%;
    width: 100%;
    box-sizing: border-box;

    margin: 32px auto 12px;
    padding: 8px 12px;

    background: rgba(0,0,0,0.015);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 10px;

    backdrop-filter: blur(2px);

    transition: background 0.25s ease, border-color 0.25s ease;
}

.fdm-cpt-nav:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

/* Zones */
.fdm-cpt-nav .nav-left {
    text-align: left;
}

.fdm-cpt-nav .nav-center {
    text-align: center;
}

.fdm-cpt-nav .nav-right {
    text-align: right;
}

/* Enllaços */
.fdm-cpt-nav a {
    text-decoration: none;
    color: #444;
    font-size: 0.9rem;
    font-weight: 500;

    padding: 4px 8px;
    border-radius: 6px;

    opacity: 0.75;
    transition: all 0.2s ease;
}

/* Hover subtil */
.fdm-cpt-nav a:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
    transform: scale(1.02);
}
/* =========================================================
MÒBIL — TOT AJUSTAT, NET I COHERENT
========================================================= */
@media (max-width: 768px) {

    /* ARCHIVE */
    .canco-archive-wrapper {
        padding: 10px 12px 30px;
    }

    .canco-archive-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* SINGLE — LAYOUT VERTICAL */
    .canco-single-layout {
        display: flex;
        flex-direction: column;
        gap: 24px;
        width: 100%;
        text-align: center;
    }

    .canco-single-image {
        max-width: 260px;
        margin: 0 auto 20px;
    }

    /* CONTINGUT ACF — CORRECCIÓ DEL DESPLAÇAMENT */
    .canco-single-content {
        width: 100%;
        max-width: 260px;     /* igual que la imatge */
        margin: 0 auto;       /* centrat */
        padding: 0;
        text-align: left;
    }

    .canco-field {
        justify-content: flex-start;
    }

    .canco-single-wrapper {
        margin: 0 auto;
        padding: 12px 16px 0;
    }

    /* ENLLAÇOS D'ESCOLTA */
    .canco-value.multi {
        font-size: 1.05rem;
        gap: 10px;
    }

    .canco-icon {
        width: 22px;
        height: 22px;
    }

    /* NAVEGADOR CPT — AJUSTAT I SENSE DESBORDAMENT */
    .fdm-cpt-nav {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 10px 12px;
        margin-top: 24px;
        margin-bottom: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .fdm-cpt-nav a {
        font-size: 0.85rem;
        padding: 4px 6px;
    }

    .fdm-cpt-nav .nav-left,
    .fdm-cpt-nav .nav-center,
    .fdm-cpt-nav .nav-right {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}
@media (max-width: 768px) {

    /* Eliminar espai blanc sota el peu en PÀGINES (no CPT) */
    body.page,
    .page .site-content,
    .page .canco-single-wrapper {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    footer,
    .site-footer {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}
