/* ========================================================== */
/* Stili di Base e Variabili - ECO GEMINI           */
/* ========================================================== */

:root {
    --primary-color: #002D62;       /* Blu scuro intensissimo */
    --secondary-color: #61b34a;     /* Verde chiaro */
    --accent-color: #f7a300;        /* Arancione per i suggerimenti */
    --background-light: #f5f5f5;    /* Sfondo chiaro */
    --text-color: #333;             /* Testo scuro */
    --border-color: #ccc;           /* Grigio per i bordi */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
    background-color: var(--background-light);
    line-height: 1.6;
}

.post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ========================================================== */
/* Header e Navigazione                        */
/* ========================================================== */

.site-header {
    background-color: white;
    color: var(--text-color);
    padding: 2rem 1rem;
    text-align: center;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.nav-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.main-logo {
    height: 60px;
    width: 60px;
    border-radius: 0;
    object-fit: contain;
}

.nav-list {
    list-style: none;
    display: none;
}

.nav-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item a {
    color: white;
    font-weight: normal;
}

/* Sottomenu */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    display: none;
    background-color: var(--primary-color);
    padding: 0.5rem;
    min-width: 350px;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    display: block;
}

.submenu a {
    font-weight: normal;
}

.search-form {
    display: none;
}

.search-input {
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.search-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: -2.5rem;
    padding: 0.5rem;
}

.search-button svg {
    height: 1.2rem;
    width: auto;
}

.mobile-icons {
    display: flex;
    gap: 1rem;
}

.search-toggle-mobile {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.search-toggle-mobile svg {
    height: 1.5rem;
    fill: white;
}

/* ========================================================== */
/* Contenuto Principale                        */
/* ========================================================== */

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.content-square {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    padding: 1.5rem;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.content-square:hover {
    transform: translateY(-5px);
}

.content-square img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

/* Stili specifici per i post del blog */
.content-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.text-content, .image-content {
    padding: 1rem;
}

.image-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.intro-section {
    padding: 1rem;
}

.styled-list {
    list-style-type: '🌿 ';
    padding-left: 1.5rem;
}

.back-to-index {
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Blocco Consiglio Utile */
.useful-tip {
    font-weight: bold;
    color: var(--accent-color);
    margin: 1rem 0;
    padding: 0.5rem;
    border-left: 4px solid var(--accent-color);
}

/* ========================================================== */
/* Sezione Conclusione e Footer                     */
/* ========================================================== */

.conclusion-box {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    margin: 2rem 0;
}

.conclusion-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

.footer-box {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
    display: inline-block;
}

/* ========================================================== */
/* Media Queries (Responsive Design)                */
/* ========================================================== */

@media (min-width: 768px) {
    /* Stili per tablet e desktop */
    .nav-list,
    .search-form {
        display: flex !important;
    }

    .mobile-icons {
        display: none !important;
    }

    .nav-list {
        flex-direction: row;
        position: static;
        width: auto;
    }

    .nav-item {
        border-bottom: none;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .content-block {
        flex-direction: row;
        align-items: center;
    }

    .text-content {
        flex: 1;
        padding-right: 2rem;
    }

    .image-content {
        flex: 1;
        padding-left: 2rem;
    }
}