/*
Theme Name: Vivere il Piceno
Theme URI: https://www.vivereilpiceno.it
Author: Studio Vivere il Piceno
Author URI: https://www.vivereilpiceno.it
Description: Tema WordPress editoriale moderno per Vivere il Piceno (Hic Manebimus Optime), con palette verde petrolio e arancio, galleria fotografica nativa integrata, integrazione video YouTube e slot pubblicitari Google AdSense puliti e conformi.
Version: 1.6.0
Requires at least: 6.2
Tested up to: 7.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vivere-il-piceno
Tags: two-columns, custom-logo, custom-menu, featured-images, photography, blog, editor-style, wide-blocks
*/

:root {
  --vip-petrol: #0B4F5C;
  --vip-petrol-dark: #073741;
  --vip-petrol-light: #156B7C;
  --vip-orange: #E86A24;
  --vip-orange-hover: #CF5715;
  --vip-cream: #F6F8F8;
  --vip-surface: #FFFFFF;
  --vip-ink: #162428;
  --vip-muted: #546A70;
  --vip-border: #D8E2E5;
  --vip-radius: 10px;
  --vip-shadow: 0 10px 28px rgba(11, 79, 92, 0.08);
  --vip-font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --vip-font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body.vip-body {
  margin: 0;
  padding: 0;
  background-color: var(--vip-cream);
  color: var(--vip-ink);
  font-family: var(--vip-font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--vip-petrol);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--vip-orange);
}

.vip-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--vip-petrol);
  color: #fff;
  padding: 10px 16px;
  z-index: 9999;
  font-weight: 700;
}

.skip-link.screen-reader-text:focus {
  left: 12px;
  top: 12px;
}

.vip-topbar {
  background-color: var(--vip-petrol-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vip-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  gap: 16px;
  flex-wrap: wrap;
}

.vip-motto-top {
  font-family: var(--vip-font-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F4B68A;
  font-weight: 600;
}

.vip-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vip-topbar-link {
  color: #fff;
  font-weight: 500;
}

.vip-topbar-link:hover {
  color: #F4B68A;
}

.vip-header {
  background-color: var(--vip-surface);
  border-bottom: 3px solid var(--vip-petrol);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 4px 18px rgba(11, 79, 92, 0.06);
}

.vip-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  min-height: 82px;
}

.vip-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.vip-custom-logo-wrap img {
  max-height: 68px;
  width: auto;
}

.vip-brand-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border-left: 4px solid var(--vip-orange);
  background: linear-gradient(90deg, rgba(11, 79, 92, 0.06), rgba(232, 106, 36, 0.05));
  border-radius: 0 8px 8px 0;
}

.vip-brand-emblem {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--vip-petrol);
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid var(--vip-orange);
  flex-shrink: 0;
}

.vip-brand-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.vip-brand-latin {
  font-family: var(--vip-font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--vip-orange);
}

.vip-brand-title {
  font-family: var(--vip-font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--vip-petrol);
  letter-spacing: 0.01em;
}

.vip-nav-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vip-nav-list,
.vip-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vip-nav-list li a,
.vip-menu li a {
  display: inline-block;
  padding: 8px 11px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vip-petrol);
  border-radius: 6px;
  white-space: nowrap;
}

.vip-nav-list li a:hover,
.vip-nav-list li.current-menu-item > a,
.vip-menu li a:hover,
.vip-menu li.current-menu-item > a {
  background-color: var(--vip-petrol);
  color: #FFFFFF;
}

.vip-menu li.menu-item-has-children {
  position: relative;
}

.vip-menu li.menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--vip-surface);
  border: 1px solid var(--vip-border);
  border-top: 3px solid var(--vip-orange);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--vip-shadow);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  z-index: 950;
}

.vip-menu li.menu-item-has-children:hover > .sub-menu {
  display: block;
}

.vip-menu .sub-menu li a {
  display: block;
  padding: 8px 16px;
  text-transform: none;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 0;
}

.vip-menu .sub-menu li a:hover {
  background: rgba(232, 106, 36, 0.12);
  color: var(--vip-orange);
}

.vip-search-toggle {
  background: rgba(11, 79, 92, 0.07);
  color: var(--vip-petrol);
  border: 1px solid var(--vip-border);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.vip-search-toggle:hover {
  background: var(--vip-orange);
  border-color: var(--vip-orange);
  color: #fff;
}

.vip-mobile-toggle {
  display: none;
  background: var(--vip-petrol);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 8px;
}

.vip-search-drawer {
  display: none;
  background: var(--vip-cream);
  border-top: 1px solid var(--vip-border);
  padding: 14px 0;
}

.vip-search-drawer.is-open {
  display: block;
}

.vip-search-form {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
}

.vip-search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--vip-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.vip-search-form button {
  background: var(--vip-orange);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.vip-search-form button:hover {
  background: var(--vip-orange-hover);
}

.vip-ads-wrapper {
  margin: 22px 0;
}

.vip-ad-slot {
  background: #FAFBFB;
  border: 1px dashed #B9CBD0;
  border-left: 4px solid var(--vip-orange);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

.vip-ad-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vip-muted);
  margin-bottom: 6px;
}

.vip-ad-placeholder {
  background: linear-gradient(135deg, rgba(11, 79, 92, 0.05), rgba(232, 106, 36, 0.06));
  color: var(--vip-petrol);
  padding: 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.vip-hero {
  padding: 28px 0 18px;
}

.vip-hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
}

.vip-hero-main {
  position: relative;
  border-radius: var(--vip-radius);
  overflow: hidden;
  min-height: 440px;
  background: var(--vip-petrol-dark);
  box-shadow: var(--vip-shadow);
  display: flex;
  align-items: flex-end;
}

.vip-hero-main > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vip-hero-main:hover > img {
  transform: scale(1.03);
}

.vip-hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 36px 28px 28px;
  background: linear-gradient(to top, rgba(7, 55, 65, 0.94) 0%, rgba(11, 79, 92, 0.65) 58%, rgba(11, 79, 92, 0) 100%);
  color: #fff;
}

.vip-badge {
  display: inline-block;
  background: var(--vip-orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.vip-badge--petrol {
  background: var(--vip-petrol);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.vip-hero-title {
  margin: 0 0 10px;
  font-family: var(--vip-font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  line-height: 1.2;
}

.vip-hero-title a {
  color: #fff;
}

.vip-hero-title a:hover {
  color: #FFC69E;
}

.vip-hero-excerpt {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.96rem;
}

.vip-hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.vip-hero-side-card {
  position: relative;
  border-radius: var(--vip-radius);
  overflow: hidden;
  min-height: 210px;
  background: var(--vip-petrol-dark);
  box-shadow: var(--vip-shadow);
  display: flex;
  align-items: flex-end;
}

.vip-hero-side-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.vip-hero-side-card:hover > img {
  transform: scale(1.04);
}

.vip-hero-side-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(7, 55, 65, 0.93) 0%, rgba(11, 79, 92, 0.45) 70%, transparent 100%);
  color: #fff;
}

.vip-hero-side-title {
  margin: 4px 0 0;
  font-family: var(--vip-font-serif);
  font-size: 1.15rem;
  line-height: 1.28;
}

.vip-hero-side-title a {
  color: #fff;
}

.vip-hero-side-title a:hover {
  color: #FFC69E;
}

.vip-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 24px 0 48px;
  align-items: start;
}

.vip-section {
  margin-bottom: 42px;
}

.vip-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--vip-border);
  position: relative;
}

.vip-section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 84px;
  height: 3px;
  background: var(--vip-orange);
}

.vip-section-title {
  margin: 0;
  font-family: var(--vip-font-serif);
  font-size: 1.55rem;
  color: var(--vip-petrol);
}

.vip-section-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vip-orange);
}

.vip-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.vip-card {
  background: var(--vip-surface);
  border: 1px solid var(--vip-border);
  border-radius: var(--vip-radius);
  overflow: hidden;
  box-shadow: var(--vip-shadow);
  display: flex;
  flex-direction: column;
}

.vip-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #E4ECEE;
}

.vip-card-media a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.vip-card:hover .vip-card-media a img {
  transform: scale(1.04);
}

.vip-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--vip-petrol);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 4px;
}

.vip-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vip-card-meta {
  font-size: 0.8rem;
  color: var(--vip-muted);
  margin-bottom: 8px;
}

.vip-card-title {
  margin: 0 0 10px;
  font-family: var(--vip-font-serif);
  font-size: 1.22rem;
  line-height: 1.3;
}

.vip-card-title a {
  color: var(--vip-petrol);
}

.vip-card-title a:hover {
  color: var(--vip-orange);
}

.vip-card-excerpt {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--vip-muted);
  flex: 1;
}

.vip-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vip-orange);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vip-read-more:hover {
  color: var(--vip-petrol);
}

.vip-gallery-section {
  background: var(--vip-surface);
  border: 1px solid var(--vip-border);
  border-top: 4px solid var(--vip-petrol);
  border-radius: var(--vip-radius);
  padding: 24px;
  box-shadow: var(--vip-shadow);
  margin-bottom: 42px;
}

.vip-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.vip-filter-btn {
  background: var(--vip-cream);
  color: var(--vip-petrol);
  border: 1px solid var(--vip-border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.vip-filter-btn.is-active,
.vip-filter-btn:hover {
  background: var(--vip-orange);
  border-color: var(--vip-orange);
  color: #fff;
}

.vip-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.vip-gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--vip-petrol-dark);
  text-align: left;
}

.vip-gallery-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.vip-gallery-item:hover > img {
  transform: scale(1.06);
}

.vip-gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 12px 10px;
  background: linear-gradient(to top, rgba(7, 55, 65, 0.92), transparent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.vip-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 36, 43, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vip-lightbox.is-open {
  display: flex;
}

.vip-lightbox-box {
  position: relative;
  max-width: 920px;
  width: 100%;
  background: var(--vip-surface);
  border-radius: var(--vip-radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.vip-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #081E24;
  width: 100%;
  min-height: 240px;
}

.vip-lightbox-media {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 74vh;
  line-height: 0;
}

.vip-lightbox-media > #vipLightboxImg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.vip-lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--vip-petrol);
  color: #fff;
}

.vip-lightbox-close,
.vip-lightbox-nav {
  background: var(--vip-orange);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.vip-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.vip-youtube-section {
  background: linear-gradient(135deg, var(--vip-petrol) 0%, var(--vip-petrol-dark) 100%);
  color: #fff;
  border-radius: var(--vip-radius);
  padding: 26px;
  box-shadow: var(--vip-shadow);
  margin-bottom: 42px;
}

.vip-youtube-section .vip-section-head {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.vip-youtube-section .vip-section-title {
  color: #fff;
}

.vip-youtube-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.vip-video-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.vip-video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #051B20;
}

.vip-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vip-video-info {
  padding: 12px 14px;
}

.vip-video-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

.vip-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vip-widget {
  background: var(--vip-surface);
  border: 1px solid var(--vip-border);
  border-radius: var(--vip-radius);
  padding: 20px;
  box-shadow: var(--vip-shadow);
}

.vip-widget-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--vip-orange);
  font-family: var(--vip-font-serif);
  font-size: 1.15rem;
  color: var(--vip-petrol);
}

.vip-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vip-widget ul li {
  padding: 7px 0;
  border-bottom: 1px solid #EDF2F4;
  font-size: 0.92rem;
}

.vip-widget ul li:last-child {
  border-bottom: none;
}

.vip-single-article {
  background: var(--vip-surface);
  border: 1px solid var(--vip-border);
  border-radius: var(--vip-radius);
  padding: 28px;
  box-shadow: var(--vip-shadow);
}

.vip-single-title {
  margin: 8px 0 12px;
  font-family: var(--vip-font-serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--vip-petrol);
  line-height: 1.22;
}

.vip-single-thumb {
  position: relative;
  margin: 18px 0 24px;
  border-radius: 8px;
  overflow: hidden;
}

.vip-entry-content {
  font-size: 1.02rem;
  color: var(--vip-ink);
}

.vip-entry-content h2,
.vip-entry-content h3 {
  font-family: var(--vip-font-serif);
  color: var(--vip-petrol);
  margin-top: 26px;
}

.vip-entry-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--vip-orange);
  background: var(--vip-cream);
  font-style: italic;
}

.vip-footer {
  background: var(--vip-petrol-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 44px;
  border-top: 4px solid var(--vip-orange);
}

.vip-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 34px;
}

.vip-footer-title {
  margin: 0 0 14px;
  font-family: var(--vip-font-serif);
  font-size: 1.1rem;
  color: #F4B68A;
}

.vip-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vip-footer ul li {
  margin-bottom: 7px;
  font-size: 0.9rem;
}

.vip-footer a {
  color: rgba(255, 255, 255, 0.88);
}

.vip-footer a:hover {
  color: #F4B68A;
}

.vip-footer-bottom {
  background: #052830;
  padding: 16px 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
}

.vip-footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .vip-hero-grid,
  .vip-main-layout {
    grid-template-columns: 1fr;
  }
  .vip-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .vip-mobile-toggle {
    display: inline-flex;
  }
  .vip-nav-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--vip-surface);
    border-bottom: 3px solid var(--vip-orange);
    box-shadow: var(--vip-shadow);
    padding: 14px 20px 20px;
  }
  .vip-nav-collapse.is-open {
    display: block;
  }
  .vip-nav-list,
  .vip-menu {
    flex-direction: column;
    align-items: stretch;
  }
  .vip-posts-grid,
  .vip-gallery-grid,
  .vip-youtube-grid,
  .vip-footer-grid {
    grid-template-columns: 1fr;
  }
}


/* Allineamento scheda dispari in griglia a 2 colonne */
@media (min-width: 783px) {
  .vip-posts-grid > .vip-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Gallerie Fotografiche negli Articoli (Recupero automatico Photo Gallery) */
.vip-article-gallery {
  margin: 28px 0;
  padding: 22px;
  background: var(--vip-cream);
  border: 1px solid var(--vip-border);
  border-top: 4px solid var(--vip-orange);
  border-radius: var(--vip-radius);
}

.vip-article-gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vip-border);
}

.vip-article-gallery-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vip-article-gallery-heading .vip-badge {
  margin-bottom: 0;
}

.vip-article-gallery-title {
  margin: 0 !important;
  font-family: var(--vip-font-serif);
  font-size: 1.25rem;
  color: var(--vip-petrol);
}

.vip-article-gallery-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--vip-muted);
}

.vip-article-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vip-gallery-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 79, 92, 0.85);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.vip-gallery-item:hover .vip-gallery-zoom-hint {
  opacity: 1;
  transform: scale(1);
  background: var(--vip-orange);
}

.vip-gallery-video-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #051B20;
}

.vip-gallery-video-tile iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vip-lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vip-lightbox-counter {
  background: var(--vip-orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.vip-lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 782px) {
  .vip-article-gallery {
    padding: 16px;
  }
  .vip-article-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}


/* Filigrana Foto (Watermark con il Logo del Sito) */
:root {
  --vip-wm-opacity: 0.72;
  --vip-wm-scale: 18%;
}

.vip-wm-inline-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  vertical-align: middle;
}

.vip-wm-inline-wrap > img {
  display: block;
  max-width: 100%;
  height: auto;
}

.vip-wm-inline-wrap.vip-wm-aligncenter {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.vip-wm-inline-wrap.vip-wm-alignleft {
  float: left;
  margin: 0.4em 1.4em 1em 0;
}

.vip-wm-inline-wrap.vip-wm-alignright {
  float: right;
  margin: 0.4em 0 1em 1.4em;
}

.vip-watermark {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  width: var(--vip-wm-scale, 18%);
  min-width: 58px;
  max-width: 190px;
  opacity: var(--vip-wm-opacity, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.vip-watermark--ctx-gallery {
  min-width: 52px;
  max-width: 125px;
}

.vip-lightbox-media .vip-watermark {
  min-width: 78px;
  max-width: 220px;
}

.vip-watermark--ctx-card {
  min-width: 48px;
  max-width: 96px;
}

.vip-watermark--ctx-hero {
  min-width: 64px;
  max-width: 140px;
}

.vip-watermark .vip-watermark-img {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 76px !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  transform: none !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.vip-watermark--bg-light {
  background: rgba(255, 255, 255, 0.78);
  padding: 4px 7px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
}

.vip-watermark--bg-light .vip-watermark-img {
  filter: none;
}

.vip-watermark--bg-dark {
  background: rgba(7, 55, 65, 0.72);
  padding: 4px 7px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
}

.vip-watermark--pos-bottom-right {
  right: 10px;
  bottom: 10px;
}

.vip-watermark--pos-bottom-left {
  left: 10px;
  bottom: 10px;
}

.vip-watermark--pos-top-right {
  right: 10px;
  top: 10px;
}

.vip-watermark--pos-top-left {
  left: 10px;
  top: 10px;
}

.vip-watermark--pos-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Se su una miniatura c'è la lente zoom in basso a destra, sposta leggermente la lente a sinistra o sopra per non toccare la filigrana */
.vip-gallery-item .vip-watermark--pos-bottom-right ~ .vip-gallery-zoom-hint {
  right: auto;
  left: 10px;
  bottom: 10px;
}

@media (max-width: 600px) {
  .vip-watermark {
    min-width: 44px;
    max-width: 110px;
  }
  .vip-lightbox-media .vip-watermark {
    min-width: 60px;
    max-width: 150px;
  }
}
