/* ═══════════════════════════════════════════════════════════════════════════
   PANEL COMPONENT - Giuliano Tartufi
   ═══════════════════════════════════════════════════════════════════════════ */

/* Backdrop */
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.panel-backdrop.panel--open {
  pointer-events: auto;
}

/* ─── Card ───────────────────────────────────────────────────────────────────── */
.panel {
  position: relative;
  width: min(429px, calc(100vw - 32px));
  border-radius: 15px;
  overflow: hidden;
  background: rgba(29, 29, 29, 0.40);
  background-blend-mode: color-burn;
  box-shadow:
    -5px 16px 11.2px rgba(0, 0, 0, 0.30),
    inset 3px -5px 1.5px -4px rgba(255, 255, 255, 0.15),
    inset 4.5px 4.5px 1.5px -5.25px rgba(255, 255, 255, 0.10),
    inset -4px 5px 1.5px -4px rgba(179, 179, 179, 0.08),
    inset -3px -4.5px 1.5px -3px rgba(179, 179, 179, 0.08);
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transform: translateY(24px);
  transition:
    opacity 0.4s ease,
    transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
    backdrop-filter 0.4s ease,
    -webkit-backdrop-filter 0.4s ease;
  display: flex;
  flex-direction: column;
}

.panel-backdrop.panel--open .panel {
  opacity: 1;
  transform: translateY(0);
  backdrop-filter: blur(11.4px);
  -webkit-backdrop-filter: blur(11.4px);
}

/* ─── Image thumb ────────────────────────────────────────────────────────────── */
.panel__image {
  width: calc(100% - 52px);
  margin: 27px 26px 0;
  height: 195px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.panel__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── Content ────────────────────────────────────────────────────────────────── */
.panel__content {
  padding: 27px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel__title {
  margin-bottom: 22px;
}

.panel__body {
  margin-bottom: 14px;
}

.panel__title {
  font-family: 'NyghtSerif', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 105%;
  color: #EBE7DD;
}

.panel__title em {
  font-style: italic;
  color: #EAB97E;
}

.panel__body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 182%;
  color: #EBE7DD;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.panel__footer {
  padding: 20px 26px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.panel__footer-line {
  flex: 1;
  height: 0;
  border-top: 0.996px solid #EAB97E;
  opacity: 0.41;
}

.panel__cta {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 16px 24px;
  gap: 6px;
  width: 163px;
  height: 54px;
  border: 2px solid rgba(234, 185, 126, 0.50);
  border-radius: 100px;
  background: rgba(29, 29, 29, 0.40);
  background-blend-mode: color-burn;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 83.81%;
  color: #EAB97E;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color 0.3s ease, background 0.3s ease;
  flex-shrink: 0;
}

.panel__cta:hover {
  border-color: rgba(234, 185, 126, 0.8);
}

.panel__cta svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.panel__cta-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.panel__cta:hover .panel__cta-arrow {
  transform: translateX(4px);
}

/* ─── Posizionamento per pannello specifico ─────────────────────────────────── */
/* 768px–1919px: allineato a sinistra */
@media (min-width: 768px) and (max-width: 1919px) {
  #panel-experience,
  #panel-estrazione,
  #panel-final {
    justify-content: flex-start;
    padding-left: 48px;
  }
}

/* 1920px+: centrato sulla prima delle 3 colonne immaginarie */
@media (min-width: 1920px) {
  #panel-experience,
  #panel-estrazione,
  #panel-final {
    justify-content: flex-start;
    padding-left: calc(100vw / 6 - min(429px, 90vw) / 2);
  }
}

/* 768px–1919px: allineato a destra */
@media (min-width: 768px) and (max-width: 1919px) {
  #panel-cane,
  #panel-rapporto {
    justify-content: flex-end;
    padding-right: 48px;
  }
}

/* 1920px+: centrato sull'ultima delle 3 colonne immaginarie */
@media (min-width: 1920px) {
  #panel-cane,
  #panel-rapporto {
    justify-content: flex-end;
    padding-right: calc(100vw / 6 - min(429px, 90vw) / 2);
  }
}

/* ─── Close button ───────────────────────────────────────────────────────────── */
.panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(0, 0, 0, 0.30);
  color: #EBE7DD;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: border-color 0.3s ease;
  padding: 0;
  line-height: 1;
}

.panel__close:hover {
  border-color: rgba(255, 255, 255, 0.50);
}
