/*
Theme Name: FacileOspitare
Description: Tema del blog di FacileOspitare
Version: 1.0
Text Domain: facileospitare
*/

/* --------------------------
   1. BLOG
--------------------------- */

:root{
	--brand:#ffbf2e;
	--brand-hover:#ffb000;
	--ink:#195065;
	--card:#ffffff;
	--muted:#6b7785;
	--bg-soft:#fffbf0;
	--bd:#ffebbe;
	--border:#eaeaea;
}

.blog-title, .blog-subtitle {
	color: #fff;
	text-shadow: 0px 0px 17px #222;
}

.blog-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    animation: fadeInUp 0.8s ease-out;
}

.blog-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: #f8f8f8;
    max-width: 600px;
    margin: 0 auto 25px auto;
    animation: fadeInUp 1s ease-out;
	text-shadow: 1px 1px 11px #222;
}

.blog-archive {
	flex: 1;
	display: flex;
	gap: 40px;
	margin-top: 60px;
}

.blog-content {
    flex: 3;
}

.blog-content h2 {
    color: #195065;
}

.blog-sidebar {
    flex: 1;
}

.blog-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    background: url('/wp-content/themes/facileospitare/assets/img/blog-hero.png') center/cover no-repeat;
    overflow: hidden;
    text-align: center;
}

/* Overlay semi-trasparente */
.blog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: #fff;
}

.blog-hero-cta {
    display: inline-block;
    padding: 14px 32px;
    background-color: #ffbf2e;
    color: #195065;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 1.4s ease-out;
}

.blog-hero-cta:hover {
    background-color: #ffb000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --------- Wrapper centrale --------- */
.blog-main{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* --------- Griglia articoli --------- */
.blog-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 10px;
}

.blog-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.blog-card.blog-card-featured {
    grid-column: span 2;
}

.blog-card-link{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Thumbnail */
.blog-thumb-wrap{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.blog-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-thumb{
  transform: scale(1.05);
}

/* Contenuto card */
.blog-card-content{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.blog-cat{
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-hover);
  letter-spacing: .02em;
}

.blog-card-title{
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-excerpt{
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-date{
  font-size: 13px;
  color: #9ca8b7;
  margin-top: auto;
}

/* --------- Paginazione --------- */
.blog-pagination{
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.blog-pagination .page-numbers{
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 14px;
  margin: 0 5px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s ease;
}
.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover{
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(255,191,46,.35);
}

/* ---------- Sidebar base ---------- */

.blog-sidebar.v2{
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	align-self: start;
}

/* ---------- CTA card ---------- */
.cta-card{
	background: var(--bg-soft);
	border: 1px solid var(--bd);
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.cta-title{
	color: var(--ink);
	font-size: 20px;
	line-height: 1.25;
	margin-bottom: 8px;
	font-weight: 800;
}

.cta-sub{
	color: var(--muted);
	font-size: 15px;
	margin-bottom: 14px;
}

.btn-cta{
	display: inline-block;
	width: 100%;
	text-align: center;
	background: var(--brand);
	color: var(--ink);
	font-weight: 800;
	padding: 12px 18px;
	border-radius: 999px;
	box-shadow: 0 8px 22px rgb(64 64 64 / 35%);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-cta:hover{
	background: var(--brand-hover);
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(255,191,46,.45);
}

/* ---------- Latest posts widget ---------- */
.widget.latest-widget{
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.widget-title{
	color: var(--ink);
	font-size: 18px;
	font-weight: 800;
	margin: 4px 4px 10px;
}

.latest-list{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.latest-item{
	border-radius: 12px;
	overflow: hidden;
	transition: background .2s ease;
}
.latest-item:hover{ background: #fafbfc; }

.latest-link{
	display: grid;
	grid-template-columns: 84px 1fr;
	gap: 12px;
	align-items: center;
	padding: 8px;
}

.latest-thumb{
	width: 84px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	background: #e9eef2;
}

.latest-meta{ display: grid; gap: 2px; }

.latest-cat{
	font-size: 12px;
	font-weight: 800;
	color: var(--brand-hover);
	text-transform: uppercase;
	letter-spacing: .02em;
}

.latest-title{
	font-size: 15px;
	line-height: 1.25;
	color: #20303a;
	font-weight: 800;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.latest-date{
	font-size: 12px;
	color: var(--muted);
}

/* --------------------------
   2. SINGOLO POST
--------------------------- */

.single-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.single-content {
    /* Mantiene la griglia 2fr 1fr, ma limita la larghezza del contenuto */
    max-width: 800px; /* Scegli un valore che ritieni migliore per la leggibilità */
    width: 100%;
    margin-left: 0;
}

.single-hero-content img, .single-body img {
	max-width: 100%;
	height: auto;
}

.single-thumb-wrap {
	margin-bottom:20px;
}

.single-cat {
	font-variant: all-small-caps;
	font-weight: 800;
	font-size: 18px;
	color: var(--brand-hover);
}

.single-title {
	font-size: 26px;
	line-height: 34px;
	margin-top: 10px;
	color: var(--ink);
}

.single-hero-content {
	margin-bottom: 20px;
}

.single-date {
	font-style: italic;
	color: var(--muted);
}

.single-body {
	text-align: justify;
}

.single-body h2 {
	color: var(--ink);
	font-size: 24px;
}

.single-body h3 {
	color: var(--ink);
	font-size: 20px;
	margin-bottom: 5px;
}

.single-body p, .single-body li {
	margin-bottom: 10px;
	font-size: 18px;
    line-height: 25px;
}

.single-body ul {
	list-style: none;
	padding-left: 10px;
	margin: 10px 0 20px;
}

.single-body ul li {
    position: relative;
    padding-left: 20px; /* Spazio per il nuovo pallino */
}

.single-body>ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px; /* Adatta il valore per allineare il pallino al centro del testo */
    width: 8px;
    height: 8px;
    background-color: var(--brand); /* Colore brand (giallo/arancio) */
    border-radius: 50%; /* Rende la forma un cerchio */
}

.toc-card {
	background: var(--bg-soft);
	border: 1px solid var(--bd);
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.toc-card h4 {
	font-size: 20px;
}

.toc-card ul, #rank-math-toc ul, #rank-math-toc ul li {
	list-style-type: none;
	padding-left: 0;
	margin: 0;
}

.toc-card a {
	color: var(--ink);
	text-decoration: none;
	display: block;
	padding: 7px 0;
	border-bottom: 1px solid var(--bd);
	transition: color .2s ease;
	line-height: 22px;
}
.toc-card a:last-child {
	border-bottom: none;
}
.toc-card a:hover {
	color: var(--brand-hover);
}

.toc-card nav>ul>li>a {
	font-weight: 700;
	margin-top: 5px;
}

.wp-block-post-excerpt {
	font-style: italic;
    color: #676767;
    padding: 5px 10px;
    border-radius: 7px;
    background: #fff8e7;
	position: relative; /* Necessario per posizionare la barra pseudo-elemento */
    padding-left: 15px; /* Aggiunge spazio a sinistra per la barra */
    margin-bottom: 20px; /* Mantieni il margine esistente o adattalo */
    border-left: 5px solid var(--brand); /* La barra verticale */
}

.wp-block-post-excerpt p {
	line-height: 22px;
    font-size: 17px;
}

.single-body p.disclaimer {
	font-size: 16px;
    line-height: 20px;
}

/* --------------------------
   3. RESPONSIVE
--------------------------- */
/* SCHERMI XL */
@media (min-width: 1440px) {
	
}
@media (max-width: 1024px){
	.blog-grid{
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
	.blog-card-title{ font-size: 18px; }
	.blog-sidebar.v2{ top: 90px; }
}
/* MOBILE */
@media (max-width: 768px) {
	.single-container {
		display: flex;
		flex-direction: column;
	}
	.wp-block-post-excerpt {
		margin-top: 20px;
	}
	.blog-grid{
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.blog-card-content{ padding: 16px; }
	.blog-card-title{ font-size: 17px; }
	.blog-card.blog-card-featured {
        grid-column: span 1;
    }
	.blog-archive {
        flex-direction: column;
    }
	.blog-sidebar.v2{
		position: static;     /* niente sticky su mobile */
		gap: 14px;
	}
	.latest-link{
		grid-template-columns: 72px 1fr;
		gap: 10px;
		padding: 10px;
	}
	.latest-thumb{ width:72px; height:56px; }
}
