/*
  Civitas – Stili personalizzati
  Estende il tema TemplateMo Tiya Golf Club (Bootstrap 5)
*/

/* -----------------------------------------------
   1. BRAND & NAVBAR
----------------------------------------------- */
.navbar-brand.civitas-brand {
  max-width: 220px;
}

/* -----------------------------------------------
   2. HERO – SFONDI GRADIENTE
----------------------------------------------- */
.civitas-hero {
  background-image: linear-gradient(160deg, #1a2537 0%, #0e4c76 55%, #1e3a2a 100%);
}

.civitas-hero-page {
  background-image: linear-gradient(135deg, #272b42 0%, #0e4c76 100%);
}

/* -----------------------------------------------
   3. SECTION LABEL
----------------------------------------------- */
.section-label {
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 14px;
  display: block;
}

/* -----------------------------------------------
  3b. QUOTE (CITAZIONE)
----------------------------------------------- */
.civitas-quote{
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 46px;
  border-left: 3px solid rgba(129, 178, 154, 0.55);
  background: rgba(244, 241, 222, 0.55);
  border-radius: 14px;
}

.civitas-quote::before{
  content: "“";
  position: absolute;
  left: 14px;
  top: 4px;
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  color: rgba(14, 76, 118, 0.28);
  pointer-events: none;
}

.civitas-quote p{
  font-style: italic;
  color: rgba(0,0,0,0.72);
}

.civitas-quote p::after{
  content: "”";
  margin-left: 6px;
  color: rgba(14, 76, 118, 0.28);
}

/* -----------------------------------------------
   4. FEATURE CARDS
----------------------------------------------- */
.civitas-feature-card {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 35px 30px;
  box-shadow: 0 2px 20px rgba(61, 64, 91, 0.07);
  border: 1px solid rgba(61, 64, 91, 0.07);
  transition: all 0.3s;
  height: 100%;
}

.civitas-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(61, 64, 91, 0.14);
}

.civitas-feature-icon {
  width: 56px;
  height: 56px;
  background: var(--section-bg-color);
  border-radius: var(--border-radius-small);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: var(--secondary-color);
  flex-shrink: 0;
}

/* -----------------------------------------------
   5. STEP FLOW
----------------------------------------------- */
.civitas-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.civitas-step:last-child {
  margin-bottom: 0;
}

.civitas-step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--secondary-color);
  color: var(--white-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.civitas-step-number.step-primary {
  background: var(--primary-color);
}

.civitas-step-content h5 {
  margin-bottom: 6px;
  color: var(--dark-color);
}

/* Step su sfondo scuro */
.civitas-step-dark .civitas-step-number {
  background: var(--primary-color);
}

.civitas-step-dark h5,
.civitas-step-dark p {
  color: rgba(255, 255, 255, 0.9);
}

.civitas-step-dark h5 {
  color: var(--white-color);
}

/* -----------------------------------------------
   6. PRICING CARDS
----------------------------------------------- */
.pricing-card {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 42px 36px;
  border: 2px solid rgba(61, 64, 91, 0.1);
  transition: all 0.3s;
  height: 100%;
  position: relative;
}

.pricing-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 10px 36px rgba(61, 64, 91, 0.13);
  transform: translateY(-4px);
}

.pricing-card.featured {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.pricing-card.featured:hover {
  border-color: var(--primary-color);
}

.pricing-card.featured h4 {
  color: var(--white-color);
}

.pricing-card.featured p,
.pricing-card.featured li {
  color: rgba(255, 255, 255, 0.78);
}

.pricing-badge {
  display: inline-block;
  background: var(--custom-btn-bg-color);
  color: var(--white-color);
  border-radius: var(--border-radius-large);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-price {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--secondary-color);
  margin-bottom: 4px;
}

.pricing-price sup {
  font-size: 24px;
  vertical-align: super;
  font-weight: 500;
}

.pricing-card.featured .pricing-price {
  color: var(--custom-btn-bg-color);
}

.pricing-period {
  font-size: 16px;
  font-weight: 400;
  color: var(--p-color);
  margin-bottom: 20px;
}

.pricing-card.featured .pricing-period {
  color: rgba(255, 255, 255, 0.55);
}

.pricing-feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
}

.pricing-feature-list li {
  padding: 9px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--p-font-size);
  border-bottom: 1px solid rgba(61, 64, 91, 0.08);
  color: var(--p-color);
}

.pricing-feature-list li:last-child {
  border-bottom: 0;
}

.pricing-card.featured .pricing-feature-list li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
}

.pricing-feature-list li .bi {
  color: var(--primary-color);
  font-size: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}

.pricing-card.featured .pricing-feature-list li .bi {
  color: var(--custom-btn-bg-color);
}

.strikethrough {
  position: relative;
}
.strikethrough:before {
  position: absolute;
  content: "";
  left: 0;
  top: 50%;
  right: 0;
  border-top: 2px solid #ffffff !important;
  border-color: inherit;

  -webkit-transform:rotate(-5deg);
  -moz-transform:rotate(-5deg);
  -ms-transform:rotate(-5deg);
  -o-transform:rotate(-5deg);
  transform:rotate(-5deg);
}

/* -----------------------------------------------
   7. STAT BLOCKS
----------------------------------------------- */
.civitas-stat-block {
  text-align: center;
  padding: 40px 20px;
}

.civitas-stat-number {
  font-size: 52px;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1;
  margin-bottom: 10px;
}

.civitas-stat-label {
  color: var(--p-color);
  font-size: var(--p-font-size);
}

/* -----------------------------------------------
   8. DOWNLOAD BUTTONS
----------------------------------------------- */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--secondary-color);
  border-radius: var(--border-radius-medium);
  padding: 14px 28px;
  color: var(--white-color);
  text-decoration: none;
  transition: all 0.3s;
  min-width: 190px;
}

.download-btn:hover {
  background: var(--primary-color);
  color: var(--white-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61, 64, 91, 0.2);
}

.download-btn .bi {
  font-size: 34px;
  flex-shrink: 0;
}

.download-btn-text small {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  line-height: 1;
}

.download-btn-text strong {
  font-size: 18px;
  display: block;
  line-height: 1.3;
}

/* -----------------------------------------------
   9. FAQ ACCORDION
----------------------------------------------- */
.civitas-accordion .accordion-button {
  font-size: var(--p-font-size);
  font-weight: var(--font-weight-medium);
  color: var(--secondary-color);
  background: transparent;
  padding: 18px 0;
  box-shadow: none !important;
}

.civitas-accordion .accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background: transparent;
}

.civitas-accordion .accordion-item {
  border: 0;
  border-bottom: 1px solid rgba(61, 64, 91, 0.1);
  background: transparent;
  border-radius: 0 !important;
}

.civitas-accordion .accordion-item:last-child {
  border-bottom: 0;
}

.civitas-accordion .accordion-body,
.civitas-accordion .accordion-body ul li,
.civitas-accordion .accordion-body p {
  font-size: var(--menu-font-size);
  padding: 0px 0px 5px 0px;
  color: var(--p-color);
}

/* -----------------------------------------------
   10. CONTACT FORM
----------------------------------------------- */
.civitas-contact-form {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 50px 45px;
  box-shadow: 0 4px 32px rgba(61, 64, 91, 0.1);
}

.civitas-support-card {
  background: var(--section-bg-color);
  border-radius: var(--border-radius-medium);
  padding: 40px 35px;
  height: 100%;
}

.civitas-support-card .bi {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.privacy-note {
  font-size: 13px;
  color: var(--p-color);
  padding: 14px 18px;
  background: var(--section-bg-color);
  border-radius: var(--border-radius-small);
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.privacy-note .bi {
  font-size: 16px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 1px;
}

/* -----------------------------------------------
   11. FEATURE CHECK LIST
----------------------------------------------- */
.feature-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: var(--p-font-size);
  color: var(--p-color);
}

.feature-check-list li .bi {
  color: var(--primary-color);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* -----------------------------------------------
   12. BACKEND MOCKUP (Homepage)
----------------------------------------------- */
.civitas-backend-preview {
  background: #f8f7f3;
  border: 1px solid rgba(61, 64, 91, 0.1);
}

.civitas-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* -----------------------------------------------
   13. STEP SECTION SU SFONDO SCURO
----------------------------------------------- */
.civitas-flow-block {
  background: var(--secondary-color);
  border-radius: var(--border-radius-medium);
  padding: 50px 45px;
}

.civitas-flow-block .section-label {
  color: var(--custom-btn-bg-color);
}

.civitas-flow-block h3 {
  color: var(--white-color);
}

/* -----------------------------------------------
   14. FOOTER LINKS
----------------------------------------------- */
.footer-link {
  color: var(--p-color);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--secondary-color);
}

/* -----------------------------------------------
   15. RESPONSIVE
----------------------------------------------- */
@media screen and (max-width: 991px) {
  .civitas-contact-form {
    padding: 35px 25px;
  }

  .civitas-flow-block {
    padding: 35px 25px;
  }

  .pricing-card {
    padding: 32px 26px;
  }

  .civitas-stat-number {
    font-size: 40px;
  }
}

@media screen and (max-width: 576px) {
  .civitas-contact-form {
    padding: 25px 18px;
  }

  .pricing-price {
    font-size: 40px;
  }

  .civitas-stat-number {
    font-size: 34px;
  }

  .download-btn {
    min-width: 160px;
    padding: 12px 20px;
  }
}

/* -----------------------------------------------
   16. CONTATTI (Pagina)
----------------------------------------------- */
body.page-contatti .contact-info-card {
  background: #fff;
  border: 1px solid rgba(14, 76, 118, 0.08);
  border-radius: 16px;
  padding: 28px;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}

body.page-contatti .contact-info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(14, 76, 118, 0.08);
}

body.page-contatti .contact-info-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 76, 118, 0.08);
  color: var(--primary-color);
  font-size: 22px;
  margin-bottom: 16px;
}

body.page-contatti .contact-info-card h5 {
  color: var(--secondary-color);
  margin-bottom: 6px;
}

body.page-contatti .contact-info-card a {
  word-break: break-all;
}

body.page-contatti .civitas-tabs .nav-pills {
  gap: 10px;
  background: var(--section-bg-color);
  padding: 6px;
  border-radius: 14px;
  display: inline-flex;
}

body.page-contatti .civitas-tabs .nav-pills .nav-link {
  color: var(--secondary-color);
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 18px;
}

body.page-contatti .civitas-tabs .nav-pills .nav-link.active {
  background: var(--primary-color);
  color: #fff;
}

body.page-contatti .form-card {
  background: #fff;
  border: 1px solid rgba(14, 76, 118, 0.08);
  border-radius: 18px;
  padding: 32px;
}

body.page-contatti .form-floating > .form-control.is-invalid,
body.page-contatti .form-control.is-invalid,
body.page-contatti .form-select.is-invalid {
  border-color: #d04545;
}

body.page-contatti .field-error {
  display: block;
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
}

body.page-contatti .honey-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Override: su questa pagina la privacy-note è una label “leggera”, non un box */
body.page-contatti .privacy-note {
  font-size: 13px;
  color: var(--p-color);
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin-top: 0;
  display: inline;
  align-items: initial;
  gap: 0;
}

body.page-contatti .response-time-card {
  background: linear-gradient(135deg, var(--primary-color), #0a3d62);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
}

body.page-contatti .response-time-card h4 {
  color: #fff;
}

body.page-contatti .response-time-card .opacity-90 {
  opacity: 0.9;
}

body.page-contatti .autocomplete-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid rgba(14, 76, 118, 0.14);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(14, 76, 118, 0.10);
  overflow: hidden;
  display: none;
}

body.page-contatti .autocomplete-menu .list-group-item {
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
}

body.page-contatti .autocomplete-menu .list-group-item:hover,
body.page-contatti .autocomplete-menu .list-group-item:focus {
  background: rgba(14, 76, 118, 0.06);
}

body.page-contatti .autocomplete-hint {
  font-size: 12px;
  color: var(--p-color);
  margin-top: 6px;
}

@media (max-width: 575.98px) {
  body.page-contatti .form-card {
    padding: 22px;
  }
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  background: #0e4c76;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 16px;
    width: min(460px, calc(100vw - 32px));
  }
}

.cookie-banner__content {
  padding: 16px;
}

.cookie-banner__title {
  color: #fff;
}

.cookie-banner__text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.cookie-banner__policy-link {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.cookie-banner__policy-link:hover,
.cookie-banner__policy-link:focus {
  color: #fc6414 !important;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  padding: 16px;
}

.cookie-panel.is-open {
  display: flex;
}

.cookie-panel__dialog {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.cookie-panel__item {
  padding: 8px 0;
}

.cookie-panel__item label {
  margin: 0;
  color: var(--p-color);
}

.cookie-panel__help {
  font-size: 13px;
  color: #6c757d;
  margin-left: 23px;
}

.cookie-panel__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* -----------------------------------------------
   ANIMAZIONI - SCROLL REVEAL & MICRO INTERAZIONI
----------------------------------------------- */

/* Elementi nascosti fino all'ingresso nel viewport. La classe viene aggiunta
   dal JS (civitas-animations.js) e funziona insieme alle classi animate.css. */
.civitas-reveal {
  opacity: 0;
  will-change: opacity, transform;
}

.civitas-reveal.civitas-reveal--visible {
  opacity: 1;
}

/* Durata leggermente piu contenuta della default (1s) per un effetto sobrio. */
.civitas-reveal.animate__animated {
  --animate-duration: 0.8s;
  animation-duration: 0.8s;
}

/* Micro-interazione: bottoni principali con piccolo lift al hover. */
.custom-btn {
  transition: all 0.25s ease;
}

.custom-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 64, 91, 0.18);
}

/* Step della sezione "Come funziona": cerchio numero che fa una piccola scala
   quando l'utente passa sopra l'intero step. */
.civitas-step {
  transition: transform 0.25s ease;
}

.civitas-step:hover {
  transform: translateX(4px);
}

.civitas-step:hover .civitas-step-number {
  transform: scale(1.08);
  transition: transform 0.25s ease;
}

.civitas-step-number {
  transition: transform 0.25s ease;
}

/* Icona della feature card che si anima quando si passa sopra la card. */
.civitas-feature-icon {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.civitas-feature-card:hover .civitas-feature-icon {
  transform: scale(1.1) rotate(-4deg);
  background: var(--primary-color);
  color: var(--white-color);
}

/* Pulsante download mantiene il suo lift, aggiungiamo solo l'effetto icona. */
.download-btn .bi {
  transition: transform 0.3s ease;
}

.download-btn:hover .bi {
  transform: scale(1.12);
}

/* Rispetto delle preferenze di accessibilita: se l'utente ha chiesto di
   ridurre le animazioni, disattiviamo animazioni di entrata e micro-effetti. */
@media (prefers-reduced-motion: reduce) {
  .civitas-reveal {
    opacity: 1 !important;
  }

  .animate__animated {
    animation: none !important;
    transition: none !important;
  }

  .civitas-step:hover,
  .civitas-step:hover .civitas-step-number,
  .civitas-feature-card:hover .civitas-feature-icon,
  .custom-btn:hover,
  .download-btn:hover .bi {
    transform: none !important;
  }
}
