/* =====================================================
   Malga Sadole — Rustico Montano
   Palette:
     --bosco       #2D4A3E  verde bosco scuro
     --salvia      #6B8E5A  verde salvia
     --legno       #4A2F1B  marrone legno
     --legno-2     #7A5A3E  marrone caldo
     --ocra        #C9A961  oro/ocra accenti
     --crema       #F5EFE2  sfondo caldo
     --crema-2     #EDE3CC  sfondo alt
     --pietra      #8B7E6C  grigio pietra
     --testo       #2B2118  testo principale
===================================================== */
:root {
    --bosco: #2D4A3E;
    --bosco-dark: #1E3329;
    --salvia: #6B8E5A;
    --legno: #4A2F1B;
    --legno-2: #7A5A3E;
    --ocra: #C9A961;
    --ocra-dark: #A8893F;
    --crema: #F5EFE2;
    --crema-2: #EDE3CC;
    --pietra: #8B7E6C;
    --testo: #2B2118;
    --testo-muted: #6b5d4e;
    --bianco: #FAF6EE;
}

* { box-sizing: border-box; }

html, body {
    padding: 0;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    color: var(--testo);
    background-color: var(--crema);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: var(--bosco);
    text-decoration: none;
    transition: color .25s ease;
}
a:hover { color: var(--ocra-dark); }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--bosco);
    line-height: 1.2;
    margin: 0 0 0.6em 0;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--legno); font-weight: 500; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ocra-dark); }

p { margin: 0 0 1.2em 0; }

hr {
    height: 0;
    border: 0;
    border-top: 1px solid var(--ocra);
    margin: 2.5em auto;
    padding: 0;
    max-width: 120px;
    position: relative;
}
hr::after {
    content: '✦';
    position: absolute;
    top: -0.7em; left: 50%;
    transform: translateX(-50%);
    background: var(--crema);
    padding: 0 0.5em;
    color: var(--ocra);
    font-size: 1rem;
}

.clear { clear: both; }

/* =========== Layout =========== */
.main {
    margin: 0 auto;
    width: 100%;
    padding-top: 76px;
}

/* Two-column layout used by news/events detail pages */
.unterzo { width: 30%; display: inline-block; vertical-align: top; }
.dueterzi { width: 63%; display: inline-block; vertical-align: top; padding: 0 30px; }

.hcontent {
    width: 100%;
    max-width: 1280px;
    padding: 50px 6%;
    margin: 0 auto;
    font-size: 1.05rem;
    box-sizing: border-box;
}

/* =========== Top brand header =========== */
.brand-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px 0 10px 0;
    text-align: center;
}
.brand-logo img {
    height: 140px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(74, 47, 27, 0.25));
}
.brand-text { text-align: left; }
.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--bosco);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.01em;
}
.brand-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--ocra-dark);
    margin-top: 6px;
}
.brand-sub {
    font-size: 0.85rem;
    color: var(--pietra);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 10px;
}

/* =========== Menu (top fixed bar) =========== */
.menu {
    height: 76px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 6%;
    box-sizing: border-box;
    background: linear-gradient(to bottom, var(--bosco-dark) 0%, var(--bosco) 100%);
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    z-index: 100;
}
.menus {
    position: fixed;
    top: 0; left: 0; right: 0;
}

.menu-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--crema) !important;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.menu-brand img {
    height: 52px;
    width: auto;
}
.menu-brand span {
    color: var(--crema);
    letter-spacing: 0.02em;
}

.menu-inline {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 36px;
    padding-right: 10px;
    height: 100%;
}
.menu-inline-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.menu-inline-item > a {
    color: var(--crema);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.menu-inline-item > a:hover,
.menu-inline-item:hover > a {
    color: var(--ocra);
    border-bottom-color: var(--ocra);
}
.menu-inline-item .caret {
    font-size: 0.7rem;
    line-height: 1;
    transition: transform .3s ease;
}
.menu-inline-item:hover .caret { transform: rotate(180deg); }

.menu-inline-sub {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: var(--bosco-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-top: 2px solid var(--ocra);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
    z-index: 110;
}
.menu-inline-item:hover > .menu-inline-sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.menu-inline-sub .menu-inline-item {
    display: block;
    height: auto;
    width: 100%;
}
.menu-inline-sub .menu-inline-item > a {
    padding: 10px 20px;
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    justify-content: space-between;
    width: 100%;
}
.menu-inline-sub .menu-inline-item > a:hover {
    background: rgba(201,169,97,0.1);
    color: var(--ocra);
}
/* Nested 3rd-level: open to the side */
.menu-inline-sub .menu-inline-sub {
    top: 0;
    left: 100%;
    transform: translateX(8px);
    border-top: none;
    border-left: 2px solid var(--ocra);
}
.menu-inline-sub .menu-inline-item:hover > .menu-inline-sub {
    transform: translateX(0);
}
.menu-inline-sub .menu-inline-item .caret { transform: rotate(-90deg); }

/* Language switcher (flags) */
.menu-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid rgba(201, 169, 97, 0.3);
}
.lang-flag {
    display: inline-flex;
    width: 26px;
    height: 18px;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0.55;
    transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.lang-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lang-flag:hover { opacity: 1; transform: translateY(-1px); }
.lang-flag.active {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--ocra);
}

/* Mobile language switcher inside slide-out menu */
.mbtn-lang {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 24px 0 40px;
    border-top: 1px solid rgba(201, 169, 97, 0.15);
    margin-top: 8px;
}
.mbtn-lang .lang-flag {
    width: 44px;
    height: 30px;
    opacity: 0.7;
}

/* Mobile burger */
.menu .mbm {
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    margin-left: auto;
}
.menu .mbm span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--crema);
    border-radius: 2px;
    transition: all .3s ease;
}
.menu .mbm.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu .mbm.is-open span:nth-child(2) { opacity: 0; }
.menu .mbm.is-open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.menu .mbtn-bar {
    display: none;
    position: fixed;
    right: 0;
    top: 76px;
    bottom: 0;
    width: 360px;
    max-width: 100vw;
    overflow: auto;
    background: var(--bosco-dark);
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}
.menu .mbtn-bar .links {
    padding: 40px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.menu .mbtn-bar a {
    color: var(--crema);
    padding: 16px 30px;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    transition: all .3s ease;
    border-bottom: 1px solid rgba(201, 169, 97, 0.12);
}
.menu .mbtn-bar a:hover {
    color: var(--ocra);
    background: rgba(201, 169, 97, 0.08);
}

/* =========== Hero / slider =========== */
.hero {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 480px;
    max-height: 820px;
    overflow: hidden;
}
.hero-slides, .hero-slides li {
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hero-slide {
    width: 100%;
    height: 75vh;
    min-height: 480px;
    max-height: 820px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg,
        rgba(30, 51, 41, 0.25) 0%,
        rgba(30, 51, 41, 0.15) 40%,
        rgba(30, 51, 41, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}
.hero-text {
    color: var(--crema);
    max-width: 800px;
    animation: fadeUp 1.2s ease;
}
.hero-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ocra);
    margin-bottom: 18px;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: var(--crema);
    line-height: 1;
    margin: 0 0 18px 0;
    text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.hero-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--crema);
    margin-bottom: 36px;
    opacity: 0.95;
}
.hero-cta {
    display: inline-block;
    background: var(--ocra);
    color: var(--legno) !important;
    padding: 16px 40px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-radius: 2px;
    transition: all .3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hero-cta:hover {
    background: var(--crema);
    color: var(--bosco) !important;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========== Buttons =========== */
.rbutton, .lbutton, .nbutton {
    display: inline-block;
    background: var(--bosco);
    color: var(--crema) !important;
    padding: 10px 24px;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all .3s ease;
}
.rbutton { float: right; }
.lbutton { float: left; background: var(--legno-2); }
.rbutton:hover, .lbutton:hover, .nbutton:hover {
    background: var(--ocra);
    color: var(--legno) !important;
}
.rbutton .dir, .lbutton .dir, .nbutton .dir {
    color: var(--ocra);
    font-size: 1rem;
    margin-right: 4px;
}

/* =========== Page content =========== */
.page-content {
    padding: 10px 0;
}
.page-content h1 {
    text-align: center;
    margin-bottom: 0.3em;
}
.page-content h2 {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--legno-2);
    margin-bottom: 2em;
}

/* =========== Cards (lastnews / folder grid) =========== */
.h-lastnews-c, .h-photos-c, .h-sponsor-c {
    text-align: center;
}
.h-lastnews {
    display: inline-block;
    padding: 0;
    width: 360px;
    max-width: 100%;
    text-align: left;
    margin: 12px;
    vertical-align: top;
    background: var(--bianco);
    box-shadow: 0 6px 24px rgba(74, 47, 27, 0.12);
    border-radius: 4px;
    overflow: hidden;
    transition: all .35s ease;
    border: 1px solid rgba(201,169,97,0.2);
}
.h-lastnews:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(74, 47, 27, 0.22);
}
.h-lastnews img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.h-lastnews .text {
    padding: 20px 22px 24px;
    font-size: 1rem;
    color: var(--testo-muted);
}
.h-lastnews .text .date {
    font-size: 0.8rem;
    color: var(--ocra-dark);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.h-lastnews .text .title {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    color: var(--bosco);
    font-weight: 600;
    margin: 10px 0 8px;
    line-height: 1.25;
}
.h-lastnews .text .desc {
    font-size: 0.95rem;
    color: var(--testo-muted);
}

/* Photo grid */
.h-photos {
    padding: 0;
    width: 250px;
    text-align: center;
    margin: 6px;
    vertical-align: top;
    box-shadow: 0 4px 16px rgba(74, 47, 27, 0.15);
    background: var(--bianco);
    border-radius: 3px;
    overflow: hidden;
    transition: all .3s ease;
}
.h-photos:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(74, 47, 27, 0.25);
}
.h-photos img {
    width: 100%;
    margin: 0;
    display: block;
}
.grid-item { width: 24%; }
.grid .desc { padding: 15px; }
.grid .desc p { margin: 0; }

/* Galleria foto/video e liste: griglia che riempie tutto il contenitore.
   Colonne uguali (1fr), niente larghezze fisse o impacchettamento a sinistra. */
.h-photos-c.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: start;
}
.h-photos-c.grid .grid-item,
.h-photos-c.grid .h-photos {
    width: auto;
    margin: 0;
}
.h-photos-c.grid .h-photos img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* =========== Footer =========== */
.bottom-bar {
    background: linear-gradient(to bottom, var(--legno) 0%, var(--bosco-dark) 100%);
    color: var(--crema);
    padding: 0 !important;
    max-width: none !important;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 6% 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-col h4 {
    color: var(--ocra);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-bottom: 18px;
}
.footer-col p {
    color: rgba(245, 239, 226, 0.78);
    font-size: 0.95rem;
    line-height: 1.8;
}
.footer-col a {
    color: var(--crema);
    border-bottom: 1px solid rgba(201, 169, 97, 0.3);
}
.footer-col a:hover {
    color: var(--ocra);
    border-bottom-color: var(--ocra);
}
.footer-logo {
    height: 80px;
    margin-bottom: 14px;
    filter: brightness(0) invert(1) opacity(0.95);
}
.footer-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--crema);
}
.footer-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--ocra);
    margin-top: 2px;
}
.footer-legal {
    border-top: 1px solid rgba(201, 169, 97, 0.18);
    padding: 18px 6% 8px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(245, 239, 226, 0.75);
    letter-spacing: 0.04em;
}
.footer-legal a {
    color: var(--crema);
    border-bottom: 1px solid rgba(201, 169, 97, 0.4);
    margin: 0 4px;
}
.footer-legal a:hover { color: var(--ocra); }
.footer-legal .sep { color: rgba(201, 169, 97, 0.5); margin: 0 6px; }

.footer-bar {
    padding: 8px 6% 22px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(245, 239, 226, 0.55);
    letter-spacing: 0.06em;
}

/* Cookie consent theme overrides */
#cc-main {
    --cc-font-family: 'Inter', system-ui, sans-serif;
    --cc-bg: var(--bianco);
    --cc-primary-color: var(--testo);
    --cc-secondary-color: var(--testo-muted);
    --cc-btn-primary-bg: var(--bosco);
    --cc-btn-primary-color: var(--crema);
    --cc-btn-primary-hover-bg: var(--bosco-dark);
    --cc-btn-secondary-bg: var(--crema-2);
    --cc-btn-secondary-color: var(--testo);
    --cc-btn-secondary-hover-bg: #e0d5b9;
    --cc-toggle-bg-on: var(--bosco);
    --cc-toggle-bg-off: #a89b85;
    --cc-toggle-bg-readonly: var(--pietra);
    --cc-cookie-category-block-bg: var(--crema);
    --cc-cookie-category-block-bg-hover: var(--crema-2);
    --cc-separator-border-color: rgba(74, 47, 27, 0.12);
    --cc-link-color: var(--bosco);
}
#cc-main .cm__title, #cc-main .pm__title { font-family: 'Playfair Display', serif; color: var(--bosco); }

/* =========== Content-driven (Manager) styling =========== */
.hcontent img { max-width: 100%; height: auto; border-radius: 3px; }
.hcontent blockquote {
    border-left: 3px solid var(--ocra);
    margin: 1.5em 0;
    padding: 0.6em 1.4em;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.25em;
    color: var(--legno);
    background: var(--crema-2);
}

/* =========== Legal pages =========== */
.legal-content { max-width: 880px; padding-top: 50px; }
.legal-page h1 { text-align: left; margin-top: 30px; }
.legal-page h2 {
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-style: normal;
    font-size: 1.5rem;
    color: var(--bosco);
    margin-top: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid rgba(201,169,97,0.3);
}
.legal-page h3 { margin-top: 1.6em; color: var(--legno); font-size: 1.15rem; }
.legal-page p, .legal-page li { font-size: 1rem; color: var(--testo); }
.legal-page ul { padding-left: 1.4em; }
.legal-page li { margin-bottom: 6px; }
.legal-updated {
    color: var(--testo-muted);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 2em;
}
.legal-note { font-size: 0.9rem; color: var(--testo-muted); border-left: 3px solid var(--ocra); padding: 4px 14px; background: var(--crema-2); }
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0 1.8em;
    font-size: 0.92rem;
    background: var(--bianco);
    box-shadow: 0 2px 10px rgba(74,47,27,0.08);
}
.cookie-table th, .cookie-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(201,169,97,0.2);
    vertical-align: top;
}
.cookie-table th {
    background: var(--bosco);
    color: var(--crema);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.cookie-table tr:last-child td { border-bottom: none; }

/* =========== Responsive =========== */
@media only screen and (max-width: 1023px) {
    .menu-inline { display: none; }
    .menu .mbm { display: flex; }

    .unterzo, .dueterzi { width: 100%; padding: 0; }

    .brand-header {
        flex-direction: column;
        gap: 18px;
    }
    .brand-text { text-align: center; }
    .brand-logo img { height: 110px; }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .grid-item { width: 31%; }
    .h-photos-c.grid { grid-template-columns: repeat(3, 1fr); }
}

@media only screen and (max-width: 600px) {
    .menu { padding: 0 18px; height: 68px; }
    .menus + .hcontent, .main { padding-top: 68px; }
    .menu-brand span { display: none; }
    .menu-brand img { height: 44px; }
    .menu .mbtn-bar { top: 68px; width: 100vw; }

    .hcontent { padding: 35px 3%; }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 6% 30px;
    }
    .footer-logo { margin: 0 auto 14px; display: block; }

    .h-lastnews { width: 100%; margin: 10px 0; }
    .grid-item { width: 46%; }
    .h-photos-c.grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Mobile in portrait: hero alto metà finestra */
@media only screen and (max-width: 768px) and (orientation: portrait) {
    .hero, .hero-slide {
        height: 50vh;
        min-height: 0;
        max-height: none;
    }
}

/* Mobile/tablet in landscape: hero a 3/4 dell'altezza finestra */
@media only screen and (max-width: 1024px) and (orientation: landscape) {
    .hero, .hero-slide {
        height: 75vh;
        min-height: 0;
        max-height: none;
    }
}
