/*
Theme Name: GT Allestimenti
Theme URI: https://gtallestimenti.it/
Author: GT Allestimenti
Description: Tema WordPress responsive personalizzato per GT Allestimenti, specializzato in allestimenti fieristici, sgomberi, sbiancature e manutenzioni.
Version: 0.1.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: gt-allestimenti
*/

:root {
  --gt-bg: #f5f6f7;
  --gt-surface: #ffffff;
  --gt-ink: #15191d;
  --gt-muted: #606871;
  --gt-line: #dfe3e6;
  --gt-dark: #111820;
  --gt-accent: #e56f21;
  --gt-accent-dark: #b94f0f;
  --gt-radius: 18px;
  --gt-shadow: 0 18px 45px rgba(17, 24, 32, 0.10);
  --gt-container: 1180px;
  --gt-gutter: clamp(18px, 4vw, 40px);
  --gt-header-height: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--gt-bg);
  color: var(--gt-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.gt-menu-open { overflow: hidden; }
img, svg, video, canvas, audio, iframe, embed, object { max-width: 100%; }
img { height: auto; display: block; }
iframe, video { width: 100%; }
a { color: inherit; overflow-wrap: anywhere; }
button, input, textarea, select { max-width: 100%; font: inherit; }
button, [type="button"], [type="submit"], [type="reset"] { touch-action: manipulation; }
input, textarea, select { width: 100%; min-height: 48px; }
textarea { min-height: 150px; resize: vertical; }
table { width: 100%; border-collapse: collapse; }
pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }

.gt-container {
  width: min(calc(100% - (var(--gt-gutter) * 2)), var(--gt-container));
  margin-inline: auto;
}
.gt-section { padding: clamp(64px, 8vw, 88px) 0; }
.gt-section--light { background: var(--gt-surface); }
.gt-section--dark { background: var(--gt-dark); color: #fff; }
.gt-eyebrow { margin: 0 0 10px; color: var(--gt-accent); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.gt-title { max-width: 100%; margin: 0; font-size: clamp(2.15rem, 5vw, 3.65rem); line-height: 1.08; letter-spacing: -.04em; overflow-wrap: normal; }
.gt-section-title { margin: 0 0 18px; font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -.03em; }
.gt-lead { max-width: 760px; margin: 18px 0 0; color: var(--gt-muted); font-size: clamp(1rem, 1.6vw, 1.13rem); }
.gt-section--dark .gt-lead { color: rgba(255,255,255,.72); }
.gt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.gt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  max-width: 100%;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gt-accent);
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.gt-button:hover { transform: translateY(-2px); background: var(--gt-accent-dark); }
.gt-button:focus-visible, .gt-nav-toggle:focus-visible, .gt-main-nav a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.gt-button--ghost { background: transparent; color: inherit; border-color: currentColor; }
.gt-button--ghost:hover { background: rgba(255,255,255,.08); }

/* Header e navigazione */
.gt-site-header { position: sticky; z-index: 1000; top: 0; background: rgba(17,24,32,.96); color: #fff; backdrop-filter: blur(14px); }
.admin-bar .gt-site-header { top: 32px; }
.gt-header-inner { position: relative; min-height: var(--gt-header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gt-brand { display: inline-flex; min-width: 0; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.gt-brand .custom-logo-link { display: inline-flex; align-items: center; }
.gt-brand .custom-logo { width: auto; max-width: min(280px, 42vw); max-height: 56px; object-fit: contain; }
.gt-brand-mark { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gt-accent); font-size: 1.05rem; font-weight: 900; letter-spacing: -.04em; }
.gt-brand-copy { min-width: 0; display: grid; line-height: 1.05; }
.gt-brand-copy strong { font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap; }
.gt-brand-copy span { margin-top: 4px; color: rgba(255,255,255,.62); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.gt-nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.gt-nav-toggle-lines, .gt-nav-toggle-lines::before, .gt-nav-toggle-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.gt-nav-toggle-lines { position: relative; margin: auto; }
.gt-nav-toggle-lines::before, .gt-nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.gt-nav-toggle-lines::before { top: -7px; }
.gt-nav-toggle-lines::after { top: 7px; }
.gt-nav-toggle[aria-expanded="true"] .gt-nav-toggle-lines { background: transparent; }
.gt-nav-toggle[aria-expanded="true"] .gt-nav-toggle-lines::before { top: 0; transform: rotate(45deg); }
.gt-nav-toggle[aria-expanded="true"] .gt-nav-toggle-lines::after { top: 0; transform: rotate(-45deg); }
.gt-main-nav ul { display: flex; align-items: center; gap: clamp(14px, 2vw, 25px); margin: 0; padding: 0; list-style: none; }
.gt-main-nav li { min-width: 0; }
.gt-main-nav a { display: block; color: rgba(255,255,255,.84); font-size: .94rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.gt-main-nav a:hover, .gt-main-nav .current-menu-item > a, .gt-main-nav .current_page_item > a { color: #fff; }
.gt-main-nav .menu-item-cta > a { padding: 10px 17px; border-radius: 999px; background: var(--gt-accent); color: #fff; }
.gt-menu-backdrop { display: none; }

/* Home */
.gt-hero { position: relative; overflow: hidden; min-height: min(710px, calc(100svh - var(--gt-header-height))); display: grid; align-items: center; background: var(--gt-dark); color: #fff; }
.gt-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,24,32,.98) 0%, rgba(17,24,32,.87) 48%, rgba(17,24,32,.28) 100%); }
.gt-hero::after { content: ""; position: absolute; width: min(680px, 70vw); aspect-ratio: 1; right: -180px; top: -150px; border: clamp(55px, 8vw, 110px) solid rgba(229,111,33,.15); border-radius: 50%; }
.gt-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); align-items: center; gap: clamp(40px, 6vw, 72px); padding: clamp(76px, 10vw, 110px) 0; }
.gt-hero-copy { min-width: 0; max-width: 720px; }
.gt-hero .gt-title { font-size: clamp(2.7rem, 6vw, 5.25rem); }
.gt-hero .gt-lead { color: rgba(255,255,255,.72); max-width: 660px; }
.gt-hero-panel { position: relative; min-width: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 28px; background: rgba(255,255,255,.08); box-shadow: var(--gt-shadow); overflow: hidden; }
.gt-hero-panel::before { content: ""; display: block; aspect-ratio: 4 / 3; background: linear-gradient(135deg, rgba(229,111,33,.94), rgba(17,24,32,.15)), repeating-linear-gradient(90deg, rgba(255,255,255,.17) 0 2px, transparent 2px 78px), repeating-linear-gradient(0deg, rgba(255,255,255,.11) 0 2px, transparent 2px 64px), #313b44; }
.gt-hero-panel-copy { padding: clamp(20px, 3vw, 24px); }
.gt-hero-panel-copy strong { display: block; font-size: 1.2rem; }
.gt-hero-panel-copy span { color: rgba(255,255,255,.68); }

.gt-stats { position: relative; z-index: 2; margin-top: -40px; }
.gt-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--gt-radius); background: var(--gt-line); box-shadow: var(--gt-shadow); }
.gt-stat { min-width: 0; padding: clamp(24px, 3vw, 30px); background: var(--gt-surface); }
.gt-stat strong { display: block; font-size: 1.1rem; }
.gt-stat span { color: var(--gt-muted); font-size: .94rem; }

.gt-intro-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(35px, 7vw, 80px); align-items: start; }
.gt-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 38px; }
.gt-card { min-width: 0; padding: clamp(25px, 4vw, 32px); border: 1px solid var(--gt-line); border-radius: var(--gt-radius); background: var(--gt-surface); box-shadow: 0 10px 30px rgba(17,24,32,.05); }
.gt-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr); gap: clamp(28px, 5vw, 40px); background: var(--gt-dark); color: #fff; border-color: transparent; }
.gt-card-number { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(229,111,33,.12); color: var(--gt-accent); font-weight: 900; }
.gt-card h3 { margin: 18px 0 8px; font-size: 1.35rem; line-height: 1.2; }
.gt-card p { margin: 0; color: var(--gt-muted); }
.gt-card--featured p { color: rgba(255,255,255,.7); }
.gt-card-link { display: inline-block; margin-top: 20px; color: var(--gt-accent); font-weight: 800; text-decoration: none; }
.gt-feature-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; align-content: center; }
.gt-feature-list li { padding: 13px 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.05); }

.gt-benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 38px; }
.gt-benefit { min-width: 0; padding: 24px 0; border-top: 2px solid var(--gt-accent); }
.gt-benefit strong { display: block; margin-bottom: 8px; }
.gt-benefit span { color: rgba(255,255,255,.66); font-size: .93rem; }

.gt-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 36px; }
.gt-project { min-width: 0; overflow: hidden; border-radius: var(--gt-radius); background: var(--gt-surface); box-shadow: 0 12px 32px rgba(17,24,32,.07); }
.gt-project > a { display: block; overflow: hidden; }
.gt-project > a img, .gt-project-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.gt-project:hover > a img { transform: scale(1.025); }
.gt-project-thumb { background: linear-gradient(135deg, #313b44, #111820 65%, #e56f21); }
.gt-project-content { padding: clamp(20px, 3vw, 24px); }
.gt-project-content h2, .gt-project-content h3 { margin: 0 0 6px; font-size: 1.2rem; line-height: 1.25; }
.gt-project-content p { margin: 0; color: var(--gt-muted); font-size: .94rem; }

.gt-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: clamp(30px, 5vw, 42px); border-radius: 28px; background: var(--gt-accent); color: #fff; box-shadow: var(--gt-shadow); }
.gt-cta h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; }
.gt-cta p { margin: 10px 0 0; color: rgba(255,255,255,.82); }
.gt-cta .gt-button { background: #fff; color: var(--gt-dark); }

/* Pagine e contenuti WordPress */
.gt-page-hero { padding: clamp(68px, 9vw, 92px) 0 clamp(50px, 7vw, 70px); background: var(--gt-dark); color: #fff; }
.gt-page-content { width: 100%; max-width: 860px; padding: clamp(52px, 8vw, 70px) 0 clamp(72px, 9vw, 95px); }
.gt-page-content > *:first-child { margin-top: 0; }
.gt-page-content > *:last-child { margin-bottom: 0; }
.gt-page-content h2, .gt-page-content h3, .gt-page-content h4 { line-height: 1.2; overflow-wrap: normal; }
.gt-page-content a { color: var(--gt-accent-dark); }
.gt-page-content img { border-radius: min(14px, 3vw); }
.gt-page-content .alignwide { width: min(1180px, calc(100vw - (var(--gt-gutter) * 2))); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.gt-page-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.gt-page-content .wp-block-columns { gap: clamp(22px, 4vw, 40px); }
.gt-page-content .wp-block-image, .gt-page-content figure { max-width: 100%; }
.gt-page-content .wp-block-gallery { gap: clamp(8px, 2vw, 16px); }
.gt-page-content .wp-block-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gt-page-content .wp-block-embed__wrapper { position: relative; overflow: hidden; }
.gt-page-content .wp-block-buttons { gap: 12px; }
.gt-page-content .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.gt-page-content form { max-width: 100%; }
.gt-page-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.gt-page-content textarea,
.gt-page-content select {
  padding: 12px 14px;
  border: 1px solid var(--gt-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gt-ink);
}
.gt-page-content input[type="submit"], .gt-page-content button[type="submit"] { min-height: 50px; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--gt-accent); color: #fff; font-weight: 800; cursor: pointer; }

/* Footer */
.gt-site-footer { background: #0b1015; color: #fff; }
.gt-footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr); gap: clamp(35px, 5vw, 55px); padding: clamp(52px, 7vw, 68px) 0 46px; }
.gt-footer-grid > * { min-width: 0; }
.gt-footer-title { margin: 0 0 16px; font-size: 1.05rem; }
.gt-footer-copy { color: rgba(255,255,255,.63); max-width: 480px; }
.gt-footer-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.gt-footer-list a { color: rgba(255,255,255,.72); text-decoration: none; }
.gt-footer-list a:hover { color: #fff; }
.gt-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: .84rem; }
.gt-footer-bottom a { color: inherit; }

.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; }
.screen-reader-text:focus { z-index: 10000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px 16px; clip: auto; background: #fff; color: #111; }

/* Tablet e menu mobile */
@media (max-width: 1080px) {
  :root { --gt-header-height: 72px; }
  .gt-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .gt-main-nav {
    visibility: hidden;
    position: fixed;
    z-index: 1002;
    top: calc(var(--gt-header-height) + 14px);
    left: var(--gt-gutter);
    right: var(--gt-gutter);
    max-height: calc(100svh - var(--gt-header-height) - 36px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: #18212a;
    box-shadow: var(--gt-shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .admin-bar .gt-main-nav { top: calc(var(--gt-header-height) + 46px); }
  .gt-main-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
  .gt-main-nav ul { align-items: stretch; flex-direction: column; gap: 5px; }
  .gt-main-nav a { min-height: 46px; display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; }
  .gt-main-nav a:hover, .gt-main-nav .current-menu-item > a, .gt-main-nav .current_page_item > a { background: rgba(255,255,255,.07); }
  .gt-main-nav .menu-item-cta > a { justify-content: center; margin-top: 4px; }
  .gt-menu-backdrop { position: fixed; z-index: 1001; inset: 0; display: block; background: rgba(5,9,13,.58); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  body.gt-menu-open .gt-menu-backdrop { opacity: 1; pointer-events: auto; }
  .gt-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(270px, .72fr); }
  .gt-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .gt-hero { min-height: auto; }
  .gt-hero::before { background: linear-gradient(180deg, rgba(17,24,32,.98) 0%, rgba(17,24,32,.91) 58%, rgba(17,24,32,.74) 100%); }
  .gt-hero-grid, .gt-intro-grid { grid-template-columns: 1fr; }
  .gt-hero-grid { gap: 38px; }
  .gt-hero-copy { max-width: 680px; }
  .gt-hero-panel { width: min(100%, 620px); }
  .gt-stats-grid { grid-template-columns: 1fr; }
  .gt-stat + .gt-stat { border-top: 1px solid var(--gt-line); }
  .gt-service-grid { grid-template-columns: 1fr; }
  .gt-card--featured { grid-column: auto; }
  .gt-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Smartphone */
@media (max-width: 600px) {
  :root { --gt-gutter: 16px; --gt-radius: 15px; --gt-header-height: 68px; }
  .admin-bar .gt-site-header { top: 46px; }
  .admin-bar .gt-main-nav { top: calc(var(--gt-header-height) + 60px); }
  .gt-header-inner { gap: 12px; }
  .gt-brand { gap: 9px; }
  .gt-brand-mark { width: 40px; height: 40px; border-radius: 10px; }
  .gt-brand .custom-logo { max-width: min(210px, 58vw); max-height: 46px; }
  .gt-brand-copy strong { font-size: .98rem; }
  .gt-brand-copy span { display: none; }
  .gt-nav-toggle { width: 46px; height: 46px; flex-basis: 46px; }
  .gt-main-nav { left: 12px; right: 12px; }
  .gt-hero::after { right: -42vw; top: -60px; }
  .gt-hero-grid { padding: 64px 0 78px; }
  .gt-hero .gt-title { font-size: clamp(2.35rem, 12vw, 3.35rem); }
  .gt-actions { flex-direction: column; align-items: stretch; }
  .gt-actions .gt-button { width: 100%; }
  .gt-stats { margin-top: -26px; }
  .gt-card--featured { grid-template-columns: 1fr; }
  .gt-feature-list { margin-top: 4px; }
  .gt-benefits, .gt-project-grid, .gt-footer-grid { grid-template-columns: 1fr; }
  .gt-footer-grid > :first-child { grid-column: auto; }
  .gt-cta { grid-template-columns: 1fr; gap: 22px; }
  .gt-cta .gt-button { width: 100%; }
  .gt-footer-bottom { flex-direction: column; align-items: flex-start; }
  .gt-page-content .wp-block-columns:not(.is-not-stacked-on-mobile) { flex-wrap: wrap !important; }
  .gt-page-content .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important; }
  .gt-page-content .wp-block-buttons, .gt-page-content .wp-block-button { width: 100%; }
  .gt-page-content .wp-block-button__link { width: 100%; }
}

@media (max-width: 380px) {
  .gt-brand-copy strong { font-size: .9rem; }
  .gt-brand-mark { width: 38px; height: 38px; }
  .gt-hero .gt-title { font-size: 2.15rem; }
}

@media (orientation: landscape) and (max-height: 540px) and (max-width: 1080px) {
  .gt-main-nav { max-height: calc(100svh - 92px); top: 78px; }
  .gt-hero-grid { padding-top: 55px; padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
