/*
Theme Name: SAT Bridge
Theme URI: https://www.serviziamministrativitecnici.it/
Description: A small, dependency-free bridge theme that preserves the SAT site's Italian navigation and visual identity while the legacy site is being retired.
Author: SAT migration
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: sat-bridge
*/

:root {
  --sat-blue: #4c89ce;
  --sat-blue-dark: #244d78;
  --sat-ink: #2a2f35;
  --sat-muted: #697586;
  --sat-line: #dfe6ed;
  --sat-surface: #ffffff;
  --sat-page: #f4f7fa;
  --sat-green: #37d52e;
  --sat-max: 1170px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sat-page);
  color: var(--sat-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--sat-blue-dark); }
a:hover, a:focus { color: var(--sat-blue); }

.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;
}

.sat-wrap {
  width: min(calc(100% - 40px), var(--sat-max));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  background: var(--sat-surface);
  border-bottom: 1px solid var(--sat-line);
  box-shadow: 0 2px 12px rgba(36, 77, 120, .06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 108px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-brand img {
  display: block;
  width: 212px;
  height: auto;
}

.site-brand__fallback {
  color: var(--sat-blue-dark);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav li { position: relative; }

.primary-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 4px;
  color: var(--sat-ink);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current-menu-item > a {
  background: #edf5fd;
  color: var(--sat-blue-dark);
}

.primary-nav .has-children > a::after {
  display: inline-block;
  margin-left: 7px;
  color: var(--sat-blue);
  content: "▾";
  font-size: .8em;
}

.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  display: block;
  min-width: 230px;
  padding: 8px;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  background: var(--sat-surface);
  border: 1px solid var(--sat-line);
  border-radius: 5px;
  box-shadow: 0 14px 35px rgba(26, 52, 79, .16);
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.primary-nav .sub-menu a { padding: 9px 11px; }

.sat-main { min-height: 560px; }

.sat-hero {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  background: var(--sat-blue-dark);
}

.sat-hero__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  animation: sat-hero-fade 12s infinite;
}

.sat-hero__slide::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 34, 55, .68), rgba(15, 34, 55, .08) 72%);
  content: "";
}

.sat-hero__slide--naples {
  background-image: url("../../uploads/2013/05/Schermata-2013-03-02-alle-22.36.20-1170x315.jpg");
  opacity: 1;
}

.sat-hero__slide--city {
  background-image: url("../../uploads/2013/05/10752127-1024x315.jpg");
  animation-delay: 6s;
}

.sat-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 355px;
  padding-block: 42px;
  color: #fff;
}

.sat-hero__copy { max-width: 630px; }

.sat-hero h1 {
  margin: 0 0 12px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 400;
  line-height: 1.08;
}

.sat-hero p {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, .94);
  font-size: 1.12rem;
}

.sat-section { padding-block: 58px; }

.sat-section--white { background: var(--sat-surface); }

.sat-section__intro {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.sat-section__intro h2,
.sat-page h1 {
  margin: 0 0 12px;
  color: var(--sat-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 400;
  line-height: 1.2;
}

.sat-section__intro p { margin: 0; color: var(--sat-muted); }

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

.sat-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 310px;
  padding: 24px 22px 28px;
  text-align: center;
  background: var(--sat-surface);
  border: 1px solid var(--sat-line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(36, 77, 120, .07);
}

.sat-service img {
  width: 190px;
  height: 134px;
  margin-bottom: 15px;
  object-fit: contain;
}

.sat-service h2 {
  margin: 4px 0 10px;
  color: var(--sat-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.2;
}

.sat-service p { margin: 0; color: var(--sat-muted); }

.sat-service__icon {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
  width: 190px;
  height: 134px;
  padding: 22px 26px;
}

.sat-service__icon span {
  display: block;
  width: 25px;
  background: linear-gradient(180deg, #76a9df, var(--sat-blue));
  border-radius: 3px 3px 0 0;
}

.sat-service__icon span:nth-child(1) { height: 40px; }
.sat-service__icon span:nth-child(2) { height: 68px; }
.sat-service__icon span:nth-child(3) { height: 92px; background: linear-gradient(180deg, #80df78, var(--sat-green)); }

.sat-welcome {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.sat-welcome h2 {
  margin: 0 0 12px;
  color: var(--sat-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 400;
}

.sat-welcome p { margin: 0; color: var(--sat-muted); }

.sat-page { padding-block: 58px; }

.sat-page__panel {
  max-width: 900px;
  padding: 38px 42px;
  margin: 0 auto;
  background: var(--sat-surface);
  border: 1px solid var(--sat-line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(36, 77, 120, .07);
}

.sat-page__panel > :first-child { margin-top: 0; }
.sat-page__panel > :last-child { margin-bottom: 0; }

.sat-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.sat-contact-card {
  padding: 22px;
  background: #f8fbfe;
  border-left: 4px solid var(--sat-blue);
}

.sat-contact-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.sat-contact-card p { margin: 0; }

.sat-contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.sat-contact-links a {
  display: block;
  padding: 12px 14px;
  background: #edf5fd;
  border-radius: 4px;
  text-decoration: none;
}

.sat-manager-link {
  display: inline-block;
  padding: 12px 18px;
  margin-top: 15px;
  color: #fff;
  background: var(--sat-blue-dark);
  border-radius: 4px;
  text-decoration: none;
}

.sat-manager-link:hover, .sat-manager-link:focus { color: #fff; background: var(--sat-blue); }

.sat-legacy-content > :first-child { margin-top: 0; }
.sat-legacy-content h2 {
  margin: 32px 0 16px;
  color: var(--sat-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.25;
}
.sat-legacy-content ul { margin: 0 0 18px; padding-left: 24px; }
.sat-legacy-content li { margin-bottom: 12px; }
.sat-legacy-content img { max-width: 100%; height: auto; }
.sat-legacy-content iframe { max-width: 100%; }

.site-footer {
  padding-block: 42px 24px;
  color: rgba(255, 255, 255, .84);
  background: #1e3042;
}

.site-footer a { color: #b9d7f4; }
.site-footer a:hover, .site-footer a:focus { color: #fff; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.site-footer p { margin: 0; }
.site-footer__bottom {
  padding-top: 23px;
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: .9rem;
}

@keyframes sat-hero-fade {
  0%, 42% { opacity: 0; }
  50%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sat-hero__slide { animation: none; }
  .sat-hero__slide--city { display: none; }
}

@media (max-width: 800px) {
  .site-header__inner { align-items: flex-start; flex-direction: column; gap: 10px; padding-block: 18px; }
  .primary-nav ul { flex-wrap: wrap; }
  .primary-nav .sub-menu { position: static; display: none; visibility: visible; opacity: 1; box-shadow: none; transform: none; }
  .primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
  .sat-services, .sat-welcome, .site-footer__grid { grid-template-columns: 1fr; }
  .sat-services { max-width: 560px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .sat-wrap { width: min(calc(100% - 28px), var(--sat-max)); }
  .sat-hero, .sat-hero__content { min-height: 300px; }
  .sat-page__panel { padding: 26px 22px; }
  .sat-contact-grid, .sat-contact-links { grid-template-columns: 1fr; }
}
