/*
Theme Name: SOS Legno Child
Theme URI: https://wonder-web.it/wp-theme
Author: Simone
Author URI: https://wonder-web.it/
Description: Child theme per ricostruzione del sito SOS LEGNO.
Template: wonderblank
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: soslegno-child
*/

:root {
  --accent-color: #9bcb4e;
  --accent2-color: #7ba83a;
  --accent3-color: #f4a261;
  --accent4-color: #e76f51;
  --primary-color: #0b3a5b;
  --dark-text-color: #1a1a1a;
  --gray-text-color: #6b7280;
  --button-padding-x: 32px;
  --button-padding-y: 14px;
  --font-family-body: "Inter", sans-serif;
  --light-text-color: #ffffff;
  --dark-border-color: #4b5563;
  --light-border-color: #d1d5db;
  --font-family-heading: "Outfit", sans-serif;
  --button-rounded-radius: 8px;
  --dark-background-color: #0b3a5b;
  --light-background-color: #e8f1f7;
  --medium-background-color: #d6e5ef;
  --primary-button-text-color: #ffffff;
  --secondary-button-bg-color: #9bcb4e;
  --secondary-button-text-color: #0b3a5b;
  --primary-button-hover-bg-color: #094263;
  --primary-button-hover-text-color: #ffffff;
  --secondary-button-hover-bg-color: #8ab843;
  --secondary-button-hover-text-color: #0b3a5b;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-body);
  color: var(--dark-text-color);
  background: #fff;
}

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

a {
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.h-32 {
  height: 6rem !important;
}

#global-header {
  min-height: 0;
}

.site-header-inner {
  height: 4.4rem;
}

.site-logo {
  width: auto;
  height: 3rem;
  object-fit: contain;
}

.icon-svg {
  width: 1.45rem;
  height: 1.45rem;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-submit {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: -0.15em;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

section[id] {
  scroll-margin-top: 8.5rem;
}

[data-landingsite-mobile-menu].is-open {
  display: block !important;
}

.mobile-accordion.is-open > div {
  display: block !important;
}

.mobile-accordion.is-open button i {
  transform: rotate(180deg);
}

.site-page-shell {
  padding: 5rem 0;
  background: #fff;
}

.site-page-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(11, 58, 91, 0.08);
  padding: 2rem;
}

.site-page-title {
  font-family: var(--font-family-heading);
  color: var(--primary-color);
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.site-page-content {
  color: var(--gray-text-color);
  line-height: 1.75;
}

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

.site-page-content > :last-child {
  margin-bottom: 0;
}

.site-footer {
  background: #f4f8fc;
  border-top: 1px solid #dbe6ef;
}

.site-footer-inner {
  padding: 1.5rem 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.gallery-shell {
  padding: 5rem 0 6rem;
  background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 26%, #ffffff 100%);
}

.gallery-hero {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(155, 203, 78, 0.15);
  color: #7ba83a;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.gallery-title {
  margin: 0;
  font-family: var(--font-family-heading);
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--primary-color);
}

.gallery-intro {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: var(--gray-text-color);
  font-size: 1.05rem;
  line-height: 1.7;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  position: relative;
  grid-column: span 4;
  border: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  padding: 0;
  background: #e8f1f7;
  box-shadow: 0 14px 30px rgba(11, 58, 91, 0.08);
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.04);
}

.gallery-card:focus-visible {
  outline: 3px solid rgba(155, 203, 78, 0.8);
  outline-offset: 3px;
}

.gallery-empty {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #dbe6ef;
  color: var(--gray-text-color);
  line-height: 1.7;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.gallery-lightbox.hidden {
  display: none;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 58, 91, 0.82);
  backdrop-filter: blur(2px);
}

.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 90vh;
  margin: 0;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.gallery-lightbox-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(74vh, 850px);
  object-fit: contain;
  background: #111827;
}

.gallery-lightbox-caption {
  padding: 1rem 1.15rem 1.15rem;
  color: #334155;
  background: #fff;
  font-size: 0.98rem;
  line-height: 1.6;
}

.gallery-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0b3a5b;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

@media (max-width: 767px) {
  .site-header-inner {
    height: 4rem;
  }

  .site-logo {
    height: 2.65rem;
  }

  #hero {
    min-height: calc(100vh - 132px);
  }

  .site-page-shell {
    padding: 3.5rem 0;
  }

  .site-page-card {
    padding: 1.4rem;
  }

  .gallery-shell {
    padding: 3.5rem 0 4.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
