/*
Theme Name: Mariposas
Theme URI: https://escuelainfantilmariposas.com/
Description: Tema WordPress colorato e moderno per scuole dell’infanzia (0–3 anni).
Version: 1.4
Author: Davide Parri & Gregorio Marchetti
Author URI: https://escuelainfantilmariposas.com/
Tags: escuela, niños, educación, responsive, colorido
*/

/*============================================================
  RESET & BASE
==============================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 15px;
    font-family: 'Poppins', 'Comic Sans MS', Arial, sans-serif;
    background: linear-gradient(135deg, #a4d5e5, #c2e9fb);
    background-size: 400% 400%;
    animation: bg-move 20s infinite alternate;
    color: #333;
    line-height: 1.6;
}

@keyframes bg-move {
    0% { background-position: left top; }
    100% { background-position: right bottom; }
}

a {
    color: #ff6f61;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4caf50;
}

/*============================================================
  NAVBAR
==============================================================*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(90deg, #7b4acb, #fdd835);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.6rem;
    color: #fff !important;
}

.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffe066 !important;
}

.navbar-toggler {
    display: block;
}

.navbar .dropdown-menu {
    display: none;
    position: static;
    float: none;
}

.navbar .dropdown-menu.show {
    display: block;
}

/*============================================================
  CONTENT
==============================================================*/
#page {
    margin: 0 auto;
    max-width: 1200px;
    padding: 100px 20px 20px 20px;
}

/*============================================================
  POST BOX
==============================================================*/
.post {
    border: 3px solid #7b4acb;
    border-radius: 16px;
    padding: 20px;
    margin-top: 40px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    border-color: #fdd835;
}
.post .title a {
    color: #7b4acb;
    font-weight: bold;
}
.post .title a:hover {
    color: #fdd835;
}
.post .date { font-size: 0.9rem; color: #777; }

/*============================================================
  HERO - versione desktop (≥1251px)
==============================================================*/
.hero-wrapper {
    position: relative;
    width: 100%;
    text-align: center;
    overflow: hidden;
}
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}
.hero-image:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    filter: brightness(1.15) saturate(1.2);
}
.hero-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #130eb3;
    font-size: 1.2rem;
    max-width: 80%;
    text-align: center;
}

/*============================================================
  SEDI
==============================================================*/
.sedes-title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 2rem 0 1rem 0;
    color: #130eb3;
}
.hero-images {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin: 2rem auto;
    gap: 20px;
    overflow: visible;
}
.hero-images img {
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    max-width: 490px;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hero-images img:hover {
    transform: scale(1.05) translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}
.sede-desc {
    margin-top: 8px;
    font-weight: 500;
    color: #333;
}
.sedi {
    display: block;
    position: relative;
    top: -140px;
}

/*============================================================
  FOOTER
==============================================================*/
#footer {
    background: linear-gradient(90deg, #7b4acb, #fdd835);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 14px;
    width: 100%;
}
#footer a {
    color: #fff;
    font-weight: bold;
}

/*============================================================
  RESPONSIVE (≤1250px)
==============================================================*/
@media (max-width: 1250px) {

    /*============================================================
      RESPONSIVE MOBILE HERO (solo per front-page-mobile.php)
    ==============================================================*/
    .mobile-hero {
        position: relative;
        overflow: hidden;
        padding: 0;
        margin: 0;
        background: linear-gradient(135deg, #a4d5e5, #c2e9fb);
        background-size: 400% 400%;
        animation: bg-move 20s infinite alternate;
    }

    /* Immagini */
    .hero-image {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
        margin: 0;
        padding: 0;
    }

    .hero-image.prato {

        position: relative;
        top: -200px;
    }


    /* Testo centrale con farfalle */
    .hero-text-wrapper {
        position: relative;
        z-index: 2;
        text-align: center;
        padding: 0 20px;
        max-width: 900px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        top: -100px;
    }

    .text-content {
        flex: 1 1 350px;
    }

    .mobile-hero-title {
        font-size: 2.2rem;
        font-weight: 700;
        color: #130eb3;
        margin-bottom: 1rem;
    }

    .mobile-hero-text {
        color: #333;
        font-size: 1.1rem;
        line-height: 1.6;
        font-weight: 500;
        margin: 0 auto;
        max-width: 700px;
    }

    /* SEDI mobile */
    .mobile-sedes img {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .mobile-sedes {
        display: block;
        position: relative;
        top: -150px;

    }

    .mobile-sedes img:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    }

    .mobile-sedes p {
        color: #130eb3;
        font-weight: 600;
    }

    /* Versione mobile più piccola */
    @media (max-width: 768px) {
        .hero-text-wrapper {
            flex-direction: column;
        }

        .butterfly {
            width: 60px;
        }

        .mobile-hero-title {
            font-size: 1.8rem;
        }

        .mobile-hero-text {
            font-size: 1rem;
            max-width: 90%;
        }
    }
}
