:root{
  --ink:#1c2430; --ink-soft:#5b6472; --paper:#f7f8fa; --line:#e6e8ec; --radius:16px;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{font-family:'Poppins',sans-serif; background:var(--paper); color:var(--ink); -webkit-font-smoothing:antialiased; overflow-x:hidden;}
a{color:inherit; text-decoration:none;}
img{display:block; width:100%; height:100%; object-fit:cover;}
.wrap{max-width:1180px; margin:0 auto; padding:0 24px;}
@media (max-width:640px){ .wrap{padding:0 10px;} }

/* HERO */
.hero{
  position:relative; min-height:340px; display:flex; align-items:center; justify-content:center;
  text-align:center; padding:70px 20px 100px; color:#fff; overflow:hidden;
}
.hero-eyebrow{letter-spacing:3px; font-size:12px; font-weight:600; opacity:.85; text-transform:uppercase; margin-bottom:10px;}
.hero h1{
  font-family:'Dancing Script',cursive; font-weight:700; font-size:clamp(38px,7vw,72px); line-height:1.05;
  text-shadow:0 6px 24px rgba(0,0,0,.35); cursor:pointer; transition:opacity .2s; display:inline-block;
}
.hero h1:hover{opacity:.85;}
.hero p.sub{margin-top:14px; font-size:15px; letter-spacing:2px; font-weight:600; text-transform:uppercase; opacity:.92;}
.hero .swoosh{width:110px; height:3px; background:linear-gradient(90deg,#f7c948,#e08a2b); border-radius:3px; margin:18px auto 0;}

/* CATEGORY NAV */
.hero-panel{
  max-width:900px; margin:-56px auto 46px; background:#fff; border-radius:18px;
  box-shadow:0 18px 40px -18px rgba(20,30,50,.28); padding:18px; position:relative; z-index:5;
}
.search-bar{
  display:flex; align-items:center; gap:10px; background:var(--paper); border-radius:999px;
  padding:10px 10px 10px 20px; margin-bottom:14px;
}
.search-bar i{color:var(--ink-soft); font-size:14px;}
.search-bar input{
  flex:1; border:none; outline:none; font-size:14px; font-family:inherit; background:transparent; color:var(--ink); min-width:0;
}
.search-bar button{
  border:none; background:#1f8a94; color:#fff; font-weight:700; font-size:12.5px;
  padding:10px 20px; border-radius:999px; cursor:pointer; white-space:nowrap;
}
.search-bar button:hover{ background:#1a747d; }
.search-results-title{ font-size:17px; margin:20px 0 24px; color:var(--ink); }

.cat-nav{
  display:flex; flex-wrap:wrap; justify-content:center; gap:10px;
}
.cat-pill{
  display:flex; align-items:center; gap:8px; padding:10px 18px; border-radius:999px; font-weight:600;
  font-size:13.5px; border:1px solid transparent; white-space:nowrap; cursor:pointer; transition:opacity .2s;
}
.cat-pill i{font-size:13px;}
.cat-pill.active-all{opacity:1 !important;}

/* GRID */
.grid{display:grid; grid-template-columns:repeat(4,1fr); gap:26px; padding-bottom:60px;}

.pagination{display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; padding-bottom:60px;}
.page-link{
  display:inline-flex; align-items:center; gap:6px; padding:9px 15px; border-radius:8px;
  font-size:13px; font-weight:600; color:var(--ink); background:#fff; border:1px solid var(--line);
  transition:background .2s, color .2s;
}
.page-link:hover{ background:#eef0f3; }
.page-link.active{ background:#1f8a94; color:#fff; border-color:#1f8a94; }
.page-link.page-nav{ font-size:12.5px; color:var(--ink-soft); }
@media (max-width:640px){
  .page-link{ padding:7px 11px; font-size:12px; }
}
@media (max-width:900px){ .grid{gap:14px;} }
@media (max-width:640px){ .grid{gap:8px;} }

.card{
  background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:0 10px 26px -18px rgba(20,30,50,.35);
  display:flex; flex-direction:column; transition:transform .25s ease, box-shadow .25s ease; cursor:pointer;
}
.card:hover{transform:translateY(-5px); box-shadow:0 20px 36px -18px rgba(20,30,50,.4);}
.card-media{position:relative; width:100%; height:0; padding-top:75%; overflow:hidden;}
.card-media img{position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover;}
.card-badge{
  position:absolute; top:8px; left:8px; background:rgba(15,20,30,.72); color:#fff; font-weight:700;
  font-size:11px; padding:3px 9px; border-radius:6px; backdrop-filter:blur(3px); line-height:1.4;
}
.card-body{padding:12px 13px 14px; display:flex; flex-direction:column; gap:5px; flex:1;}
.card-tags{display:flex; flex-wrap:wrap; gap:4px 8px;}
.card-tag{display:flex; align-items:center; gap:5px; font-size:9.5px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; overflow-wrap:break-word;}
.card-rating{font-size:11px; color:#e0a52c; display:flex; align-items:center; gap:5px;}
.card-rating span{color:var(--ink-soft); font-weight:600;}
.card-tag i{font-size:9px;}
.card h3{font-size:12.5px; line-height:1.32; font-weight:700; color:var(--ink); overflow-wrap:break-word; word-break:break-word; hyphens:auto;}
.card .read-more{margin-top:auto; font-size:10px; font-weight:700; display:inline-flex; align-items:center; gap:4px;}

@media (max-width:900px){
  .card-body{padding:9px 8px 10px; gap:4px;}
  .card h3{font-size:10.5px; line-height:1.3;}
  .card-tag{font-size:8px; gap:3px;}
  .card-tag i{font-size:8px;}
  .card-badge{font-size:9.5px; padding:2px 7px; top:6px; left:6px; border-radius:5px;}
  .read-more{font-size:8.5px;}
}
@media (max-width:640px){
  .card-body{padding:7px 6px 8px; gap:3px;}
  .card h3{font-size:9px; line-height:1.28;}
  .card-tag{font-size:6.5px;}
  .card-tag i{font-size:6.5px;}
  .card-badge{font-size:7.5px; padding:2px 5px;}
  .read-more{font-size:6.5px;}
  .card{border-radius:8px;}
}

/* SINGLE ARTICLE PAGE */
.article-page{max-width:760px; margin:0 auto; padding:40px 24px 70px;}
.article-back{display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--ink-soft); margin-bottom:20px;}

.video-embed{
  position:relative; width:100%; aspect-ratio:16/9; border-radius:14px; overflow:hidden;
  cursor:pointer; background:#000; margin-top:6px;
}
.video-embed img{width:100%; height:100%; object-fit:cover; opacity:.8;}
.video-embed iframe{width:100%; height:100%; border:0; display:block;}
.video-play-btn{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:72px; height:72px; border-radius:50%; background:rgba(31,138,148,.92);
  border:none; color:#fff; font-size:24px; display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.35); transition:background .2s, transform .2s;
}
.video-embed:hover .video-play-btn{ background:#1f8a94; transform:translate(-50%,-50%) scale(1.06); }
.article-media{border-radius:18px; overflow:hidden; aspect-ratio:16/8; margin-bottom:24px;}
.article-tags{display:flex; flex-wrap:wrap; gap:8px 14px; margin-bottom:14px;}
.article-tag{font-size:12px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; display:inline-flex; align-items:center; gap:6px;}

/* CONDIVISIONE SOCIAL */
.share-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:34px 0; padding-top:22px; border-top:1px solid var(--line);}
.share-label{font-size:13px; font-weight:700; color:var(--ink-soft); margin-right:2px;}
.share-row a, .share-copy{
  width:38px; height:38px; border-radius:50%; background:var(--paper); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; font-size:15px; color:var(--ink);
  cursor:pointer; transition:background .2s, transform .2s;
}
.share-row a:hover, .share-copy:hover{ background:#eef0f3; transform:translateY(-2px); }

/* VOTO A STELLE */
.rating-box{ background:#fbfbfc; border:1px solid var(--line); border-radius:14px; padding:22px 24px; margin-bottom:34px; text-align:center;}
.rating-box h3{ font-size:15px; margin-bottom:14px; color:var(--ink); }
.star-rating{ display:inline-flex; flex-direction:row-reverse; gap:4px; font-size:32px; }
.star-rating input{ display:none; }
.star-rating label{ color:#d8dce2; cursor:pointer; transition:color .15s; line-height:1; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label{ color:#e0a52c; }
.rating-result, .rating-result-small{ margin-top:10px; font-size:13.5px; color:var(--ink-soft); display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; }
.stars-display{ color:#e0a52c; letter-spacing:2px; }

/* COMMENTI */
.comments-section{ margin-top:10px; }
.comments-section h3{ font-size:18px; margin-bottom:18px; }
.comment{ padding:16px 0; border-bottom:1px solid var(--line); }
.comment-author{ font-weight:700; font-size:13.5px; color:var(--ink); }
.comment-date{ font-weight:400; color:var(--ink-soft); font-size:12px; margin-left:6px; }
.comment p{ margin-top:6px; font-size:14px; line-height:1.65; color:var(--ink-soft); overflow-wrap:break-word; word-break:break-word; }
.no-comments{ color:var(--ink-soft); font-size:14px; padding:10px 0 20px; }

.comment-form-box{ margin-top:26px; background:#fbfbfc; border:1px solid var(--line); border-radius:14px; padding:22px 24px; }
.comment-form-box h4{ font-size:15px; margin-bottom:14px; }
.comment-form-row{ display:flex; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.comment-form-row input{ flex:1; min-width:160px; }
.comment-form-box input, .comment-form-box textarea{
  width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:8px; font-size:13.5px;
  font-family:inherit; background:#fff;
}
.comment-form-box textarea{ min-height:100px; resize:vertical; margin-bottom:14px; }
.btn-comment-submit{
  background:#1f8a94; color:#fff; border:none; padding:11px 22px; border-radius:8px;
  font-weight:700; font-size:13px; cursor:pointer;
}
.btn-comment-submit:hover{ background:#1a747d; }
.comment-flash{ padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:14px; }
.comment-flash.ok{ background:#e9f8ee; color:#2c7a45; }
.comment-flash.error{ background:#fdecec; color:#c0392b; }
.hp-field{ position:absolute; left:-9999px; opacity:0; height:0; overflow:hidden; }
.article-page h1{font-size:clamp(24px,4vw,34px); line-height:1.3; margin-bottom:18px; color:var(--ink);}
.article-page p{font-size:15.5px; line-height:1.8; color:var(--ink-soft); margin-bottom:14px; overflow-wrap:break-word; word-break:break-word;}
.article-page a{overflow-wrap:break-word; word-break:break-word;}

/* FOOTER */
footer{background:#0e1b2c; color:#c9d3de; padding:56px 0 0; margin-top:20px;}
.footer-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr 1.3fr; gap:34px; padding-bottom:40px; border-bottom:1px solid rgba(255,255,255,.08);}
@media (max-width:900px){ .footer-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:560px){ .footer-grid{grid-template-columns:1fr;} }
.f-brand h2{font-family:'Dancing Script',cursive; color:#fff; font-size:30px;}
.f-brand p{margin-top:12px; font-size:13.5px; line-height:1.7; color:#9fadbd;}
.f-cta{margin-top:16px; display:inline-block; background:linear-gradient(90deg,#1f8a94,#4c9a6a); color:#fff; font-weight:700; font-size:12.5px; letter-spacing:.5px; padding:11px 20px; border-radius:999px; text-transform:uppercase;}
.f-search{display:flex; margin-top:18px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.08); max-width:280px;}
.f-search input{flex:1; border:none; background:transparent; padding:11px 14px; font-size:13px; color:#fff; outline:none;}
.f-search input::placeholder{color:#7c8ba0;}
.f-search button{border:none; background:linear-gradient(90deg,#1f8a94,#4c9a6a); color:#fff; padding:0 16px; cursor:pointer;}
footer h4{color:#fff; font-size:13px; letter-spacing:1px; text-transform:uppercase; margin-bottom:16px;}
footer ul{list-style:none; display:flex; flex-direction:column; gap:10px;}
footer ul li a{font-size:13.5px; color:#9fadbd; transition:color .2s;}
footer ul li a:hover{color:#fff;}
footer ul li a i{width:14px; margin-right:6px; opacity:.8;}
.f-news li a{display:block; line-height:1.4;}
.f-news .f-date{display:block; font-size:11px; color:#5f7185; margin-top:2px;}
.f-social-row{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px;}
.f-social-row a{width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.07); display:flex; align-items:center; justify-content:center; font-size:15px; color:#fff; transition:background .2s, transform .2s;}
.f-social-row a:hover{background:linear-gradient(135deg,#1f8a94,#8b5fbf); transform:translateY(-2px);}
.f-newsletter form{display:flex; margin-top:10px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.08);}
.f-newsletter input{flex:1; border:none; background:transparent; padding:11px 14px; font-size:13px; color:#fff; outline:none;}
.f-newsletter input::placeholder{color:#7c8ba0;}
.f-newsletter button{border:none; background:linear-gradient(90deg,#1f8a94,#4c9a6a); color:#fff; padding:0 18px; cursor:pointer;}
.f-newsletter small{display:block; margin-top:8px; font-size:11px; color:#5f7185;}
.f-newsletter small.ok{color:#4c9a6a;}
.f-bottom{text-align:center; font-size:12px; color:#5f7185; padding:20px 0 26px;}
.f-projects{display:flex; flex-wrap:wrap; gap:10px; padding:26px 0; justify-content:center; border-bottom:1px solid rgba(255,255,255,.08);}
.f-projects a{font-size:12.5px; font-weight:600; color:#c9d3de; background:rgba(255,255,255,.06); padding:8px 16px; border-radius:999px; display:inline-flex; align-items:center; gap:7px; transition:background .2s, color .2s;}
.f-projects a:hover{background:rgba(255,255,255,.14); color:#fff;}
.f-projects a i{font-size:11px; opacity:.85;}
