/* =========================================================
   STILI PAGINA TEMPLATE DETTAGLIO FOTO
   ========================================================= */

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8f9fa;
  color: #222;
  line-height: 1.5;
}

/* Header Navigazione */

.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

@media (max-width: 360px) {
  .back-link {
    font-size: 0.8rem;
  }
}

.back-link:hover {
  color: #000;
}

/* Layout a Due Colonne */

.photo-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
}

/* Colonna Sinistra */

.photo-primary-column {
  display: flex;
  flex-direction: column;
  /*gap: 32px;*/
}

.photo-wrapper {
  width: 100%;
  background-color: #000;
  /*border-radius: 8px;*/
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.photo-main {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.photo-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #111;
}

.photo-description {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
}

/* Blocco Licenza CC */

.license-block {
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  /*padding: 24px;*/
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.license-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cc-license-icon {
  width: 36px;
  height: 36px;
  color: #333;
  flex-shrink: 0;
}

.license-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 365px) {
  .license-name {
    margin: 2px 0 0 0;
    font-size: 0.64rem;
    color: #666;
    font-weight: 500;
  }
}

.license-details {
  font-size: 0.88rem;
  color: #555;
  margin: 0;
}

.license-link {
  font-size: 0.85rem;
  color: #0066cc;
  text-decoration: underline;
  font-weight: 500;
}

.license-link:hover {
  text-decoration: underline;
}

/* Colonna Destra (Sidebar Cards) */

.photo-sidebar-column {
  display: flex;
  flex-direction: column;
  /*gap: 20px;*/
}

.sidebar-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.card-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #111;
}

.card-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #111;
}

/* Scheda Autore */

.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.author-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.author-name {
  margin: 2px 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.author-portfolio-link {
  font-size: 0.82rem;
  color: #0066cc;
  text-decoration: none;
}

.author-portfolio-link:hover {
  text-decoration: underline;
}

/* Scheda Metadati */

.exif-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.exif-item {
  display: flex;
  flex-direction: column;
}

.exif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.exif-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.exif-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 500;
}

.exif-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  padding-left: 22px;
}

.copyright-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed #eee;
}

.copyright-text {
  font-size: 0.78rem;
  color: #666;
}

/* Scheda Acquisto */

.purchase-card {
  background-color: #ffffff;
  border: 2px solid #111;
}

.purchase-desc {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 16px 0;
}

.price-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.price-label {
  font-size: 0.75rem;
  color: #777;
  text-transform: uppercase;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
}

.btn-buy-license, .btn-buy-license:visited, .btn-buy-license:hover, .btn-buy-license:active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  background-color: #000;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn-buy-license:hover {
  background-color: #222;
}

.btn-buy-license .btn-icon {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
  fill: #ffffff !important;
  color: #ffffff !important;
}

/* Responsive per Mobile e Tablet */

@media (max-width: 900px) {
  .photo-page-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* NUOVI INSERIMENTI */

.photo-wrapper {
  width: 100%;
  background-color: #000;
  /*border-radius: 8px;*/
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-main {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Ottimizzazione per monitor larghi */

@media (min-width: 1200px) {
  .photo-main {
    max-height: 65vh;
    width: auto;
    max-width: 100%;
  }
}

