/* --- portus.css --- */

body, html {
    margin: 0;
    padding: 0;
    background-color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Contenidor estàndard PC */
.main-wrapper, .page-container {
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

.button {
    display: inline-block;
    width: 280px;
    background-color: #1c87c9;
    border: none;
    color: white;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    margin: 10px auto;
    transition: background-color 0.3s;
}

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

/* Gràfiques (PC) */
.grafic-container {
    width: 95%;
    max-width: 1400px;
    margin: 10px auto;
    overflow-x: auto;
}

iframe {
    width: 100%;
    height: 330px;
    border: none;
    display: block;
}

/* --- ROTACIÓ PER A MÒBIL (Portada i Dades) --- */
/* S'activa en pantalles de mòbil */
@media screen and (max-width: 850px) {
    
    /* Forcem la rotació a qualsevol pàgina que tingui la classe .rotar-mobil */
    .rotar-mobil {
        position: fixed;
        width: 100vh; /* Amplada visual = Alçada telèfon */
        height: 100vw; /* Alçada visual = Amplada telèfon */
        top: 0;
        left: 100vw;
        transform: rotate(90deg);
        transform-origin: top left;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        box-sizing: border-box;
    }

    /* Ajust de la caixa de contingut de la portada un cop rotada */
    .rotar-mobil .content-box {
        display: flex !important;
        flex-direction: row !important; /* Text a un costat, botons a l'altre */
        align-items: center;
        justify-content: center;
        gap: 40px;
        width: 90%;
    }

    /* Evitem marges excessius en els botons quan estem de costat */
    .rotar-mobil .buttons-side {
        margin-top: 0 !important;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Mida de botons per a mòbil girat */
    .rotar-mobil .button {
        width: 260px;
        padding: 15px;
        font-size: 20px;
        margin: 5px auto;
    }

    /* Ajust de gràfiques per a mòbil girat */
    .rotar-mobil iframe {
        min-width: 700px; 
        height: 280px;
    }

    /* Escalat de títols per a mòbil */
    .rotar-mobil h1 {
        font-size: 2.5em;
    }
}