/* ========================================
   0203ENGINEERING TEMPLATE - CSS PRINCIPALE
   ======================================== */

/* === VARIABILI === */
:root {
    --primary-color: #000000;
    --secondary-color: #d4a574;
    --text-color: #000000;
    --text-light: #000000;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* === RESET BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 40px;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 20px;
    min-height: 130px;
}

/* Blocco logo (tagline solo in home, via PHP) */
.logo-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0;
}

.logo-block .logo,
.logo-block .logo a,
.logo-block .logo img {
    margin: 0;
    padding: 0;
    display: block;
}

/* Tagline: usata solo in home */
.header-tagline {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.4;
    margin-top: 10px;
    max-width: 480px;
}

/* Home: tagline centrata, maiuscolo, più grande */
/* Grid layout per header con contenuto centrato (home tagline o titolo pagina) */
.page-home .header-container,
.header-has-centered .header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.page-home .header-container nav,
.page-home .header-container .mobile-toggle,
.header-has-centered .header-container nav,
.header-has-centered .header-container .mobile-toggle {
    grid-column: 3;
    grid-row: 1;
}

.page-home .header-tagline-center,
.header-page-title {
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    margin: 0;
    max-width: none;
    padding: 0 20px;
}

/* Titolo/tagline centrato rispetto alla pagina (non solo alla cella grid) */
.header-has-centered .header-tagline-center,
.header-has-centered .header-page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 120px);
}

/* Titolo header grande: stesso stile di .section-title h2 */
.header-title-large {
    font-size: 36px !important;
    font-weight: 300 !important;
    letter-spacing: 0.02em;
}

.header-title-large::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #84A836;
    margin: 15px auto 0;
}

/* Immagine a tutta larghezza sotto header (solo home) */
.home-hero-img-wrap {
    position: relative;
    width: 100%;
    max-width: 100vw;
    margin-top: 138px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.home-hero-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.page-home .nav-menu {
    top: 138px;
    height: calc(100vh - 138px);
}

.page-home .nav-overlay {
    top: 138px;
    height: calc(100vh - 138px);
}

.page-home .hero {
    margin-top: 0;
}

/* Text Logo */
.logo a {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.logo img {
    height: 130px;
    width: auto;
    max-height: none;
}

.logo-text-top {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
    line-height: 1;
}

.logo-text-bottom {
    font-size: 12px;
    font-weight: 400;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1;
    margin-top: 2px;
}

/* White logo variant (hero, footer) */
.hero-logo-text,
.footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.hero-logo-text {
    margin-bottom: 30px;
    align-items: center;
}

.hero-logo-text .logo-text-top {
    color: var(--white);
    font-size: 72px;
}

.hero-logo-text .logo-text-bottom {
    color: var(--secondary-color);
    font-size: 22px;
    letter-spacing: 6px;
}

.footer-logo-text {
    margin-bottom: 20px;
}

.footer-logo-text .logo-text-top {
    color: var(--white);
    font-size: 36px;
}

.footer-logo-text .logo-text-bottom {
    color: var(--secondary-color);
    font-size: 13px;
    letter-spacing: 4px;
}

/* Navigation - Always Hamburger */
.nav-menu {
    position: fixed;
    top: 138px;
    right: -100%;
    width: 300px;
    height: calc(100vh - 138px);
    background: var(--white);
    display: flex;
    flex-direction: column;
    padding: 30px;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    gap: 0;
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-menu > li > a {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 0;
    display: block;
    border-bottom: 1px solid var(--bg-light);
}

.nav-menu > li > a:hover {
    color: var(--secondary-color);
}

/* Nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 138px;
    left: 0;
    width: 100%;
    height: calc(100vh - 138px);
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* Hamburger Toggle - Always Visible */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    align-self: center;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                url('../images/hero-bg.jpg') center/cover no-repeat;
    margin-top: 138px;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    max-width: 300px;
    margin: 0 auto 30px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
}

.btn,
.btn-outline {
    display: inline-block;
    padding: 14px 36px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.btn:hover,
.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* === SECTION BASE === */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #84A836;
    margin: 15px auto 0;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.servizi-single {
    max-width: 700px;
    margin: 0 auto;
}

.servizi-categoria-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 35px 0 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

.servizi-categoria-title:first-of-type {
    margin-top: 0;
}

.servizi-descrizione-completa {
    margin-top: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

.servizi-descrizione-completa p { margin-bottom: 12px; }
.servizi-descrizione-completa ul { margin: 15px 0; padding-left: 25px; }
.servizi-descrizione-completa li { margin-bottom: 6px; }

.servizi-home-list li {
    margin-bottom: 12px;
}

/* === GRID LAYOUT === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Sezione Chi Siamo · Vision · Mission: stesso sfondo bianco, allineati */
.section-intro {
    background: var(--white);
    padding-bottom: 24px;
}

.title-left-block {
    align-items: center;
    gap: 50px;
}

.title-left-block + .title-left-block {
    margin-top: 40px;
}

.title-left-heading {
    text-align: left;
}

.title-left-heading h3 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.title-left-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-color);
}

.title-left-text p {
    margin: 0 0 1em 0;
    text-align: justify;
}

.title-left-text p:last-child {
    margin-bottom: 0;
}

.section-intro-img {
    margin-top: 50px;
}

/* Riduce margine superiore pulsanti Team/Servizi dopo Missione */
.section-intro-buttons {
    padding-top: 8px;
}

/* Legacy: blocco titolo a destra (mantenuto per eventuale riuso) */
.title-right-block {
    align-items: center;
    gap: 50px;
}

.title-right-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-color);
}

.title-right-desc p {
    margin: 0;
}

.title-right-heading {
    text-align: right;
}

.title-right-heading h3 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

/* === CONTENT BLOCKS === */
.content-box {
    padding: 30px;
}

.content-box h3 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-box p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.content-box ul {
    margin: 20px 0;
}

.content-box ul li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--text-light);
}

.content-box ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-size: 20px;
}

/* === IMAGE BOX === */
.image-box {
    position: relative;
    overflow: hidden;
}

.image-box img {
    width: 100%;
    transition: transform 0.5s ease;
}

.image-box:hover img {
    transform: scale(1.05);
}

/* === GALLERY SLIDER === */
.gallery-slider {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-container {
    overflow: hidden;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease;
}

.gallery-item {
    display: block;
    min-width: calc(33.333% - 20px);
    margin: 0 10px;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: 40px 20px 20px;
}

.gallery-caption h4 {
    font-size: 16px;
    font-weight: 500;
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

/* === TEAM CARDS === */
.team-card {
    text-align: center;
    padding: 20px;
}

.team-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    margin-bottom: 20px;
}

.team-photo-placeholder {
    background: var(--bg-light, #f0f0f0);
    margin-bottom: 20px;
}

.team-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-card h4 {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 400;
    margin-bottom: 15px;
}

.team-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    text-align: justify;
}

.team-card-linkedin {
    margin-top: 12px;
    margin-bottom: 0;
}

.team-linkedin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary-color, #d4a574);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.team-linkedin-link:hover {
    text-decoration: underline;
}

.team-linkedin-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* === CLIENTI BADGE / CARD === */
.clienti-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.client-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    transition: var(--transition);
}

.client-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.client-card-img {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.client-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.client-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 20px 10px;
    color: var(--text-color);
}

.client-card-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 20px 20px;
}

/* === LAVORI BADGE / CARD (più grandi di clienti e team) === */
.lavori-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}

.lavoro-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    transition: var(--transition);
}

.lavoro-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.lavoro-card-img {
    width: 100%;
    height: 280px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lavoro-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lavoro-card-body {
    padding: 28px 28px 32px;
}

.lavoro-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-color);
}

.lavoro-card-desc {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 24px;
}

.lavoro-card-cta {
    display: inline-block;
    padding: 14px 36px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.lavoro-card-cta:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Lavoro Dettaglio */
.lavoro-detail-hero {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.lavoro-detail-hero img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.lavoro-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.lavoro-detail-content p {
    margin-bottom: 1em;
}

.lavoro-detail-content p:last-child {
    margin-bottom: 0;
}

.lavoro-detail-servizi {
    margin-top: 40px;
}

.lavoro-detail-servizi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lavoro-detail-servizi-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.lavoro-detail-servizi-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.lavoro-detail-gallery {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.lavoro-detail-gallery-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-color);
}

.lavoro-detail-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.lavoro-detail-gallery-item {
    border-radius: 8px;
    overflow: hidden;
}

.lavoro-detail-gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* === FORM === */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

/* === FOOTER === */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 40px auto;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.footer h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer p,
.footer a {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background: rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 24px 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.footer-links {
    display: flex;
    gap: 30px;
}

/* === BACKGROUND SECTIONS === */
.bg-light {
    background: var(--bg-light);
}

.bg-dark {
    background: var(--primary-color);
    color: var(--white);
}

.bg-dark h2,
.bg-dark h3 {
    color: var(--white);
}

.bg-dark .form-group label {
    color: rgba(255,255,255,0.95);
}

/* Solo per screen reader (titolo nella pagina è già nell'immagine) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('../images/page-header.jpg') center/cover no-repeat;
    background-size: cover;
    background-position: center;
    padding: 150px 40px 80px;
    text-align: center;
    color: var(--white);
    margin-top: 138px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
}

/* Page header con scritta già nell'immagine (1920x1080): solo immagine a tutto schermo */
.page-header-chi-siamo,
.page-header-servizi,
.page-header-clienti,
.page-header-lavori,
.page-header-contatti {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 56.25vw; /* 16:9 come home */
    padding: 24px;
    margin-top: 138px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.page-header-chi-siamo { background-image: url('../images/chi-siamo.webp'); }
.page-header-servizi { background-image: url('../images/servizi.webp'); }
.page-header-clienti { background-image: url('../images/clienti.webp'); }
.page-header-lavori { background-image: url('../images/lavori.webp'); }
.page-header-contatti { background-image: url('../images/contatti.webp'); }

/* Titolo generico page-header (per pagine che non usano immagine con scritta) */
.page-header h1 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 300;
    margin-bottom: 15px;
    max-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    word-wrap: break-word;
}

/* Linea page-header rimossa: i titoli sono ora nell'header, evitando duplicazione */

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .grid-3,
    .clienti-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lavori-grid {
        gap: 36px;
    }
    
    .lavoro-card-img {
        height: 240px;
    }
    
    .gallery-item {
        min-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .title-left-block {
        gap: 24px;
    }
    
    .title-left-block + .title-left-block {
        margin-top: 32px;
    }
    
    .title-left-heading {
        text-align: center;
    }
    
    .title-left-heading h3 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .section-intro-img {
        margin-top: 20px;
        margin-bottom: 30px;
    }
    
    .section-intro {
        padding-bottom: 0;
    }
    
    .section-intro-buttons {
        padding-top: 0;
    }
    
    .title-right-block {
        gap: 28px;
    }
    
    .title-right-heading {
        text-align: center;
    }
    
    .title-right-heading h3 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    /* Home mobile: logo e hamburger come le altre pagine, tagline sotto */
    .page-home .header-container,
    .header-has-centered .header-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 12px 20px;
    }
    
    .page-home .header-container .logo-block,
    .header-has-centered .header-container .logo-block {
        grid-column: 1;
        grid-row: 1;
    }

    .page-home .header-container nav,
    .header-has-centered .header-container nav {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    
    .page-home .header-container .mobile-toggle,
    .header-has-centered .header-container .mobile-toggle {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    
    .page-home .header-tagline-center,
    .header-has-centered .header-page-title {
        position: static;
        left: auto;
        transform: none;
        width: auto;
        max-width: none;
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 14px;
        line-height: 1.45;
        text-align: center;
        padding: 0;
    }
    
    /* Spazio sotto header */
    .home-hero-img-wrap {
        margin-top: 138px;
        padding: 0;
    }
    
    .page-home .nav-menu {
        top: 138px;
        height: calc(100vh - 138px);
    }
    
    .page-home .nav-overlay {
        top: 138px;
        height: calc(100vh - 138px);
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .logo img {
        height: 100px;
    }
    
    .nav-menu {
        position: fixed;
        top: 138px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 138px);
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        transition: var(--transition);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 10px;
        background: var(--bg-light);
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .clienti-grid,
    .lavori-grid {
        grid-template-columns: 1fr;
    }
    
    .lavoro-card-body {
        padding: 24px 24px 28px;
    }
    
    .lavoro-card-img {
        height: 220px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .page-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .page-header-chi-siamo,
    .page-header-servizi,
    .page-header-clienti,
    .page-header-lavori,
    .page-header-contatti {
        min-height: 220px;
    }
    
    .gallery-item {
        min-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 500px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .section {
        padding: 50px 0;
    }
    
    .section-intro {
        padding-bottom: 0;
    }
    
    .section-intro-buttons {
        padding-top: 0;
    }

    .container-fluid {
        padding: 0 20px;
    }

    /* Home: su schermi stretti tagline più piccola */
    .page-home .header-tagline-center {
        font-size: 12px;
    }

    .header-page-title:not(.header-title-large) {
        font-size: 12px;
    }

    .header-title-large {
        font-size: 28px !important;
    }

    .home-hero-img-wrap {
        margin-top: 138px;
        padding: 0;
    }
}

/* === NEWS SECTION === */
.page-header-news {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('../images/news.webp') center/cover no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 56.25vw;
    padding: 24px;
    margin-top: 138px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* News Filters */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.news-filter-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    transition: var(--transition);
    text-decoration: none;
}

.news-filter-btn:hover,
.news-filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.news-grid-small {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.news-card-img {
    width: 100%;
    height: 220px;
    background: var(--bg-light);
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 24px;
}

.news-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-color);
    line-height: 1.4;
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 16px;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
}

.news-card-date,
.news-card-author {
    display: inline-block;
}

.news-card-cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
}

.news-card-cta:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* News Detail */
.news-detail {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-img {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.news-detail-img img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-header {
    margin-bottom: 30px;
    text-align: center;
}

.news-detail-title {
    font-size: 36px;
    font-weight: 600;
    margin: 16px 0;
    color: var(--text-color);
    line-height: 1.3;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    font-size: 14px;
    color: #888;
}

.news-detail-summary {
    background: var(--bg-light);
    padding: 24px;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.news-detail-summary p {
    font-size: 18px;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.news-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4 {
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.news-detail-content ul,
.news-detail-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-detail-content li {
    margin-bottom: 10px;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.news-detail-content blockquote {
    background: var(--bg-light);
    padding: 20px 24px;
    border-left: 4px solid var(--secondary-color);
    margin: 20px 0;
    font-style: italic;
}

.news-detail-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.news-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 13px;
    border-radius: 20px;
    margin: 4px;
}

/* News Related */
.news-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.news-related-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination-link {
    display: inline-block;
    padding: 10px 16px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

.pagination-link:hover,
.pagination-link.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* News Responsive */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header-news {
        min-height: 220px;
    }

    .news-grid,
    .news-grid-small {
        grid-template-columns: 1fr;
    }

    .news-detail-title {
        font-size: 28px;
    }

    .news-detail-meta {
        flex-direction: column;
        gap: 8px;
    }

    .news-filters {
        gap: 8px;
    }

    .news-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
