/*
 * Theme Name: InfoCollepasso
 * Template: astra
 * Version: 1.0.0
 * Text Domain: infocollepasso-child
 */

@import url('../astra/style.css');

/* =============================================
   RESET COLORI BLU ASTRA
   ============================================= */
a,
.entry-content a,
.ast-breadcrumbs a,
.page-numbers,
.cat-links a,
.tags-links a,
.comment-reply-link,
.wp-block-button__link {
	color: #c77800 !important;
	text-decoration: none;
}

a:hover,
.entry-content a:hover {
	color: #a05900 !important;
	text-decoration: underline;
}

/* Titoli — rimuove blu Astra */
h1, h2, h3, h4, h5, h6,
.entry-title,
.entry-title a,
.ast-archive-title {
	color: #111 !important;
}

/* Corpo testo */
body,
.entry-content,
.entry-content p,
.entry-content li,
.entry-summary {
	color: #333 !important;
}

/* Rimuove bordi e colori Astra */
.ast-article-post,
.ast-article-single {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}

/* Paginazione */
.page-numbers.current {
	background: #c77800 !important;
	color: #fff !important;
	border-color: #c77800 !important;
}

/* Widget nativi WP */
.widget { margin-bottom: 1.5rem; }
.widget-title { border-bottom: 2px solid #c77800; padding-bottom: 0.5rem; margin-bottom: 1rem; font-size: 1.1rem; color: #111 !important; }
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 0.5rem 0; border-bottom: 1px solid #e4e0d8; font-size: 0.9rem; }
.widget li:last-child { border-bottom: none; }
.widget a { color: #c77800 !important; text-decoration: none; }
.widget a:hover { text-decoration: underline; }

/* Form commenti */
.comment-form input,
.comment-form textarea {
	border: 1px solid #e4e0d8 !important;
	border-radius: 4px;
	padding: 0.6rem;
	font-size: 0.9rem;
	color: #333;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: #c77800 !important;
	outline: none;
}

#submit,
.submit {
	background: #c77800 !important;
	color: #fff !important;
	border: none !important;
	padding: 0.7rem 1.5rem !important;
	border-radius: 4px !important;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
}

#submit:hover { background: #a05900 !important; }

/* =============================================
   PRINT CSS — Pagina articolo
   ============================================= */
@media print {
	/* Nascondi elementi non utili alla stampa */
	#site-header,
	#site-footer,
	.single-sidebar,
	.post-nav,
	.post-comments,
	.post-cats,
	.post-breadcrumb,
	.post-author,
	nav,
	button,
	.sharedaddy,
	.jp-relatedposts,
	.wpcnt,
	.adsbygoogle,
	[class*="share"],
	[class*="social"],
	[class*="related"] {
		display: none !important;
	}

	/* Layout stampa */
	body {
		background: #fff !important;
		color: #000 !important;
		font-family: Georgia, 'Times New Roman', serif;
		font-size: 12pt;
		line-height: 1.6;
	}

	.single-wrap,
	.single-article {
		display: block !important;
		max-width: 100% !important;
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* Header articolo */
	.post-header {
		padding: 0 0 1rem 0 !important;
		border-bottom: 2px solid #000;
		margin-bottom: 1.5rem;
	}

	.post-header h1 {
		font-size: 20pt !important;
		color: #000 !important;
		margin-bottom: 0.5rem;
	}

	.post-meta {
		font-size: 9pt !important;
		color: #555 !important;
		border-top: 1px solid #ccc;
		padding-top: 0.5rem;
	}

	/* Immagine featured */
	.post-featured-img {
		max-height: 300px !important;
		margin-bottom: 1.5rem;
		page-break-inside: avoid;
	}

	/* Contenuto */
	.post-content {
		padding: 0 !important;
		font-size: 11pt;
		color: #000 !important;
	}

	.post-content p { margin-bottom: 1rem; orphans: 3; widows: 3; }
	.post-content h2 { font-size: 14pt !important; page-break-after: avoid; }
	.post-content h3 { font-size: 12pt !important; page-break-after: avoid; }
	.post-content img { max-width: 100%; page-break-inside: avoid; }
	.post-content a { color: #000 !important; text-decoration: none; }
	.post-content a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }

	/* Firma */
	.post-footer {
		border-top: 1px solid #ccc;
		padding-top: 0.8rem;
		margin-top: 1.5rem;
		font-size: 9pt;
		color: #555;
	}

	/* URL sito in fondo */
	.post-footer::after {
		content: "Fonte: infocollepasso.it";
		display: block;
		margin-top: 0.5rem;
		font-size: 8pt;
		color: #888;
	}

	/* Evita interruzioni di pagina inopportune */
	figure, .post-featured-img { page-break-inside: avoid; }
	h1, h2, h3 { page-break-after: avoid; }
	p { page-break-inside: avoid; }
}
/* =============================================
   NASCONDI TITOLO PAGINA ASTRA — globale
   Per pagine con hero custom (legal, chi-siamo)
   ============================================= */
.page-id-chi-siamo .entry-header,
.page .entry-header .entry-title {
	display: none;
}

/* Selettori Astra specifici */
.ast-page-builder-template .entry-header,
.page .ast-single-post-order .entry-header {
	display: none;
}

/* Approccio universale: nasconde .entry-header
   su tutte le pagine statiche che hanno .legal-hero */
body.page .entry-header:has(+ * .legal-hero),
body.page:has(.legal-hero) .entry-header,
body.page:has(.legal-page) .entry-header {
	display: none !important;
}
/* Nascondi pulsante scroll-to-top Astra */
#ast-scroll-top,
.ast-scroll-top-wrap,
[id*="scroll-top"],
[class*="scroll-top"] {
	display: none !important;
}
/* Fix testo bianco su badge categoria — override del selettore a { color: #c77800 !important } */
.post-cat-tag,
.post-cat-tag:hover,
.card-cat,
.card-cat:hover,
.card-category,
.card-category:hover,
.arc-card-cat,
.arc-card-cat:hover,
.tag,
.cat-badge,
a.post-cat-tag,
a.card-cat,
a.arc-card-cat {
	color: #fff !important;
}
/* Rimuovi pallini lista dal menu nav */
#site-nav ul,
#site-nav li,
#site-nav .menu,
#site-nav .menu li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#site-nav .menu {
	display: flex !important;
	gap: 0 !important;
}

#site-nav .menu li a {
	color: #ccc;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
	padding: 0 1rem;
	height: 64px;
	display: flex;
	align-items: center;
	border-bottom: 3px solid transparent;
	transition: color 0.2s, border-color 0.2s;
	margin-bottom: -3px;
	color: #ccc !important;
}

#site-nav .menu li a:hover {
	color: #fff !important;
	border-bottom-color: #c77800;
}
/* =============================================
   SIDEBAR — BANNER STORIA DI COLLEPASSO
   ============================================= */
.sidebar-storia-banner {
	background: linear-gradient(135deg, #c77800 0%, #8b5200 100%);
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
	box-shadow: 0 3px 12px rgba(199,120,0,0.35);
}

.storia-banner-link {
	display: block;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

.storia-banner-link:hover {
	opacity: 0.92;
}

.storia-banner-inner {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1.3rem 1.2rem;
}

.storia-banner-icon {
	font-size: 2rem;
	flex-shrink: 0;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.storia-banner-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.storia-banner-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: rgba(255,255,255,0.75);
	font-weight: 700;
}

.storia-banner-text strong {
	font-size: 1rem;
	font-weight: 800;
	color: #ffffff !important;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.storia-banner-sub {
	font-size: 0.75rem;
	color: rgba(255,255,255,0.7);
}

.storia-banner-arrow {
	font-size: 1.3rem;
	color: rgba(255,255,255,0.8);
	flex-shrink: 0;
}

/* =============================================
   SIDEBAR — CHI CI SOSTIENE (sponsor grid)
   ============================================= */
.sponsor-grid {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.sponsor-item {
	background: #fff;
	border-bottom: 1px solid #f0ece6;
	padding: 0.4rem 0;
}

.sponsor-item:last-child {
	border-bottom: none;
}

.sponsor-item img {
	width: 100%;
	height: auto;
	display: block;
}

/* =============================================
   HOMEPAGE — BANNER (sotto hero)
   ============================================= */
.homepage-banners {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1.5rem;
	margin-bottom: 3rem;
}

@media (max-width: 900px) {
	.homepage-banners {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	.homepage-banners {
		grid-template-columns: 1fr;
	}
}

.hp-banner {
	border-radius: 8px;
	overflow: hidden;
	display: block;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

.hp-banner:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Banner Storia */
.hp-banner-storia {
	background: linear-gradient(135deg, #c77800 0%, #8b5200 100%);
}

/* Banner Contatti */
.hp-banner-contatti {
	background: linear-gradient(135deg, #1c1c1c 0%, #2d2d2d 100%);
	border: 1px solid #3a3a3a;
}

/* Banner Esplora */
.hp-banner-esplora {
	background: linear-gradient(135deg, #2d2d2d 0%, #1c1c1c 100%);
	border: 1px solid #c77800;
}

.hp-banner-inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
}

.hp-banner-icon {
	font-size: 2.2rem;
	flex-shrink: 0;
}

.hp-banner-text {
	flex: 1;
}

.hp-banner-label {
	display: block;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: rgba(255,255,255,0.7);
	font-weight: 700;
	margin-bottom: 0.3rem;
}

.hp-banner-title {
	display: block;
	font-size: 1.05rem;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 0.3rem;
}

.hp-banner-sub {
	display: block;
	font-size: 0.8rem;
	color: rgba(255,255,255,0.65);
}

.hp-banner-arrow {
	font-size: 1.4rem;
	color: rgba(255,255,255,0.7);
	flex-shrink: 0;
}

/* =============================================
   MOBILE NAV — Storia + Ultime notizie
   ============================================= */
.mobile-nav-divider {
	height: 1px;
	background: #2a2a2a;
	margin: 0.3rem 0;
}

.mobile-nav-storia {
	display: block;
	padding: 1rem 1.5rem;
	color: #c77800 !important;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 700;
	background: rgba(199,120,0,0.08);
	border-bottom: 1px solid #222;
}

.mobile-nav-storia:hover {
	background: rgba(199,120,0,0.15);
}

.mobile-nav-section-label {
	padding: 0.7rem 1.5rem 0.4rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #666;
}

.mobile-nav-post {
	display: block;
	padding: 0.7rem 1.5rem;
	color: #ccc !important;
	text-decoration: none;
	font-size: 0.88rem;
	border-bottom: 1px solid #1a1a1a;
	line-height: 1.4;
}

.mobile-nav-post:hover {
	color: #fff !important;
	background: #1a1a1a;
}

.mobile-nav-post-date {
	display: block;
	font-size: 0.72rem;
	color: #555;
	margin-bottom: 0.2rem;
}

/* =============================================
   SPONSOR MOBILE — visibili solo su mobile
   ============================================= */
.mobile-sponsors {
	display: none; /* nascosto su desktop */
	background: #fff;
	padding: 1.5rem;
	border-top: 2px solid #e4e0d8;
}

.mobile-sponsors-title {
	font-size: 0.85rem;
	font-weight: 700;
	color: #111;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #c77800;
	display: inline-block;
}

.mobile-sponsors-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
}

.mobile-sponsor-item {
	background: #f9f7f4;
	border: 1px solid #e4e0d8;
	border-radius: 4px;
	padding: 0.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-sponsor-item img {
	width: 100%;
	height: auto;
	display: block;
}

.mobile-sponsor-wide {
	grid-column: 1 / -1;
}

@media (max-width: 1024px) {
	.mobile-sponsors {
		display: block;
	}
}

/* Mobile nav — stile li generati da wp_nav_menu */
#mobile-nav li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#mobile-nav li a {
	display: block;
	padding: 0.9rem 1.5rem;
	color: #ccc !important;
	font-size: 0.95rem;
	border-bottom: 1px solid #222;
	text-decoration: none;
}

#mobile-nav li a:hover {
	color: #c77800 !important;
	background: #1a1a1a;
}

#mobile-nav ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
