/* =========================
   CONFIGURACIÓ GENERAL
   ========================= */

:root {
    --roig: #b5292e;
    --roig-fosc: #791b22;
    --groc: #f2c14e;
    --crema: #fff8e8;
    --blanc: #ffffff;
    --text: #292421;
    --text-suau: #746c66;
    --verd: #21885b;
    --ombra: 0 10px 30px rgba(80, 30, 20, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--crema);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================
   CAPÇALERA
   ========================= */

.capcalera {
    position: relative;
    overflow: hidden;
    padding: 42px 22px 80px;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(242, 193, 78, 0.45),
            transparent 26%
        ),
        linear-gradient(
            145deg,
            var(--roig),
            var(--roig-fosc)
        );
    color: var(--blanc);
}

.capcalera::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -90px;
    width: 210px;
    height: 210px;
    border: 35px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.poble {
    margin: 0 0 4px;
    color: var(--groc);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.22rem;
}

.capcalera h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 500px;
    font-size: clamp(2.6rem, 10vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.18rem;
}

.data-actual {
    position: relative;
    z-index: 1;
    margin: 18px 0 0;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}


/* =========================
   CONTINGUT PRINCIPAL
   ========================= */

.contingut {
    position: relative;
    z-index: 2;
    width: min(100% - 28px, 760px);
    margin: -48px auto 0;
}


/* =========================
   ACTE ACTUAL
   ========================= */

.destacat {
    position: relative;
    min-height: 210px;
    padding: 28px 24px;
    overflow: hidden;
    background: var(--blanc);
    border-radius: 24px;
    box-shadow: var(--ombra);
}

.destacat::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -55px;
    width: 150px;
    height: 150px;
    background: rgba(181, 41, 46, 0.07);
    border-radius: 50%;
}

.etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 17px;
    padding: 7px 12px;
    background: #fce8e9;
    border-radius: 999px;
    color: var(--roig);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08rem;
}

.etiqueta::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--roig);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(181, 41, 46, 0.12);
}

.destacat h2,
.seguent h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 1.15;
}

.destacat h2 {
    max-width: 560px;
    font-size: clamp(1.7rem, 7vw, 2.5rem);
}

.hora,
.lloc {
    position: relative;
    z-index: 1;
}

.hora {
    margin: 17px 0 5px;
    color: var(--roig);
    font-size: 1.05rem;
    font-weight: 800;
}

.lloc {
    margin: 0;
    color: var(--text-suau);
    font-size: 0.95rem;
}

/* =========================
   AVISOS D'ÚLTIMA HORA
   ========================= */

.ocult {
    display: none;
}

.avisos {
    margin-bottom: 14px;
    padding: 22px;
    background: #fff1d6;
    border: 2px solid #e59824;
    border-radius: 20px;
    box-shadow: var(--ombra);
}

.cap-avisos {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 15px;
}

.icona-avis {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    background: #e37e1c;
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
}

.etiqueta-avis {
    margin: 0 0 3px;
    color: #a44a08;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1rem;
}

.cap-avisos h2 {
    margin: 0;
    font-size: 1.25rem;
}

.avis {
    padding: 14px 0;
    border-top: 1px solid rgba(164, 74, 8, 0.2);
}

.avis:first-child {
    border-top: 0;
    padding-top: 0;
}

.avis:last-child {
    padding-bottom: 0;
}

.avis h3 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.avis p {
    margin: 0;
    color: #65452e;
    font-size: 0.9rem;
    line-height: 1.4;
}

.actualitzacio-avisos {
    margin: 15px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(164, 74, 8, 0.2);
    color: #88694e;
    font-size: 0.72rem;
}

/* =========================
   SEGÜENT ACTE
   ========================= */

.seguent {
    margin-top: 14px;
    padding: 22px 24px;
    background: #f6e3b8;
    border: 1px solid rgba(110, 75, 20, 0.08);
    border-radius: 20px;
}

.etiqueta-secundaria {
    margin: 0 0 10px;
    color: #7b5618;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08rem;
}

.seguent h2 {
    font-size: 1.3rem;
}

.seguent .hora {
    color: #7b5618;
}


/* =========================
   PROGRAMA
   ========================= */

.programa {
    padding: 42px 0 20px;
}

.titol-seccio {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0 4px 18px;
}

.sobre-titol {
    margin: 0 0 5px;
    color: var(--roig);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12rem;
}

.titol-seccio h2 {
    margin: 0;
    font-size: 1.75rem;
}


/* =========================
   SELECTOR DE DIES
   ========================= */

.selector-dies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-bottom: 24px;
    padding: 5px 2px 10px;
}

.boto-dia {
    flex: 0 0 calc((100% - 45px) / 6);
    min-width: 48px;
    min-height: 66px;
    padding: 10px 5px;

    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e6d9cc;
    border-radius: 16px;

    color: var(--text);
    font: inherit;
    cursor: pointer;

    box-shadow:
        0 3px 8px rgba(80, 30, 20, 0.06),
        0 8px 18px rgba(80, 30, 20, 0.04);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.boto-dia:hover {
    transform: translateY(-2px);
    box-shadow:
        0 5px 12px rgba(80, 30, 20, 0.09),
        0 10px 22px rgba(80, 30, 20, 0.06);
}

.boto-dia span {
    display: block;
}

.boto-dia .nom-dia {
    margin-bottom: 5px;
    color: var(--text-suau);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.boto-dia .numero-dia {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}

.boto-dia.actiu {
    background:
        linear-gradient(
            145deg,
            var(--roig),
            var(--roig-fosc)
        );

    border-color: transparent;
    color: var(--blanc);

    transform: translateY(-2px);

    box-shadow:
        0 6px 14px rgba(181, 41, 46, 0.25),
        0 12px 24px rgba(181, 41, 46, 0.16);
}

.boto-dia.actiu .nom-dia {
    color: rgba(255, 255, 255, 0.78);
}

.dia-seleccionat {
    margin: 0 4px 16px;
    color: var(--text);
    font-size: clamp(1.12rem, 4.8vw, 1.38rem);
    font-weight: 850;
    line-height: 1.25;
}


/* =========================
   TARGETES DELS ACTES
   ========================= */

.llista-actes {
    display: grid;
    gap: 12px;
}

.targeta-acte {
    display: grid;
    grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
    gap: 15px;
    padding: 19px;
    background: var(--blanc);
    border: 1px solid #eee5dc;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(80, 30, 20, 0.05);
}

.targeta-acte.en-curs {
    border: 2px solid var(--roig);
}

.targeta-acte.finalitzat {
    opacity: 0.58;
}

.hora-targeta {
    color: var(--roig);
    font-size: 1.05rem;
    font-weight: 900;
}

.informacio-acte h3 {
    margin: 0 0 7px;
    font-size: 1.08rem;
    line-height: 1.25;
}

.informacio-acte .ubicacio {
    margin: 0;
    color: var(--text-suau);
    font-size: 0.88rem;
}
.detalls-acte {
    margin: 9px 0 0;
    color: var(--text-suau);
    font-size: 0.82rem;
    line-height: 1.45;
}
.estat-acte {
    display: inline-block;
    margin-top: 11px;
    padding: 5px 9px;
    background: #e4f5ec;
    border-radius: 999px;
    color: var(--verd);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.04rem;
}


/* =========================
   PEU DE PÀGINA
   ========================= */

footer {
    margin-top: 25px;
    padding: 28px 24px;
    background: #2b2420;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.5;
}

footer p {
    margin: 3px 0;
}


/* =========================
   PANTALLES GRANS
   ========================= */

@media (min-width: 700px) {
    .capcalera {
        padding-top: 65px;
        padding-bottom: 100px;
    }

    .destacat {
        padding: 36px;
    }

    .seguent {
        padding: 26px 36px;
    }

    .programa {
        padding-top: 55px;
    }

    .targeta-acte {
        grid-template-columns: 90px 1fr;
        padding: 23px;
    }
    .hora-targeta {
    line-height: 1.2;
    overflow-wrap: break-word;
}
    .selector-dies {
    grid-template-columns: repeat(11, minmax(0, 1fr));
}
}
/* =========================
   ACTES MODIFICATS I SUSPESOS
   ========================= */

.targeta-acte.modificat {
    background: #fff7df;
    border: 2px solid #e39a21;
}

.targeta-acte.modificat .hora-targeta {
    color: #a96100;
}

.estat-modificat {
    background: #fff0c5;
    color: #a96100;
}

.targeta-acte.anulat {
    background: #fff0f0;
    border: 2px solid #c73838;
    opacity: 0.72;
}

.targeta-acte.anulat .hora-targeta {
    color: #9e2929;
    text-decoration: line-through;
}

.targeta-acte.anulat .informacio-acte h3 {
    color: #8f3333;
    text-decoration: line-through;
}

.estat-anulat {
    background: #f7d7d7;
    color: #a51f1f;
}

/* =========================
   TIPUS D'AVISOS
   ========================= */

.avis-suspension {
    margin: 8px 0;
    padding: 14px;
    background: #ffe4e4;
    border: 1px solid #e6aaaa;
    border-left: 5px solid #b82d34;
    border-radius: 12px;
}

.avis-suspension h3 {
    color: #a01f27;
}

.avis-cambio {
    margin: 8px 0;
    padding: 14px;
    background: #fff1cc;
    border: 1px solid #e6c477;
    border-left: 5px solid #d27a12;
    border-radius: 12px;
}

.avis-cambio h3 {
    color: #a35400;
}

.avis-aparcamiento {
    margin: 8px 0;
    padding: 14px;
    background: #e8f1ff;
    border: 1px solid #b2cbee;
    border-left: 5px solid #316bb1;
    border-radius: 12px;
}

.avis-aparcamiento h3 {
    color: #285c9a;
}

.avis-informacion {
    margin: 8px 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.45);
    border-left: 5px solid #df961f;
    border-radius: 12px;
}

/* =========================
   INSTAL·LACIÓ DE L'APLICACIÓ
   ========================= */

.installacio-app {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 14px;
    padding: 20px;

    background:
        linear-gradient(
            145deg,
            #fff2f0,
            #fffaf0
        );

    border: 1px solid #edcec6;
    border-radius: 20px;

    box-shadow:
        0 5px 16px rgba(80, 30, 20, 0.06);
}

.installacio-app.ocult {
    display: none;
}

.icona-installacio {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 15px;

    box-shadow:
        0 5px 12px rgba(80, 30, 20, 0.15);
}

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

.text-installacio {
    flex: 1;
    min-width: 0;
}

.etiqueta-installacio {
    margin: 0 0 4px;
    color: var(--roig);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.09rem;
}

.text-installacio h2 {
    margin: 0;
    font-size: 1.25rem;
}

.text-installacio > p:not(.etiqueta-installacio) {
    margin: 6px 0 13px;
    color: var(--text-suau);
    font-size: 0.88rem;
    line-height: 1.4;
}

.boto-installar {
    padding: 10px 16px;
    background: var(--roig);
    border: 0;
    border-radius: 999px;
    color: white;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.boto-installar:active {
    transform: scale(0.97);
}

.instruccions-ios {
    margin-top: 13px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
}

.instruccions-ios.ocult {
    display: none;
}

.instruccions-ios p {
    margin: 0;
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.45;
}


/* =========================
   NOTIFICACIONS AL MÒBIL
   ========================= */

.notificacions-app {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 14px;
    padding: 20px;
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #fffdf6
        );
    border: 1px solid #ecd99d;
    border-radius: 20px;
    box-shadow:
        0 5px 16px rgba(80, 30, 20, 0.06);
}

.notificacions-app.ocult {
    display: none;
}

.icona-notificacions {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    background: var(--groc);
    border-radius: 50%;
    color: var(--roig-fosc);
    font-size: 1.8rem;
    font-weight: 900;
    box-shadow:
        0 5px 12px rgba(80, 30, 20, 0.12);
}

.text-notificacions {
    flex: 1;
    min-width: 0;
}

.etiqueta-notificacions {
    margin: 0 0 4px;
    color: var(--roig);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.09rem;
}

.text-notificacions h2 {
    margin: 0;
    font-size: 1.25rem;
}

.text-notificacions > p:not(.etiqueta-notificacions) {
    margin: 6px 0 13px;
    color: var(--text-suau);
    font-size: 0.88rem;
    line-height: 1.4;
}

.boto-notificacions {
    padding: 10px 16px;
    background: var(--roig);
    border: 0;
    border-radius: 999px;
    color: white;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.boto-notificacions:active {
    transform: scale(0.97);
}

.boto-notificacions:disabled {
    cursor: wait;
    opacity: 0.65;
}

.estat-notificacions {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 11px;
}

.estat-notificacions.ocult {
    display: none;
}