﻿/* Base */
:root {
    --header-height: 3rem;
    --footer-height: 3rem;
    --gap: 2rem;
    --site-body-height: calc(100vh - var(--header-height) - var(--footer-height) - var(--gap) - 3.2rem);
}
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    z-index: 1000;
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background-color: #fff;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.site-body {
    height: calc(var(--site-body-height) + 4rem);
    margin-top: calc(var(--header-height) + (var(--gap) - 1rem));
    margin-bottom: var(--footer-height);
    border: 1px solid lightgray; /* per togliere i bordi al main border: none;*/
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/*.site-body {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow: hidden;*/ /* blocca scroll esterno */
/*}*/



.navbar-nav .nav-link {
    position: relative;
    border-radius: 20px;
    padding: 6px 12px;
    transition: background-color .3s ease, box-shadow .3s ease;
    font-family: "Raleway", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background-color: #f0f8ff !important;
        box-shadow: 0 0 12px rgba(0,0,0,0.15) !important;
        outline: none !important;
    }

    .navbar-nav .nav-link.active {
        background-color: #f6f7e1 !important;
        box-shadow: 0 0 12px rgba(0,0,0,0.15) !important;
    }

@media (min-width: 768px) {
    .nav-link-p {
        position: relative;
        border-radius: 20px;
        padding: 6px 12px;
        transition: background-color .3s ease, box-shadow .3s ease;
        font-family: "Raleway", sans-serif;
        font-size: 0.95rem;
        font-weight: 500;
    }

        .nav-link-p:focus {
            background-color: #f0f8ff !important;
            box-shadow: 0 0 12px rgba(0,0,0,0.15) !important;
            outline: none !important;
        }

        .nav-link-p:hover {
            background-color: white !important;
            box-shadow: 0 0 12px rgba(0,0,0,0.15) !important;
            outline: none !important;
        }
}
/* Smartphone (Bootstrap: <= 576px) */
@media (max-width: 767.99px) {
    /* Tipografia fluida più compatta su smartphone */
    html {
        font-size: clamp(13px, 1vw + 9px, 15px);
    }

    :root {
        --header-height: 2.75rem;
        --footer-height: 2.75rem;
        --gap: 1rem;
        --site-body-height: calc(100vh - var(--header-height) - var(--footer-height) - var(--gap) - 3rem);
    }

    .site-body {
        height: calc(var(--site-body-height) + 3rem);
        margin-top: calc(var(--header-height) + (var(--gap) - 0.5rem));
        margin-bottom: var(--footer-height);
        padding: 0.75rem;
    }

    .navbar-nav .nav-link {
        display: inline-block; /* evita che si allarghi a tutta la riga */
        width: auto; /* larghezza determinata dal contenuto */
        margin: 4px 0; /* piccolo margine verticale tra i link */
        text-align: center; /* centra il testo nel bottone */
    }

}
.text-materia {
    color: #932424;
}

