/* ========================================
   INOVAR - PORTFOLIO PAGE STYLES
   ======================================== */

/* --- Portfolio Hero --- */
.portfolio-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
  padding-bottom: 80px;
  padding-top: calc(var(--header-height) + 40px);
}

.portfolio-hero .hero-bg {
  height: 130%;
  opacity: 0.25;
}

.portfolio-hero .hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.95) 100%
  );
}

.portfolio-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  padding: 0 32px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--gray-light);
}

.breadcrumb a {
  color: var(--gray-lighter);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--red);
}

.breadcrumb .separator {
  color: var(--gray-light);
  font-size: 10px;
}

.breadcrumb .current {
  color: var(--white);
  font-weight: 500;
}

.portfolio-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  margin-bottom: 16px;
  line-height: 1.05;
}

.portfolio-hero-content h1 span {
  color: var(--red);
}

.portfolio-hero-content p {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--gray-lighter);
  font-weight: 300;
  line-height: 1.6;
}

/* --- Filter Bar --- */
.filter-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 20px 0;
  transition: box-shadow 0.3s ease;
}

.filter-bar.shadow {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.filter-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--gray-lighter);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: 50px;
  cursor: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.results-count {
  font-size: 14px;
  color: var(--gray-light);
  white-space: nowrap;
}

.results-count strong {
  color: var(--white);
  font-weight: 600;
}

/* --- Property Grid --- */
.property-section {
  padding: 60px 0 120px;
  background: var(--black);
  min-height: 60vh;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* --- Property Card --- */
.property-card {
  background: var(--black-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  opacity: 1;
}

.property-card.hidden {
  display: none;
}

.property-card:hover {
  transform: translateY(-10px);
  border-color: rgba(212, 43, 43, 0.2);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 43, 43, 0.1);
}

.property-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.property-card:hover .property-card-image img {
  transform: scale(1.08);
}

.property-card-image .badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.badge-venda {
  background: rgba(212, 43, 43, 0.9);
  color: var(--white);
}

.badge-concluida {
  background: rgba(34, 139, 34, 0.85);
  color: var(--white);
}

.badge-andamento {
  background: rgba(218, 165, 32, 0.9);
  color: var(--black);
}

.badge-projeto {
  background: rgba(120, 120, 120, 0.85);
  color: var(--white);
}

.property-card-image .image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-card:hover .image-overlay {
  opacity: 1;
}

.image-overlay .view-btn {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease 0.1s;
}

.property-card:hover .image-overlay .view-btn {
  transform: translateY(0);
  opacity: 1;
}

.image-overlay .view-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

/* Card Body */
.property-card-body {
  padding: 28px;
}

.property-card-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-light);
  margin-bottom: 20px;
}

.property-location svg {
  width: 14px;
  height: 14px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.property-specs {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-lighter);
}

.spec-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.property-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.property-price small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-light);
  margin-top: 2px;
}

.property-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-lighter);
}

.property-status .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.green { background: #228B22; }
.status-dot.yellow { background: #DAA520; }
.status-dot.gray { background: #888; }

.btn-card-detail {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: none;
  transition: all var(--transition-fast);
}

.btn-card-detail:hover {
  background: var(--red);
  border-color: var(--red);
}

/* --- No Results --- */
.no-results {
  text-align: center;
  padding: 80px 0;
  display: none;
}

.no-results.show {
  display: block;
}

.no-results p {
  font-size: 18px;
  color: var(--gray-light);
}

/* ========================================
   DETAIL MODAL / OVERLAY
   ======================================== */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.detail-modal.open {
  opacity: 1;
  visibility: visible;
}

.detail-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.detail-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--black);
}

.detail-modal-content::-webkit-scrollbar {
  width: 6px;
}

.detail-modal-content::-webkit-scrollbar-track {
  background: var(--black);
}

.detail-modal-content::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 3px;
}

.detail-close {
  position: fixed;
  top: 24px;
  right: 32px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  cursor: none;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.detail-close:hover {
  background: var(--red);
  border-color: var(--red);
  transform: rotate(90deg);
}

.detail-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
}

/* Gallery */
.detail-gallery {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 0;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--gray-dark);
}

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

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all var(--transition-fast);
  z-index: 2;
  backdrop-filter: blur(8px);
}

.gallery-nav-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.gallery-nav-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
}

.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  backdrop-filter: blur(8px);
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: none;
  transition: all var(--transition-fast);
  opacity: 0.5;
}

.gallery-thumb.active {
  border-color: var(--red);
  opacity: 1;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

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

/* Detail Info */
.detail-info {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}

.detail-main h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.detail-main .detail-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--gray-lighter);
  margin-bottom: 32px;
}

.detail-main .detail-location svg {
  width: 18px;
  height: 18px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
}

.detail-badge {
  display: inline-flex;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 12px;
  vertical-align: middle;
}

.detail-description {
  margin-bottom: 40px;
}

.detail-description h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.detail-description p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-lighter);
  font-weight: 300;
}

/* Features list */
.detail-features {
  margin-bottom: 40px;
}

.detail-features h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 14px;
  color: var(--gray-lighter);
  transition: all var(--transition-fast);
}

.feature-item:hover {
  border-color: rgba(212, 43, 43, 0.2);
  background: rgba(212, 43, 43, 0.05);
}

.feature-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Sidebar - Specs Table */
.detail-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  align-self: start;
}

.specs-card {
  background: var(--black-soft);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  padding: 32px;
  margin-bottom: 24px;
}

.specs-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.spec-row .spec-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-light);
}

.spec-row .spec-label svg {
  width: 18px;
  height: 18px;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.5;
}

.spec-row .spec-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.price-card {
  background: linear-gradient(135deg, rgba(212, 43, 43, 0.15) 0%, rgba(13, 13, 13, 0.95) 100%);
  border: 1px solid rgba(212, 43, 43, 0.2);
  border-radius: var(--border-radius);
  padding: 32px;
  text-align: center;
}

.price-card .price-label {
  font-size: 13px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.price-card .price-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 24px;
}

.price-card .price-value small {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-lighter);
}

.btn-whatsapp-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 32px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-whatsapp-detail:hover {
  background: var(--red-light);
  box-shadow: 0 8px 35px var(--red-glow);
  transform: translateY(-2px);
}

.btn-whatsapp-detail svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Related Projects */
.detail-related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 48px;
}

.detail-related h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 32px;
}

.related-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.related-scroll::-webkit-scrollbar {
  display: none;
}

.related-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--black-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: none;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 43, 43, 0.15);
}

.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.related-card-info {
  padding: 20px;
}

.related-card-info h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.related-card-info span {
  font-size: 13px;
  color: var(--gray-light);
}

/* --- CTA Section (reuse from main) --- */
.portfolio-cta {
  padding: 120px 0;
  background: var(--black-soft);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.portfolio-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  opacity: 0.15;
}

.portfolio-cta .container {
  position: relative;
  z-index: 1;
}

.portfolio-cta .section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  margin-bottom: 16px;
}

.portfolio-cta .section-text {
  max-width: 550px;
  margin: 0 auto 40px;
  font-size: 17px;
}

/* === Scroll to top button === */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: rgba(44, 44, 44, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  cursor: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-4px);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-info {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .property-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar .container {
    justify-content: center;
  }

  .filter-buttons {
    justify-content: center;
  }

  .results-count {
    display: none;
  }

  .portfolio-hero {
    min-height: 40vh;
  }

  .detail-gallery {
    padding: 60px 16px 0;
  }

  .detail-info {
    padding: 32px 16px 60px;
    gap: 32px;
  }

  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .gallery-thumb {
    width: 80px;
    height: 56px;
  }

  .gallery-nav-btn {
    width: 38px;
    height: 38px;
  }

  .detail-related {
    padding: 0 16px 60px;
    padding-top: 32px;
  }

  .related-card {
    width: 280px;
  }

  .scroll-top {
    bottom: 90px;
    right: 24px;
    width: 42px;
    height: 42px;
  }

  a, button, .filter-btn, .property-card, .btn-card-detail, .gallery-nav-btn, .gallery-thumb, .detail-close, .btn-whatsapp-detail, .related-card, .scroll-top {
    cursor: pointer;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .property-card-body {
    padding: 20px;
  }

  .property-specs {
    gap: 12px;
  }

  .spec-item  {
    font-size: 12px;
  }

  .detail-gallery {
    padding: 60px 0 0;
  }

  .gallery-main {
    border-radius: 0;
  }

  .gallery-thumbs {
    padding: 0 16px;
  }

  .detail-main h1 {
    font-size: 24px;
  }

  .detail-badge {
    margin-left: 0;
    margin-top: 8px;
    display: block;
    width: fit-content;
  }

  .price-card .price-value {
    font-size: 28px;
  }
}
