/* =========================================================================
   IMMOBILIARE BORTOLAI.IT - GENOVA | CONDOMINIO VIA CARLO LINNEO
   Palette ufficiale estratta da www.bortolai.it:
   - Blu Bortolai: #00549e
   - Giallo Bortolai: #fbe408
   - Blu Scuro Istituzionale: #263a4f
   ========================================================================= */

:root {
  --bortolai-blue: #00549e;
  --bortolai-blue-hover: #00407a;
  --bortolai-yellow: #fbe408;
  --bortolai-yellow-hover: #e5cf05;
  --bortolai-dark: #263a4f;
  --bortolai-darker: #1b2a3a;
  --bortolai-ice: #f0f6fc;
  --success-emerald: #28a745;
  --danger-red: #dc3545;
  --surface-white: #ffffff;
  --surface-light: #f8f9fa;
  --border-color: #dee2e6;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --radius-xl: 16px;
  --radius-lg: 10px;
  --radius-md: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Work Sans', 'Poppins', 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--surface-light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Poppins', 'Work Sans', sans-serif;
}

/* Pulsating indicator for live availability */
@keyframes bortolaiPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(40, 167, 69, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background-color: #28a745;
  border-radius: 50%;
  display: inline-block;
  animation: bortolaiPulse 2s infinite;
}

/* Official Bortolai signature button & underline arrow */
.btn-bortolai-yellow {
  background-color: var(--bortolai-yellow);
  color: var(--bortolai-dark);
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-bortolai-yellow:hover {
  background-color: var(--bortolai-yellow-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(251, 228, 8, 0.35);
}

.btn-bortolai-blue {
  background-color: var(--bortolai-blue);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-bortolai-blue:hover {
  background-color: var(--bortolai-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 84, 158, 0.3);
}

/* Bortolai yellow accent line (inspired by .readmoresss .dl-arrow in bortolai.it) */
.bortolai-accent-line {
  display: inline-block;
  width: 44px;
  height: 3px;
  background-color: var(--bortolai-yellow);
  vertical-align: middle;
}

/* Hot Drop Zone */
.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-xl);
  padding: 38px 24px;
  text-align: center;
  background-color: var(--bortolai-ice);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--bortolai-blue);
  background-color: #e2effb;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 84, 158, 0.14);
}

.dropzone.dragover {
  border-style: solid;
  border-color: var(--bortolai-yellow);
  background-color: #fefce8;
}

/* Image Thumbnails & Gallery */
.gallery-main {
  position: relative;
  width: 100%;
  height: 330px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--bortolai-dark);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.gallery-main img:hover {
  transform: scale(1.03);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  width: 74px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  opacity: 0.72;
}

.thumb-item:hover, .thumb-item.active {
  border-color: var(--bortolai-yellow);
  opacity: 1;
  transform: translateY(-1px);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Availability Badges */
.badge-available {
  background-color: #28a745;
  color: white;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.28);
}

.badge-low {
  background-color: var(--bortolai-yellow);
  color: var(--bortolai-dark);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(251, 228, 8, 0.35);
}

.badge-full {
  background-color: #dc3545;
  color: white;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.28);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(38, 58, 79, 0.96);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38, 58, 79, 0.78);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-table th {
  background-color: var(--bortolai-ice);
  padding: 12px 14px;
  font-weight: 700;
  color: var(--bortolai-dark);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-dark);
}

.admin-table tr:hover {
  background-color: #f8fbff;
}

.admin-table input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}

.admin-table input:focus {
  outline: none;
  border-color: var(--bortolai-blue);
  box-shadow: 0 0 0 2px rgba(0, 84, 158, 0.2);
}
