* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #F4F4F4;
    color: #333333;
    font-size: 13px;
    line-height: 1.4;
    padding: 20px;
}

/* Contenidor de la fitxa (Simula un full A4) */
.fitxa-container {
    max-width: 850px;
    margin: 0 auto;
    background-color: #FFFFFF;
    padding: 30px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

/* --- CAPÇALERA DE LA FITXA --- */
.header-fitxa {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}
.header-esquerra {
    width: 30%;
}
.header-esquerra .titol-pla {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    line-height: 1.1;
}
.header-esquerra .anys-pla {
    font-size: 16px;
    font-weight: bold;
    color: #555555;
    margin-bottom: 5px;
}
.header-esquerra .icones-blocs {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}
.header-esquerra .bloc-fleca {
    width: 30px;
    height: 20px;
    border: 1px solid #333333;
    background-color: #FFF;
}
.header-dreta {
    width: 65%;
    text-align: right;
}
.subvencio-titol {
    font-size: 11px;
    font-weight: bold;
    color: #222222;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: left;
    line-height: 1.2;
}
.barra-titol-fitxa {
    background-color: #000000;
    color: #FFFFFF;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.back-button button {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 10px 14px;
border: none;
border-radius: 8px;
background-color: #2563eb;
color: white;
font-size: 14px;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.1s ease;
}

.back-button button:hover {
background-color: #1d4ed8;
}

.back-button button:active {
transform: scale(0.97);
}

.back-button button:focus {
outline: 2px solid #93c5fd;
outline-offset: 2px;
}

/* --- BLOCS DE DADES GROGUES --- */
.taula-dades-basiques {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
.taula-dades-basiques td {
    border: 1px solid #E5E5E5;
    padding: 6px 10px;
    vertical-align: top;
    background-color: #FFFFE0; /* Fons groc clar */
}
.label-fitxa {
    font-size: 10px;
    font-weight: bold;
    color: #555555;
    display: block;
    margin-bottom: 2px;
}
.dada-fitxa {
    font-size: 13px;
    font-weight: bold;
    color: #000000;
}
.codi-actuacio {
    background-color: #E5E5E5 !important;
    text-align: center;
    vertical-align: middle !important;
    width: 15%;
}

/* --- SECCIÓ ÀMBIT (BLAU) --- */
.taula-ambits {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 12px;
}
.taula-ambits td {
    border: 1px solid #E5E5E5;
    padding: 4px 8px;
}
.col-codi {
    width: 12%;
    font-weight: bold;
    background-color: #FFFFE0;
}

.col-codi-blau {
    width: 12%;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #2EA0C3;
}

.col-ambit-blau {
    background-color: #2EA0C3;
    color: #FFFFFF;
    font-weight: bold;
}

.col-codi-verd {
    width: 12%;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #2A965F;
}

.col-ambit-verd {
    background-color: #2A965F;
    color: #FFFFFF;
    font-weight: bold;
}

.col-codi-vermell {
    width: 12%;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #C44543;
}

.col-ambit-vermell {
    background-color: #C44543;
    color: #FFFFFF;
    font-weight: bold;
}

/* --- SECCIÓ TITOLS SECCIONS --- */
.seccio-titol {
    font-size: 12px;
    font-weight: bold;
    color: #333333;
    margin: 15px 0 8px 0;
}

/* --- BLOCS DE CONTINGUT --- */
.bloc-contingut1 {
    border: 1px solid #D9D9D9;
    border-top: 4px solid #2EA0C3;
    background-color: #FAFAFA;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.bloc-contingut2 {
    border: 1px solid #D9D9D9;
    border-top: 4px solid #2A965F;
    background-color: #FAFAFA;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.bloc-contingut3 {
    border: 1px solid #D9D9D9;
    border-top: 4px solid #C44543;
    background-color: #FAFAFA;
    padding: 12px 15px;
    margin-bottom: 15px;
}

/* --- EMPLAÇAMENT (DUES COLUMNES) --- */
.emplacament-container {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}
.emplacament-mapa {
    width: 40%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.emplacament-carrer {
    width: 40%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.emplacament-imatge {
    width: 60%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.emplacament-mapav2 {
    width: 33%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.emplacament-carrerv2 {
    width: 33%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.emplacament-imatgev2 {
    width: 33%;
    border: 1px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}
.emplacament-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.taula-indicadors td,
.taula-indicadors th {
    vertical-align: top;
    line-height: 1.3;
}

/* --- TEXTOS DESCRIPTIUS --- */
.text-descriptiu {
    font-size: 12px;
    text-align: justify;
    margin-bottom: 10px;
    color: #222222;
}
.llista-objectius {
    margin-left: 15px;
    margin-bottom: 15px;
    font-size: 12px;
}
.llista-objectius li {
    margin-bottom: 4px;
}

/* --- TAULA FINANÇAMENT --- */
.taula-financament {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 11px;

    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.taula-financament th {
    border: 1px solid #CCCCCC;
    padding: 5px;
    background-color: #F5F5F5;
    font-weight: bold;
    text-align: center;
}
.taula-financament td {
    border: 1px solid #CCCCCC;
    padding: 5px;
    text-align: right;
}
.taula-financament td:nth-child(1),
.taula-financament td:nth-child(2) {
    text-align: left;
}
.fila-total {
    font-weight: bold;
    background-color: #E5F2FF;
}
.financament-maxim-header {
    background-color: #FFFFE0 !important;
}

/* --- TAULA INDICADORS --- */
.taula-indicadors {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 11px;
}
.taula-indicadors th {
    border: 1px solid #CCCCCC;
    padding: 6px;
    background-color: #F5F5F5;
    font-weight: bold;
    text-align: left;
}
.taula-indicadors td {
    border: 1px solid #CCCCCC;
    padding: 6px;
    vertical-align: top;
    text-align: center;
}

/* --- OBSERVACIONS --- */
.observacions-bloc {
    margin-top: 20px;
    border-top: 1px solid #DDDDDD;
    padding-top: 8px;
    font-size: 11px;
    color: #666666;
}