/*
Theme Name: TopProduct
Theme URI: https://topproduct.it
Author: TopProduct.it
Author URI: https://topproduct.it
Description: Tema WordPress per TopProduct.it — confronto indipendente di software B2B. Include homepage, pagine di confronto/ranking, e il quiz interattivo "Pico" disponibile ovunque tramite lo shortcode [topproduct_quiz]. Brand: blu #0F4C81, arancio #FF6B35.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: topproduct
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #14181F;
  background: #FFFFFF;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: #0F4C81; }
h1, h2, h3, h4 { font-family: 'Archivo', system-ui, sans-serif; }

/* WordPress core helper classes */
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13.5px; color: #5B6573; text-align: center; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.tp-container { max-width: 1280px; margin: 0 auto; }
.tp-section { padding: 72px 56px; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.tp-header {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  border-bottom: 1px solid #E5E9EF;
  position: sticky; top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.tp-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.tp-logo .tile {
  width: 34px; height: 34px; border-radius: 9px; background: #0F4C81;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.tp-logo .word {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 23px; letter-spacing: -0.02em;
}
.tp-logo .word .a { color: #0F4C81; }
.tp-logo .word .b { color: #14181F; }
.tp-nav { display: flex; align-items: center; gap: 34px; }
.tp-nav ul { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.tp-nav a { font-size: 15px; font-weight: 500; color: #14181F; text-decoration: none; }
.tp-nav a:hover { color: #0F4C81; }
.tp-cta-nav {
  display: inline-flex !important; align-items: center; gap: 7px;
  background: #FF6B35; color: #fff !important; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 2px 8px rgba(255,107,53,0.28);
}
.tp-cta-nav:hover { background: #E85C28; }
.tp-cta-nav svg { width: 16px; height: 16px; }
.tp-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.tp-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; padding: 16px 28px; border-radius: 8px;
  text-decoration: none; cursor: pointer; border: none; font-family: inherit;
}
.tp-btn-primary { background: #FF6B35; color: #fff; box-shadow: 0 6px 18px rgba(255,107,53,0.3); }
.tp-btn-primary:hover { background: #E85C28; }
.tp-btn-outline { background: transparent; color: #0F4C81; border: 1.5px solid #0F4C81; }
.tp-btn-outline:hover { background: #0F4C81; color: #fff; }
.tp-btn svg { width: 18px; height: 18px; }

/* ============================================================
   PROSE (contenuto editoriale dei confronti / articoli)
   ============================================================ */
.tp-prose { font-size: 17px; line-height: 1.65; color: #14181F; }
.tp-prose > * { max-width: 64ch; }
.tp-prose .alignwide, .tp-prose .alignfull, .tp-prose table, .tp-prose figure { max-width: none; }
.tp-prose p { margin: 0 0 18px; }
.tp-prose h2 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; margin: 40px 0 18px; }
.tp-prose h3 { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 21px; margin: 30px 0 12px; }
.tp-prose a { color: #0F4C81; text-decoration: underline; text-underline-offset: 2px; }
.tp-prose ul, .tp-prose ol { padding-left: 22px; margin: 0 0 18px; }
.tp-prose li { margin-bottom: 8px; }
.tp-prose img { border-radius: 14px; }
.tp-prose blockquote {
  margin: 24px 0; padding: 4px 0 4px 22px; border-left: 3px solid #FF6B35;
  font-size: 19px; color: #5B6573;
}
.tp-prose table {
  width: 100%; border-collapse: collapse; font-size: 15px;
  border: 1px solid #E5E9EF; border-radius: 14px; overflow: hidden; margin: 0 0 28px;
}
.tp-prose thead tr { background: #0F4C81; color: #fff; text-align: left; }
.tp-prose th, .tp-prose td { padding: 14px 18px; }
.tp-prose tbody tr { border-bottom: 1px solid #E5E9EF; }
.tp-prose tbody tr:nth-child(even) { background: #F7F9FB; }

/* ============================================================
   ARTICLE HEADER (confronti)
   ============================================================ */
.tp-article { max-width: 880px; margin: 0 auto; padding: 56px 32px 0; }
.tp-trust { display: flex; align-items: center; gap: 16px; padding-bottom: 26px; margin-bottom: 28px; border-bottom: 1px solid #E5E9EF; flex-wrap: wrap; }
.tp-author { display: flex; align-items: center; gap: 10px; }
.tp-author .ava { width: 38px; height: 38px; border-radius: 999px; background: #0F4C81; color: #fff; font-family: 'Archivo', sans-serif; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.tp-meta-item { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: #5B6573; }

/* ============================================================
   FOOTER
   ============================================================ */
.tp-footer { background: #0B3A63; padding: 48px 56px; }
.tp-footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.tp-footer a { color: #BBD3EA; text-decoration: none; font-size: 14px; }
.tp-footer a:hover { color: #fff; }

/* ============================================================
   QUIZ HOOK BAND (riutilizzabile nei contenuti)
   ============================================================ */
.tp-quizband {
  background: #0F4C81; border-radius: 16px; padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.tp-quizband h3 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 24px; color: #fff; margin: 0 0 6px; }
.tp-quizband p { font-size: 16px; color: #BBD3EA; margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .tp-header { padding: 0 22px; }
  .tp-section { padding: 48px 22px; }
  .tp-nav ul { display: none; }
  .tp-menu-toggle { display: inline-flex; }
  .tp-nav.is-open ul { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #E5E9EF; padding: 18px 22px; gap: 16px; }
  .tp-article { padding: 36px 20px 0; }
}
