.municipi-detail {
    padding: 26px 0 40px;
}

.municipi-detail__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 15px;
    color: #3f3f3f;
}

.municipi-detail__breadcrumb a {
    color: #3f3f3f;
    text-decoration: none;
}

.municipi-detail__breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-strong {
    font-weight: 700;
    color: #000;
}

.fav-star {
    color: #f5b301;
    margin-right: 8px;
    font-size: 16px;
    line-height: 1;
}

.municipi-detail__header {
    margin-bottom: 44px;
}

.municipi-detail__title {
    margin: 0 0 28px;
    color: #161616;
    line-height: 0.98;
    font-weight: 300;
    font-size: 76px;
    letter-spacing: -1px;
}

.municipi-detail__title span,
.municipi-detail__title strong {
    display: block;
}

.municipi-detail__title strong {
    margin-top: 12px;
    font-weight: 800;
}

.municipi-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.btn-pill:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-pill--outline {
    background: #fff;
    border: 1px solid #8d867f;
    color: #2e2e2e;
}

.btn-pill--brown {
    background: #6d5949;
    color: #fff;
}

.btn-pill--dark {
    background: #000;
    color: #fff;
}

.btn-pill--edit {
    background: #19b7df;
    color: #ffffff;
}

.btn-pill--edit:hover {
    background-color: #258ca4;
}

.municipi-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 54px;
    align-items: start;
}

.section-title {
    margin: 0 0 18px;
    color: #232323;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 300;
}

.info-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    border: 1px solid #8e8e8e;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.info-row__label {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #202020;
    border-right: 1px solid #8e8e8e;
    background: #fff;
}

.info-row__value {
    padding: 14px 20px;
    font-size: 16px;
    color: #494949;
    background: #fff;
}

/* Botó tornar */
/* Contenidor opcional */
.back-wrapper {
    margin-bottom: 20px;
}

/* Botó tornar */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1f1f1f;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

/* Cercle icona */
.back-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5E4C3F;
    color: #ffffff;
    flex-shrink: 0;
}

/* SVG dins el cercle */
.back-icon svg {
    width: 14px;
    height: 14px;
}

/* Hover */
.back-button:hover .back-icon {
    background: #4f3f35;
}

/* Text */
.back-text {
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}

/* Opcional: hover del text */
.back-button:hover .back-text {
    text-decoration: underline;
}

/* Bloc media */
.municipi-top__media {
    width: 100%;
}

/* Cas galeria */
.municipi-gallery {
    position: relative;
    width: 100%;
}

.gallery-image {
    display: none;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.gallery-image.is-active {
    display: block;
}

/* Cas imatge única o placeholder */
.municipi-top__media > img {
    width: 100%;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.municipi-top__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.municipi-top__dots span,
.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #d3d3d3;
}

.gallery-dot {
    cursor: pointer;
}

.municipi-top__dots .is-active,
.gallery-dot.is-active {
    background: #000;
}

@media (max-width: 1200px) {
    .municipi-detail__title {
        font-size: 62px;
    }

    .municipi-top {
        grid-template-columns: 1fr;
    }

    .municipi-top__media {
        max-width: 520px;
    }
}

@media (max-width: 768px) {
    .municipi-detail__title {
        font-size: 48px;
    }

    .section-title {
        font-size: 32px;
    }

    .info-row {
        grid-template-columns: 1fr;
    }

    .info-row__label {
        border-right: none;
        border-bottom: 1px solid #8e8e8e;
    }
}

/* =========================
   SECCIÓ TOTS ELS CAMPS
========================= */

.municipi-fields,
.municipi-fields * {
    font-family: 'Montserrat', sans-serif;
}

.municipi-fields {
    margin-top: 56px;
}

.municipi-fields__title {
    margin: 20px 0 10px;
    color: #1f1f1f;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.municipi-block {
    margin-top: 26px;
}

.municipi-block__title {
    margin: 0 0 18px;
    color: #6d5949;
    font-size: 20px;
    font-weight: 700;
}

.detail-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: grid;
    grid-template-columns: 260px 1fr 200px;
    align-items: center;
    gap: 14px;
}

.detail-row__label,
.detail-row__value {
    height: 46px;
    border: 1.5px solid #8a8a8a;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
}

.detail-row__label {
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}

.detail-row__value {
    font-size: 15px;
    color: #3f3f3f;
}

.detail-row__meta {
    font-size: 12px;
    color: #b5b5b5;
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .detail-row {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .detail-row__meta {
        grid-column: 2 / 3;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .municipi-fields__title {
        font-size: 32px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .detail-row__meta {
        grid-column: auto;
        padding-left: 4px;
    }
}

/* =========================
   UBICACIÓ / LINKS MUNICIPI
========================= */

.municipi-links {
    margin-top: 70px;
}

.municipi-links__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.9fr;
    gap: 64px;
    align-items: start;
}

.municipi-map {
    margin-top: 14px;
    margin-bottom: 42px;
    width: 100%;
    max-width: 690px;
}

.municipi-map iframe {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    background: #e9e9e9;
}

.municipi-map img {
    display: block;
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
}

.municipi-links__title {
    margin: 0 0 12px;
    color: #1f1f1f;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.municipi-links__title strong {
    font-weight: 800;
}

.municipi-cta-card p {
    margin: 0 0 20px;
    max-width: 520px;
    color: #3c3c3c;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
}

.municipi-links__divider {
    margin: 42px 0 46px;
    border: none;
    border-top: 1px solid #8e8e8e;
}

/* Polígons llistat */

.municipi-poligons {
    margin-top: 18px;
}

.municipi-poligons__head {
    margin-bottom: 14px;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 700;
}

.municipi-poligons__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.municipi-poligons__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 14px;
    align-items: center;
}

.municipi-poligons__name {
    min-height: 46px;
    padding: 0 16px;
    border: 1.5px solid #8a8a8a;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    color: #2f2f2f;
    font-size: 15px;
    box-sizing: border-box;
}

.municipi-poligons__empty {
    padding: 16px 18px;
    border: 1px solid #8d8d8d;
    border-radius: 12px;
    background: #fff;
    color: #666;
    font-size: 15px;
}

/* Botó beix tipus mockup */
.btn-pill--sand {
    background: #d2c4a6;
    color: #ffffff;
}

.btn-pill--sand:hover {
    color: #ffffff;
}

.btn-pill--brown-light {
    background: #7b6653;
    color: #ffffff;
}

.btn-pill--brown-light:hover {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1100px) {
    .municipi-links__grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .municipi-links__title {
        font-size: 34px;
    }

    .municipi-links__divider {
        margin: 34px 0 38px;
    }
}

@media (max-width: 768px) {
    .municipi-links {
        margin-top: 54px;
    }

    .municipi-links__title {
        font-size: 28px;
        line-height: 1.15;
    }

    .municipi-cta-card p {
        font-size: 16px;
    }

    .municipi-poligons__row {
        grid-template-columns: 1fr;
    }
}

/* ===== SECCIÓ EXTRA (CTA + RECOMANACIONS) ===== */

.municipi-extra {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ===== CTA IEM ===== */

.iem-cta {
    background: #d8cfc0;
    border-radius: 14px;
    padding: 48px 40px;
    text-align: center;
}

.iem-cta__title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1f1f1f;
}

.iem-cta__text {
    max-width: 760px;
    margin: 0 auto 26px;
    font-size: 16px;
    color: #3f3f3f;
    line-height: 1.6;
}

.iem-cta__actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Botons variants suaus */
.btn-pill--brown-light {
    background: #6d5949;
    color: #fff;
}

.btn-pill--outline-soft {
    border: 1px solid #6d5949;
    color: #6d5949;
    background: transparent;
}

/* ===== RECOMANACIONS ===== */

.municipi-recom {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 60px;
    align-items: center;
}

/* Contingut esquerra */
.municipi-recom__title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 18px;
    color: #1c1c1c;
}

.municipi-recom__item {
    margin-bottom: 28px;
}

.municipi-recom__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.municipi-recom__subtitle {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #6d5949;
}

.municipi-recom__text {
    font-size: 16px;
    line-height: 1.7;
    color: #4a4a4a;
    max-width: 520px;
    margin: 0;
}

.municipi-recom__inline-link {
    font-size: 14px;
    color: #6d5949;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all .2s ease;
}

.municipi-recom__inline-link:hover {
    border-bottom: 1px solid #6d5949;
}

/* Imatge dreta */
.municipi-recom__media img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    display: block;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .municipi-recom {
        grid-template-columns: 1fr;
    }

    .municipi-recom__media {
        max-width: 520px;
    }
}

@media (max-width: 768px) {
    .municipi-recom__title {
        font-size: 40px;
    }

    .iem-cta__title {
        font-size: 32px;
    }
}