/*
Theme Name: Foto Cine Gori 2025
Theme URI: https://www.cmsstudio.it
Author: CMS Studio team
Author URI: https://www.cmsstudio.it/
Description: Tema WordPress per il sito Foto Cine Gori (versione 2025).
Version: 5.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.0
Tags: business, photography, bootstrap, responsive
Text Domain: fcg2025
*/

/* ===============================
   Variabili & Reset di base
================================== */
:root {
  --color-1: #f6f6f4; /* Background principale chiaro */
  --color-2: #e4e3dd; /* Sezioni alternate / grigio-beige */
  --color-3: #bfbfaa; /* Grigio-verde neutro per box, card */
  --color-4: #a29b92; /* Testo secondario / bordi soft */
  --color-5: #1d252c; /* Testo principale scuro */
  --color-6: #a67232; /* Accento moderno (rame/bronzo) */

  --color-1-rgb: 246, 246, 244; /* #f6f6f4 */
  --color-2-rgb: 228, 227, 221; /* #e4e3dd */
  --color-3-rgb: 191, 191, 170; /* #bfbfaa */
  --color-4-rgb: 162, 155, 146; /* #a29b92 */
  --color-5-rgb: 29, 37, 44; /* #1d252c */
  --color-6-rgb: 166, 114, 50; /* #a67232 */

  --def-transition-duration: 0.3s;

  --font-titolo: "Playfair Display", serif;
  --font-paragrafo: "Raleway", sans-serif;
  --font-subheading: "Montserrat", sans-serif;

  --bs-tertiary-bg: var(--color-3);
  --bs-dark: var(--color-5);
  --bs-border-width: 0;
  --bs-border-radius: 0;
}

/* Scroll smooth, rispettando reduced motion */
html:focus-within {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===============================
   Utilities di colore / sfondo
================================== */
/* Background utilities – NON imposto --bs-bg-opacity qui */
.bg-color-1 {
  background-color: rgba(
    var(--color-1-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}
.bg-color-2 {
  background-color: rgba(
    var(--color-2-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}
.bg-body-stone {
  background-color: rgba(
    var(--color-3-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}
.bg-body-stone-light {
  background-color: rgba(
    var(--color-4-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}
.bg-color-5 {
  background-color: rgba(
    var(--color-5-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}
.bg-color-6 {
  background-color: rgba(
    var(--color-6-rgb),
    var(--bs-bg-opacity, 1)
  ) !important;
}

.bg-body-img {
  background: #faf8f2
    url(https://www.fotocinegori.it/wp-content/uploads/2024/04/bg-pattern.png)
    repeat top;
  background-size: cover;
}

/* Override Bootstrap text utilities con la palette tema */
.text-primary {
  color: var(--color-6) !important; /* accento rame/bronzo */
}

.text-dark {
  color: var(--color-5) !important; /* testo principale scuro */
}

.text-secondary {
  color: var(--color-4) !important; /* testo secondario soft */
}
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--color-6);
  --bs-btn-border-color: var(--color-6);

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: color-mix(in srgb, var(--color-6) 85%, black);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--color-6) 75%, black);

  --bs-btn-focus-shadow-rgb: var(--color-6-rgb);

  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: color-mix(in srgb, var(--color-6) 70%, black);
  --bs-btn-active-border-color: color-mix(in srgb, var(--color-6) 60%, black);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);

  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--color-6);
  --bs-btn-disabled-border-color: var(--color-6);
  color: var(--bs-btn-color) !important;
}

/* ===============================
   Body & Tipografia
================================== */
body {
  background-color: #fff;
  color: var(--bs-dark);
  font-display: fallback;
  font-family: var(--font-paragrafo);
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 300;
  min-height: 100vh;
  width: 100vw;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}
em {
  font-style: italic;
}
strong {
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-titolo);
  line-height: 1.5em;
  color: var(--bs-dark);
  padding-bottom: 10px;
}
h1::after,
h2::after {
  content: "";
  width: 60px;
  height: 3px;
  margin: 10px auto;
  display: block;
  background: var(--color-2);
  line-height: 1.1;
}

ul {
  list-style-type: disc;
}
a:not([class]) {
  text-decoration-skip-ink: auto;
}
a,
a:visited {
  color: var(--color-6);
  text-decoration: none;
  transition: all 0.1s ease-in-out;
}
a:hover {
  color: var(--color-4);
  text-decoration: none;
  transition: all 0.1s ease-out;
}
.color-6 {
  color: var(--color-6);
}

.storie__title {
  font-family: var(--font-titolo);
  font-size: 1.4rem;
  line-height: 1em;
  font-weight: 400;
}
.storie__text-area {
  display: block;
  text-align: center;
  margin: 1.25rem 0 1.75rem;
}
.title::after {
  content: "";
  width: 60px;
  height: 3px;
  margin: 10px auto;
  display: block;
  background: var(--color-5);
}
.sottotitolo {
  font-family: var(--font-subheading);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--color-6);
  font-weight: 400;
  text-transform: uppercase;
}
.page-numbers {
  font-family: var(--font-subheading);
  font-size: 1.2rem;
  letter-spacing: 0.2rem;
  word-spacing: 0.2rem;
  line-height: 1em;
  font-weight: 400;
}

/* Blockquote */
.blockquote {
  position: relative;
  font-size: 1.25rem;
  padding: 1rem 2rem;
  font-style: italic;
}
.fst-italic {
  font-style: italic !important;
}

/* ===============================
   Grid helpers (bordi colonne)
================================== */
@media (min-width: 992px) {
  .col-md-border:not(:last-child) {
    border-right: 1px solid #d7d7d7;
  }
  .col-md-border + .col-md-border {
    border-left: 1px solid #d7d7d7;
    margin-left: -1px;
  }
}
/* ===============================
   NAVBAR / MENU
================================== */

/* Reset immagini brand + proporzioni affidabili (iOS safe) */
#mainNav .navbar-brand img {
  display: block;
  width: auto;
  max-width: 100%;
}
/* Logo di base */
.brand-logo {
  height: 28px; /* altezza predefinita (mobile) */
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Desktop */
@media (min-width: 992px) {
  .brand-logo {
    height: 40px; /* più grande su desktop */
  }
}

/* Schermi grandi (opzionale) */
@media (min-width: 1200px) {
  .brand-logo {
    height: 56px;
  }
}
/* Link principali */
.nav-link,
.nav-link:visited {
  --bs-nav-link-color: var(--color-5);
  font-family: var(--font-titolo);
  font-weight: 400;
  line-height: 2em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bs-nav-link-color);
  text-decoration: none;
}
.nav-link:focus,
.nav-link:hover {
  --bs-nav-link-hover-color: var(--color-6);
  color: var(--bs-nav-link-hover-color);
  text-decoration: none;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
  border-bottom: 2px solid var(--color-6);
}
/* Hover underline SOLO su desktop (evita offcanvas) */
@media (min-width: 1200px) {
  #mainNav .nav-item::after {
    content: "";
    display: block;
    height: 1px;
    background: #bdbdbd;
    transform: scaleX(0);
    transition: transform 0.3s;
  }
  #mainNav .nav-item:hover::after {
    transform: scaleX(1);
  }
}

/* Offcanvas mobile: niente underline */
#mainOffcanvas .nav-item::after {
  display: none !important;
}

/* Dropdown desktop: animazione + apertura su hover/focus (opzionale) */
@media (min-width: 1200px) {
  #mainNav .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    margin-top: 0;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    background: #faf8f8;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  /* Apri su HOVER e anche con la TASTIERA */
  #mainNav .dropdown:hover > .dropdown-menu,
  #mainNav .dropdown:focus-within > .dropdown-menu,
  #mainNav .nav-item.show > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: fadeIn 0.4s ease forwards;
  }
  #mainNav .dropdown-menu::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 30px;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: transparent;
    border-bottom-color: #bdbdbd;
    transform: translateY(1px);
  }
}

/* Voci dropdown (estetica) */
.dropdown-item,
.dropdown-item:visited {
  color: #000;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  line-height: 2em;
  text-transform: uppercase;
  font-weight: 400;
  text-decoration: none;
}
.dropdown-item:focus,
.dropdown-item:hover {
  background-color: #fefefe;
  text-decoration: none;
}

/* Animazione usata sopra (se la tieni) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Motion reduce (tienilo) */
@media (prefers-reduced-motion: reduce) {
  #mainNav .dropdown-menu {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Switch lingua */
#lang ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
#lang ul li {
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
}
#lang ul li.current {
  font-weight: 700;
}
#lang ul li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}
#lang ul li a:hover {
  color: var(--color-6);
} /* ===============================
   Cards
================================== */
.card:hover {
  transition: box-shadow 0.3s ease;
  box-shadow: 1px 0 6px 0 #777;
}
/* ===============================
   Scroll to top button
================================== */
#scrollToTopBtn {
  position: fixed;
  right: 1rem;
  bottom: 70px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--color-2);
  color: var(--color-6);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2140;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
#scrollToTopBtn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
#scrollToTopBtn:hover {
  background: var(--color-3);
  transform: translateY(-3px) scale(1.05);
}
#scrollToTopBtn:active {
  transform: translateY(0) scale(0.95);
}
#scrollToTopBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6),
    0 0 0 6px rgba(165, 111, 31, 0.5), 0 6px 18px rgba(0, 0, 0, 0.2);
}
@media (prefers-reduced-motion: reduce) {
  #scrollToTopBtn {
    transition: opacity 0.01ms linear;
    transform: none;
  }
  #scrollToTopBtn:hover,
  #scrollToTopBtn:active {
    transform: none;
  }
}
@media (max-width: 768px) {
  #scrollToTopBtn {
    display: none !important;
  }
}
@media (forced-colors: active) {
  #scrollToTopBtn {
    forced-color-adjust: none;
    background: ButtonFace;
    color: ButtonText;
    outline: 1px solid ButtonText;
    box-shadow: none;
  }
}
/* ===============================
   Divider “spacer” verticale
================================== */
.spacer--wrapper {
  --spacer-h: 45px; /* altezza default */
  width: 20px;
  height: var(--spacer-h);
  margin-inline: auto; /* equivale a mx-auto in BS */
  position: relative;
  background: transparent;
}

@media (min-width: 1024px) {
  .spacer--wrapper {
    --spacer-h: 90px;
  }
}

/* Diamantini */
.spacer--wrapper::before,
.spacer--wrapper::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translateX(-50%) rotate(45deg);
  background-color: var(--color-6);
}
.spacer--wrapper::before {
  top: 0;
}
.spacer--wrapper::after {
  bottom: 0;
  opacity: 0;
  transition: opacity 0.5s 1s;
}
.spacer--wrapper.visible::after {
  opacity: 1;
}

/* Linea centrale */
.spacer {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 0; /* parte da 0 */
  transform: translateX(-50%);
  background-color: var(--color-6);
  transition: height 0.5s ease-in-out 0.5s;
}

/* Altezza finale */
.spacer.spacer-height:not(.long) {
  height: var(--spacer-h);
}
