/*
    Nuovo Tema Moderno "AssiPratiko Glass"
    Design ottimizzato per UX/UI e conversioni (Preventivi)
    Versione Completa
*/

:root {
  --primary-color: #0084cc;
  --primary-hover: #005f99;
  --bg-glass: rgba(30, 30, 40, 0.65);
  --bg-glass-hover: rgba(40, 40, 55, 0.85);
  --border-glass: rgba(255, 255, 255, 0.15);
  --text-main: #ffffff;
  --text-muted: #d1d1d1;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-speed: 0.3s;
}

body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-main);
  position: relative;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h5 {
  font-weight: 400;
  letter-spacing: 0.5px;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }

#tm-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/pop-bg.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  transition: all var(--transition-speed) ease;
}

/* Sfumatura scura per garantire leggibilità sul background */
#tm-bg:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 15, 20, 0.8) 0%, rgba(15, 15, 20, 0.4) 100%);
}

#tm-wrap {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 100vh;
}

p {
  line-height: 1.8;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.tm-main-content {
  display: flex;
  align-items: center;
  padding: 50px 15px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: auto;
  padding-bottom: 80px !important; /* Spazio per non far coprire il contenuto dal footer fisso */
}

/* Colonna Info Agenzia */
.tm-site-header-col {
  display: flex;
  align-items: center;
}

.tm-copyright-text {
  background-color: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  display: inline-block;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tm-copyright-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.tm-copyright-text h5 {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Grid Navigazione (Pulsanti Quadrati) */
.content {
  max-width: 400px;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.grid__item {
  flex: 1 1 calc(50% - 20px);
  min-width: 150px;
}

.product {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product:hover {
  transform: translateY(-5px);
}

.tm-nav-link {
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 165px;
  text-align: center;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.product:hover .tm-nav-link {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 25px rgba(0, 132, 204, 0.2);
  color: #fff;
}

.tm-nav-icon {
  margin-bottom: 15px;
  color: var(--primary-color);
  transition: transform var(--transition-speed) ease;
}

.product:hover .tm-nav-icon {
  transform: scale(1.1);
}

.tm-nav-text {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.fa-3x { font-size: 2.5em; }

/* Logica Espansione Codrops */
.product__bg { width: 100%; height: 100%; top: 0px; }
.product__bg, .product__description { opacity: 0; position: absolute; }
.product__description { width: 100%; height: 100%; top: 0; left: 0; display: none; }
.details { font-size: 1rem; width: 100%; height: 100%; bottom: 0; left: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: center; pointer-events: none; padding: 15px; display: none; }
.details > * { position: relative; opacity: 0; }
.details--open { pointer-events: auto; }

/* Overlay Dettagli Espansi */
.details__bg {
  width: 100%;
  max-width: 900px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 50px;
  transform-origin: 0 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--border-glass);
}

.details__bg--down {
  background: rgba(30, 30, 42, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* Pulsante di Chiusura (X) */
.details__close {
  position: absolute !important;
  top: 25px !important;
  right: 25px !important;
  border: 0;
  background: rgba(0, 0, 0, 0.6) !important;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  z-index: 9999 !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.details__close:hover {
  background: #ff4d4d !important;
  transform: scale(1.1) rotate(90deg);
}

.details__close * {
  pointer-events: none;
}

.tm-fa-close { font-size: 20px; }

/* Immagini e Team */
.img-fluid {
  border-radius: var(--radius-md);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.tm-reverse-sm { flex-direction: row; }

/* Slick Slider */
.tm-slider-img-link { padding: 0 10px; }
.slick-dots li button:before { font-size: 16px; color: rgba(255,255,255,0.5); opacity: 1; transition: color 0.3s ease; }
.slick-dots { position: absolute; bottom: -40px; display: block; width: 100%; padding: 0; list-style: none; text-align: center; }
.slick-dots li.slick-active button:before { color: var(--primary-color); opacity: 1; }

/* Modulo di Contatto / Preventivo */
.contact-form label { font-size: 0.9rem; color: var(--text-muted); }

.form-control {
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: rgba(255,255,255,0.5);
}

.form-control:focus {
  color: white;
  background-color: rgba(0, 0, 0, 0.4);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 132, 204, 0.25);
  outline: none;
}

/* Pulsanti */
.btn {
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tm-btn-submit {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border: none;
  color: white;
}

.tm-btn-submit:hover {
  background: linear-gradient(135deg, var(--primary-hover), #004d80);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 132, 204, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #ff9900, #e68a00);
  border: none;
  color: white;
  border-radius: var(--radius-lg);
  margin-top: 20px;
  /*width: 100%;*/
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e68a00, #cc7a00);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.3);
}

/* Checkbox Privacy Custom */
.container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
  margin-right: 10px;
  vertical-align: middle;
}

/* =========================================
   FOOTER FISSATO IN BASSO
   ========================================= */
footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 15px 0;
  background: rgba(15, 15, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-glass);
  /*z-index: 100;*/
}

footer .tm-copyright-text {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.9rem;
  display: block;
}

/* Disattiva vecchi script o media query che spostavano il footer sui telefoni */
.tm-main-content.tm-footer-relative footer {
  position: fixed !important;
  bottom: 0 !important;
  margin-top: 0 !important;
}

.tm-text-highlight { color: var(--primary-color); font-weight: 600; }
.tm-text-highlight:hover { color: white; }

/* Utilities */
a { transition: all var(--transition-speed) ease; }
a:hover, a:focus { text-decoration: none; outline: none; }
p:last-child { margin-bottom: 0; }

/* Responsive Media Queries */
@media (min-width: 900px) {
  .container { max-width: 1000px; }
}

@media (max-width: 991px) {
  .tm-nav-link { height: 145px; }
}

@media (max-width: 767px) {
  .container { max-width: 100%; padding: 0 20px; }
  .content { margin-left: auto; margin-right: auto; width: 100%; max-width: 500px;}
  .grid { justify-content: center; }
  .tm-reverse-sm { flex-direction: column-reverse; }
  .tm-copyright-text { padding: 20px; margin-bottom: 30px; }
  .details__bg { padding: 30px 20px; }
}

@media (max-width: 544px) {
  .tm-main-content { flex-direction: column; padding: 20px 10px; padding-bottom: 80px !important; }
  .slick-dots li button:before { font-size: 12px; }
  .grid__item { flex: 1 1 100%; }
}