/*
Theme Name: Aslatech
Theme URI: https://www.aslatech.com
Author: Aslatech
Description: Tema a blocchi per il sito vetrina di Aslatech. Testi e struttura si modificano da Aspetto, Editor.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aslatech
*/

:root {
    --blue: #4171b5;
    --blue-dark: #325993;
    --blue-light: #9db9e6;
    --gray: #6e7173;
    --navy: #0f172a;
    --text: #334155;
    --text-light: #5b6778;
    --mist: #f4f6f9;
    --line: #dde3ec;
    --white: #ffffff;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body { margin: 0; -webkit-font-smoothing: antialiased; }

h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }

a { text-decoration: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- Intestazione ---------- */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header-inner { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-header .brand { line-height: 0; }
.site-header .brand img { height: 48px; width: auto; max-width: none; display: block; }

.site-header .wp-block-navigation { font-size: 0.95rem; font-weight: 500; }
.site-header .wp-block-navigation .wp-block-navigation__container { gap: 1.75rem; }
.site-header .wp-block-navigation-item__content { color: var(--text); transition: color 0.15s; }
.site-header .wp-block-navigation-item__content:hover { color: var(--blue); }
.site-header .menu-cta .wp-block-navigation-item__content {
    background: var(--blue); color: var(--white);
    padding: 0.6rem 1.2rem; border-radius: 4px; font-weight: 600;
}
.site-header .menu-cta .wp-block-navigation-item__content:hover { background: var(--blue-dark); color: var(--white); }

/* ---------- Pulsanti ---------- */
.wp-block-buttons { margin: 0; }
.btn .wp-block-button__link {
    background: var(--blue); color: var(--white);
    padding: 0.8rem 1.5rem; border-radius: 4px;
    font-weight: 600; font-size: 0.95rem; line-height: 1.4;
    transition: background-color 0.15s;
}
.btn .wp-block-button__link:hover { background: var(--blue-dark); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
    padding: calc(var(--header-h) + 5rem) 0 5rem;
    color: var(--white);
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(157, 185, 230, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 185, 230, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center; }
.hero .slogan { font-family: var(--wp--preset--font-family--display, inherit); color: var(--blue-light); font-weight: 500; letter-spacing: 1px; margin-bottom: 1rem; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 4.6vw, 3.3rem); font-weight: 600; line-height: 1.15; margin-bottom: 1.25rem; }
.hero p.lead { font-size: 1.1rem; line-height: 1.65; color: #cbd5e1; max-width: 34rem; margin-bottom: 2rem; }

/* Cartiglio: riquadro tecnico come nei disegni meccanici */
.titleblock { margin: 0; border: 1px solid rgba(157, 185, 230, 0.55); background: rgba(15, 23, 42, 0.6); }
.titleblock-row { display: grid; grid-template-columns: 8.5rem 1fr; border-top: 1px solid rgba(157, 185, 230, 0.3); }
.titleblock-row:first-child { border-top: 0; }
.titleblock dt { padding: 0.85rem 1rem; font-size: 0.85rem; color: var(--blue-light); border-right: 1px solid rgba(157, 185, 230, 0.3); }
.titleblock dd { padding: 0.85rem 1rem; font-weight: 500; color: var(--white); }

/* ---------- Sezioni ---------- */
.section { padding: 4.75rem 0; }
.section.alt, .section.alt2 { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1.15; margin-bottom: 0.9rem; }
.section-head p { color: var(--text-light); font-size: 1.05rem; line-height: 1.65; }

/* ---------- Intestazione di pagina dedicata (Settori, Ricerca e brevetti) ---------- */
.page-hero {
    padding: calc(var(--header-h) + 4rem) 0 3rem;
    color: var(--white);
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(157, 185, 230, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 185, 230, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.15; margin-bottom: 0.9rem; }
.page-hero p.lead { color: #cbd5e1; font-size: 1.05rem; line-height: 1.65; max-width: 40rem; margin: 0; }

/* ---------- Missione e scala TRL ---------- */
.missione .lead { max-width: 52rem; margin-bottom: 0; }
.trl-prompt { font-size: 0.92rem; color: var(--text-light); margin: 1.1rem 0 0; }
.trl-prompt a { color: var(--blue-dark); font-weight: 600; text-underline-offset: 2px; }
.trl-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
.trl-step {
    text-align: center; padding: 1rem 0.5rem;
    background: #eef1f6; border: 1px solid #d5dee8; border-radius: 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.trl-icon { display: block; margin: 0 auto 0.4rem; width: 24px; height: 24px; color: var(--blue-dark); }
.trl-icon .trl-svg { width: 100%; height: 100%; display: block; }
.trl-step strong { display: block; font-family: var(--wp--preset--font-family--display, inherit); color: var(--blue-dark); font-size: 0.9rem; }
.trl-step small { display: block; color: var(--text-light); font-size: 0.68rem; line-height: 1.3; margin-top: 0.3rem; }

/* ---------- Griglia dei settori (home) ---------- */
.sector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem 1.75rem; }
.sector-card {
    border-top: 3px solid var(--blue); padding: 1.75rem 0 0;
    background: transparent; transition: transform 0.15s;
}
.sector-card:hover { transform: translateY(-2px); }
.sector-card h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.25; margin-bottom: 0.6rem; }
.sector-card h3 a {
    color: var(--blue-dark); text-decoration: underline; text-decoration-color: rgba(50, 89, 147, 0.35);
    text-underline-offset: 3px;
}
.sector-card h3 a:hover { color: var(--blue); text-decoration-color: currentColor; }
.sector-card .intro { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
.sector-card .points { margin: 0; }

/* Specialità */
.section.specs { padding: 4.5rem 0; }
.spec-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 600; margin-bottom: 2rem; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.spec { padding-top: 1.25rem; border-top: 3px solid var(--blue); }
.spec h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.6rem; }
.spec p { color: var(--text-light); font-size: 0.97rem; line-height: 1.65; }

/* Righe dei settori: titolo a sinistra, dettagli a destra */
.back-link { margin: 2rem 0 1.5rem; }
.back-link a { color: var(--blue-dark); font-weight: 600; font-size: 0.92rem; }

.points { list-style: none; display: grid; gap: 0.7rem; line-height: 1.65; }
.points li { position: relative; padding-left: 1.4rem; margin: 0; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.7rem; height: 2px; background: var(--blue); }

/* Competenze */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); background: var(--white); }
.skills > .skill { padding: 2rem; border-top: 1px solid var(--line); }
.skills > .skill:nth-child(-n+2) { border-top: 0; }
.skills > .skill:nth-child(odd) { border-right: 1px solid var(--line); }
.skill h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
.skill h3 a {
    color: var(--blue-dark); text-decoration: underline; text-decoration-color: rgba(50, 89, 147, 0.35);
    text-underline-offset: 3px;
}
.skill h3 a:hover { color: var(--blue); text-decoration-color: currentColor; }
.skill p { color: var(--text-light); font-size: 0.97rem; line-height: 1.65; }

/* Illustrazione a tratto (pagine di competenza) */
.illustration {
    max-width: 22rem; margin: 0 auto 2rem; padding: 2.5rem;
    border: 1px solid var(--line); border-radius: 4px; background: var(--mist);
}
.illustration svg { width: 100%; height: auto; color: var(--blue-dark); display: block; }

/* Etichetta riutilizzabile (righe di ricerca, teaser) */
.tag {
    display: inline-block; font-family: var(--wp--preset--font-family--display, inherit); font-weight: 600; font-size: 0.85rem; line-height: 1.4;
    color: var(--blue-dark); border: 1px solid var(--blue); border-radius: 3px; padding: 0.25rem 0.7rem;
}

/* Ricerca e brevetti: stessa impostazione a griglia di Settori */
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem 1.75rem; }
.research-card { border-top: 3px solid var(--blue); padding: 1.75rem 0 0; background: transparent; }
.research-card .tag { margin-bottom: 0.85rem; }
.research-card h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.25; margin-bottom: 0.6rem; }
.research-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }
.research-card img {
    width: 100%; height: auto; display: block; margin-bottom: 0.85rem;
    background: var(--white); border: 1px solid var(--line); padding: 0.5rem;
}

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.person { padding-top: 1.25rem; border-top: 3px solid var(--blue); }
.person h3 { font-size: 1.15rem; font-weight: 600; }
.person p.role { color: var(--blue-dark); font-weight: 600; font-size: 0.92rem; margin: 0.2rem 0 0.75rem; }
.person p { color: var(--text-light); font-size: 0.95rem; line-height: 1.65; }
.person p.role { color: var(--blue-dark); }

/* Contatti */
.contact { background: var(--navy); color: var(--white); padding: 4.75rem 0; }
.contact h2 { color: var(--white); font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1.15; margin-bottom: 1rem; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: start; }
.contact p.lead { color: #cbd5e1; font-size: 1.05rem; line-height: 1.65; max-width: 32rem; margin-bottom: 2rem; }
.contact-list { margin: 0; border: 1px solid rgba(157, 185, 230, 0.45); }
.contact-list > div { display: grid; grid-template-columns: 6rem 1fr; border-top: 1px solid rgba(157, 185, 230, 0.3); }
.contact-list > div:first-child { border-top: 0; }
.contact-list dt { padding: 0.9rem 1rem; color: var(--blue-light); font-size: 0.9rem; border-right: 1px solid rgba(157, 185, 230, 0.3); }
.contact-list dd { padding: 0.9rem 1rem; color: var(--white); }
.contact-list dd a { color: var(--white); border-bottom: 1px solid var(--blue-light); }

/* ---------- Piè di pagina ---------- */
.site-footer { background: #090d16; padding: 2rem 0; font-size: 0.88rem; }
.site-footer p { color: #94a3b8; }

/* ---------- Pagine interne e articoli ---------- */
.page-main { padding: calc(var(--header-h) + 3rem) 0 4rem; }
.container.narrow { max-width: 780px; }
.container.narrow2 { max-width: 720px; }
.page-main h1 { font-size: 2.2rem; font-weight: 600; margin-bottom: 1.5rem; }
.page-main h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.page-main p, .page-main ul, .page-main ol { margin-bottom: 1rem; line-height: 1.7; }
.page-main ul, .page-main ol { padding-left: 1.4rem; }
.page-main a { color: var(--blue-dark); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .sector-grid, .research-grid { grid-template-columns: 1fr; }
    .spec-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .skills { grid-template-columns: 1fr; }
    .skills > .skill:nth-child(2) { border-top: 1px solid var(--line); }
    .skills > .skill:nth-child(odd) { border-right: 0; }
    .site-header .wp-block-navigation .wp-block-navigation__container { gap: 0.9rem; }
    .site-header .wp-block-navigation { font-size: 0.9rem; }
    .site-header .brand img { height: 34px; }
    .trl-scale { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .titleblock-row { grid-template-columns: 1fr; }
    .titleblock dt { border-right: 0; padding-bottom: 0; }
    .contact-list > div { grid-template-columns: 1fr; }
    .contact-list dt { border-right: 0; padding-bottom: 0; }
    .section, .contact, .page-hero { padding: 4rem 0; }
    .trl-scale { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Nell'editor l'intestazione non deve coprire il contenuto */
.editor-styles-wrapper .site-header { position: static; }
.editor-styles-wrapper .hero { padding-top: 5rem; }
