/* ================================================================
   VILLACO — COMPONENTS
   Buttons · Badges · Cards (property, blog, why, service, type)
   Forms · Pagination · Stats bar · Testimonials
   ================================================================ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .92rem;
  transition: var(--transition);
  letter-spacing: .3px;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(5, 87, 189, .2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 87, 189, .3);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(182, 142, 101, .25);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(182, 142, 101, .35);
  color: var(--white);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 26px;
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, .7);
  color: var(--white);
  padding: 10px 26px;
  background: transparent;
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 15px 36px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 18px;
  font-size: .82rem;
}

.btn-cta-pill {
  padding: 10px 22px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 50px;
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-cta-pill:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-sale   { background: #E9DFCE; color: var(--primary); }
.badge-rent   { background: #e8f5e9; color: #2e7d32; }
.badge-lease  { background: #fff8e1; color: #f57f17; }
.badge-jv     { background: #ffebee; color: #c62828; }

.badge-available  { background: #e8f5e9; color: #2e7d32; }
.badge-sold       { background: #ffebee; color: #c62828; }
.badge-rented     { background: #fff8e1; color: #f57f17; }
.badge-off-market { background: #f5f5f5; color: #757575; }

/* ── BASE CARD ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── PROPERTY CARD ── */
.property-card {
  position: relative;
}

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

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

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

.property-card .card-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.property-card .card-price {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  border-radius: var(--radius-sm) 0 0 0;
}

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

.property-card .card-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

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

.property-card .card-location {
  color: var(--text-muted);
  font-size: .83rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-card .card-specs {
  display: flex;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.property-card .spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.property-card .spec svg {
  color: var(--primary);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  aspect-ratio: 4/3;
}

.card-img-placeholder i {
  font-size: 3rem;
  opacity: .2;
}

/* ── GRIDS ── */
.properties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.blog-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

/* ── BLOG CARD ── */
.blog-card .card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

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

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

.blog-card .card-body {
  padding: 22px;
}

.blog-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.blog-category {
  font-size: .73rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-xlight);
  padding: 3px 10px;
  border-radius: 30px;
}

.blog-date {
  font-size: .78rem;
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card p {
  font-size: .84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.65;
}

.blog-read-more {
  font-size: .84rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.blog-read-more:hover {
  gap: 10px;
  color: var(--primary-dark);
}

.blog-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  aspect-ratio: 16/9;
}

.blog-img-placeholder i {
  font-size: 3rem;
  opacity: .2;
}

/* ── WHY CARDS ── */
.why-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, 1fr);
}

.why-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(5, 87, 189, .12);
}

.why-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-xlight);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 1.7rem;
  transition: var(--transition);
}

.why-card:hover .why-icon {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1) rotate(-5deg);
}

.why-card h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.why-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── SERVICE CARDS ── */
.services-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.service-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--primary);
}

.service-card-inner {
  padding: 32px 28px;
}

.service-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  background: var(--primary-xlight);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.08);
}

.service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: .86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* ── PROPERTY TYPE CARDS ── */
.types-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

.type-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.type-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

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

.type-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 27, 42, .88) 0%, rgba(13, 27, 42, .2) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
  transition: var(--transition);
}

.type-card:hover .type-card-overlay {
  background: linear-gradient(to top, rgba(5, 87, 189, .9) 0%, rgba(5, 87, 189, .35) 55%, transparent 100%);
}

.type-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 1.2rem;
  transition: var(--transition);
}

.type-card:hover .type-card-icon {
  background: var(--accent);
}

.type-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--white);
}

.type-card-sub {
  font-size: .78rem;
  opacity: .8;
  color: rgba(255, 255, 255, .85);
}

/* ── CTA STRIP ── */
.cta-strip {
  position: relative;
  padding: 90px 0;
  text-align: center;
  overflow: hidden;
}

.cta-strip-bg {
  position: absolute;
  inset: 0;
  background: url('../images/cta-bg.jpg') center/cover no-repeat;
}

.cta-strip-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 87, 189, .92) 0%, rgba(4, 79, 168, .88) 100%);
}

.cta-strip-content {
  position: relative;
  z-index: 1;
}

.cta-strip h2 {
  color: var(--white);
  margin-bottom: 14px;
}

.cta-strip p {
  color: rgba(255, 255, 255, .82);
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.cta-strip .cta-label {
  color: var(--accent);
  background: rgba(232, 160, 32, .15);
}

.cta-strip .cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--primary);
  color: var(--white);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: .82rem;
  color: rgba(255, 255, 255, .75);
  margin-top: 6px;
}

/* ── TESTIMONIALS ── */
.testimonials-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-head);
  font-size: 6rem;
  line-height: 1;
  color: var(--primary-xlight);
  position: absolute;
  top: 8px;
  right: 18px;
  color: rgba(5, 87, 189, .07);
}

.testimonial-stars {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 14px;
}

.testimonial-text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}

.author-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--dark);
}

.author-role {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 20px;
}

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

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

.form-row-custom {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: .83rem;
  color: var(--dark);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 87, 189, .12);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* ── FILTERS ── */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.filter-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.filter-field:focus-within {
  border-color: var(--primary);
}

.filter-field svg {
  color: var(--primary);
  flex-shrink: 0;
}

.filter-field select,
.filter-field input {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: .86rem;
  color: var(--dark);
}

.filter-results {
  color: var(--text-muted);
  font-size: .86rem;
  margin-bottom: 20px;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text);
  border: 1.5px solid var(--border);
  background: var(--white);
}

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

/* ── HERO SEARCH BOX ── */
.hero-search {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-xl);
  margin-top: 48px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.search-field:focus-within {
  border-color: var(--primary);
  background: var(--white);
}

.search-field svg {
  color: var(--primary);
  flex-shrink: 0;
}

.search-field select,
.search-field input {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--dark);
}

.hero-search .btn {
  width: 100%;
  justify-content: center;
}

/* ── PROPERTY DETAIL ── */
.property-gallery {
  margin-bottom: 32px;
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

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

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.gallery-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  opacity: .65;
  transition: var(--transition);
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

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

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

.spec-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.spec-item:hover {
  border-color: var(--primary);
  background: var(--white);
}

.spec-item svg {
  color: var(--primary);
  margin-bottom: 6px;
}

.spec-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
}

.spec-name {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  border: 1px solid var(--border);
}

.sidebar-card h3 {
  font-size: 1rem;
  margin-bottom: 18px;
  color: var(--dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

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

.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: var(--text);
}

.amenity-item svg,
.amenity-item i {
  color: var(--primary);
  flex-shrink: 0;
}
