/*
Theme Name: Fullstack-Theme
Theme URI: 
Author: 
Author URI: 
Description: Tema WordPress boilerplate per sviluppo fullstack.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
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: fullstack
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, one-column, two-columns, right-sidebar
*/

/* --------------------------------------------------------------------------
   Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	line-height: 1.6;
	background: #fff;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.btn,
a.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
	border-style: none;
	border-color: transparent;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.site {
	width: 100%;
}

.site-header {
	width: 100%;
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
	transition: padding 0.2s ease;
	/* Sezione fluida; contenuto in .site-header-inner (max-width) */
}

.site-header-sticky {
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header-sticky.is-scrolled {
	padding: 0.4rem 0;
}

.site-header-sticky.is-scrolled .site-logo {
	max-height: 36px;
}

.site-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.site-header-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.header-align-left .site-header-inner {
	justify-content: space-between;
}

.header-align-left .site-header-inner .site-header-actions {
	margin-left: auto;
}

.header-align-center .site-header-inner {
	justify-content: center;
}

.header-align-right .site-header-inner {
	justify-content: flex-end;
}

.site-header-social,
.site-header-contacts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.site-header-social-link,
.site-header-contact {
	white-space: nowrap;
}

.site-branding {
	flex-shrink: 0;
}

.site-logo-link {
	display: inline-block;
}

.site-logo {
	max-height: 48px;
	width: auto;
}

.site-name {
	font-weight: 600;
	font-size: 1.25rem;
}

.site-navigation {
	flex: 1;
	min-width: 0;
}

.site-navigation .nav-menu {
	justify-content: flex-end;
}

.site-header-menu-trigger {
	display: none;
	position: relative;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.site-header-menu-trigger-icon,
.site-header-menu-trigger-icon::before,
.site-header-menu-trigger-icon::after {
	display: block;
	position: absolute;
	left: 50%;
	width: 1.4rem;
	height: 2px;
	background: currentColor;
	transform: translateX(-50%);
	transition: transform 0.2s ease, opacity 0.2s ease;
	content: "";
}

.site-header-menu-trigger-icon {
	top: calc(50% - 1px);
}

.site-header-menu-trigger-icon::before {
	top: -0.45rem;
}

.site-header-menu-trigger-icon::after {
	top: 0.45rem;
}

.site-header-menu-trigger[aria-expanded="true"] .site-header-menu-trigger-icon {
	background: transparent;
}

.site-header-menu-trigger[aria-expanded="true"] .site-header-menu-trigger-icon::before {
	transform: translateX(-50%) rotate(45deg);
	top: 0;
}

.site-header-menu-trigger[aria-expanded="true"] .site-header-menu-trigger-icon::after {
	transform: translateX(-50%) rotate(-45deg);
	top: 0;
}

.site-header-search-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

.site-header-search-trigger:hover {
	opacity: 0.8;
}

.site-header-search-trigger .icon-search {
	width: 1.5rem;
	height: 1.5rem;
}

.fullstack-mobile-menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fullstack-mobile-menu-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.fullstack-mobile-menu {
	position: fixed;
	top: 0;
	right: 0;
	height: 100dvh;
	width: min(84vw, 360px);
	z-index: 1001;
	background: #fff;
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
	transform: translateX(100%);
	transition: transform 0.25s ease;
	display: flex;
	flex-direction: column;
	visibility: hidden;
	pointer-events: none;
}

.fullstack-mobile-menu.is-open {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}

.fullstack-mobile-menu-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem 0.75rem;
	border-bottom: 1px solid #ececec;
}

.fullstack-mobile-menu-title {
	font-weight: 600;
}

.fullstack-mobile-menu-close {
	font-size: 1.7rem;
	line-height: 1;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
	width: 2rem;
	height: 2rem;
}

.fullstack-mobile-menu-nav {
	padding: 1rem;
	overflow-y: auto;
}

.fullstack-mobile-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.fullstack-mobile-nav-menu a {
	display: block;
	padding: 0.6rem 0;
}

@media (max-width: 768px) {
	.site-header-inner {
		gap: 0.75rem;
	}

	.site-header-menu-trigger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.site-navigation {
		display: none;
	}

	.site-navigation .nav-menu {
		justify-content: flex-start;
		width: 100%;
	}
}

/* Modale ricerca */
.fullstack-search-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.2s, opacity 0.2s;
}

.fullstack-search-modal.is-open {
	visibility: visible;
	opacity: 1;
}

.fullstack-search-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.fullstack-search-modal-content {
	position: relative;
	width: 100%;
	max-width: 28rem;
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.fullstack-search-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
}

.fullstack-search-modal-close:hover {
	color: #333;
}

.fullstack-search-modal .search-form {
	margin-top: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site-main {
	width: 100%;
	min-height: 40vh;
}

/* Container per il content: senza max-width e padding per permettere sections fullwidth */
.site-main-inner {
	width: 100%;
}

.site-footer {
	width: 100%;
	padding: 2rem 0;
	border-top: 1px solid #eee;
	font-size: 0.875rem;
	color: #666;
	/* Sezione fluida; contenuto in .site-footer-inner (max-width) */
}

.site-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.footer-align-left .site-footer-inner {
	text-align: left;
}

.footer-align-center .site-footer-inner {
	text-align: center;
}

.footer-align-right .site-footer-inner {
	text-align: right;
}

.site-footer-pre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-bottom: 1rem;
}

.footer-align-left .site-footer-pre {
	justify-content: flex-start;
}

.footer-align-center .site-footer-pre {
	justify-content: center;
}

.footer-align-right .site-footer-pre {
	justify-content: flex-end;
}

.site-footer-pre .site-footer-logo {
	flex-shrink: 0;
}

.site-footer-pre .site-footer-logo-img {
	max-height: 40px;
	width: auto;
}

.site-footer-pre .site-footer-nav .nav-menu,
.site-footer-pre .site-footer-contacts {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer-pre .site-footer-contacts {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

/* Footer multi-colonna */
.site-footer-columns {
	display: grid;
	grid-template-columns: repeat(var(--footer-cols, 1), 1fr);
	gap: 2rem;
	margin-bottom: 1rem;
}
.site-footer-columns[data-cols="1"] { --footer-cols: 1; }
.site-footer-columns[data-cols="2"] { --footer-cols: 2; }
.site-footer-columns[data-cols="3"] { --footer-cols: 3; }
.site-footer-columns[data-cols="4"] { --footer-cols: 4; }

.site-footer-col {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.site-footer-columns .site-footer-logo-img {
	max-height: 40px;
	width: auto;
}

.site-footer-logo-text {
	margin: 0.5rem 0 0;
	font-size: 0.85em;
	line-height: 1.5;
}

/* Icone inline SVG (social, contatti) */
.fs-icon,
.site-header-social-link svg,
.site-footer-social-link svg,
.site-header-contact svg,
.site-footer-contact svg {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	vertical-align: middle;
	flex-shrink: 0;
}

.site-header-contact,
.site-footer-contact {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.site-header-social-link,
.site-footer-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Direzione social */
.site-header-social,
.site-footer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.site-header-social.social-dir-column,
.site-footer-social.social-dir-column {
	flex-direction: column;
	align-items: flex-start;
}

.site-footer-columns .site-footer-nav .nav-menu,
.site-footer-columns .site-footer-contacts {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer-copy {
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	margin-top: 0;
}

.site-footer-has-pre .site-footer-copy {
	margin-top: 0;
}

.site-footer-single {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.footer-align-left .site-footer-single {
	justify-content: flex-start;
}

.footer-align-center .site-footer-single {
	justify-content: center;
}

.footer-align-right .site-footer-single {
	justify-content: flex-end;
}

.site-footer-single .site-footer-social,
.site-footer-single .site-footer-contacts {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.site-footer-single .nav-menu {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

/* Con sidebar */
.has-sidebar .site-main {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
}

@media (max-width: 768px) {
	.has-sidebar .site-main {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   Navigazione
   -------------------------------------------------------------------------- */
.nav-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-menu a {
	padding: 0.25rem 0;
}

/* --------------------------------------------------------------------------
   Loop / articoli
   -------------------------------------------------------------------------- */
.entry-header {
	margin-bottom: 1rem;
}

.entry-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.entry-meta {
	font-size: 0.875rem;
	color: #666;
}

.entry-content {
	margin-bottom: 2rem;
}

.entry-content-empty {
	display: none;
}

.entry-content p {
	margin: 0 0 1rem;
}

.pagination {
	display: flex;
	gap: 0.5rem;
	margin-top: 2rem;
	list-style: none;
	padding: 0;
	margin-left: 0;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.pagination .current {
	background: #333;
	color: #fff;
	border-color: #333;
}

/* --------------------------------------------------------------------------
   Sidebar / widget
   -------------------------------------------------------------------------- */
.widget {
	margin-bottom: 2rem;
}

.widget-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	padding: 0.25rem 0;
	border-bottom: 1px solid #eee;
}

.widget li:last-child {
	border-bottom: none;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-404 .page-title {
	margin-bottom: 1rem;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.search-form input[type="search"] {
	flex: 1;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.search-form button {
	padding: 0.5rem 1rem;
	background: #333;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}
