:root {
    --bg-sand: #fdf4dc;
    --bg-cream: #fff9ed;
    --ink: #3d2f22;
    --ink-soft: #6f5942;
    --sage: #e1c57f;
    --forest: #8c6137;
    --clay: #d09a64;
    --card: #ffffff;
    --border: #ead7bb;
    --radius: 18px;
    --shadow: 0 14px 35px rgba(116, 78, 45, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 18%, rgba(225, 197, 127, 0.24), transparent 45%),
        radial-gradient(circle at 85% 8%, rgba(208, 154, 100, 0.18), transparent 30%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-sand) 100%);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.18;
    color: var(--ink);
}

a {
    color: var(--forest);
    text-decoration: none;
}

a:hover {
    color: var(--clay);
}

.container {
    width: min(1320px, 95vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(140, 97, 55, 0.2);
    background-color: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(9px);
}

/* Header con immagine di sfondo caricata dal Customizer */
.site-header.has-header-image {
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-color: transparent;
    backdrop-filter: none;
}

/* Overlay scuro semitrasparente sopra l'immagine */
.header-overlay {
    display: none;
}

.site-header.has-header-image .header-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(96, 63, 34, 0.52) 0%,
        rgba(96, 63, 34, 0.34) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.site-header.has-header-image .header-inner {
    position: relative;
    z-index: 1;
}

/* Testi header leggibili su sfondo immagine */
.site-header.has-header-image .site-title,
.site-header.has-header-image .main-nav a {
    color: #fff;
    text-shadow: none;
}

.site-header.has-header-image .main-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.site-header.has-header-image .menu-toggle {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ── menu primo livello ── */
.main-nav > ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 4px;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
    text-shadow: none;
}

.main-nav a:hover {
    background: rgba(225, 197, 127, 0.24);
}

/* freccia per le voci con figli */
.main-nav li.menu-item-has-children > a::after,
.main-nav li.page_item_has_children > a::after {
    content: " ▾";
    font-size: 0.7em;
    opacity: 0.65;
}

/* ── dropdown sub-menu ── */
.main-nav ul ul {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: rgba(116, 78, 45, 0.97);
    border: 1px solid rgba(255, 235, 205, 0.35);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 6px 0;
    z-index: 100;
    flex-direction: column;
    gap: 0;
}

.main-nav ul ul li {
    width: 100%;
}

.main-nav ul ul a {
    border-radius: 0;
    padding: 9px 18px;
    font-size: 0.92rem;
    color: #fff8ea;
    text-shadow: none;
}

.main-nav ul ul a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

/* mostra dropdown: hover (desktop) e classe .is-open (JS) */
.main-nav li:hover > ul,
.main-nav li.is-open > ul {
    display: flex;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--bg-cream);
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 12px;
}

.hero-olistica {
    position: relative;
    padding: 76px 0 84px;
    overflow: hidden;
}

.hero-olistica::before,
.hero-olistica::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-olistica::before {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(225, 197, 127, 0.28) 0%, rgba(225, 197, 127, 0) 70%);
    top: -140px;
    left: -120px;
}

.hero-olistica::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(208, 154, 100, 0.24) 0%, rgba(208, 154, 100, 0) 70%);
    right: -80px;
    bottom: -90px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(225, 197, 127, 0.2);
    color: var(--forest);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-inner h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3.8vw, 3rem);
    line-height: 1.2;
}

.hero-inner p {
    margin-top: 14px;
    color: var(--ink-soft);
}

.section-heading h2,
.section-heading h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.news-home,
.news-section {
    padding: 6px 0 70px;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    gap: 26px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

/* ── Layout Home ── */
.home-main {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    gap: 26px;
    padding: 28px 0 64px;
    align-items: start;
}

.home-content-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* CORPO: stessa card delle altre aree */
.home-corpo {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    width: 100%;
    overflow: hidden;
}

.home-corpo img,
.home-corpo figure,
.home-corpo .wp-block-image img,
.home-corpo .wp-caption,
.home-corpo video,
.home-corpo iframe {
    max-width: 100%;
    height: auto;
}

.home-corpo:empty {
    display: none;
}

/* NEWS sotto il corpo */
.home-news {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-grid,
.home-news-list {
    display: grid;
    gap: 20px;
}

.news-card {
    display: grid;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.news-thumb img,
.news-thumb-fallback {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.news-thumb-fallback {
    background: linear-gradient(150deg, rgba(225, 197, 127, 0.5), rgba(208, 154, 100, 0.42));
}

.news-body {
    padding: 16px 16px 16px 0;
}

.news-meta {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.news-body h2,
.news-body h3 {
    margin: 8px 0 10px;
    line-height: 1.28;
}

.news-excerpt {
    color: var(--ink-soft);
}

.home-sidebar .widget,
.site-sidebar .widget {
    background: #fcfaf3;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    position: sticky;
    top: 92px;
    /* larghezza massima = container del menu (header-inner) */
    max-width: 100%;
}

.home-sidebar .widget img,
.site-sidebar .widget img {
    display: block;
    width: 100%;
    max-width: 240px;   /* stessa max-width del logo nel header */
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.widget-title {
    margin: 0 0 10px;
    color: var(--forest);
}

.slug-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.slug-list li a {
    display: block;
    border: 1px dashed rgba(140, 97, 55, 0.35);
    border-radius: 10px;
    padding: 7px 10px;
    font-family: "Courier New", monospace;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.single-main {
    padding: 36px 0 64px;
}

.page-main {
    padding: 36px 0 64px;
}

.page-header h1 {
    margin: 0 0 22px;
}

.page-article,
.single-article {
    max-width: 820px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.btn-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--forest);
    color: #fff;
    border-radius: 999px;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: background 0.2s;
}

.btn-cta:hover {
    background: var(--clay);
    color: #fff;
}

.single-thumb img {
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.pagination-wrap {
    margin-top: 26px;
}

.site-footer {
    margin-top: 20px;
    border-top: 1px solid rgba(140, 97, 55, 0.2);
    background: rgba(255, 252, 244, 0.85);
}

.footer-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 12px;
}

/* Breadcrumb navigazione evento */
.myoshin-breadcrumb {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.myoshin-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.myoshin-breadcrumb li {
    display: inline;
}

.myoshin-breadcrumb a {
    color: var(--forest);
    text-decoration: none;
    transition: color 0.2s ease;
}

.myoshin-breadcrumb a:hover {
    color: var(--clay);
}

.myoshin-breadcrumb li::after {
    content: " / ";
    margin-left: 0.5rem;
    color: var(--border);
}

.myoshin-breadcrumb li:last-child::after {
    content: none;
}

.breadcrumb-current {
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 900px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .home-main {
        grid-template-columns: 1fr;
    }

    .home-sidebar .widget,
    .site-sidebar .widget {
        position: static;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .news-body {
        padding: 0 16px 16px;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 76px;
        left: 0;
        background: rgba(255, 253, 248, 0.98);
        border-bottom: 1px solid rgba(140, 97, 55, 0.2);
        padding: 10px 4vw 16px;
        z-index: 5;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a,
    .site-header.has-header-image .main-nav a {
        color: var(--ink);
        text-shadow: none;
    }

    .main-nav ul ul {
        position: static;
        min-width: 0;
        margin: 4px 0 0;
        background: rgba(116, 78, 45, 0.97);
    }

    .header-inner {
        position: relative;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 14px 0;
    }
}
