/*
Theme Name: Rivaluta Bootstrap 5
Theme URI: https://www.rivaluta.it/
Author: Rivaluta.it
Description: Tema WordPress leggero per Rivaluta.it, basato su Bootstrap 5 e con contenuto centrale responsive.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rivaluta-bootstrap5
*/

:root {
  --rivaluta-content-max: 1140px;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: .15em; }
img { height: auto; max-width: 100%; }

.site-header .navbar-brand { line-height: 1.05; }
.site-header .navbar-brand small { font-size: .75rem; line-height: 1.1; }
.site-header .dropdown-menu { max-height: min(70vh, 38rem); overflow-y: auto; }
.site-header .dropdown-item { white-space: normal; }

.site-main-column { max-width: var(--rivaluta-content-max); }
.entry-card { background: #fff; border: 0; border-radius: 1rem; box-shadow: 0 .125rem .5rem rgba(0,0,0,.075); }
.entry-content { line-height: 1.7; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content table { width: 100%; }
.entry-content iframe { max-width: 100%; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }

.adsense-laterale {
  align-items: center;
  color: #6c757d;
  display: flex;
  justify-content: center;
  min-height: 600px;
  text-align: center;
}

.page-numbers { border-radius: .375rem; display: inline-block; padding: .4rem .7rem; text-decoration: none; }
.page-numbers.current { background: var(--bs-primary); color: #fff; }

.site-footer .nav-link { color: rgba(255,255,255,.85); }
.site-footer .nav-link:hover,
.site-footer .nav-link:focus { color: #fff; text-decoration: underline; }

.footer-content {
  background: linear-gradient(145deg, #eef3f8 0%, #f8fafc 48%, #edf2f7 100%);
  border-top: 1px solid rgba(15, 23, 42, .08);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  position: relative;
}
.footer-content::before { background: var(--bs-primary); content: ""; height: 4px; left: 0; position: absolute; right: 0; top: 0; }
.footer-content-heading { align-items: end; display: grid; gap: 1rem 3rem; grid-template-columns: minmax(0, 1fr) minmax(17rem, .75fr); margin-bottom: 2rem; }
.footer-content-kicker, .footer-panel-label { color: var(--bs-primary); display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin-bottom: .35rem; text-transform: uppercase; }
.footer-content-heading h2 { color: #172033; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 750; letter-spacing: -.035em; margin: 0; }
.footer-content-heading p { color: #5e6878; line-height: 1.65; margin: 0; }
.footer-editorial-panel { background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); border-radius: 1.15rem; box-shadow: 0 1rem 2.5rem rgba(34,49,72,.08); padding: clamp(1.25rem, 3vw, 2rem); }
.footer-panel-heading { align-items: center; border-bottom: 1px solid #e7ebf0; display: flex; gap: .85rem; margin-bottom: .7rem; padding-bottom: 1.15rem; }
.footer-panel-heading h3 { color: #172033; font-size: 1.18rem; font-weight: 750; margin: 0; }
.footer-panel-label { font-size: .64rem; margin: 0 0 .15rem; }
.footer-panel-icon { align-items: center; background: rgba(var(--bs-primary-rgb),.1); border-radius: .75rem; color: var(--bs-primary); display: inline-flex; flex: 0 0 2.65rem; font-size: 1.15rem; height: 2.65rem; justify-content: center; }
.footer-category-list li + li { border-top: 1px solid #edf0f3; }
.footer-category-list a { align-items: center; color: #273449; display: grid; gap: .7rem; grid-template-columns: 1.8rem minmax(0,1fr) auto auto; padding: .73rem .2rem; text-decoration: none; transition: color .18s ease, transform .18s ease; }
.footer-category-list a:hover, .footer-category-list a:focus { color: var(--bs-primary); transform: translateX(.2rem); }
.footer-category-rank { color: #9aa4b2; font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.footer-category-name { font-size: .92rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-category-count { color: #7a8493; font-size: .7rem; white-space: nowrap; }
.footer-category-list .bi { font-size: .8rem; }
.footer-recent-posts li { align-items: center; display: grid; gap: .9rem; grid-template-columns: 2rem minmax(0,1fr) 2.25rem; padding: .72rem .15rem; }
.footer-recent-posts li + li { border-top: 1px solid #edf0f3; }
.footer-post-number { color: #a0a9b5; font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.footer-post-copy { min-width: 0; }
.footer-post-meta { align-items: center; display: flex; gap: .75rem; margin-bottom: .15rem; }
.footer-post-meta a { color: var(--bs-primary); font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.footer-post-meta time { color: #8993a1; font-size: .7rem; }
.footer-post-link { color: #273449; display: block; font-size: .92rem; font-weight: 700; line-height: 1.35; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.footer-post-link:hover, .footer-post-link:focus { color: var(--bs-primary); }
.footer-post-arrow { align-items: center; border: 1px solid #dfe4e9; border-radius: 50%; color: #657083; display: inline-flex; height: 2.1rem; justify-content: center; text-decoration: none; transition: .18s ease; width: 2.1rem; }
.footer-post-arrow:hover, .footer-post-arrow:focus { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; transform: translateX(.15rem); }

/* Pagina pubblica /blog/ */
.boss-page { padding-bottom: 2rem; }
.boss-hero { align-items: center; background: linear-gradient(125deg,#101b2d 0%,#18385d 62%,var(--bs-primary) 135%); border-radius: 1.35rem; box-shadow: 0 1.25rem 3rem rgba(17,38,64,.18); color: #fff; display: flex; justify-content: space-between; margin-bottom: 1.25rem; overflow: hidden; padding: clamp(1.6rem,4vw,3rem); position: relative; }
.boss-hero::after { border: 1px solid rgba(255,255,255,.13); border-radius: 50%; content: ""; height: 18rem; position: absolute; right: -6rem; top: -9rem; width: 18rem; }
.boss-hero > * { position: relative; z-index: 1; }
.boss-kicker { color: #9fc9ff; display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; margin-bottom: .55rem; text-transform: uppercase; }
.boss-hero h1 { font-size: clamp(2rem,5vw,3.25rem); font-weight: 780; letter-spacing: -.045em; margin: 0 0 .4rem; }
.boss-hero p { color: rgba(255,255,255,.72); margin: 0; max-width: 42rem; }
.boss-controls { align-items: end; background: #fff; border: 1px solid #e3e8ee; border-radius: 1rem; box-shadow: 0 .5rem 1.5rem rgba(30,45,65,.06); display: grid; gap: 1rem; grid-template-columns: minmax(16rem,1fr) 8rem 8rem auto auto; margin-bottom: 1rem; padding: 1rem 1.2rem; }
.boss-control-copy { display: flex; flex-direction: column; }
.boss-control-copy strong { color: #253248; }
.boss-control-copy span, .boss-controls label span { color: #7a8493; font-size: .72rem; }
.boss-controls label { font-weight: 700; }
.boss-controls .form-control { margin-top: .25rem; }
.boss-search-control label { color: #253248; display: block; font-size: .78rem; font-weight: 750; margin-bottom: .25rem; }
.boss-search-control .form-control { margin-top: 0; }
.boss-search-control .input-group-text { background: #f5f7f9; color: #758091; }
.boss-search-summary { background: rgba(var(--bs-primary-rgb),.08); border: 1px solid rgba(var(--bs-primary-rgb),.16); border-radius: .75rem; color: #34445b; font-size: .85rem; font-weight: 650; margin: 0 0 1.25rem; padding: .7rem 1rem; }
.boss-empty { align-items: center; color: #7e8896; display: flex; flex-direction: column; gap: .65rem; padding: 2rem 1rem; text-align: center; }
.boss-empty .bi { color: #b3bcc7; font-size: 1.8rem; }
.boss-panel { background: #fff; border: 1px solid #e2e7ed; border-radius: 1.15rem; box-shadow: 0 .8rem 2.2rem rgba(30,45,65,.07); overflow: hidden; padding: clamp(1.25rem,3vw,2rem); }
.boss-panel-heading { align-items: center; border-bottom: 1px solid #e8ecf0; display: flex; justify-content: space-between; margin-bottom: .6rem; padding-bottom: 1.1rem; }
.boss-panel-heading span { color: var(--bs-primary); display: block; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.boss-panel-heading h2 { color: #1b293e; font-size: 1.25rem; font-weight: 750; margin: .15rem 0 0; }
.boss-panel-heading > .bi { color: #bdc6d0; font-size: 1.4rem; }
.boss-category-ranking li + li { border-top: 1px solid #edf0f3; }
.boss-category-ranking a { align-items: center; color: #26354b; display: grid; gap: .8rem; grid-template-columns: 1.8rem minmax(0,1fr) auto; padding: .85rem .1rem; text-decoration: none; }
.boss-category-ranking a:hover strong { color: var(--bs-primary); }
.boss-rank { color: #9ca7b4; font-size: .72rem; font-weight: 800; }
.boss-category-data { min-width: 0; }
.boss-category-data strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; transition: color .18s ease; white-space: nowrap; }
.boss-progress { background: #edf1f5; border-radius: 1rem; display: block; height: .22rem; margin-top: .45rem; overflow: hidden; }
.boss-progress span { background: linear-gradient(90deg,var(--bs-primary),#66a9ff); border-radius: inherit; display: block; height: 100%; }
.boss-count { color: #26354b; font-size: .9rem; font-weight: 800; text-align: right; }
.boss-count small { color: #939daa; font-size: .62rem; font-weight: 600; }
.boss-post-list article { align-items: center; display: grid; gap: .75rem 1rem; grid-template-columns: minmax(0,1fr) 2.2rem; padding: .78rem .1rem; }
.boss-post-list article + article { border-top: 1px solid #edf0f3; }
.boss-post-meta { align-items: center; display: flex; gap: .7rem; grid-column: 1; }
.boss-post-meta a { color: var(--bs-primary); font-size: .63rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.boss-post-meta time { color: #929ca9; font-size: .7rem; }
.boss-post-list h3 { font-size: .92rem; font-weight: 700; grid-column: 1; line-height: 1.35; margin: -.45rem 0 0; }
.boss-post-list h3 a { color: #28364b; text-decoration: none; }
.boss-post-list h3 a:hover { color: var(--bs-primary); }
.boss-read { align-items: center; border: 1px solid #dfe4e9; border-radius: 50%; color: #6d7887; display: inline-flex; grid-column: 2; grid-row: 1 / span 2; height: 2.1rem; justify-content: center; text-decoration: none; width: 2.1rem; }
.boss-read:hover { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }

@media (min-width: 992px) {
  .site-header .navbar-nav > .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}

@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding-top: .75rem; }
  .footer-content-heading { grid-template-columns: 1fr; }
  .boss-controls { grid-template-columns: 1fr 1fr auto auto; }
  .boss-search-control { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
  .footer-category-count { display: none; }
  .footer-category-list a { grid-template-columns: 1.6rem minmax(0,1fr) auto; }
  .footer-recent-posts li { gap: .65rem; grid-template-columns: 1.5rem minmax(0,1fr); }
  .footer-post-arrow { display: none; }
  .boss-hero { align-items: flex-start; flex-direction: column; }
  .boss-controls { grid-template-columns: 1fr 1fr; }
  .boss-controls button, .boss-controls > .btn-outline-secondary { grid-column: 1 / -1; }
  .boss-count small { display: none; }
}

/* Allineamenti e classi standard generate dall'editor WordPress. */
.alignleft { float: left; margin: .5rem 1rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: #6c757d; font-size: .875rem; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; }
