/*importo lo stile che mi piace */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
    --color-primary: #ff8c61;
    --color-primary-dark: #e07a50;
    --color-secondary: #ffd166;
    --color-tertiary: #4ea8de;

    --bg-page: #faf9f6;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);

    --text-main: #2b2d42;
    --text-muted: #5c6275;

    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-hover: 0 15px 40px 0 rgba(31, 38, 135, 0.15);

    --radius-lg: 20px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* html scalerà la grandezza di tutto il sito */
html {
    font-size: 16px;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.8;
    overflow-x: hidden;
    padding-top: 120px;
}

/* SFONDI ANIMATI FLUTTUANTI*/
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: floatShape 20s infinite alternate ease-in-out;
}
.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    top: -100px;
    left: -100px;
}
.shape-2 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}
.shape-3 {
    width: 400px;
    height: 400px;
    background: var(--color-tertiary);
    top: 30%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, -60px) scale(1.1);
    }
    100% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* NAVBAR IN VETRO E LOGO */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.nav-brand img {
    height: 60px;
    object-fit: contain;
    transition: var(--transition);
}
.nav-brand:hover img {
    transform: scale(1.05);
}

/* EFFETTO VETRO E CONTENITORI */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5% 5rem 5%;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(
        45deg,
        var(--color-primary-dark),
        var(--color-tertiary)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Funzione per rendere il testo trasparente */
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem 4rem;
    box-shadow: var(--shadow-glass);
    margin-bottom: 2.5rem;
}

.glass-panel h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
}

/* Elenco introduttivo Home */
.intro-list {
    list-style: none;
    max-width: 750px;
    margin: 0 auto;
}
.intro-list li {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}
.intro-list b {
    color: var(--color-tertiary);
    font-weight: 600;
    margin-right: 5px;
}

/* GRIGLIE E BLOCCHI NAVIGABILI */
.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}
.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}
.glass-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-tertiary);
}

.nav-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.nav-block-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nav-block-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.nav-block-card:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-tertiary);
}

.nav-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nav-block-card h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* TESTI E LISTE (Delle pagine attività, conclusioni e progetto */
.custom-list {
    list-style: none;
}
.custom-list li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}
.custom-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 1.2rem;
}
.custom-list b {
    color: var(--text-main);
    font-weight: 600;
}
.link-sito {
    color: var(--color-tertiary);
    text-decoration: none;
    font-weight: 600;
}
.link-sito:hover {
    text-decoration: underline;
}

/* ANIMAZIONI E BOTTONI */
.fade-up {
    animation: fadeUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    opacity: 0;
}
.delay-1 {
    animation-delay: 0.2s;
}
.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-back {
    display: inline-block;
    margin-top: 3rem;
    padding: 12px 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}
.btn-back:hover {
    background: var(--color-tertiary);
    color: white;
    transform: translateY(-3px);
}

/* FUNZIONI NECESSARIE AD ADATTARE IL SITO AGLI SCHERMI */

/* 1. Schermi giganti (LIM, Monitor 4K, TV) */
@media (min-width: 1600px) {
    html {
        font-size: 20px;
    } /* Ingrandisce in proporzione tutti i testi e i padding */
    .container {
        max-width: 1400px;
    }
}

/* 2. Tablet e iPad orizzontali */
@media (max-width: 1024px) {
    .glass-panel {
        padding: 2.5rem;
    }
    .page-title {
        font-size: 2.5rem;
    }
}

/* 3. Smartphone e schermi piccoli */
@media (max-width: 768px) {
    body {
        padding-top: 100px;
    }

    .navbar {
        height: 80px;
    }
    .nav-brand img {
        height: 45px;
    }

    .container {
        padding: 0 5% 3rem 5%;
    }

    .page-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }
    .glass-panel h2 {
        font-size: 1.5rem;
    }

    .intro-list li,
    .custom-list li {
        font-size: 1rem;
    }

    /* Costringe le griglie a impilarsi in una singola colonna sui telefoni */
    .nav-blocks,
    .glass-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .nav-block-card,
    .glass-card {
        padding: 1.5rem;
    }
    .nav-card-img {
        height: 160px;
    }

    .btn-back {
        width: 100%;
        text-align: center;
    }
}
