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

body {
  font-family: 'Inter', sans-serif;
  background: #eaecf4;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.25rem;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Card container ── */
.card {
  width: 100%;
  background: #fff;
  border: 1px solid #dde1ee;
  box-shadow: 0 20px 60px rgba(20, 26, 60, 0.14), 0 4px 16px rgba(20, 26, 60, 0.06);
  overflow: hidden;
}

.card-layout {
  display: flex;
  flex-direction: column;
}

/* ── Left panel ── */
.card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem 2rem 1.5rem;
}

.photo-circle {
  width: 256px;
  height: 256px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #dde1ee;
  flex-shrink: 0;
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.creci-block {
  display: none;
  text-align: center;
}

.creci-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e8703a;
}

.creci-value {
  font-family: 'Roboto Slab', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: #edf0ff;
  margin-top: 3px;
}

.accent-line {
  display: none;
  width: 48px;
  height: 2px;
  background: #e8703a;
  flex-shrink: 0;
}

/* ── Right panel ── */
.card-right {
  padding: 0.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e8703a;
  margin-bottom: 0.5rem;
}

.name {
  font-family: 'Roboto Slab', serif;
  font-size: 2.25rem;
  font-weight: 400;
  color: #1a2040;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.creci-mobile {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.tagline {
  display: none;
}

.divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.25rem 0;
}

/* ── Contacts (mobile) ── */
.contacts-rows {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}

.contact-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a2040;
}

/* ── Contacts (desktop) ── */
.contacts-grid {
  display: none;
}

.contact-item-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.contact-item-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a2040;
}

/* ── Buttons ── */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  border-radius: 0.15rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.82; }

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-secondary {
  background: #e8703a;
  color: #fff;
  border-color: #e8703a;
}

.btn-primary {
  background: #1a2040;
  color: #fff;
  border-color: #1a2040;
}

.btn-outline {
  background: transparent;
  color: #1a2040;
  border-color: #dde1ee;
}

.label-mobile { display: inline; }
.label-desktop { display: none; }

/* ── Gallery property badge (galeria.html only) ── */
.property-badge {
  display: none;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #e8703a;
  border-radius: 0 0.2rem 0.2rem 0;
}

.property-badge-label {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e8703a;
  margin-bottom: 0.2rem;
}

.property-badge-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a2040;
  line-height: 1.3;
}

.property-badge-count {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.125rem;
}

/* ── Interactive contact values ── */
a.contact-value,
a.contact-item-value,
button.contact-value,
button.contact-item-value {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

button.contact-value,
button.contact-item-value {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-align: inherit;
}

a.contact-value:hover,
button.contact-value:hover,
a.contact-item-value:hover,
button.contact-item-value:hover {
  color: #e8703a;
}

/* ── CRECI link ── */
.creci-link {
  display: block;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.18s;
}
.creci-link:hover { opacity: 0.72; }

.creci-mobile a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.creci-mobile a:hover { color: #e8703a; }

/* ── Desktop layout (≥ 1024px) ── */
@media (min-width: 1024px) {
  body {
    align-items: center;
    padding: 3rem 1.5rem;
  }

  .card-layout {
    flex-direction: row;
    min-height: 480px;
  }

  .card-left {
    background: #1a2040;
    width: 38%;
    flex-shrink: 0;
    justify-content: space-between;
    padding: 2.5rem 2.25rem;
    gap: 0;
  }

  .photo-circle {
    border-color: rgba(237, 240, 255, 0.18);
  }

  .creci-block { display: block; }
  .accent-line { display: block; }

  .card-right {
    flex: 1;
    padding: 2.5rem;
    justify-content: space-between;
  }

  .tagline {
    display: block;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #6b7280;
    margin-top: 0.75rem;
    margin-bottom: 2rem;
    max-width: 18rem;
  }

  .creci-mobile { display: none; }
  .mobile-suffix { display: none; }
  .divider { display: none; }
  .contacts-rows { display: none; }

  .contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
  }

  .contacts-grid .full {
    grid-column: 1 / -1;
  }

  .buttons {
    flex-direction: row;
    gap: 0.75rem;
    margin-top: 0;
  }

  .btn { flex: 1; }

  .label-mobile { display: none; }
  .label-desktop { display: inline; }

  .name { font-size: 3rem; }

  .property-badge {
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
  }
}

/* ── Galleries modal ── */
.galleries-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(12, 16, 36, 0.72);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.galleries-modal.open {
  opacity: 1;
  pointer-events: all;
}

.galleries-modal-card {
  background: #fff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(12, 16, 36, 0.3);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.galleries-modal.open .galleries-modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.galleries-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.galleries-modal-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a2040;
}

.galleries-modal-close {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.galleries-modal-close:hover { background: #f0f2fa; color: #1a2040; }
.galleries-modal-close svg { width: 16px; height: 16px; }

.galleries-grid {
  overflow-y: auto;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gallery-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.gallery-item:hover { border-color: #b0b7c8; background: #f8f9fc; }

.gallery-item-thumb {
  width: 80px;
  height: 60px;
  border-radius: 0.2rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #e5e7eb;
}

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

.gallery-item-info { flex: 1; min-width: 0; }

.gallery-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a2040;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-item-chevron {
  width: 14px;
  height: 14px;
  color: #9ca3af;
  flex-shrink: 0;
}

.galleries-empty {
  font-size: 0.875rem;
  color: #9ca3af;
  text-align: center;
  padding: 2rem 0;
}

/* ── Share toast ── */
.share-toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #1a2040;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.125rem;
  border-radius: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 3000;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(12, 16, 36, 0.22);
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Admin hint button ── */
.admin-corner-btn {
  position: fixed;
  bottom: 0.875rem;
  right: 0.875rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  opacity: 0.18;
  text-decoration: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.admin-corner-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.admin-corner-btn:hover { opacity: 0.55; }
