/* Fonts loaded via <link> in header partial: Fraunces (display serif) + Outfit (UI sans) */

:root {
  /* Cohesive aesthetic: brand dark green dominant, brand dull orange (gold) sharp accent, warm ivory surfaces */
  --primary-color: #234E18;       /* Brand Dark Green */
  --primary-hover: #173510;
  --primary-soft: #2e6220;        /* Lifted green for layered surfaces */
  --secondary-color: #BF9023;     /* Brand Dull Orange (Gold) */
  --secondary-bright: #dfb244;    /* Lit gold for highlights/gradients */
  --secondary-hover: #9b741a;
  --accent-color: #387c26;        /* Accent Green */
  --whatsapp-color: #25d366;      /* Official WhatsApp Green */
  --text-dark: #171e16;
  --text-light: #f4efe6;          /* Warm off-white */
  --text-gray: #6b7280;
  --bg-light: #f6f2ea;            /* Warm ivory (replaces cold gray) */
  --bg-white: #ffffff;
  --bg-dark: #061004;
  --border-color: #e7e0d3;        /* Warm border to match ivory */
  --font-sans: 'Outfit', -apple-system, sans-serif;
  --font-heading: 'Fraunces', 'Outfit', serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 6px rgba(35,78,24,0.06);
  --shadow-md: 0 12px 24px -8px rgba(35,78,24,0.14), 0 4px 8px -4px rgba(35,78,24,0.08);
  --shadow-lg: 0 28px 50px -12px rgba(35,78,24,0.28), 0 10px 18px -10px rgba(35,78,24,0.12);
  --glow-gold: 0 0 0 1px rgba(191,144,35,0.4), 0 18px 40px -16px rgba(191,144,35,0.5);
  --transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  /* Atmospheric base: warm ivory with subtle gold/navy radial depth instead of a flat fill */
  background-color: var(--bg-light);
  background-image:
    radial-gradient(1100px 600px at 12% -8%, rgba(191,144,35,0.10), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(35,78,24,0.07), transparent 55%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-optical-sizing: auto;
  color: var(--primary-color);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

::selection {
  background: rgba(191,144,35,0.28);
  color: var(--primary-hover);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background:
    linear-gradient(180deg, rgba(35,78,24,0.97), rgba(23,53,16,0.92)),
    radial-gradient(600px 120px at 0% 0%, rgba(191,144,35,0.16), transparent 70%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(191,144,35,0.18);
  padding: 15px 0;
}

header::after {
  /* Thin gold filament under the header */
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191,144,35,0.7), transparent);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.logo-text {
  font-size: 1.5rem;
  color: var(--bg-white);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--secondary-color);
}

nav {
  flex: 1 1 auto;
  min-width: 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  white-space: nowrap;
}

nav ul li a:hover, nav ul li a.active {
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.05);
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-light);
  line-height: 1;
  opacity: 0.72;
  border: 1px solid transparent;
}

.language-option:hover,
.language-option.active {
  opacity: 1;
  background: rgba(191, 144, 35, 0.18);
  border-color: rgba(191, 144, 35, 0.65);
}

.flag-icon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.btn-favorites {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  color: var(--text-light);
  padding: 8px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.btn-favorites:hover {
  background: rgba(191, 144, 35, 0.2);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.btn-favorites .fav-count {
  background: var(--secondary-color);
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 50%;
}

.btn-admin,
.btn-admin-panel {
  background: rgba(191, 144, 35, 0.18);
  border-color: rgba(191, 144, 35, 0.55);
  color: var(--text-light) !important;
  font-weight: 700 !important;
}

.btn-admin:hover,
.btn-admin-panel:hover {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

.btn-logout {
  background: #ef4444;
  border-color: rgba(255,255,255,0.18);
  color: white !important;
  font-weight: 700 !important;
}

.btn-logout:hover {
  background: #dc2626 !important;
  border-color: rgba(255,255,255,0.28);
  color: white !important;
}

/* Banner Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(17,39,12,0.92) 0%, rgba(35,78,24,0.72) 45%, rgba(15,34,10,0.9) 100%),
    url('/uploads/villa_exterior.png') no-repeat center center/cover;
  padding: 140px 20px 120px;
  text-align: center;
  color: var(--text-light);
}

/* Atmospheric depth: soft gold glow + slow drift */
.hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(540px 380px at 22% 28%, rgba(191,144,35,0.28), transparent 60%),
    radial-gradient(620px 460px at 82% 80%, rgba(35,78,24,0.12), transparent 65%);
  pointer-events: none;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.hero-subtitle {
  color: var(--secondary-bright);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease-out) 0.05s forwards;
}

.hero-subtitle::before {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--secondary-color);
  vertical-align: middle;
  margin-right: 14px;
}

.hero-title {
  color: #fffaf0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
  opacity: 0;
  animation: riseIn 0.9s var(--ease-out) 0.18s forwards;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(244, 239, 230, 0.82);
  max-width: 640px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: riseIn 0.9s var(--ease-out) 0.32s forwards;
}

/* Search Filters Form */
.search-container {
  max-width: 1040px;
  margin: -56px auto 56px auto;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
  z-index: 10;
  opacity: 0;
  animation: riseIn 0.9s var(--ease-out) 0.46s forwards;
}

.search-container::before {
  /* Gold hairline crown */
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  border-radius: 2px;
}

.search-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  align-items: end;
}

@media (max-width: 900px) {
  .header-container {
    flex-wrap: wrap;
    gap: 14px;
  }

  nav {
    order: 3;
    width: 100%;
  }

  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  .search-form .form-group-submit {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  header {
    padding: 10px 0;
  }

  .header-container {
    justify-content: center;
  }

  .nav-actions,
  .nav-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    margin-left: 0;
    flex: 1 1 100%;
  }

  .nav-buttons {
    width: 100%;
    gap: 8px;
  }

  .btn-favorites {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .search-form {
    grid-template-columns: 1fr;
  }
  .search-form .form-group-submit {
    grid-column: span 1;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input, .form-group select {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  background: var(--bg-light);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--secondary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.btn-search-submit {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 8px 18px -10px rgba(35,78,24,0.7);
}

.btn-search-submit:hover {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

/* Load More (paginação) */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-load-more {
  padding: 14px 40px;
  background: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-load-more:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.btn-load-more:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Properties Section */
.section-container {
  max-width: 1200px;
  margin: 0 auto 80px auto;
  padding: 0 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 500;
  position: relative;
  padding-bottom: 14px;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-bright), var(--secondary-color));
  border-radius: 2px;
}

/* Property Grid and Cards */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.property-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  position: relative;
  display: flex;
  flex-direction: column;
  /* Orchestrated page-load: staggered reveal */
  opacity: 0;
  animation: cardReveal 0.7s var(--ease-out) forwards;
}

/* Stagger across the grid for a cascading entrance */
.properties-grid .property-card:nth-child(1) { animation-delay: 0.05s; }
.properties-grid .property-card:nth-child(2) { animation-delay: 0.13s; }
.properties-grid .property-card:nth-child(3) { animation-delay: 0.21s; }
.properties-grid .property-card:nth-child(4) { animation-delay: 0.29s; }
.properties-grid .property-card:nth-child(5) { animation-delay: 0.37s; }
.properties-grid .property-card:nth-child(6) { animation-delay: 0.45s; }
.properties-grid .property-card:nth-child(n+7) { animation-delay: 0.5s; }

.property-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(191, 144, 35, 0.55);
}

.card-image-wrapper {
  position: relative;
  height: 230px;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

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

.card-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 14px;
  background: rgba(35, 78, 24, 0.78);
  backdrop-filter: blur(6px);
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50px;
  z-index: 5;
}

.card-tag.destaque {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  border-color: rgba(255,255,255,0.4);
}

.card-tag.reservado {
  background: rgba(180, 83, 9, 0.85);
}

.card-tag.vendido {
  background: rgba(127, 29, 29, 0.85);
}

.card-fav-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-sm);
  z-index: 5;
  transition: var(--transition);
}

.card-fav-btn:hover {
  transform: scale(1.1);
  background: var(--bg-white);
}

.card-fav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-gray);
  stroke-width: 2;
  transition: var(--transition);
}

.card-fav-btn.is-active svg {
  fill: #e63946;
  stroke: #e63946;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-price {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  color: var(--secondary-hover);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s var(--ease-out);
}

.property-card:hover .card-title {
  color: var(--secondary-hover);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.card-location svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-gray);
}

.card-features {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.card-features-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.card-features-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--secondary-color);
  fill: none;
}

/* Property Detail Page Design */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Premium Image Carousel */
.carousel-container {
  position: relative;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
  background: #000;
}

@media (max-width: 600px) {
  .carousel-container {
    height: 300px;
  }
}

.carousel-slides {
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(35, 78, 24, 0.7);
  color: var(--bg-white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: var(--secondary-color);
  transform: scale(1.3);
}

.carousel-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(35, 78, 24, 0.8);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
}

/* Property Header / Info Panel */
.property-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.property-title-section h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.property-meta-info {
  display: flex;
  gap: 20px;
  color: var(--text-gray);
  font-size: 0.95rem;
}

.property-meta-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.property-price-section {
  text-align: right;
}

.property-price-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-gray);
  font-weight: 600;
  letter-spacing: 1px;
}

.property-price-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--secondary-hover);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.btn-detail-fav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-detail-fav:hover {
  background: var(--bg-light);
  border-color: var(--secondary-color);
}

.btn-detail-fav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-dark);
  stroke-width: 2.5;
  transition: var(--transition);
}

.btn-detail-fav.is-active {
  background: #fff0f1;
  border-color: #ffccd0;
  color: #e63946;
}

.btn-detail-fav.is-active svg {
  fill: #e63946;
  stroke: #e63946;
}

/* Detailed Information Section */
.property-info-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.info-card-title {
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 22px;
  padding-bottom: 12px;
  position: relative;
  color: var(--primary-color);
}

.info-card-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary-bright), var(--secondary-color));
  border-radius: 2px;
}

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

.spec-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-light);
  padding: 15px;
  border-radius: var(--radius-sm);
}

.spec-icon {
  background: rgba(191, 144, 35, 0.15);
  color: var(--secondary-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spec-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.spec-details label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-details span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.property-description {
  white-space: pre-line;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.8;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.feature-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.feature-tag svg {
  color: #10b981;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sidebar Lead Forms / Agent Contact */
.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.agent-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.agent-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px auto;
  border: 3px solid var(--secondary-color);
}

.agent-name {
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.agent-role {
  font-size: 0.85rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-weight: 600;
}

.agent-contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.agent-contact-form input, .agent-contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.agent-contact-form input:focus, .agent-contact-form textarea:focus {
  border-color: var(--secondary-color);
}

.btn-agent-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
}

.btn-agent-submit:hover {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

/* Floating WhatsApp Icon */
.whatsapp-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--whatsapp-color);
  color: var(--bg-white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 999;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
  animation: pulse-ring 2s infinite;
}

.whatsapp-floating:hover {
  background-color: #20ba5a;
  transform: scale(1.1);
}

.whatsapp-floating svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Footer Section */
footer {
  position: relative;
  background:
    radial-gradient(800px 320px at 85% 0%, rgba(191,144,35,0.12), transparent 60%),
    linear-gradient(180deg, #132a0c, var(--bg-dark));
  color: rgba(244, 239, 230, 0.72);
  padding: 70px 20px 32px 20px;
  border-top: 1px solid rgba(191,144,35,0.45);
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-info h3 {
  color: var(--bg-white);
  margin-bottom: 20px;
}

.footer-info p {
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.footer-links h4 {
  color: var(--bg-white);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links ul li a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
}

/* Admin Dashboard & Login Styles */
.admin-login-container {
  max-width: 450px;
  margin: 100px auto;
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.admin-login-title {
  text-align: center;
  margin-bottom: 30px;
}

.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: #fdf2f2;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

.alert-success {
  background: #f3faf7;
  color: #03543f;
  border: 1px solid #def7ec;
}

.admin-dashboard {
  max-width: 1200px;
  margin: 40px auto 80px auto;
  padding: 0 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.btn-logout {
  background: #ef4444;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-logout:hover {
  background: #dc2626;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

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

.admin-card-form {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.admin-card-form h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.admin-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.admin-form-group input, 
.admin-form-group select, 
.admin-form-group textarea {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-form-group input:focus, 
.admin-form-group select:focus, 
.admin-form-group textarea:focus {
  border-color: var(--secondary-color);
}

.admin-form-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.admin-form-submit:hover {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

/* Admin - Integração MLS */
.admin-integration {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-top: 30px;
}

.admin-integration-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-integration-head h3 {
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.integration-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.integration-badge.is-on {
  background: rgba(34, 160, 94, 0.12);
  color: #1f8a4c;
}

.integration-badge.is-off {
  background: rgba(120, 130, 145, 0.14);
  color: var(--text-gray);
}

.admin-integration-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-test-connection {
  padding: 13px 22px;
  background: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-test-connection:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
}

.btn-test-connection:disabled {
  opacity: 0.7;
  cursor: default;
}

.integration-test-result {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.integration-test-result.is-ok { color: #1f8a4c; }
.integration-test-result.is-error { color: #d13b3b; }

/* Admin listings list */
.admin-listings {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  height: fit-content;
}

.admin-listings h3 {
  margin-bottom: 20px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-list-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.admin-list-info {
  flex-grow: 1;
}

.admin-list-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.admin-list-meta {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.admin-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-list-actions form {
  display: flex;
  align-items: center;
  margin: 0;
}

.btn-delete {
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid #fca5a5;
  padding: 0;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-delete:hover {
  background: #ef4444;
  color: white;
}

.btn-view-site {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  padding: 0;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-view-site:hover {
  border-color: var(--primary-color);
}

/* 404 View */
.notfound-container {
  text-align: center;
  padding: 100px 20px;
}

.notfound-title {
  font-size: 6rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.notfound-text {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.btn-home {
  display: inline-block;
  background: var(--primary-color);
  color: var(--bg-white);
  padding: 12px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-home:hover {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.notfound-title {
  font-weight: 600;
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Motion keyframes (cookbook: orchestrated page-load reveals) ===== */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-subtitle, .hero-title, .hero-desc, .search-container, .property-card {
    opacity: 1 !important;
  }
}

/* ==========================================================================
   Admin Tabs & Edit Layouts
   ========================================================================== */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
  padding-bottom: 10px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary-color);
  background: rgba(35, 78, 24, 0.05);
}

.tab-btn.active {
  color: var(--primary-color);
  background: rgba(35, 78, 24, 0.08);
  box-shadow: inset 0 -2px 0 var(--secondary-color);
}

.tab-content {
  display: none;
  animation: cardReveal 0.4s var(--ease-out);
}

.tab-content.active {
  display: block;
}

.btn-edit {
  background: rgba(191, 144, 35, 0.12);
  color: var(--secondary-hover);
  border: 1px solid rgba(191, 144, 35, 0.3);
  padding: 0 12px;
  height: 32px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.btn-edit:hover {
  background: var(--secondary-color);
  color: var(--text-light);
}

.btn-cancel {
  padding: 13px 20px;
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  margin-top: 10px;
}

.btn-cancel:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* API Documentation styles */
.badge-method {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}

.code-block {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--primary-color);
  word-break: break-all;
  display: inline-block;
}

.json-code {
  background: var(--bg-dark);
  color: #a7f3d0;
  padding: 15px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px solid #1e293b;
}

/* ==========================================================================
   Public Blog Layouts
   ========================================================================== */
.blog-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #173510 100%);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(191, 144, 35, 0.2);
}

.blog-banner::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191, 144, 35, 0.7), transparent);
}

.blog-banner-content {
  max-width: 800px;
  margin: 0 auto;
}

.blog-subtitle {
  color: var(--secondary-color);
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.blog-title {
  color: var(--text-light);
  font-size: 2.8rem;
  font-family: var(--font-heading);
}

@media (max-width: 768px) {
  .blog-title { font-size: 2rem; }
}

.tag-filter-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding: 10px 15px;
  background: rgba(191, 144, 35, 0.1);
  border: 1px solid rgba(191, 144, 35, 0.2);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.clear-tag-btn {
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.clear-tag-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.no-posts-container {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

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

.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(191, 144, 35, 0.3);
}

.blog-card-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-light);
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  font-size: 0.82rem;
  color: var(--text-gray);
  margin-bottom: 12px;
  display: flex;
  gap: 15px;
}

.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.35;
}

.blog-card-title a:hover {
  color: var(--secondary-hover);
}

.blog-card-excerpt {
  color: var(--text-gray);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: auto;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-tag-badge {
  background: var(--bg-light);
  color: var(--primary-color);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.blog-tag-badge:hover {
  background: var(--secondary-color);
  color: var(--primary-hover);
  border-color: var(--secondary-color);
}

.blog-card-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

.blog-card-link:hover {
  color: var(--secondary-hover);
}

.blog-card-link i {
  transition: transform 0.25s var(--ease-out);
}

.blog-card-link:hover i {
  transform: translateX(4px);
}

/* ==========================================================================
   Public Blog Post Detail View
   ========================================================================== */
.post-detail-container {
  max-width: 800px;
  margin: 40px auto 80px auto;
  padding: 0 20px;
}

.post-header {
  margin-bottom: 30px;
}

.btn-back-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 25px;
}

.btn-back-blog:hover {
  color: var(--primary-color);
}

.post-meta {
  font-size: 0.88rem;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.post-detail-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .post-detail-title { font-size: 2.2rem; }
}

.post-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.post-hero-image-wrapper {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .post-hero-image-wrapper {
    aspect-ratio: 16 / 10;
  }
}

.post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.post-content p {
  margin-bottom: 25px;
  text-align: justify;
}

.post-footer-actions {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Modals (Popups) for Admin Forms
   ========================================================================== */
.admin-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 16, 4, 0.45); /* Dark branding overlay */
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

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

.admin-modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(191, 144, 35, 0.25);
  box-shadow: var(--shadow-lg), var(--glow-gold);
  width: 100%;
  max-width: 750px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 35px;
  position: relative;
  animation: scaleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-gray);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-light);
  transition: var(--transition);
}

.close-modal:hover {
  background: #fee2e2;
  color: #ef4444;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Include buttons above lists */
.list-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.btn-include {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  color: var(--bg-white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-include:hover {
  background: linear-gradient(135deg, var(--secondary-bright), var(--secondary-color));
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Admin Search & Pagination Controls
   ========================================================================== */
.admin-search-wrapper {
  margin-bottom: 20px;
  position: relative;
  width: 100%;
}

.admin-search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  background: var(--bg-white);
  transition: var(--transition);
}

.admin-search-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(191, 144, 35, 0.15);
}

.admin-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  pointer-events: none;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: rgba(35, 78, 24, 0.05);
}

.pagination-btn:disabled {
  color: var(--text-gray);
  border-color: var(--border-color);
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.88rem;
  color: var(--text-gray);
  font-weight: 500;
}

/* ==========================================================================
   Quill Editor styling overrides
   ========================================================================== */
.quill-editor-wrapper {
  margin-bottom: 15px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.quill-editor-wrapper .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  padding: 8px;
}

.quill-editor-wrapper .ql-container.ql-snow {
  border: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.quill-editor-wrapper .ql-editor {
  min-height: 250px;
  max-height: 400px;
}

/* API Tokens Tab Styles */
.tokens-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.tokens-table th {
  padding: 12px 10px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-color);
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-light);
}

.tokens-table td {
  padding: 14px 10px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.tokens-table tr:hover {
  background-color: rgba(35, 78, 24, 0.02);
}

.btn-copy-token {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 0.95rem;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-copy-token:hover {
  color: var(--secondary-color);
  background-color: rgba(191, 144, 35, 0.1);
}

/* ==========================================================================
   Public Form Pages (Leads / Trabalhe Conosco)
   ========================================================================== */
.form-page {
  max-width: 720px;
  margin: 60px auto 90px auto;
  padding: 0 20px;
}

.form-page-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 40px 45px;
}

.form-page-head {
  text-align: center;
  margin-bottom: 30px;
}

.form-page-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  color: var(--secondary-bright);
  font-size: 1.6rem;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.form-page-head h1 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.form-page-head p {
  color: var(--text-gray);
  font-size: 0.98rem;
  max-width: 520px;
  margin: 0 auto;
}

.form-page-form .admin-form-submit {
  margin-top: 22px;
  padding: 15px;
  font-size: 1rem;
}

.career-either-help {
  font-size: 0.85rem;
  color: var(--text-gray);
  background: var(--bg-light);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.career-either-help i {
  color: var(--secondary-color);
  margin-right: 4px;
}

/* DDI / country select */
.ddi-select {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-white);
  width: 100%;
}

.ddi-select:focus {
  border-color: var(--secondary-color);
}

@media (max-width: 600px) {
  .form-page-card {
    padding: 28px 20px 32px;
  }
  .form-page-head h1 {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   User photo preview (round box) — admin user & profile forms
   ========================================================================== */
.photo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.photo-preview {
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
  background: var(--bg-light);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Admin — Leads & Candidatos
   ========================================================================== */
.tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--secondary-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.candidate-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.candidate-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.candidate-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-color);
}

.candidate-position {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-top: 2px;
}

.candidate-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
  font-size: 0.85rem;
}

.candidate-contact a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.candidate-contact a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.candidate-experience {
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.55;
  white-space: pre-wrap;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: 4px;
}

/* ============================================================
   Modais modernos (substituem alert() e confirm() nativos)
   ============================================================ */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 16, 4, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
}

.app-modal-overlay.is-visible {
  opacity: 1;
}

body.app-modal-open {
  overflow: hidden;
}

.app-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 28px;
  text-align: center;
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s var(--ease-out), opacity 0.32s var(--ease-out);
}

/* Fina barra dourada no topo, alinhada ao branding */
.app-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--secondary-color), var(--secondary-bright));
}

.app-modal-overlay.is-visible .app-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.app-modal-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.7rem;
  color: var(--primary-color);
  background: rgba(35, 78, 24, 0.10);
}

.app-modal--info .app-modal-icon {
  color: var(--primary-color);
  background: rgba(35, 78, 24, 0.10);
}
.app-modal--confirm .app-modal-icon {
  color: var(--secondary-hover);
  background: rgba(191, 144, 35, 0.14);
}
.app-modal--warning .app-modal-icon,
.app-modal--error .app-modal-icon {
  color: #b4531f;
  background: rgba(180, 83, 31, 0.12);
}
.app-modal--success .app-modal-icon {
  color: var(--accent-color);
  background: rgba(56, 124, 38, 0.14);
}

.app-modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.app-modal-message {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-gray);
  margin-bottom: 26px;
  white-space: pre-line;
}

.app-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.app-modal-btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.app-modal-btn--primary {
  color: var(--text-light);
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-color));
  box-shadow: var(--shadow-sm);
}
.app-modal-btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.app-modal-btn--ghost {
  color: var(--primary-color);
  background: transparent;
  border-color: var(--border-color);
}
.app-modal-btn--ghost:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
}

.app-modal-btn:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .app-modal-actions {
    flex-direction: column-reverse;
  }
  .app-modal-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-modal-overlay,
  .app-modal {
    transition: opacity 0.15s linear;
  }
  .app-modal {
    transform: none;
  }
}

