
/* ============================================================
   RentaHouse PH - Main Stylesheet
   ============================================================ */

:root {
  --primary:       #434e5e;
  --primary-dark:  #30345277;
  --primary-light: #424268b6;
  --secondary:     #637c91;
  --success:       #198754;
  --warning:       #ffc107;
  --danger:        #dc3545;
  --info:          #0dcaf0;
  --teal:          #20c997;
  --orange:        #fd7e14;
  --dark:          #373838;
  --light:         #b6adadbd;
  --white:         #ffffff;
  --body-bg:       #5e5e63b2;
  --card-shadow:   1 5px 25px rgba(0,0,0,.08);
  --card-hover:    1 13px 44px rgba(0, 0, 0, 0.15);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --transition:    all .3s cubic-bezier(.4,0,.2,1);
  --gradient-primary: linear-gradient(135deg, #475c7a 0%, #323536 100%);
  --gradient-hero:    linear-gradient(135deg, #282d35 0%, #404752 50%, #363a3d 100%);
  --gradient-card:    linear-gradient(135deg, #2e3347 0%, #5b4670 100%);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--body-bg);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ---- Navbar ---- */
#mainNavbar {
  background: var(--gradient-hero);
  backdrop-filter: blur(110px);
  border-bottom: 1px solid rgba(78, 64, 64, 0.1);
  padding: .75rem 0;
  transition: var(--transition);
  z-index: 1030;
}

#mainNavbar.scrolled {
  background: rgba(35, 35, 36, 0.521) !important;
  box-shadow: 0 4px 20px rgba(97, 97, 97, 0.2);
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
}

.brand-icon-sm { width: 32px; height: 32px; font-size: 1rem; }

.brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -.3px;
}

.footer-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark);
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .5rem .75rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.15);
}

/* ---- Hero ---- */
.hero-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 80px 0 100px;
  min-height: 500px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.pexels.com/photos/1396122/pexels-photo-1396122.jpeg') center/cover no-repeat;
  opacity: .12;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--body-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.hero-title span { color: #ffd700; }

.hero-subtitle {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: rgba(177, 160, 160, 0.85);
}

/* ---- Search Box ---- */
.search-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
  z-index: 2;
}

.search-box .form-control,
.search-box .form-select {
  border: 2px solid #e9ecef;
  border-radius: var(--radius-md);
  padding: .65rem 1rem;
  font-size: .9rem;
  transition: var(--transition);
}

.search-box .form-control:focus,
.search-box .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.1);
}

/* ---- Stats Bar ---- */
.stats-bar {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 2rem;
  margin-top: -30px;
  position: relative;
  z-index: 3;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: .78rem;
  color: var(--secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- Section Headers ---- */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
}

.section-subtitle { color: var(--secondary); font-size: .95rem; }

/* ---- Property Cards ---- */
.property-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: none;
  height: 100%;
  cursor: pointer;
}

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

.property-card-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}

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

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

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

.property-card-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  letter-spacing: .3px;
}

.property-card-body { padding: 1.25rem; }

.property-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
}

.property-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--dark);
  margin: .3rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-location {
  font-size: .82rem;
  color: var(--secondary);
}

.property-meta {
  display: flex;
  gap: .75rem;
  font-size: .8rem;
  color: var(--secondary);
  padding-top: .75rem;
  border-top: 1px solid #f0f0f0;
  margin-top: .75rem;
}

.property-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Filter Sidebar ---- */
.filter-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.filter-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--primary-dark);
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13,110,253,.3);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--gradient-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13,110,253,.3);
}

/* ---- Property Detail ---- */
.property-gallery { border-radius: var(--radius-lg); overflow: hidden; }

.gallery-main {
  height: 420px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

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

.gallery-thumb {
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: .7;
  transition: var(--transition);
  border: 2px solid transparent;
}

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

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

.info-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.75rem;
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .8rem;
  font-weight: 500;
  margin: 3px;
}

.owner-card {
  background: linear-gradient(135deg, #f8f9ff, #e8f0fe);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.pexels.com/photos/106399/pexels-photo-106399.jpeg') center/cover;
  opacity: .07;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 2;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.auth-logo .brand-icon { background: var(--gradient-primary); }

/* ---- Forms ---- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 2px solid #e9ecef;
  padding: .65rem 1rem;
  font-size: .9rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.1);
}

.form-label { font-weight: 500; font-size: .875rem; color: #495057; }

/* ---- Dashboard Cards ---- */
.dash-stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.dash-stat-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover); }
.dash-stat-card.success { border-color: var(--success); }
.dash-stat-card.warning { border-color: var(--warning); }
.dash-stat-card.danger  { border-color: var(--danger); }
.dash-stat-card.info    { border-color: var(--info); }
.dash-stat-card.teal    { border-color: var(--teal); }

.dash-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dash-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  line-height: 1.1;
}

/* ---- Reservation Cards ---- */
.reservation-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid #f0f0f0;
}

.reservation-card:hover { box-shadow: var(--card-hover); }

.reservation-img {
  width: 130px;
  min-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* ---- Message Thread ---- */
.message-bubble {
  max-width: 95%;
  padding: .5rem 1.0rem;
  border-radius: var(--radius-lg);
  font-size: 1.0rem;
  line-height: 1.50;
  word-break: break-word;
  font-style: italic;
  
}

.message-bubble.sent {
  background: var(--gradient-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.message-bubble.received {
  background: var(--gradient-primary);
  color: #ffffff;
  border-bottom-left-radius: 4px;
  margin-right: auto;
}

.message-time {
  font-size: .72rem;
  color: var(--secondary);
  margin-top: 4px;
}

/* ---- Profile ---- */
.profile-cover {
  height: 200px;
  background: var(--gradient-hero);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  overflow: hidden;
}

.profile-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.pexels.com/photos/1396122/pexels-photo-1396122.jpeg') center/cover;
  opacity: .2;
}

.profile-avatar-wrap {
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  object-fit: cover;
}

/* ---- Upload Zone ---- */
.upload-zone {
  border: 2px dashed #c0c9d8;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  background: #fafbff;
  transition: var(--transition);
  cursor: pointer;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ---- Alerts & Toasts ---- */
.alert { border-radius: var(--radius-md); border: none; }

.toast {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  backdrop-filter: blur(10px);
  min-width: 280px;
}

/* ---- Pagination ---- */
.pagination .page-link {
  border-radius: var(--radius-sm) !important;
  border: none;
  color: var(--primary);
  margin: 0 2px;
  transition: var(--transition);
}

.pagination .page-link:hover { background: var(--primary); color: #fff; }
.pagination .page-item.active .page-link { background: var(--gradient-primary); border: none; }

/* ---- Breadcrumb ---- */
.breadcrumb-item + .breadcrumb-item::before { color: var(--secondary); }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }

/* ---- Type Filter Pills ---- */
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .5rem 1.1rem;
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #cdcecf;
  background: #ffffff;
  color: var(--secondary);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.type-pill:hover, .type-pill.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13,110,253,.25);
}

/* ---- Footer ---- */
.footer { margin-top: auto; }

.footer-top { background: #ffffff; border-top: 1px solid #e9ecef; }

.footer-bottom { background: #464b507e; border-top: 1px solid #1f83e7; }

.footer-heading {
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--dark);
  margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--secondary); font-size: .875rem; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--gradient-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13,110,253,.3);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.animate-fade-up {
  animation: fadeInUp .6s ease both;
}

.animate-delay-1 { animation-delay: .1s; }
.animate-delay-2 { animation-delay: .2s; }
.animate-delay-3 { animation-delay: .3s; }
.animate-delay-4 { animation-delay: .4s; }
.animate-delay-5 { animation-delay: .5s; }

.card-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-lg);
  height: 300px;
}

/* ---- Listing image preview grid ---- */
.img-preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.img-preview-item {
  position: relative;
  width: 100px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid #e9ecef;
}

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

.img-preview-item .remove-img {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(220,53,69,.9);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  cursor: pointer;
  border: none;
  line-height: 1;
}

/* ---- Conversation list ---- */
.conv-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.conv-item:hover, .conv-item.active { background: var(--primary-light); color: inherit; }

.conv-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}



/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { padding: 60px 0 80px; }
  .gallery-main { height: 260px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .gallery-thumb { height: 60px; }
  .reservation-img { width: 90px; min-height: 100px; }
  .stats-bar { padding: 1rem; }
  .stat-number { font-size: 1.4rem; }
  .filter-card { position: static; margin-bottom: 1rem; }
}

@media (max-width: 576px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .info-card { padding: 1.25rem; }
  .search-box { padding: 1rem; }
  .hero-title { font-size: 1.75rem; }
}
