/* =====================================================================
   VVN Audit Fixes — Blocchi CSS correttivi dall'audit UX
   ===================================================================== */

/* ── 1. News archive: dark theme cards ── */
.vvn-newsarchive .vvn-news-card {
  background: #0e1a2e;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s;
}
.vvn-newsarchive .vvn-news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(0,0,0,.4), 0 0 0 1px rgba(63,142,205,.45);
}
.vvn-newsarchive .vvn-news-card__body {
  background: #0e1a2e;
  padding: clamp(1rem, 2vw, 1.4rem);
}
.vvn-newsarchive .vvn-news-card__title {
  color: #fff;
}
.vvn-newsarchive .vvn-news-card__date {
  color: #5a6b76;
}
.vvn-newsarchive .vvn-news-card__excerpt {
  color: #7a8fa0;
}
.vvn-newsarchive .vvn-news-card__more {
  color: #3f8ecd;
}
.vvn-newsarchive .vvn-news-card__cat {
  background: rgba(63, 142, 205, .2);
  color: #bdeaff;
}

/* ── 2. WPForms: dark theme contact form ── */
.elementor-element-d7915b1 {
  background: linear-gradient(160deg, #1d2f4d 0%, #16233b 100%) !important;
  position: relative;
}
.elementor-element-d7915b1::before {
  content: ""; position: absolute; inset: 0;
  background: url('../img/vvn-pattern.svg') repeat;
  opacity: .1;
  pointer-events: none;
}
.elementor-element-d7915b1 > .elementor-container {
  position: relative;
  z-index: 1;
}
.elementor-28 .wpforms-form .wpforms-field-label,
.page-id-28 .wpforms-form .wpforms-field-label {
  color: #c8d6e5 !important;
}
.elementor-28 .wpforms-form input[type="text"],
.elementor-28 .wpforms-form input[type="email"],
.elementor-28 .wpforms-form input[type="tel"],
.elementor-28 .wpforms-form input[type="url"],
.elementor-28 .wpforms-form input[type="number"],
.elementor-28 .wpforms-form textarea,
.elementor-28 .wpforms-form select,
.page-id-28 .wpforms-form input[type="text"],
.page-id-28 .wpforms-form input[type="email"],
.page-id-28 .wpforms-form input[type="tel"],
.page-id-28 .wpforms-form input[type="url"],
.page-id-28 .wpforms-form input[type="number"],
.page-id-28 .wpforms-form textarea,
.page-id-28 .wpforms-form select {
  background: rgba(255, 255, 255, .06) !important;
  border-color: rgba(255, 255, 255, .12) !important;
  color: #e2eaf2 !important;
}
.elementor-28 .wpforms-form input::placeholder,
.elementor-28 .wpforms-form textarea::placeholder,
.page-id-28 .wpforms-form input::placeholder,
.page-id-28 .wpforms-form textarea::placeholder {
  color: #5a6b76 !important;
}
.elementor-28 .wpforms-form input:focus,
.elementor-28 .wpforms-form textarea:focus,
.elementor-28 .wpforms-form select:focus,
.page-id-28 .wpforms-form input:focus,
.page-id-28 .wpforms-form textarea:focus,
.page-id-28 .wpforms-form select:focus {
  border-color: var(--vvn-blue) !important;
  box-shadow: inset 0 0 0 1px var(--vvn-blue) !important;
  background: rgba(255, 255, 255, .08) !important;
}
.elementor-28 .wpforms-form .wpforms-submit,
.page-id-28 .wpforms-form .wpforms-submit {
  background: var(--vvn-blue) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: .9rem 2.4rem !important;
  font-family: var(--vvn-font-body) !important;
  font-weight: 700 !important;
  font-size: .95rem !important;
  letter-spacing: .03em !important;
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.elementor-28 .wpforms-form .wpforms-submit:hover,
.page-id-28 .wpforms-form .wpforms-submit:hover {
  background: var(--vvn-blue-dark) !important;
  transform: translateY(-2px);
}

/* ── 3. Cookie banner: compact on mobile ── */
@media (max-width: 680px) {
  .cookie-notice-container,
  .cn-body #cookie-notice .cookie-notice-container {
    padding: 10px 14px !important;
    font-size: .78rem !important;
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center !important;
  }
  .cookie-notice-container .cn-text-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  .cookie-notice-container .cn-buttons-container {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
  }
  .cookie-notice-container .cn-buttons-container a,
  .cookie-notice-container .cn-buttons-container button {
    padding: 6px 16px !important;
    font-size: .75rem !important;
    min-width: auto !important;
  }
}

/* ── 4. Classifica: mobile simplified view ── */
@media (max-width: 680px) {
  .vvn-classifica-wrap {
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
  }
  .vvn-classifica-full {
    min-width: 0 !important;
    font-size: .82rem;
  }
  .vvn-classifica-full th:nth-child(n+5),
  .vvn-classifica-full td:nth-child(n+5) {
    display: none;
  }
  .vvn-classifica-full th:nth-child(1),
  .vvn-classifica-full td:nth-child(1) {
    width: 30px;
    padding-left: 8px;
    padding-right: 4px;
  }
  .vvn-classifica-full th:nth-child(2),
  .vvn-classifica-full td:nth-child(2) {
    max-width: none;
    white-space: normal;
  }
  .vvn-classifica-full th:nth-child(3),
  .vvn-classifica-full td:nth-child(3),
  .vvn-classifica-full th:nth-child(4),
  .vvn-classifica-full td:nth-child(4) {
    width: 40px;
    text-align: center;
    padding: 8px 4px;
  }
}

/* ── 5. Menu mobile: sottovoci compresse con toggle a fisarmonica ── */
@media (max-width: 992px) {
  .site-header .site-navigation-dropdown ul.menu li ul {
    display: none !important;
  }
  .site-header .site-navigation-dropdown ul.menu li.vvn-sub-open > ul {
    display: block !important;
  }
  .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children:after {
    display: none !important;
  }
  .site-header .site-navigation-dropdown ul.menu > li.menu-item-has-children {
    display: flex !important;
    flex-wrap: wrap !important;
    position: relative;
  }
  .site-header .site-navigation-dropdown ul.menu > li.menu-item-has-children > a {
    flex: 1 !important;
    min-width: 0;
  }
  .site-header .site-navigation-dropdown ul.menu > li.menu-item-has-children > ul {
    flex-basis: 100% !important;
  }
  .vvn-submenu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 52px;
    background: rgba(255,255,255,.05) !important;
    border: none !important;
    border-left: 1px solid rgba(255,255,255,.1) !important;
    color: var(--vvn-blue-2) !important;
    font-size: .8rem;
    cursor: pointer;
    transition: transform .3s ease, background .3s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
  }
  .vvn-submenu-toggle:hover,
  .vvn-submenu-toggle:focus {
    background: rgba(255,255,255,.12) !important;
    outline: none;
  }
  .vvn-sub-open > .vvn-submenu-toggle svg {
    transform: rotate(180deg);
  }
  .vvn-submenu-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform .3s ease;
  }
}

/* ── 6. Pagine editoriali: griglie e bottoni responsive su mobile ── */
@media (max-width: 767px) {
  .vvn-scope [style*="grid-template-columns: 1fr 1fr"],
  .vvn-scope [style*="grid-template-columns:1fr 1fr"],
  .site-main [style*="grid-template-columns: 1fr 1fr"],
  .site-main [style*="grid-template-columns:1fr 1fr"],
  .elementor [style*="grid-template-columns: 1fr 1fr"],
  .elementor [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .vvn-scope iframe,
  .site-main iframe {
    min-height: 280px !important;
    width: 100% !important;
  }
  .vvn-scope [style*="clip-path: polygon"],
  .site-main [style*="clip-path: polygon"] {
    clip-path: none !important;
  }
  .vvn-pagehead {
    min-height: auto !important;
    padding: clamp(3rem, 8vw, 5rem) 0 !important;
  }
  .vvn-pagehead .vvn-display,
  .vvn-pagehead h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem) !important;
    white-space: normal !important;
  }
  .vvn-btn,
  .vvn-abbo-band__btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .vvn-abbo-band__inner {
    align-items: stretch !important;
  }
  .vvn-scope [style*="align-items: center"],
  .vvn-scope [style*="align-items:center"],
  .site-main [style*="align-items: center"],
  .site-main [style*="align-items:center"] {
    align-items: stretch !important;
  }
  .vvn-abbo-band__inner > *,
  .vvn-scope [style*="align-items: center"] > *,
  .vvn-scope [style*="align-items:center"] > *,
  .site-main [style*="align-items: center"] > *,
  .site-main [style*="align-items:center"] > * {
    text-align: center;
  }
}
