.fe-event-page-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.fe-event-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
}

.fe-event-results {
  min-width: 0;
}

.fe-event-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 0;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}

.fe-filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fe-filter-title {
  font-size: 1em;
  font-weight: 800;
  color: #111;
}

.fe-inline-calendar-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

.fe-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.fe-filter-field label {
  font-size: 13px;
  font-weight: 800;
  color: #111;
}

.fe-filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 14px;
}

.fe-filter-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.fe-filter-submit,
.fe-filter-reset {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid #e30613;
  background: #e30613;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.fe-event-filters .fe-filter-submit {
  background: #e30613 !important;
  border-color: #e30613 !important;
  color: #fff !important;
}

.fe-event-filters .fe-filter-submit:hover {
  background: #c90010 !important;
  border-color: #c90010 !important;
  color: #fff !important;
}

.fe-filter-reset {
	 font-size: 14px !important;
  background: #111;
  border-color: #111;
}

.fe-filter-submit:hover,
.fe-filter-reset:hover {
  opacity: 0.85;
  color: #fff;
}


/* CALENDARIO APERTO */

.fe-event-filters .flatpickr-calendar {
  width: 100%;
  box-shadow: none;
  border: 1px solid #eee;
  border-radius: 10px;
}

.fe-event-filters .flatpickr-innerContainer,
.fe-event-filters .flatpickr-rContainer,
.fe-event-filters .flatpickr-days,
.fe-event-filters .dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.fe-event-filters .flatpickr-day {
  max-width: none;
  height: 38px;
  line-height: 38px;
  border-radius: 6px;
}

.fe-event-filters .flatpickr-day.selected,
.fe-event-filters .flatpickr-day.startRange,
.fe-event-filters .flatpickr-day.endRange {
  background: #e30613;
  border-color: #e30613;
  color: #fff;
}

.fe-event-filters .flatpickr-day.today {
  border-color: #e30613;
}

.fe-event-filters .flatpickr-months .flatpickr-month {
  height: 46px;
}

.fe-event-filters .flatpickr-current-month {
  padding-top: 8px;
  font-size: 15px;
}

.fe-event-filters .flatpickr-current-month .flatpickr-monthDropdown-months,
.fe-event-filters .flatpickr-current-month input.cur-year {
  font-weight: 800;
}


/* Griglia eventi a destra */
.fe-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.fe-event-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fe-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.fe-event-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.fe-event-thumb-wrap {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #f3f3f3;
}

.fe-event-thumb {
  width: 100%;
  height: 100%;
}

.fe-event-thumb img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.fe-event-date-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-width: 62px;
  min-height: 62px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #e30613;
  color: #fff;
  text-align: center;
  line-height: 1;
}

.fe-event-date-day {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.fe-event-date-month {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
}

.fe-event-content {
  padding: 18px;
}

.fe-event-title {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.25;
}

.fe-event-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.fe-event-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 4px;
  background: #f2f2f2;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fe-event-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fe-event-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #555;
}

.fe-event-meta-icon {
  flex: 0 0 auto;
  width: 18px;
  line-height: 1.4;
}

.fe-event-meta-date {
  color: #222;
  font-weight: 500;
}

.fe-event-meta-place {
  color: #555;
}

/* Pagina PUBBLICA EVENTO */
.fe-public-submit-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 0;
}

.fe-public-submit-form {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
}

.fe-public-submit-form h2,
.fe-public-submit-form h3 {
  margin-top: 0;
  color: #111111;
}

.fe-form-section p {
  color: #666666;
  margin-top: 6px;
}

.fe-form-row {
  margin-bottom: 20px;
}

.fe-form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111111;
}

.fe-form-row select[multiple] {
  min-height: 150px;
}

.fe-form-row input[type="text"],
.fe-form-row input[type="email"],
.fe-form-row input[type="date"],
.fe-form-row input[type="time"],
.fe-form-row input[type="file"],
.fe-form-row textarea,
.fe-form-row select {
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  background: #ffffff;
}

.fe-form-row textarea {
  resize: vertical;
}

.fe-form-row small {
  display: block;
  margin-top: 6px;
  color: #777777;
}

.fe-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.fe-privacy-row label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
}

.fe-privacy-row input {
  margin-top: 4px;
}

.fe-submit-button {
  background: #e30613;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.fe-submit-button:hover {
  background: #c90010;
}

.fe-submit-success {
  background: #e9f8ef;
  color: #146b35;
  border: 1px solid #bce8cb;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 700;
}

.fe-submit-error {
  background: #fff1f1;
  color: #b00020;
  border: 1px solid #ffc7c7;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .fe-public-submit-form {
    padding: 22px;
  }

  .fe-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.fe-event-type-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}

.fe-event-type-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dddddd;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 600 !important;
  margin: 0 !important;
}

.fe-event-type-checkbox input {
  width: auto !important;
  margin: 0 !important;
}

.fe-event-type-checkbox span {
  line-height: 1.2;
}

.fe-event-type-checkbox:has(input:checked) {
  border-color: #e30613;
  background: #fff5f5;
}

.fe-submit-button {
  background: #e30613 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.fe-submit-button:hover {
  background: #c90010 !important;
  color: #ffffff !important;
}

.fe-public-submit-thankyou {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fe-public-submit-thankyou .fe-submit-success {
  max-width: 760px;
  text-align: center;
  font-size: 20px;
  line-height: 1.5;
}

.fe-public-submit-form .wp-editor-wrap {
  margin-top: 8px;
}

.fe-public-submit-form .wp-editor-container {
  border: 1px solid #dddddd;
  border-radius: 10px;
  overflow: hidden;
}

.fe-public-submit-form .mce-toolbar .mce-btn button,
.fe-public-submit-form .quicktags-toolbar input {
  font-size: 13px;
}

@media (max-width: 768px) {
  .fe-event-type-checkboxes {
    grid-template-columns: 1fr;
  }
}

/* Loader scroll infinito */
.fe-event-loader {
  display: none;
  width: 100%;
  padding: 34px 0 10px;
  text-align: center;
}

.fe-event-loader.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fe-loader-icon {
  width: 38px;
  height: 38px;
  border: 4px solid #eee;
  border-top-color: #e30613;
  border-radius: 50%;
  display: inline-block;
  animation: fe-loader-spin 0.8s linear infinite;
}

@keyframes fe-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.fe-event-scroll-trigger {
  width: 100%;
  height: 1px;
}

.fe-no-events {
  padding: 20px;
  border-radius: 8px;
  background: #f7f7f7;
  color: #555;
}

/* Responsive */
@media (max-width: 1024px) {
  .fe-event-page-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
  }

  .fe-event-grid {
    grid-template-columns: 1fr;
  }

  .fe-event-sidebar {
    top: 90px;
  }
}

@media (max-width: 767px) {
  .fe-event-page-layout {
    display: block;
  }

  .fe-event-sidebar {
    position: static;
    margin-bottom: 24px;
  }

  .fe-event-filters {
    padding: 16px;
  }

  .fe-event-grid {
    grid-template-columns: 1fr;
  }
}


/* dettagli evento in pagina evento */

.fe-single-event-details {
  margin: 24px 0;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 18px;
}

.fe-single-event-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.fe-single-event-types .fe-event-type {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.fe-single-event-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  color: #222222;
  font-size: 16px;
  line-height: 1.5;
}

.fe-single-event-detail-icon {
  flex: 0 0 auto;
}

.fe-single-event-map-link {
  color: #e30613;
  font-weight: 700;
  text-decoration: none;
}

.fe-single-event-map-link:hover {
  text-decoration: underline;
}


/* calendario filtro mese */
.fe-filter-month-button {
  width: 100%;
  margin-top: 10px;
  background: #111111;
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.fe-filter-month-button:hover {
  background: #e30613;
  color: #ffffff;
}


/* Pagina pubblica articolo */

.fe-public-password-form {
  max-width: 560px;
  margin: 0 auto;
}

.fe-public-submit-form textarea#fe_contenuto_articolo {
  font-family: Consolas, Monaco, monospace;
  min-height: 320px;
}

.fe-public-submit-form textarea#fe_contenuto_articolo::placeholder {
  color: #999999;
}


.fe-submit-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  background: #e30613;
  color: #ffffff !important;
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}

.fe-submit-new-button:hover {
  background: #c90010;
  color: #ffffff !important;
}

/* css per galleria HTML nostra */
.fe-article-gallery {
  display: grid !important;
  grid-template-columns: repeat(var(--fe-gallery-columns), minmax(0, 1fr)) !important;
  gap: 18px;
  margin: 32px 0;
}

.fe-article-gallery-item {
  margin: 0 !important;
  padding: 0 !important;
}

.fe-article-gallery-item img {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  height: auto !important;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

@media (max-width: 767px) {
  .fe-article-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .fe-article-gallery {
    grid-template-columns: 1fr !important;
  }
}


/* per pagine tipo-evento */

.fe-taxonomy-event-page {
  padding: 40px 0;
}

.fe-taxonomy-event-container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.fe-taxonomy-event-header {
  margin-bottom: 28px;
}

.fe-taxonomy-event-header h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 900;
  color: #111111;
}

.fe-taxonomy-event-description {
  max-width: 760px;
  color: #555555;
  font-size: 17px;
  line-height: 1.6;
}

/* per fonte originale */
.fe-original-source {
	text-align:right;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.7em;
  line-height: 1;
  color: #777;
}

.fe-original-source a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
}

/* ================================
   HUB EVENTI - GRIGLIA
================================ */

.fe-event-hub {
  width: 100%;
}

.fe-event-hub .fe-event-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  width: 100%;
}

.fe-event-hub .fe-event-card {
  min-width: 0;
}

/* Tablet */

@media (max-width: 1024px) {
  .fe-event-hub .fe-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
}

/* Mobile */

@media (max-width: 640px) {
  .fe-event-hub .fe-event-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}


/* ================================
   CARD EVENTI - IMMAGINE COVER
================================ */

.fe-event-thumb {
  width: 100% !important;
  height: 250px !important;
  overflow: hidden !important;
  position: relative !important;
  background: #f2f2f2 !important;
}

.fe-event-thumb img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center center !important;
}

