/*
Theme Name: PBI Custom
Theme URI: https://photoboothitalia.com
Author: Photobooth Italia
Author URI: https://photoboothitalia.com
Description: Tema custom CSS-first per Photobooth Italia. Nessun page builder. Nav: Home | Privati | Corporate | Catalogo | Chi siamo + CTA Preventivo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: pbi-custom
Tags: custom, photobooth, italia
*/

/* ============================================================
   CUSTOM PROPERTIES — PALETTE & TYPOGRAPHY
   ============================================================ */
:root {
  /* Brand colors */
  --color-navy:       #22577A;
  --color-navy-dark:  #1a4260;
  --color-teal:       #38A3A5;
  --color-teal-light: #57C4C6;
  --color-white:      #ffffff;
  --color-off-white:  #f7f9fc;
  --color-light-gray: #e8edf2;
  --color-mid-gray:   #6b7a8d;
  --color-dark:       #1a2332;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:   1.125rem;  /* 18px */
  --fs-lg:   1.375rem;  /* 22px */
  --fs-xl:   1.75rem;   /* 28px */
  --fs-2xl:  2.25rem;   /* 36px */
  --fs-3xl:  3rem;      /* 48px */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;

  --line-height-tight:  1.2;
  --line-height-normal: 1.6;
  --line-height-loose:  1.8;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --max-width:        1200px;
  --max-width-text:   760px;
  --header-height:    72px;
  --border-radius:    8px;
  --border-radius-lg: 16px;
  --transition:       200ms ease;
  --shadow-sm:        0 1px 3px rgba(0,0,0,.08);
  --shadow-md:        0 4px 16px rgba(34,87,122,.12);
  --shadow-lg:        0 8px 32px rgba(34,87,122,.18);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--line-height-normal);
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-teal);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--line-height-tight);
  color: var(--color-navy);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.container--narrow {
  max-width: var(--max-width-text);
}

.section {
  padding-block: var(--sp-16);
}

.section--sm {
  padding-block: var(--sp-10);
}

.section--lg {
  padding-block: var(--sp-24);
}

.grid {
  display: grid;
  gap: var(--sp-6);
}

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

.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--gap { gap: var(--sp-4); }

.text-center { text-align: center; }
.text-left { text-align: left; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.btn--primary:hover {
  background: var(--color-teal-light);
  border-color: var(--color-teal-light);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn--outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--outline-white:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-base);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-light-gray);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-teal);
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__menu a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.site-nav__menu a:hover,
.site-nav__menu li.current-menu-item > a,
.site-nav__menu li.current_page_item > a {
  color: var(--color-navy);
  background: var(--color-off-white);
}

.site-nav__cta {
  margin-left: var(--sp-4);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   HERO / BANDA PREVENTIVO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, #2d6a8f 50%, var(--color-teal) 100%);
  color: var(--color-white);
  padding-block: var(--sp-24) var(--sp-20);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="30" fill="rgba(255,255,255,0.03)"/></svg>') no-repeat center/cover;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
  margin-bottom: var(--sp-5);
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--sp-5);
}

.hero__title em {
  font-style: normal;
  color: var(--color-teal-light);
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.85);
  line-height: var(--line-height-loose);
  margin-bottom: var(--sp-8);
  max-width: 560px;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

/* Banda preventivo — sticky strip above hero or standalone */
.banda-preventivo {
  background: var(--color-teal);
  color: var(--color-white);
  padding-block: var(--sp-3);
}

.banda-preventivo .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.banda-preventivo__text {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.banda-preventivo .btn {
  background: var(--color-white);
  color: var(--color-teal);
  border-color: var(--color-white);
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-4);
}

.banda-preventivo .btn:hover {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.site-main {
  min-height: 60vh;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-light-gray);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.card:hover .card__image img {
  transform: scale(1.03);
}

.card__body {
  padding: var(--sp-6);
}

.card__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-teal);
  margin-bottom: var(--sp-2);
}

.card__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

.card__excerpt {
  color: var(--color-mid-gray);
  font-size: var(--fs-sm);
  line-height: var(--line-height-loose);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-header__label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--sp-3);
}

.section-header__title {
  font-size: var(--fs-2xl);
  color: var(--color-navy);
  margin-bottom: var(--sp-4);
}

.section-header__text {
  font-size: var(--fs-md);
  color: var(--color-mid-gray);
  max-width: 600px;
  margin-inline: auto;
  line-height: var(--line-height-loose);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.8);
  padding-block: var(--sp-16) var(--sp-6);
}

.site-footer a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--color-teal-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-10);
}

.footer-brand__logo {
  margin-bottom: var(--sp-4);
}

.footer-brand__tagline {
  font-size: var(--fs-sm);
  line-height: var(--line-height-loose);
  color: rgba(255,255,255,0.65);
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
}

.footer-col__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-col__links a {
  font-size: var(--fs-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5);
}

.footer-bottom__legal {
  display: flex;
  gap: var(--sp-4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-light-gray);
    box-shadow: var(--shadow-md);
    padding: var(--sp-4) var(--sp-6);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    z-index: 99;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .site-nav__menu a {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-base);
    border-radius: var(--border-radius);
    width: 100%;
  }

  .site-nav__cta {
    margin-left: 0;
    margin-top: var(--sp-3);
    width: 100%;
  }

  .site-nav__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .banda-preventivo .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: var(--sp-4);
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__cta-group .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--fs-xs);
  color: var(--color-mid-gray);
  text-align: center;
  margin-top: var(--sp-2);
}

.alignleft  { float: left;  margin: 0 var(--sp-4) var(--sp-4) 0; }
.alignright { float: right; margin: 0 0 var(--sp-4) var(--sp-4); }
.aligncenter { display: block; margin-inline: auto; margin-bottom: var(--sp-4); }
.alignwide { max-width: 1400px; margin-inline: auto; }
.alignfull { max-width: 100%; }

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

/* Skip to content */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--sp-2) var(--sp-4);
  z-index: 9999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}
