/*
	Esocop - foglio di stile del tema nuovo (fase 4, 2026)
	Colori presi dal logo: blu notte del marchio, blu-verde della cornice del Dasher, crema del cabinet.
	Il tema precedente (Striped, main.css) resta disponibile con ESOCOP_THEME = 'old' in stefy/theme.php.
*/
@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Playfair+Display:wght@500;600&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
	--navy: #1c2b3a;
	--navy-deep: #131e2a;
	--teal: #1f5b6b;
	--teal-light: #4fa3b3;
	--teal-pale: #dcecef;
	--cream: #efe4cc;
	--paper: #f6f2ea;
	--card: #ffffff;
	--ink: #23292f;
	--muted: #6b7378;
	--line: #ddd6c8;
	--accent: #c94f3a;
	--font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
	--font-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-logo: "Archivo Black", "Arial Black", Arial, sans-serif;
	--radius: 6px;
	--shadow: 0 1px 2px rgba(28, 43, 58, 0.06), 0 6px 20px rgba(28, 43, 58, 0.06);
	--maxw: 1120px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(31, 91, 107, 0.35); transition: color .15s, border-color .15s; }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
a.image, .site-header a, .site-nav a, .site-footer a, a.button, .card a { border-bottom: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; margin: 0 0 0.6em 0; font-weight: 600; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1.2em 0; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
blockquote { margin: 1.5em 0; padding: 0.5em 1.5em; border-left: 4px solid var(--teal-light); color: var(--muted); font-style: italic; }
code, pre { font-family: "Fira Mono", Consolas, "Courier New", monospace; font-size: 0.9em; }
center { display: block; text-align: center; }
font { font-size: inherit; }

/* Lists */
ul, ol { margin: 0 0 1.2em 1.4em; padding: 0; }
li { margin-bottom: 0.3em; }
ul.default { list-style: disc; }
ul.default li { padding-left: 0.2em; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em 0; font-size: 0.95em; }
th, td { padding: 0.6em 0.8em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--navy); background: var(--teal-pale); }
tr:hover td { background: #faf7f0; }

/* Forms */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
	font-family: inherit; font-size: 1em; color: var(--ink);
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 0.55em 0.8em; max-width: 100%;
}
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-light); outline-offset: 1px; border-color: var(--teal-light); }
textarea { width: 100%; min-height: 8em; }
label { font-weight: 600; }
input[type="submit"], input[type="button"], button, a.button, .button {
	display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: 0.95em; letter-spacing: 0.02em;
	color: #fff; background: var(--teal); border: 0; border-radius: var(--radius);
	padding: 0.6em 1.3em; margin: 0.2em 0.3em 0.2em 0; cursor: pointer; line-height: 1.4;
	transition: background .15s, transform .1s;
}
input[type="submit"]:hover, button:hover, a.button:hover, .button:hover { background: var(--navy); color: #fff; }
a.button.alt, .button.alt { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
a.button.alt:hover { background: var(--teal); color: #fff; }

/* Header: logo on the first row, menu bar on the second */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header > .wrap {
	max-width: var(--maxw); margin: 0 auto; padding: 1em 1.2em 0.8em 1.2em;
	display: flex; align-items: center; justify-content: space-between; gap: 1.5em; flex-wrap: wrap;
}
.site-logo { display: block; line-height: 0; }
.site-logo img { width: 250px; height: auto; display: block; }
.site-tagline { margin: 0; color: var(--muted); font-family: var(--font-display); font-size: 1.05rem; font-style: italic; }

/* Navigation bar */
.site-nav { background: var(--navy); position: sticky; top: 0; z-index: 50; }
.site-nav .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2em; position: relative; }
.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; }
.nav-button { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; }
.nav-list li { margin: 0; position: relative; }
.nav-list > li > a {
	display: block; padding: 0.85em 1.1em; color: #e6edf2;
	font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	border-bottom: 3px solid transparent;
}
.nav-list > li > a:hover, .nav-list > li:hover > a, .nav-list > li:focus-within > a { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-list > li.current > a { border-bottom-color: var(--teal-light); color: #fff; }
.nav-list > li.has-sub > a::after { content: ""; display: inline-block; margin-left: 0.5em; width: 0.4em; height: 0.4em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.2em) rotate(45deg); opacity: 0.8; }
.nav-list ul.sub {
	list-style: none; margin: 0; padding: 0.4em 0; display: none;
	position: absolute; left: 0; top: 100%; min-width: 220px; z-index: 60;
	background: var(--card); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.nav-list li:hover > ul.sub, .nav-list li:focus-within > ul.sub { display: block; }
.nav-list ul.sub li { margin: 0; }
.nav-list ul.sub a { display: block; padding: 0.55em 1.1em; color: var(--navy); font-size: 0.95rem; font-weight: 600; }
.nav-list ul.sub a:hover { background: var(--teal-pale); color: var(--teal); }

/* Main column */
.site-main { max-width: var(--maxw); margin: 0 auto; padding: 2.2em 1.2em 3em 1.2em; }
#content { width: 100%; }
#content .inner { width: 100%; }

/* Cards (article.box of the old pages) */
article.box, section.box, .box.search, .card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 2.2em 2.4em; margin: 0 0 2em 0;
}
article.box > header { margin-bottom: 1.4em; }
article.box > header h2, article.box > header h1 { margin-bottom: 0.2em; }
article.box > header h2 a { color: var(--navy); border-bottom: 0; }
article.box > header p { color: var(--muted); font-size: 1.05em; margin: 0; }
.image.featured { display: block; margin: 0 0 1.6em 0; border-bottom: 0; }
.image.featured img { display: block; width: 100%; border-radius: var(--radius); }
article.box h3 { margin-top: 1.4em; padding-bottom: 0.3em; border-bottom: 2px solid var(--teal-pale); }
article.box h3:first-child { margin-top: 0; }

/* The row of navigation buttons of the old template is replaced by the top menu */
.pagination { display: none; }

/* Home page: featured models */
.featured-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.2em; margin: 1em 0 0.5em 0; }
.featured-models a.card { display: block; padding: 0; overflow: hidden; margin: 0; }
.featured-models a.card:hover { border-color: var(--teal-light); transform: translateY(-2px); transition: transform .15s; }
.featured-models .thumb { height: 150px; background: var(--cream); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.featured-models .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-models .name { padding: 0.7em 0.9em; font-weight: 600; color: var(--navy); font-size: 0.95em; line-height: 1.3; }
.featured-models .firm { display: block; color: var(--muted); font-weight: 400; font-size: 0.85em; }

/* Model sheet (model.php) */
.model-meta { color: var(--muted); margin-bottom: 1em; }
.model-meta a { border-bottom: 1px solid rgba(31, 91, 107, 0.35); }
.model-photos { display: flex; flex-wrap: wrap; gap: 0.8em; margin: 1em 0 2em 0; align-items: center; }
.model-photos a { display: block; height: 220px; max-width: 100%; border-bottom: 0; }
.model-photos img { height: 100%; width: auto; max-width: 100%; display: block; border-radius: var(--radius); object-fit: contain; background: #fff; border: 1px solid var(--line); }
.model-credits { font-size: 0.75em; color: var(--muted); margin: -1.5em 0 2em 0; white-space: pre-line; }
.model-info { white-space: pre-line; }
.model-docs { padding-left: 1.5em; }
.model-docs li { padding-left: 0.4em; margin-bottom: 0.6em; line-height: 1.6; }
.model-docs li a { font-weight: 700; }
.model-docs .doc-meta { color: var(--muted); font-size: 0.85em; }

/* Footer */
.site-footer { background: var(--navy); color: #c9d3dc; margin-top: 2em; }
.site-footer .wrap { max-width: var(--maxw); margin: 0 auto; padding: 2.5em 1.2em 1.5em 1.2em; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2em; }
.site-footer h3 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.8em; }
.site-footer p { color: #c9d3dc; font-size: 0.95em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4em; font-size: 0.95em; }
.site-footer a { color: #e6edf2; }
.site-footer a:hover { color: var(--teal-light); }
.site-footer .social a { display: inline-block; margin-right: 0.6em; }
.site-footer .social img { width: 28px; height: 28px; vertical-align: middle; }
.site-footer .copyright { max-width: var(--maxw); margin: 0 auto; padding: 1em 1.2em 1.5em 1.2em; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85em; color: #9fb0bf; display: flex; flex-wrap: wrap; gap: 0.5em 2em; }
.site-footer .copyright a { color: #c9d3dc; }

/* Responsive */
@media screen and (max-width: 900px) {
	.site-footer .wrap { grid-template-columns: 1fr 1fr; }
	.nav-list > li > a { font-size: 0.76rem; padding: 0.8em 0.8em; letter-spacing: 0.06em; }
}
@media screen and (max-width: 760px) {
	body { font-size: 16px; }
	.site-header > .wrap { padding: 0.6em 1em; }
	.site-logo img { width: 180px; }
	.site-tagline { display: none; }
	.site-nav .wrap { padding: 0 0.9em; }
	.nav-button {
		display: flex; align-items: center; gap: 0.6em; color: #e6edf2; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
		padding: 0.8em 0; cursor: pointer;
	}
	.nav-button span { display: block; width: 22px; height: 3px; background: #e6edf2; border-radius: 2px; }
	.nav-button span + span { margin-top: -1px; }
	.nav-list { display: none; flex-direction: column; padding: 0.3em 0 0.8em 0; }
	.nav-list > li > a { padding: 0.7em 0.4em; font-size: 0.9rem; border-bottom: 0; border-left: 3px solid transparent; }
	.nav-list > li.current > a { border-left-color: var(--teal-light); }
	.nav-list > li.has-sub > a::after { display: none; }
	.nav-list ul.sub { display: block; position: static; background: transparent; border: 0; box-shadow: none; padding: 0 0 0.4em 1.2em; }
	.nav-list ul.sub a { color: #b7c5d1; font-weight: 400; padding: 0.35em 0.4em; }
	.nav-list ul.sub a:hover { background: transparent; color: #fff; }
	.nav-toggle:checked ~ .nav-list { display: flex; }
	.site-main { padding: 1.4em 0.9em 2.5em 0.9em; }
	article.box, section.box, .box.search, .card { padding: 1.4em 1.2em; }
	h1 { font-size: 1.9rem; }
	h2 { font-size: 1.55rem; }
	.model-photos a { height: 150px; }
	.site-footer .wrap { grid-template-columns: 1fr; gap: 1.5em; }
}

/* Print */
@media print {
	.site-header, .site-footer, .site-nav { display: none; }
	body { background: #fff; }
	article.box { box-shadow: none; border: 0; padding: 0; }
}

/* ---------- Fase 4, passi 3-6: home, elenchi, scheda, documentazione ---------- */

/* Page header */
.page-head { margin: 0 0 1.6em 0; max-width: 780px; }
.page-head h1 { margin-bottom: 0.3em; }
.page-head p { color: var(--muted); font-size: 1.05em; }
.breadcrumb { font-size: 0.85em; color: var(--muted); margin: 0 0 0.6em 0; }
.breadcrumb a { color: var(--muted); border-bottom-color: transparent; }
.breadcrumb a:hover { color: var(--teal); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; margin-bottom: 1em; border-bottom: 2px solid var(--teal-pale); padding-bottom: 0.4em; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.section-head a { font-size: 0.9em; font-weight: 600; white-space: nowrap; border-bottom: 0; }
.home-section { margin-bottom: 2.6em; }

/* Hero */
.hero {
	display: grid; grid-template-columns: 1fr 260px; gap: 2.5em; align-items: center;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 2.6em 2.8em; margin-bottom: 2.6em;
}
.hero .kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--teal); margin-bottom: 0.6em; }
.hero h1 { font-size: 2.6rem; margin-bottom: 0.4em; }
.hero .lead { font-size: 1.12em; color: #3d454b; max-width: 620px; }
.hero-actions { margin-top: 1.4em; }
.hero-count { text-align: center; border-left: 1px solid var(--line); padding-left: 2em; }
.hero-count .number { display: block; font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--teal); font-weight: 600; }
.hero-count .label { display: block; margin-top: 0.5em; color: var(--muted); font-size: 0.95em; line-height: 1.35; }

/* Cards of models (home and lists) */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2em; margin: 0 0 2em 0; }
.model-grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9em; }
.featured-models { grid-template-columns: repeat(5, 1fr); }
@media screen and (max-width: 900px) { .featured-models { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
a.model-card { display: block; padding: 0; overflow: hidden; margin: 0; color: var(--navy); transition: transform .15s, border-color .15s; }
a.model-card:hover { border-color: var(--teal-light); transform: translateY(-2px); color: var(--teal); }
.model-card .thumb { display: flex; height: 160px; background: #fff; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.model-grid.small .model-card .thumb { height: 115px; }
.model-card .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 0.4em; }
.model-card .thumb.nophoto { background: var(--cream); color: #9a8c6c; font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; }
.model-card .name { display: block; padding: 0.7em 0.9em 0.8em 0.9em; font-weight: 600; font-size: 0.95em; line-height: 1.3; }
.model-card .firm { display: block; color: var(--muted); font-weight: 400; font-size: 0.85em; margin-top: 0.2em; }

/* Home: news and events */
.home-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5em; }
.news-list, .event-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 130px 1fr; gap: 1em; padding: 0.8em 0; border-bottom: 1px solid var(--line); font-size: 0.95em; }
.news-list .date, .event-list .date { color: var(--teal); font-weight: 700; font-size: 0.85em; line-height: 1.4; }
.event-list li { display: grid; grid-template-columns: 26px 1fr; gap: 0 0.7em; padding: 0.7em 0; border-bottom: 1px solid var(--line); font-size: 0.95em; }
.event-list .flag { width: 24px; height: 16px; margin-top: 0.3em; grid-row: span 2; }
.event-list strong { display: block; color: var(--navy); }
.small { font-size: 0.85em; color: var(--muted); }
.home-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5em; background: var(--navy); color: #c9d3dc; border-radius: var(--radius); padding: 2em 2.2em; }
.home-strip h3 { color: #fff; font-size: 1.15rem; margin-bottom: 0.4em; }
.home-strip p { font-size: 0.95em; margin-bottom: 0.8em; }
.home-strip a { color: #fff; font-weight: 600; border-bottom-color: rgba(255,255,255,0.35); }
.home-strip a:hover { color: var(--teal-light); }

/* Filters and results (preserved, documentation) */
.filters { display: flex; flex-wrap: wrap; gap: 0.8em 1.2em; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1em 1.4em; margin-bottom: 1.2em; }
.filters label { display: flex; flex-direction: column; gap: 0.25em; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.filters select, .filters input[type="search"], .filters input[type="text"] { font-size: 0.95rem; min-width: 190px; text-transform: none; letter-spacing: 0; }
.filters input[type="submit"] { margin: 0; }
.filters .reset { font-size: 0.9em; align-self: center; }
.results-count { color: var(--muted); font-size: 0.95em; margin-bottom: 1em; }
.pager { display: flex; flex-wrap: wrap; gap: 0.3em; justify-content: center; margin: 1em 0 2em 0; }
.pager a, .pager span { display: inline-block; min-width: 2.2em; text-align: center; padding: 0.35em 0.6em; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font-size: 0.9em; }
.pager span.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.pager a:hover { border-color: var(--teal); }

/* Model sheet: specs table */
.specs { width: auto; min-width: 60%; margin: 1.2em 0 1.8em 0; font-size: 0.95em; }
.specs th { width: 190px; background: transparent; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.05em; padding-top: 0.75em; }
.specs td { color: var(--ink); }
.specs tr:hover td, .specs tr:hover th { background: #faf7f0; }
.model-info > p:first-child { font-size: 1.08em; }

/* Documentation */
.doc-list { list-style: none; margin: 0 0 1.5em 0; padding: 0; }
.doc-list li { padding: 0.7em 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 0.5em 1.5em; align-items: baseline; }
.doc-list li a.doc { font-weight: 600; }
.doc-list .doc-meta { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.doc-list .doc-model { grid-column: 1 / -1; font-size: 0.85em; color: var(--muted); }
.doc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.6em 1.5em; margin: 0 0 2em 0; list-style: none; padding: 0; }
.doc-groups li { margin: 0; font-size: 0.95em; }
.doc-groups .n { color: var(--muted); font-size: 0.85em; }

/* News and calendar pages */
.news-page p > b:first-child, .news-page p > strong:first-child { display: block; color: var(--teal); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2em; }
.news-page p { padding: 0.9em 0; border-bottom: 1px solid var(--line); margin: 0; }
.calendar-page h2 { margin-top: 1.4em; padding-bottom: 0.2em; border-bottom: 2px solid var(--teal-pale); }
.calendar-page p { padding: 0.6em 0; margin: 0; }
.calendar-page img { vertical-align: middle; margin-right: 0.4em; border-radius: 2px; }

@media screen and (max-width: 900px) {
	.hero { grid-template-columns: 1fr; padding: 2em 1.6em; }
	.hero-count { border-left: 0; border-top: 1px solid var(--line); padding: 1.2em 0 0 0; }
	.home-columns { grid-template-columns: 1fr; gap: 2em; }
	.home-strip { grid-template-columns: 1fr; }
}
@media screen and (max-width: 760px) {
	.hero h1 { font-size: 2rem; }
	.news-list li { grid-template-columns: 1fr; gap: 0.2em; }
	.filters label, .filters select, .filters input[type="search"] { width: 100%; min-width: 0; }
	.doc-list li { grid-template-columns: 1fr; }
	.doc-list .doc-meta { white-space: normal; }
	.specs th { width: 120px; }
}

/* Messaggio di errore dei moduli */
.form-error { background: #fbeae7; border: 1px solid #e3b4ab; color: #8a2f1f; border-radius: var(--radius); padding: 0.8em 1em; margin: 0 0 1.2em 0; }
