:root{
	--accent:#9b683e;
	--muted:#666;
	--bg:#ffffff;
	--card-bg:#ffffff; /* box background set to solid white */
	--border:rgba(16,24,40,0.06);
	--wood:#A67C52; /* tonalità legno chiaro */
}

*{box-sizing:border-box;font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif}
body{margin:0;color:#222;background:var(--bg)}
.container{max-width:1100px;margin:0 auto;padding:24px}

/* Page subtle background: enabled only on the homepage (body.home) */
body.home::before{
	content:"";
	position:fixed;
	inset:0;
	z-index:-1;
	background-image:linear-gradient(rgba(255,255,255,0.65), rgba(255,255,255,0.65)), url('/assets/images/home/ground.jpg');
	background-repeat:no-repeat;
	background-position:center bottom;
	background-size:cover;
	opacity:0.9;
	pointer-events:none;
}
/* ciao */
/* header / navbar */
.site-header{background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.98));box-shadow:0 1px 0 rgba(0,0,0,0.03);padding:10px 0;position:relative;z-index:1002;overflow:visible}
.site-header .container{display:flex;align-items:center;justify-content:space-between}
.logo{display:flex;align-items:center;gap:12px;text-decoration:none}
.logo-img{width:72px;height:auto;display:block}

/* Larger logo on homepage for stronger presence */
body.home .logo-img{width:110px}

@media (max-width:520px){
	body.home .logo-img{width:86px}
}
.brand{font-weight:800;color:var(--wood);font-size:20px}
.top-nav a{margin-left:14px;color:var(--muted);text-decoration:none;font-size:14px;padding:8px 10px;border-radius:8px;transition:background .18s,color .18s}
.top-nav a:hover{background:rgba(166,124,82,0.08);color:var(--wood)}

/* Dropdown menu for product listing */
.nav-dropdown{position:relative;display:inline-block}
.nav-dropdown{z-index:1003}
.nav-dropdown .nav-link{color:var(--muted);text-decoration:none;padding:8px 10px;border-radius:8px;display:inline-block}
.nav-dropdown .nav-link:hover{color:var(--wood)}
.nav-dropdown .dropdown-menu{position:absolute;left:0;top:100%;background:var(--card-bg);min-width:240px;border:1px solid var(--border);border-radius:6px;box-shadow:0 8px 24px rgba(16,24,40,0.12);padding:8px 0;display:none;z-index:1003;transform-origin:top left;margin-top:0}
.nav-dropdown .dropdown-menu li{list-style:none}
.nav-dropdown .dropdown-menu a{display:block;padding:10px 16px;color:#222;text-decoration:none}
.nav-dropdown .dropdown-menu a:hover{background:rgba(0,0,0,0.04)}
.nav-dropdown:hover .dropdown-menu{display:block}
.nav-dropdown:focus-within .dropdown-menu{display:block}
.nav-dropdown .dropdown-menu{pointer-events:auto}
.nav-dropdown.open .dropdown-menu{display:block}
.nav-dropdown .nav-link{cursor:pointer}

/* Hero */
.hero{
	padding:48px 24px;
	margin-bottom:18px;
	color:#fff;
	background-image:linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('/assets/images/home/sfondo.jpg');
	background-size:cover;
	background-position:center center;
	border-radius:6px;
	display:flex;
	flex-direction:column;
	gap:10px;
	align-items:center;
	justify-content:center;
	text-align:center;
	min-height:280px;
	position:relative;
	z-index:1;
}
.hero h1{margin:0 0 12px;font-size:44px;line-height:1.02}
.hero p{margin:0;color:rgba(255,255,255,0.95);font-size:20px;max-width:900px}

/* Buttons */
.btn{display:inline-block;background:var(--accent);color:#fff;padding:10px 16px;border-radius:8px;text-decoration:none;font-weight:600}
.btn.secondary{background:transparent;color:#fff;border:1px solid rgba(255,255,255,0.18)}

/* Layout */
.content{display:grid;grid-template-columns:1fr 300px;gap:28px;margin-top:20px;align-items:start;position:relative;z-index:1;background:var(--card-bg);padding:26px;border-radius:14px;box-shadow:0 10px 30px rgba(16,24,40,0.06);}
.posts{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}
.sidebar{border-left:0;padding-left:0}

/* Featured card spanning full width */
.posts .featured-card{
	grid-column:1 / -1;
	display:flex;
	flex-direction:column;
	gap:16px;
	padding:18px;
	background:var(--card-bg);
	border-radius:12px;
	border:1px solid var(--border);
	box-shadow:0 8px 28px rgba(16,24,40,0.08);
}
.posts .featured-card .card-image{
	width:100%;
	height:320px;
	object-fit:cover;
	border-radius:8px;
	display:block;
}
.posts .featured-card .card-body{
	padding:12px 16px;
	width:100%;
}
.posts .featured-card h3{font-size:22px;margin:0 0 10px}
.posts .featured-card p{font-size:16px;color:var(--muted);margin:0 0 12px}

/* Card */
.post{display:flex;flex-direction:column;background:var(--card-bg);border:1px solid var(--border);border-radius:10px;overflow:hidden;box-shadow:0 6px 18px rgba(16,24,40,0.06);transition:transform .18s ease,box-shadow .18s ease}
.post .card-image{width:100%;height:160px;object-fit:cover;display:block}
.post .card-body{padding:18px}
.post h3{margin:0 0 8px;font-size:18px}
.post p{margin:0 0 12px;color:var(--muted);font-size:14px}
.post a{color:var(--accent);text-decoration:none;font-weight:600}
.post:hover{transform:translateY(-6px);box-shadow:0 12px 34px rgba(16,24,40,0.12)}

/* Sidebar */
.sidebar{position:relative;min-width:0}
.sidebar .sticky{position:sticky;top:24px}

/* Google reviews card in sidebar */
.review-card{background:var(--card-bg);border:1px solid var(--border);padding:12px;border-radius:10px;margin-bottom:14px;display:flex;flex-direction:column;align-items:flex-start}
.review-card .stars{color:#f5a623;font-size:18px;letter-spacing:2px;margin-bottom:6px}
.review-card .gm-btn{display:inline-block;background:#1a73e8;color:#fff;padding:8px 12px;border-radius:20px;text-decoration:none;font-weight:700}
.review-card .gm-btn:hover{background:#1558b0}

/* Contact card used on contact page */
.contact-card{background:#fbfcfe;padding:12px;border:1px solid var(--border);border-radius:10px;margin-bottom:12px;color:#111}
.contact-card strong{display:block;font-weight:800;color:#0b2a4a;margin-bottom:6px}
.contact-card div{margin:4px 0;font-size:15px}

/* Email form styling */
.form-header{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.form-header .mail-icon{width:44px;height:44px;flex:0 0 44px;border-radius:8px;background:linear-gradient(180deg,#d14836,#b42b1f);display:flex;align-items:center;justify-content:center;color:#fff}
.mail-note{font-size:14px;color:var(--muted);margin-bottom:10px}
.email-btn{display:inline-flex;align-items:center;gap:10px;background:linear-gradient(180deg,#d14836,#b42b1f);color:#fff;padding:10px 14px;border-radius:8px;border:0;cursor:pointer;font-weight:700}
.email-btn svg{width:18px;height:18px}
.email-btn.secondary{background:#444}

/* Form fields */
form{background:var(--card-bg);border:1px solid var(--border);padding:16px;border-radius:10px}
form label{display:block;margin-bottom:8px;font-size:14px}
form input,form textarea{width:100%;padding:10px;border:1px solid #e6e6e6;border-radius:6px;min-width:0;max-width:100%;box-sizing:border-box}
form textarea{resize:vertical}
form button{background:var(--accent);color:#fff;padding:10px 14px;border:0;border-radius:6px;cursor:pointer}

.site-footer{background:#222;color:#ddd;padding:24px;margin-top:40px;border-top:4px solid #111;position:relative;z-index:1}

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

@media (max-width:520px){
	.hero{padding:36px 16px;min-height:220px}
	.hero h1{font-size:26px}
	.post .card-image{height:130px}
	.posts .featured-card{flex-direction:column}
	.posts .featured-card .card-image{width:100%;height:180px}
	.posts .featured-card .card-body{padding:12px}
}

/* Product pages */
.product-article{margin:28px 0;padding:28px;background:var(--card-bg);border-radius:12px;border:1px solid var(--border);color:#222;box-shadow:0 8px 30px rgba(16,24,40,0.06)}
.product-article h1{font-size:36px;margin-top:8px;color:#0b2a4a;margin-bottom:8px;font-weight:800}
.product-article .lead{font-size:20px;color:#184b8f;font-weight:600;margin-bottom:12px}
.product-header{display:flex;align-items:center;justify-content:space-between;gap:18px}
.product-header .title-wrap{flex:1}
.product-header .pefc-logo{display:flex;align-items:center;gap:8px}
.product-header .pefc-logo img{height:54px;width:auto;display:block}
.product-meta{margin-top:12px;color:#555;font-size:16px}
.product-article p{color:#222;line-height:1.9;font-size:16px}

/* Enhanced typography and layout refinements */
.product-article .highlight{color:#184b8f;font-weight:700}

/* Two-column layout for product details */
.product-grid{display:grid;grid-template-columns:1fr 320px;gap:28px;align-items:start}
.specs{background:#fbfcfe;padding:18px;border-radius:10px;border:1px solid rgba(24,75,143,0.06)}
.specs h4{margin:0 0 10px 0;color:#184b8f;font-size:16px}
.specs ul{margin:8px 0 0 18px}
.specs li{margin:8px 0;color:#222}

.badge{display:inline-block;background:#eaf3ff;color:#184b8f;padding:6px 10px;border-radius:8px;font-weight:800;font-size:13px}

/* Download / CTA */
.download-btn{display:inline-block;background:#184b8f;color:#fff;padding:10px 14px;border-radius:8px;text-decoration:none;font-weight:700;margin-top:12px}
.download-btn:hover{background:#0f3970}

/* Tweak gallery thumbnails for stronger presence */
.product-gallery{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;margin-top:20px}
.product-gallery .gallery-item{height:160px}
.product-gallery .gallery-item img{transition:transform .28s ease,filter .2s ease,box-shadow .18s ease}
.product-gallery .gallery-item:hover img{transform:scale(1.08);filter:brightness(0.9);box-shadow:0 10px 30px rgba(16,24,40,0.12)}

@media (max-width:900px){
	.product-grid{grid-template-columns:1fr}
	.specs{order:2}
}

/* Main image: larger and centered, show full image without heavy crop */
.product-media{display:flex;align-items:center;justify-content:center;background:transparent;padding:18px;border-radius:10px;border:1px solid rgba(0,0,0,0.03);position:relative;overflow:hidden}
.product-main{width:100%;max-width:980px;height:auto;max-height:520px;object-fit:contain;border-radius:8px;display:block;background:transparent;position:relative;z-index:2;box-shadow:0 6px 24px rgba(10,20,30,0.12)}

/* Blurred background behind main image + tint using sampled primary color */
.product-media::before{content:"";position:absolute;inset:0;border-radius:10px;background-image:var(--bg-img);background-size:cover;background-position:center center;background-repeat:no-repeat;filter:blur(28px) saturate(85%) contrast(92%);transform:scale(1.06);opacity:0.9;z-index:0;transition:opacity .25s ease}
.product-media::after{content:"";position:absolute;inset:0;border-radius:10px;background:var(--primary-color, rgba(155,104,62,0.14));mix-blend-mode:multiply;opacity:0.5;z-index:1;transition:background-color .25s ease,opacity .25s ease}

/* Ensure gallery thumbnails remain above decorative background */
.product-gallery{position:relative;z-index:3}

.product-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:14px;margin-top:20px}
.product-gallery .gallery-item{width:100%;height:140px;overflow:hidden;border-radius:8px;border:1px solid rgba(0,0,0,0.05);background:#fff;display:block;cursor:pointer;position:relative}
.product-gallery .gallery-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .28s ease,filter .2s ease}
.product-gallery .gallery-item:hover img{transform:scale(1.06);filter:brightness(0.95)}
.product-gallery .gallery-item:after{content:"";position:absolute;inset:0;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(0,0,0,0.02)}

.product-downloads{margin-top:22px}

/* Lightbox / modal */
.lightbox-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.7);display:none;align-items:center;justify-content:center;z-index:2000;padding:24px}
.lightbox-overlay.open{display:flex}
.lightbox-content{max-width:1200px;width:100%;max-height:90vh;display:flex;flex-direction:column;align-items:center}
.lightbox-content img{max-width:100%;max-height:90vh;object-fit:contain;border-radius:6px;box-shadow:0 14px 50px rgba(0,0,0,0.5)}
.lightbox-close{position:absolute;top:18px;right:22px;color:#fff;background:transparent;border:0;font-size:28px;cursor:pointer}

/* Better bullets layout */
.product-article ul{margin:14px 0 20px 18px;color:#222}
.product-article ul li{margin:8px 0}

/* Measures / packaging table used on product pages */
.measures-table{width:100%;border-collapse:collapse;margin-top:22px;font-size:15px}
.measures-table thead th{background:#f2c200;color:#111;padding:14px 12px;text-align:left;font-weight:700}
.measures-table th,.measures-table td{padding:12px 12px;border-bottom:1px solid rgba(0,0,0,0.06)}
.measures-table tbody tr:nth-child(odd){background:#fff}
.measures-table tbody tr:nth-child(even){background:#fbfbfb}
.measures-table .muted{color:var(--muted);font-size:14px}
.measures-note{margin-top:18px;color:#333;font-size:15px}

/* Small gallery figure styling used on product pages */
.product-gallery-figs{display:flex;gap:28px;align-items:flex-start;flex-wrap:wrap;margin-top:18px}
.product-gallery-figs figure{width:180px;text-align:center;margin:0}
.product-gallery-figs img{width:100%;height:120px;object-fit:cover;border-radius:6px;border:1px solid rgba(0,0,0,0.06)}
.product-gallery-figs figcaption{margin-top:8px;color:#555;font-size:14px}

@media (max-width:720px){
	.product-gallery-figs{justify-content:space-between}
	.product-gallery-figs figure{width:30%}
}

@media (max-width:900px){
	.product-main{max-height:420px}
	.product-gallery .gallery-item{height:110px}
}

@media (max-width:720px){
  .product-gallery img{height:86px}
  .product-article h1{font-size:20px}
}

/* Dynamic homepage animations */
/* Hero entrance */
.hero{transform:translateY(10px);opacity:0;transition:transform .8s cubic-bezier(.2,.9,.2,1),opacity .8s ease}
.hero.visible{transform:translateY(0);opacity:1}

/* Posts: initial hidden state then fade/slide in with stagger */
.post{opacity:0;transform:translateY(18px);transition:transform .62s cubic-bezier(.2,.9,.2,1),opacity .62s ease,box-shadow .18s ease;transition-delay:var(--delay,0ms)}
.post.in-view{opacity:1;transform:translateY(0)}
.post:hover{transform:translateY(-6px) scale(1.01);box-shadow:0 18px 42px rgba(16,24,40,0.12)}

/* Make sure transitions are smooth on reduced-motion preferences */
@media (prefers-reduced-motion: reduce){
	.hero, .post{transition:none!important;transform:none!important;opacity:1!important}
}

/* Hero decorative particles and parallax container */
.hero{position:relative;overflow:hidden}
.hero-decor{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.hero > *{position:relative;z-index:2}
.hero-decor .circle{position:absolute;border-radius:50%;opacity:0.12;filter:blur(6px);transform:translateY(0);will-change:transform,opacity}

@keyframes floatUp {
	0%{transform:translateY(20vh) scale(1);opacity:0}
	10%{opacity:0.08}
	90%{opacity:0.06}
	100%{transform:translateY(-30vh) scale(0.9);opacity:0}
}

@keyframes sway {
	0%{transform:translateX(0)}
	50%{transform:translateX(8px)}
	100%{transform:translateX(0)}
}

/* Slight 3D tilt on hero for depth on pointer move */
.hero.tilt{transform-style:preserve-3d;transition:transform .12s ease}

/* Enhance post animation for more drama */
.post{opacity:0;transform:translateY(26px) rotateX(6deg) scale(.995);transition:transform .72s cubic-bezier(.2,.9,.2,1),opacity .72s ease,box-shadow .18s ease;}
.post.in-view{opacity:1;transform:translateY(0) rotateX(0deg) scale(1)}
.post .card-image{transition:transform .5s ease,filter .5s ease}
.post:hover .card-image{transform:scale(1.06) translateZ(0);filter:brightness(1.02)}

/* Limit number of heavy decorative elements on small screens */
@media (max-width:720px){
	.hero-decor{opacity:0.7}
}

/* Additional form block styles (used on index and contatti) */
.form-block { display:block; }
.form-header { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.form-header .mail-icon { width:42px; height:42px; background:linear-gradient(135deg,#e95454,#d14848); color:#fff; display:flex; align-items:center; justify-content:center; border-radius:8px; font-size:18px; box-shadow:0 4px 10px rgba(209,72,72,.18); }
.mail-note { font-size:12px; color:#333; opacity:0.85; }
.email-btn { display:inline-flex; align-items:center; gap:8px; background:linear-gradient(90deg,#d14848,#c23333); color:#fff; border:none; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:600; box-shadow:0 6px 18px rgba(194,51,51,.18); }
.email-btn svg { width:18px; height:18px; opacity:0.95; }
.email-btn:active { transform:translateY(1px); }

/* reinforce overflow rules for small sidebars */
form input, form textarea, form select { min-width:0; max-width:100%; box-sizing:border-box; }
textarea { resize:vertical; }

/* Purchase box styles */
.purchase-box{background:var(--card-bg);border:1px solid var(--border);padding:12px;border-radius:10px;margin-bottom:14px}
.purchase-box h4{margin:0 0 6px;color:#184b8f;font-size:15px}
.purchase-box ul{margin:6px 0 10px 18px;color:#222;font-size:14px}
.purchase-box li{margin:6px 0}
.link-cta{display:inline-block;margin-top:6px;color:var(--accent);font-weight:700;text-decoration:none}

/* Certificazioni page background using PEFC image with dark overlay for readable text */
body.cert-page::before{
	content:"";
	position:fixed;
	inset:0;
	z-index:-1;
	background-image:linear-gradient(rgba(6,12,24,0.45), rgba(6,12,24,0.45)), url('/assets/images/PEFC.jpg');
	background-size:cover;
	background-position:center center;
	background-repeat:no-repeat;
	filter:contrast(0.98) saturate(0.9);
	opacity:1;
}

/* Slightly translucent article background to keep text readable over the image */
body.cert-page .product-article{
	background:rgba(255,255,255,0.70);
	border:1px solid rgba(0,0,0,0.04);
}

@media (max-width:720px){
	body.cert-page::before{background-position:top center}
	body.cert-page .product-article{padding:18px}
}

/* Footer funding note (homepage) */
.funding-note{margin-top:18px;color:#cfcfcf;font-size:13px;line-height:1.5;padding-top:12px;border-top:1px solid rgba(255,255,255,0.03)}
.funding-note p{margin:6px 0}

@media (max-width:720px){
	.funding-note{font-size:12px}
}

/* Style for clickable funding project link */
.funding-note .funding-link{color:#ffdca6;text-decoration:underline;font-weight:700}
.funding-note .funding-link:hover{color:#fff}


