/*
Theme Name: Il Guardiano del Faro Teal
Theme URI: https://ilguardianodelfaro.it/
Author: Codex
Description: Tema classico WordPress ispirato al layout di GazziNet con palette royal blue, navy tecnici e superfici chiare.
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.2
Text Domain: ilguardianodelfaro-teal
*/

:root {
  --gf-bg: #1e336e;
  --gf-bg-rgb: 30, 51, 110;
  --gf-surface: #f8faff;
  --gf-surface-alt: #eef4ff;
  --gf-card: #ffffff;
  --gf-line: #c7d5ff;
  --gf-text: #152544;
  --gf-muted: #4b618b;
  --gf-accent: #4876ff;
  --gf-accent-rgb: 72, 118, 255;
  --gf-accent-dark: #2f5de0;
  --gf-sea: #6f94ff;
  --gf-sea-deep: #385dbf;
  --gf-shadow: 0 20px 50px rgba(5, 17, 33, 0.16);
  --gf-radius: 18px;
  --gf-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--gf-text);
  background:
    radial-gradient(circle at top left, rgba(var(--gf-accent-rgb), 0.16), transparent 32%),
    linear-gradient(180deg, #dbe6ff 0, #edf3ff 140px, #f8faff 140px, #f2f6ff 100%);
  font: 400 16px/1.6 Georgia, "Times New Roman", serif;
}

a {
  color: var(--gf-accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--gf-accent);
}

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

iframe,
video,
embed,
object,
svg {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(var(--gf-bg-rgb), 0.96);
  backdrop-filter: blur(12px);
}

.site-wrapper {
  width: 100%;
}

.site-header__inner,
.site-main__inner,
.site-footer__inner {
  width: 100%;
  max-width: var(--gf-max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.brand__fallback,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.custom-logo {
  max-height: 58px;
  width: auto;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ffffff 0 30%, #d6453d 30% 60%, #ffffff 60% 100%);
  border: 3px solid #22333d;
  box-shadow: 0 0 0 4px rgba(var(--gf-accent-rgb), 0.2);
}

.brand__text {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.brand__title {
  color: #eff5ff;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand__tagline {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.primary-nav {
  margin-left: auto;
}

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

.primary-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #d9e7ff;
  background: rgba(var(--gf-accent-rgb), 0.14);
  font: 600 0.92rem/1.1 Arial, Helvetica, sans-serif;
}

.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav a:hover {
  background: rgba(var(--gf-accent-rgb), 0.32);
  color: #fff;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.site-main {
  padding: 34px 0 48px;
}

.content-shell {
  width: 100%;
  margin: 0 auto;
  display: block;
}

.site-main__inner > *,
.content-shell > *,
.panel {
  min-width: 0;
}

.panel {
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--gf-shadow);
}

.hero__copy {
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(244, 247, 251, 0.98), rgba(255, 255, 255, 0.98)),
    var(--gf-surface);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gf-accent-dark);
  font: 700 0.84rem/1.1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  color: #16252d;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.hero p {
  margin: 0 0 18px;
  color: var(--gf-muted);
  font-size: 1.05rem;
}

.hero__meta {
  display: inline-block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--gf-surface-alt);
  border: 1px solid var(--gf-line);
  color: #425158;
  font-size: 0.95rem;
}

.hero__visual {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background:
    linear-gradient(180deg, #7ea1ff, var(--gf-accent-dark));
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 72%;
  height: 38%;
  background: linear-gradient(135deg, #f3b43b 0 34%, #dfe7ef 34% 100%);
  clip-path: polygon(0 30%, 82% 0, 48% 100%, 0 100%);
}

.hero__visual::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 18%;
  width: 68px;
  height: 230px;
  border-radius: 40px;
  border: 1px solid rgba(25, 33, 38, 0.4);
  background: repeating-linear-gradient(180deg, #fff 0 22px, #d53e36 22px 44px);
  box-shadow: 18px 16px 0 rgba(0, 0, 0, 0.12);
}

.hero__harbor {
  position: absolute;
  left: 8%;
  top: 48%;
  width: 56%;
  height: 20%;
  background: #6d6963;
  transform: skewX(-28deg);
  box-shadow: 0 16px 0 rgba(0, 0, 0, 0.08);
}

.hero__card {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(55, 85, 90, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.12);
}

.hero__card-head {
  padding: 7px 12px;
  background: var(--gf-accent);
  color: #fff;
  font: 700 0.95rem/1 Arial, Helvetica, sans-serif;
}

.hero__card-body {
  padding: 12px;
  color: #33444b;
  font-size: 0.92rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.info-card {
  overflow: hidden;
}

.info-card__link {
  display: block;
  height: 100%;
  color: inherit;
}

.info-card__link:hover {
  color: inherit;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.info-card__head {
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--gf-accent), var(--gf-accent-dark));
  color: #fff;
  font: 700 1rem/1 Arial, Helvetica, sans-serif;
}

.info-card__body {
  padding: 18px;
  color: #304046;
  background: rgba(255, 255, 255, 0.94);
}

.info-card__body p {
  margin: 0 0 12px;
}

.info-card__body p:last-child {
  margin-bottom: 0;
}

.content-card,
.sidebar-card {
  padding: 26px;
}

.entry-content > * {
  max-width: 100%;
}

.content-card h2,
.sidebar-card h2 {
  margin-top: 0;
  color: #19313b;
  font-size: 1.5rem;
}

.entry-content .wp-block-group,
.entry-content .wp-block-columns,
.entry-content .wp-block-cover,
.entry-content .wp-block-media-text {
  margin-bottom: 1.5rem;
}

.entry-content .wp-block-button__link {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gf-accent), var(--gf-accent-dark));
}

.entry-content .alignwide,
.entry-content .alignfull {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.2rem;
}

.entry-content table {
  width: 100%;
}

.sidebar-card ul {
  margin: 0;
  padding-left: 18px;
}

.sidebar-card li + li {
  margin-top: 8px;
}

.entry-content > :first-child {
  margin-top: 0;
}

.site-footer {
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #284586;
  color: rgba(255, 255, 255, 0.75);
}

.under-construction {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 28px;
  align-items: center;
}

.under-construction__copy h1 {
  margin: 0 0 14px;
  color: #10233d;
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 0.94;
  text-transform: uppercase;
}

.under-construction__copy p {
  margin: 0 0 16px;
  color: var(--gf-muted);
  font-size: 1.04rem;
}

.under-construction__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e6edff;
  color: var(--gf-accent-dark);
  font: 700 0.82rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.under-construction__note {
  display: inline-block;
  padding: 12px 14px;
  border: 1px solid var(--gf-line);
  border-radius: 14px;
  background: var(--gf-surface-alt);
  color: #30455d;
}

.construction-art {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--gf-sea);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.1), transparent 28%),
    linear-gradient(180deg, #6f94ff 0%, var(--gf-accent-dark) 100%);
}

.construction-art::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 86px;
  background: linear-gradient(180deg, #314355, #192433);
}

.construction-art::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  top: 34px;
  height: 20px;
  background: repeating-linear-gradient(135deg, #f6c544 0 22px, #213349 22px 44px);
  box-shadow: 0 278px 0 rgba(0, 0, 0, 0.12);
}

.construction-art__crane {
  position: absolute;
  right: 16%;
  bottom: 86px;
  width: 10px;
  height: 182px;
  background: #d4dee8;
  box-shadow: 0 0 0 2px rgba(9, 19, 33, 0.15);
}

.construction-art__crane::before {
  content: "";
  position: absolute;
  left: -116px;
  top: 18px;
  width: 170px;
  height: 8px;
  background: #d4dee8;
}

.construction-art__crane::after {
  content: "";
  position: absolute;
  left: -14px;
  bottom: -18px;
  width: 38px;
  height: 18px;
  background: #9eb0c0;
}

.construction-art__hook {
  position: absolute;
  right: 25%;
  top: 96px;
  width: 2px;
  height: 78px;
  background: #d4dee8;
}

.construction-art__hook::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 18px;
  height: 18px;
  border: 3px solid #f6c544;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 0 0 14px 0;
  transform: translateX(-50%) rotate(18deg);
}

.construction-art__helmet {
  position: absolute;
  left: 16%;
  bottom: 96px;
  width: 110px;
  height: 64px;
  border-radius: 110px 110px 28px 28px;
  background: linear-gradient(180deg, #ffd45b, #e8a91d);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.construction-art__helmet::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}

.construction-art__tools {
  position: absolute;
  left: 42%;
  bottom: 94px;
  width: 96px;
  height: 96px;
  transform: rotate(-10deg);
}

.construction-art__tools::before,
.construction-art__tools::after {
  content: "";
  position: absolute;
  background: #dbe5ef;
  border-radius: 10px;
}

.construction-art__tools::before {
  left: 40px;
  top: 0;
  width: 14px;
  height: 96px;
}

.construction-art__tools::after {
  left: 0;
  top: 42px;
  width: 96px;
  height: 14px;
}

.construction-art__sign {
  position: absolute;
  left: 14%;
  top: 118px;
  width: 168px;
  padding: 14px 12px;
  border: 4px solid #f8cf58;
  background: rgba(8, 20, 38, 0.72);
  color: #f8cf58;
  text-align: center;
  font: 700 1rem/1.2 Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer__inner {
  padding-top: 24px;
  padding-bottom: 34px;
  text-align: center;
  font-size: 0.95rem;
}

table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.site-footer p {
  margin: 0 0 8px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 920px) {
  .section-grid,
  .under-construction {
    grid-template-columns: 1fr;
  }

  .site-header__inner,
  .site-main__inner,
  .site-footer__inner {
    padding-left: 15px;
    padding-right: 15px;
  }

  .primary-nav {
    display: none;
    width: 100%;
    margin: 8px 0 0;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav a {
    border-radius: 12px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-header__inner {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .content-card,
  .sidebar-card {
    padding: 22px 18px;
  }
}
