/* ==========================================================================
   VERDE — Green Economy theme (light palette)
   bg #f4f7f0 · cards #fff · navbar/footer #1a3d52 · accent #3a8a4a · gold #8c6e1e
   Fraunces (headings) · DM Sans (body)
   ========================================================================== */

/* --- Base ---------------------------------------------------------------- */

body {
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
    font-weight: 400;
    background: #f4f7f0;
    color: #3d5e35;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    color: #1a3d52;
    letter-spacing: 0.01em;
}

p, li { color: #3d5e35; }
strong, b { color: #1a3d52; }

a { color: #3a8a4a; }
a:hover { color: #1a3d52; }

blockquote {
    background: #e8f0e2;
    border-left: 3px solid #3a8a4a;
    color: #3d5e35;
    padding: 0.75rem 1.2rem;
}

code, pre { background: #e8f0e2; color: #1a3d52; }

/* --- Header / nav -------------------------------------------------------- */

#header {
    background: #1a3d52 !important;
    border-bottom: 2px solid rgba(200, 168, 72, 0.3) !important;
    color: #dce8d2 !important;
}

#header a { color: #b8d4b0 !important; }
#header a:hover,
#header a.active { color: #c8a848 !important; }

.dropmenu ul li a { color: #b8d4b0 !important; }
.dropmenu ul li a:hover,
.dropmenu ul li a.active { color: #c8a848 !important; }

.dropmenu ul ul {
    background: #1a3d52 !important;
    border: 1px solid rgba(200, 168, 72, 0.2) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}
.dropmenu ul ul a { color: #b8d4b0 !important; }
.dropmenu ul ul a:hover { color: #c8a848 !important; }

.mobile-menu .button_container span { background: #dce8d2 !important; }

.overlay { background: #1a3d52 !important; }
.treemenu li { background: rgba(58, 138, 74, 0.08) !important; }
.treemenu li a { color: #b8d4b0 !important; }
.treemenu li a:hover,
.treemenu li a.active { color: #c8a848 !important; }

/* --- Page body ----------------------------------------------------------- */

#body-wrapper,
.section { background: #f4f7f0; }

.bg-gray { background: #f4f7f0 !important; }

/* --- Hero ---------------------------------------------------------------- */

.hero { background-color: #1a3d52; }
.hero h1 { color: #dce8d2 !important; }
.hero h2 { color: #b8d4b0 !important; }

/* --- Footer -------------------------------------------------------------- */

#footer {
    background: #1a3d52;
    color: #b8d4b0;
    text-align: center;
    padding: 1.5rem 1rem;
}

#footer::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
    margin-bottom: 1.2rem;
}

#footer a { color: #c8a848; }
#footer a:hover { color: #dce8d2; }

.footer-brand {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #dce8d2;
    margin: 0 0 0.3rem;
}

.footer-sub {
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(220, 232, 210, 0.6);
    margin: 0.15rem 0;
}

/* --- Generic Spectre cards ----------------------------------------------- */

.card {
    background: #ffffff;
    border-color: rgba(58, 138, 74, 0.15);
    color: #3d5e35;
}

.card .card-header,
.card .card-footer {
    border-color: rgba(58, 138, 74, 0.12);
    background: #eef4e8;
    color: #1a3d52;
}

/* --- Reusable tricolor stripe -------------------------------------------- */

.tricolor-stripe {
    height: 4px;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
}

/* ==========================================================================
   Blog grid
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 840px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .posts-grid { grid-template-columns: 1fr; gap: 1rem; } }

.blog-listing { background: #eef4e8; padding-bottom: 3rem; }

/* --- Post card --- */

.grid-item { display: flex; }

.grid-item .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 3px;
    border: 1px solid rgba(58, 138, 74, 0.15);
    box-shadow: 0 2px 12px rgba(26, 46, 28, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 46, 28, 0.14);
    border-color: rgba(58, 138, 74, 0.35);
}

.grid-item .card-image a { display: block; overflow: hidden; }

.grid-item .card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.grid-item .card:hover .card-image img { transform: scale(1.04); }

.grid-item .card-header {
    background: #eef4e8;
    padding: 0.85rem 1.2rem 0.65rem;
    border-bottom: none;
}

.grid-item .card-header::after {
    content: '';
    display: block;
    height: 3px;
    margin: 0.65rem -1.2rem -0.65rem;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
}

.grid-item .card-subtitle {
    font-size: 10px;
    color: #8c6e1e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.grid-item .card-title h5 {
    font-family: 'Fraunces', serif;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1a3d52;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.grid-item .card-title h5 a { color: #1a3d52; text-decoration: none; }
.grid-item .card-title h5 a:hover { color: #3a8a4a; }

.grid-item .card-body {
    flex: 1;
    padding: 0.85rem 1.2rem 0.75rem;
    font-size: 0.875rem;
    color: #3d5e35;
    line-height: 1.65;
    background: #ffffff;
}

.grid-item .card-body p:last-child { margin-bottom: 0; }

.grid-item .card-footer {
    background: #3a8a4a;
    border-top: none;
    padding: 0.55rem 1.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'DM Sans', sans-serif;
}

.grid-item .card-footer a { color: #fff; }

/* ==========================================================================
   Attività page
   ========================================================================== */

.attivita-page { padding-bottom: 4rem; }
.attivita-header { margin-bottom: 2rem; padding-top: 1rem; }

.attivita-title {
    font-family: 'Fraunces', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #1a3d52;
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem;
}

.attivita-intro { color: #3d5e35; font-size: 1.05rem; max-width: 640px; margin-bottom: 1.5rem; line-height: 1.65; }

.stats-bar {
    display: flex;
    margin-bottom: 3rem;
    border: 1px solid rgba(58, 138, 74, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 1.4rem 0.75rem;
    background: #1a3d52;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: 'Fraunces', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #c8a848;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #b8d4b0; }

@media (max-width: 540px) {
    .stats-bar { flex-wrap: wrap; }
    .stat-item { flex-basis: 50%; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
}

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 2.5rem 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(58, 138, 74, 0.2);
}

.section-heading h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3d52;
    letter-spacing: 0.01em;
    margin: 0;
}

.instagram-handle { font-size: 0.85rem; color: #8c6e1e; font-weight: 500; font-family: 'DM Sans', sans-serif; }

.attivita-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 840px) { .attivita-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .attivita-grid { grid-template-columns: 1fr; } }

.attivita-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(58, 138, 74, 0.15);
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(26, 46, 28, 0.07);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.attivita-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(26, 46, 28, 0.13); border-color: rgba(58, 138, 74, 0.3); }

.attivita-card-header { background: #eef4e8; padding: 0.7rem 1rem; display: flex; justify-content: space-between; align-items: center; }

.attivita-card-stripe {
    height: 3px;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
}

.attivita-data { font-size: 10px; color: #8c6e1e; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.cat-badge { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 2px; }
.cat-evento      { background: #3a8a4a; color: #fff; }
.cat-laboratorio { background: #8c6e1e; color: #fff; }
.cat-rete        { background: rgba(58, 138, 74, 0.1); color: #3a8a4a; border: 1px solid rgba(58, 138, 74, 0.3); }

.attivita-card-body { flex: 1; padding: 1rem; }
.attivita-card-body h3 { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700; color: #1a3d52; margin: 0 0 0.5rem; line-height: 1.3; }
.attivita-card-body p { font-size: 0.875rem; color: #3d5e35; line-height: 1.6; margin: 0; }

.attivita-card-footer { padding: 0.55rem 1rem; background: #eef4e8; border-top: 1px solid rgba(58, 138, 74, 0.1); display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }

.stato-badge { font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 2px; }
.stato-completato  { border: 1px solid #8c6e1e; color: #8c6e1e; }
.stato-in-corso    { border: 1px solid #3a8a4a; color: #3a8a4a; }
.stato-aperto      { border: 1px solid rgba(58, 138, 74, 0.3); color: #4a6e40; }

.palanche-badge { font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: #3a8a4a; padding: 2px 7px; border-radius: 2px; }

.social-section { margin-top: 1rem; }
.instagram-feed-placeholder { background: #eef4e8; border: 1px solid rgba(58, 138, 74, 0.2); border-radius: 3px; padding: 3rem 2rem; text-align: center; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.instagram-feed-placeholder p { font-size: 1rem; color: #3d5e35; margin: 0; line-height: 1.65; }

/* ==========================================================================
   Home hero — keeps dark header feel, text inverted
   ========================================================================== */

.home-hero {
    background: #1a3d52;
    padding: 5rem 0 4rem;
    text-align: center;
}

.home-hero::after {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
    margin-top: 3rem;
}

.home-hero-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #c8a848;
    margin: 0 0 0.75rem;
}

.home-hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    font-weight: 700;
    color: #dce8d2;
    line-height: 0.95;
    margin: 0 0 1.25rem;
}

.home-hero-tagline {
    font-size: 0.85rem;
    color: #95b08c;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 2rem;
    font-family: 'DM Sans', sans-serif;
}

.home-hero-stripe { max-width: 160px; margin: 0 auto; }

/* ==========================================================================
   .pal-* content components — light theme
   ========================================================================== */

.pal-hero {
    background: #eef4e8;
    border-bottom: 1px solid rgba(58, 138, 74, 0.2);
    padding: 2.5rem 1rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 3px 3px 0 0;
}

.pal-hero h1 { font-family: 'Fraunces', serif; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; color: #1a3d52; margin-bottom: 0.4rem; }
.pal-hero p { color: #3d5e35; font-size: 1.05rem; }

.pal-hero::after {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(to right, #3a8a4a 42%, #c8a848 42%, #c8a848 58%, #3a8a4a 58%);
    margin-top: 1.5rem;
}

.pal-section { margin-bottom: 2.5rem; }

.pal-section h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a3d52;
    border-bottom: 2px solid #3a8a4a;
    display: inline-block;
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}

.pal-note { background: rgba(58, 138, 74, 0.07); border-left: 4px solid #3a8a4a; border-radius: 0 3px 3px 0; padding: 0.9rem 1.1rem; margin: 0.8rem 0; font-size: 0.94rem; color: #3d5e35; }
.pal-note strong { color: #1a3d52; }

.pal-warn { background: rgba(140, 110, 30, 0.07); border-left: 4px solid #8c6e1e; border-radius: 0 3px 3px 0; padding: 0.9rem 1.1rem; margin: 0.8rem 0; font-size: 0.94rem; color: #3d5e35; }

.pal-danger { background: rgba(180, 40, 40, 0.06); border-left: 4px solid #c04040; border-radius: 0 3px 3px 0; padding: 0.9rem 1.1rem; margin: 0.8rem 0; font-size: 0.94rem; color: #3d5e35; }
.pal-danger strong { color: #b03030; }

.pal-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 1rem 0; }

.pal-card { background: #eef4e8; border: 1px solid rgba(58, 138, 74, 0.15); border-radius: 3px; padding: 1rem 1.1rem; }
.pal-card strong { display: block; font-family: 'Fraunces', serif; font-size: 0.95rem; font-weight: 700; color: #1a3d52; margin-bottom: 4px; }
.pal-card p { font-size: 0.88rem; color: #3d5e35; margin: 0; line-height: 1.5; }

.pal-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.pal-flow-step { background: rgba(58, 138, 74, 0.08); border: 1px solid rgba(58, 138, 74, 0.3); border-radius: 3px; padding: 0.4rem 0.8rem; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.85rem; color: #3a8a4a; white-space: nowrap; }
.pal-flow-arrow { color: rgba(58, 138, 74, 0.3); font-size: 1.1rem; }

.pal-stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 1rem 0; }
.pal-stat { background: #1a3d52; border-radius: 3px; padding: 0.8rem 1.2rem; text-align: center; flex: 1; min-width: 110px; }
.pal-stat-number { font-family: 'Fraunces', serif; font-size: 1.8rem; font-weight: 700; color: #c8a848; line-height: 1.1; }
.pal-stat-label { font-size: 0.78rem; color: #b8d4b0; margin-top: 2px; }

.pal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.pal-table th { background: #3a8a4a; color: #fff; text-align: left; padding: 0.6rem 1rem; font-family: 'DM Sans', sans-serif; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem; }
.pal-table td { padding: 0.6rem 1rem; border-bottom: 1px solid rgba(58, 138, 74, 0.1); color: #3d5e35; }
.pal-table tr:last-child td { border-bottom: none; }
.pal-table tr:nth-child(even) td { background: rgba(58, 138, 74, 0.04); }

.pal-steps { list-style: none; padding: 0; counter-reset: palstep; }
.pal-steps li { counter-increment: palstep; display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 0.7rem; color: #3d5e35; }
.pal-steps li::before { content: counter(palstep); background: #3a8a4a; color: #fff; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.82rem; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }

.pal-store-links { display: flex; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.pal-store-link { display: inline-block; background: #1a3d52; border: 1px solid rgba(58, 138, 74, 0.3); color: #dce8d2; text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 3px; font-size: 0.9rem; font-weight: 600; transition: background 0.15s, border-color 0.15s; }
.pal-store-link:hover { background: #3a8a4a; border-color: #3a8a4a; color: #fff; }
.pal-store-link span { display: block; font-size: 0.72rem; font-weight: 400; opacity: 0.7; }
