/* ==========================================================================
   STILE.CSS - Finanziamenti-Mutui.it (HTML5 / Responsive / Core Web Vitals)
   ========================================================================== */

:root {
  --primary: #0b2545;       /* Blu istituzionale bancario */
  --primary-light: #133c55;
  --secondary: #136f63;     /* Verde fiducia finanziaria */
  --accent: #d97706;        /* Arancio/Oro conversione CTA */
  --accent-hover: #b45309;
  --bg-body: #f4f7fa;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(11,37,69,0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-notice {
  background-color: #06162b;
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 6px 0;
  text-align: center;
}

.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 18px 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.brand-logo-box {
  background: var(--secondary);
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  padding: 8px 12px;
  border-radius: 6px;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.78rem;
  color: #94a3b8;
}

.top-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav a {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 10px;
  border-radius: 4px;
}

.top-nav a:hover {
  background-color: rgba(255,255,255,0.12);
  text-decoration: none;
}

.top-nav .btn-nav-cta {
  background-color: var(--accent);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
}

.top-nav .btn-nav-cta:hover {
  background-color: var(--accent-hover);
}

.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb span {
  margin: 0 6px;
}

.ad-banner-top {
  margin: 16px auto;
  text-align: center;
  min-height: 90px;
  background: #edf2f7;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-layout {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  gap: 28px;
  align-items: start;
  padding-bottom: 50px;
}

.sidebar-left {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.menu-group {
  border-bottom: 1px solid var(--border-color);
}

.menu-group:last-child {
  border-bottom: none;
}

.menu-group-title {
  background-color: #f1f5f9;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border-color);
}

.menu-list {
  list-style: none;
}

.menu-list li a {
  display: block;
  padding: 9px 15px;
  font-size: 0.88rem;
  color: var(--text-main);
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.menu-list li a:hover {
  background-color: #f8fafc;
  color: var(--primary);
  border-left-color: var(--secondary);
  text-decoration: none;
  padding-left: 18px;
}

.content-area {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.content-area h1 {
  font-size: 1.95rem;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 14px;
  font-weight: 800;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.geo-summary-box {
  background-color: #f0fdf4;
  border-left: 4px solid var(--secondary);
  padding: 18px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 22px 0;
}

.geo-summary-title {
  font-weight: 800;
  color: var(--secondary);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
  display: block;
}

.content-area h2 {
  font-size: 1.42rem;
  color: var(--primary);
  margin: 30px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #f1f5f9;
}

.content-area h3 {
  font-size: 1.15rem;
  color: var(--primary-light);
  margin: 22px 0 8px 0;
}

.content-area p {
  margin-bottom: 16px;
  color: var(--text-main);
}

.content-area ul, .content-area ol {
  margin: 0 0 18px 22px;
}

.content-area li {
  margin-bottom: 8px;
}

.table-responsive {
  overflow-x: auto;
  margin: 24px 0;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data-table th {
  background-color: var(--primary);
  color: #ffffff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
}

table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-color);
}

table.data-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.partner-cta-box {
  background: linear-gradient(135deg, #0b2545 0%, #163d6b 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: var(--radius);
  margin: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.partner-cta-text h3 {
  color: #ffffff;
  margin: 0 0 6px 0;
  font-size: 1.25rem;
}

.partner-cta-text p {
  color: #e2e8f0;
  margin: 0;
  font-size: 0.92rem;
}

.btn-partner {
  background-color: var(--accent);
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-partner:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.ad-in-article {
  margin: 24px 0;
  text-align: center;
  min-height: 280px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px;
}

.faq-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
}

.faq-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.faq-question {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.faq-answer {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 90px;
}

.widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
}

.ad-sidebar-box {
  text-align: center;
  min-height: 250px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px;
}

.site-footer {
  background-color: var(--primary);
  color: #cbd5e1;
  padding: 40px 0 24px 0;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 7px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 220px 1fr;
  }
  .sidebar-right {
    grid-column: 1 / -1;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-right > * {
    flex: 1 1 300px;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-left {
    order: 2;
  }
  .content-area {
    order: 1;
    padding: 20px;
  }
  .sidebar-right {
    order: 3;
  }
  .content-area h1 {
    font-size: 1.55rem;
  }
}
