/* =========================
   BASE RESET
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Roboto, sans-serif;
}

h1, h2, h3, h4, h5 {
    margin: 0;
}

/* =========================
   ROOT VARIABLES
========================= */

:root {
    --primary: #0e00d6;
    --accent: #dc3545;
    --dark: #001f4d;
    --bg-body: rgb(158,15,15);
}

/* =========================
   LAYOUT BASE
========================= */

body {
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* =========================
   NAVBAR BASE
========================= */

.navbar {
    position: relative;
    z-index: 1050;
}

.navbar .nav-link {
    font-family: 'Raleway', sans-serif;
    font-weight: 550;
    font-size: 16px;
    letter-spacing: 0.3px;
    color: var(--primary);
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.navbar .nav-link:hover {
    color: var(--dark);
    transform: translateY(-1px);
}

.navbar .nav-link.active {
    color: var(--accent) !important;
    position: relative;
}

.navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* =========================
   HAMBURGER ICON
========================= */

.navbar-toggler {
    border: none;
    padding: 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: black;
    display: inline-block;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: black;
    left: 0;
    transition: 0.3s;
}

.navbar-toggler-icon::before { top: -7px; }
.navbar-toggler-icon::after { top: 7px; }

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* =========================
   CAROUSEL
========================= */

#carouselExampleAutoplaying {
    position: relative;
}

.carousel-item {
    height: 70vh;
    min-height: 400px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    text-align: center;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 10;
}

.carousel-caption-custom h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.carousel-caption-custom p {
    font-size: 1.2rem;
}

/* =========================
   CARDS HOME
========================= */

.container-section2 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin: 50px;
}

.container-section2 .card {
    flex: 1 1 300px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.container-section2 .card img {
    height: 200px;
    object-fit: cover;
}

.card-link {
    text-decoration: none;
    display: inline-block;
}

.card-link:hover .card {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

.card-text {
    text-align: center;
    color: blue;
    font-size: 20px;
}

.card-text:hover {
    color: rgba(36,56,71,0.98);
}

.card-text:active {
    color: red;
}

.text-paragraph {
    color: white;
}

.card-text-socio {
    font-size: 15px;
}

/* =========================
   FORMATION / GALLERY
========================= */

.image-square {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-width: 350px;
}

.image-square img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    border-radius: 6px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* =========================
   WORKSHOP
========================= */

.workshop-card {
    border-radius: 12px;
    overflow: hidden;
}

.workshop-card .row {
    align-items: stretch;
}

.workshop-card img {
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 8px;
}

.small-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

.text-box {
    max-width: 420px;
    width: 100%;
    margin-left: auto;
}

/* =========================
   MUSICA & SPETTACOLO
========================= */

.card-static {
    width: 20rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.card-static .card-img-top {
    width: 100%;
    height: auto;
}

.card-static .card-text {
    font-size: 12px;
    font-weight: bold;
    margin-top: 8px;
}

/* =========================
   CONTATTI
========================= */

.ratio iframe {
    border-radius: 8px;
}

/* =========================
   FOOTER
========================= */

.footer {
    background: var(--dark);
    padding: 40px 20px;
    color: #fff;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin: 10px 0;
}

.footer-nav a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s, transform 0.2s;
}

.footer-nav a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-nav a.active {
    color: var(--accent) !important;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    font-size: 1.4rem;
    transition: color 0.3s, transform 0.3s;
}

.footer-social a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* =========================
   SCROLL TOP
========================= */

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================
   RESPONSIVE (TUTTO IN FONDO)
========================= */

@media (max-width: 768px) {

    .carousel-item {
        height: 45vh;
        min-height: 250px;
    }

    .carousel-item img {
        object-position: center;
    }

    .carousel-caption-custom {
        width: 90%;
        padding: 12px 15px;
    }

    .carousel-caption-custom h1 {
        font-size: 1.4rem;
    }

    .carousel-caption-custom p {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-grid img {
        height: auto;
        background: #fff;
        padding: 8px;
        display: block;
    }

    .gallery-grid img:hover {
        transform: none;
        box-shadow: none;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav li {
        margin: 5px 0;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 991px) {

    .carousel-caption-custom h1 {
        font-size: 1.6rem;
    }

    .carousel-caption-custom p {
        font-size: 1rem;
    }

    @media (max-width: 991px) {

    .navbar .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;

        width: 70%;
        min-width: 220px;
        height: 87vh;

        background: #2f7df6;
        z-index: 2000;

        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        border-radius: 0 0 0 12px;

        padding: 20px 25px;
        overflow-y: auto;

        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .navbar .navbar-collapse.show {
        transform: translateX(0);
    }

    .navbar .navbar-nav {
        width: 100%;
        text-align: right;
    }

    .navbar .nav-link {
        font-family: 'Raleway', sans-serif;
        font-size: 16px;
        font-weight: 500;
        display: block;
        text-align: right;
        color: #fff !important;
        padding: 10px 15px;
        transform: none;
    }

    .navbar .nav-link:hover {
        background: rgba(255,255,255,0.2);
        border-radius: 6px;
    }

    .navbar .nav-link.active {
        color: #ff1a1a !important;
        font-weight: 600;
        border-radius: 6px;
    }

    .navbar .nav-link.active::after {
        display: none;
    }
}
}