/* Base compartida de les pàgines simples (blog.html, rgpd.html). marca.css es carrega després. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--verd); text-decoration: none; }

nav { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); padding: 0 5%; display: flex; align-items: center; justify-content: space-between; height: 60px; border-bottom: 1px solid transparent; }
.nav-back { font-size: 14px; color: rgba(255,255,255,.65); }
.nav-back:hover { color: #fff; }

.page-hero { background: var(--guix-2); border-bottom: 1px solid var(--linia); padding: 56px 5% 44px; }
.page-hero-inner { max-width: 900px; margin: 0 auto; }
.page-hero .tag { display: inline-block; background: var(--verd-lt); color: var(--verd); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px; margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; max-width: 780px; }
.page-sub { font-size: 17px; color: var(--muted); margin-top: 12px; max-width: 680px; }

/* Blog */
.posts { width: min(900px, 90%); margin: 0 auto; padding: 48px 0 72px; display: grid; gap: 20px; }
.post { display: block; background: #fff; border: 1px solid var(--linia); border-radius: 16px; overflow: hidden; color: inherit; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s; }
.post:hover { transform: translateY(-2px); border-color: var(--guix-verd); box-shadow: 0 18px 40px -22px rgba(20,39,31,.35); }
.post-foto img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: 50% 45%; }
.post-text { padding: 24px 28px 26px; }
.post-meta { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.post h2 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; }
.post p { color: #33463D; font-size: 15px; margin-bottom: 12px; }
.post-more { font-size: 14px; font-weight: 600; color: var(--verd); }
@media (min-width: 760px) {
  .post-foto { display: grid; grid-template-columns: 42% 1fr; }
  .post-foto img { height: 100%; min-height: 250px; }
}

/* RGPD */
.rgpd { width: min(900px, 90%); margin: 0 auto; padding: 48px 0 72px; }
.rgpd-intro { max-width: 760px; color: #33463D; font-size: 15px; margin-bottom: 32px; }
.legal-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .legal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .legal-grid { grid-template-columns: repeat(3, 1fr); } }
.legal-card { background: #fff; border: 1px solid var(--linia); border-radius: 12px; padding: 20px; }
.legal-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.legal-card p { font-size: 14px; color: #33463D; line-height: 1.6; }

/* Peu i selector d'idioma */
footer { padding: 32px 5%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: var(--muted); font-size: 13px; }
.footer-legal a:hover { color: var(--verd); }

.lang-switch { position: relative; display: inline-flex; flex-shrink: 0; user-select: none; }
.lang-switch__trigger { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; cursor: pointer; font-family: inherit; font-size: 13px; padding: 6px 4px; }
.lang-switch__caret { transition: transform .25s ease; margin-top: 1px; }
.lang-switch[data-open] .lang-switch__caret { transform: rotate(180deg); }
.lang-switch__menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 8.5rem; padding: 5px; list-style: none; border: 1px solid; border-radius: 10px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; z-index: 1200; }
.lang-switch[data-open] .lang-switch__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switch__opt { display: block; width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer; font: 500 14px/1.2 inherit; font-family: inherit; color: rgba(255,255,255,.75); border-radius: 6px; padding: 9px 11px; }
.lang-switch__opt:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-switch__opt.is-active { color: #fff; font-weight: 600; }
