/* =============================
   Rent Free Society — Brand Theme
   Blue + White, light theme, clean & minimal
============================= */

:root {
  --primary: #DC0F62;
  --primary-dark: #9E0B47;
  --primary-light: #FCE7EF;
  --secondary: #00A699;
  --secondary-dark: #00857A;
  --secondary-light: #E1F6F4;
  --white: #FFFFFF;
  --surface: #F7F7F7;
  --text-dark: #222222;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(17, 24, 39, 0.06);
  --shadow-hover: 0 10px 28px rgba(220, 15, 98, 0.18);
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

a { text-decoration: none; }

/* ---------- Navbar ---------- */
.navbar-brand {
  display: flex;
  align-items: center;
}
.navbar-brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 1.65rem;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  line-height: 1;
}
.navbar-brand-address { color: var(--secondary); }

.navbar {
  background-color: var(--white) !important;
  border-bottom: 1px solid var(--border);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.35rem;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary) !important;
}

/* ---------- Buttons ---------- */
/* Consistent, moderate rounding (not pill-shaped) + a smooth lift-on-hover
   animation, applied sitewide so every button (primary, outline, secondary,
   sm/lg sizes) behaves and feels the same. */
.btn {
  border-radius: 1px;
  font-weight: 400;
  padding: 0.55rem 1.3rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(22, 34, 90, 0.15);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(22, 34, 90, 0.12);
}
.btn-sm { border-radius: 1px; padding: 0.35rem 0.9rem; }
.btn-lg { border-radius: 10px; padding: 0.75rem 1.75rem; }

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ---------- Search / Form basics ---------- */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- Section titles ---------- */
.section-title {
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ---------- Property Cards ---------- */
.property-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}
.property-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.property-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--surface);
}
.property-card .card-body {
  padding: 1.1rem;
}
.property-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
}
.property-title {
  font-weight: 400;
  color: var(--text-dark);
  font-size: 1.02rem;
  margin: 0.3rem 0;
}
.property-location {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.property-meta {
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.badge-type {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}
.badge-status-pending { background: #FEF3C7; color: #92400E; }
.badge-status-approved { background: #D1FAE5; color: #065F46; }
.badge-status-rejected { background: #FEE2E2; color: #991B1B; }

/* ---------- Generic surfaces ---------- */
.bg-surface { background-color: var(--surface); }

.card-flat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Sidebar (Owner / Admin dashboards) ---------- */
.dash-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 65px);
  padding: 1.5rem 1rem;
}
.dash-sidebar .nav-link {
  color: var(--text-dark);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.dash-sidebar .nav-link.active,
.dash-sidebar .nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.dash-main {
  padding: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.stat-card .stat-number {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
footer {
  background: var(--text-dark);
  color: #D1D5DB;
  padding: 2.5rem 0 1.2rem;
}
footer a { color: #D1D5DB; }
footer a:hover { color: var(--white); }
footer h6 { color: var(--white); font-weight: 700; }
.footer-brand-naya { color: var(--white); }
.footer-brand-address { color: var(--secondary); }
footer hr { border-color: #374151; }

/* ---------- Auth pages ---------- */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

/* ---------- Tables ---------- */
.table-clean th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--border);
}
.table-clean td {
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

/* ---------- Owner Contact Blur/Unlock ---------- */
.aa-blur-box {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.aa-unlock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* ---------- Property Detail Tabs ---------- */
.nav-tabs {
  border-bottom: 2px solid var(--border);
}
.nav-tabs .nav-link {
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.nav-tabs .nav-link:hover {
  color: var(--primary);
}

/* ---------- Secondary (orange) utilities ---------- */
.btn-secondary-aa {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
  font-weight: 400;
  border-radius: 1px;
  transition: all 0.15s ease;
}
.btn-secondary-aa:hover { background-color: var(--secondary-dark); border-color: var(--secondary-dark); color: #fff; }
.btn-secondary-aa:not(.btn-sm):not(.btn-lg) { padding: 0.55rem 1.3rem; }
.text-secondary-aa { color: var(--secondary) !important; }
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.85rem;
}
.star-rating i { color: #F5A623; }
.star-rating.lg { font-size: 1.1rem; }
.star-rating.lg i { font-size: 1.05rem; }

.badge-verified {
  background: var(--secondary-light);
  color: var(--secondary-dark);
  font-weight: 700;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Modern sticky navbar w/ blur ---------- */
.navbar {
  background-color: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-logo-icon { height: 44px; width: auto; }
@media (max-width: 767px) {
  .navbar-logo-icon { height: 36px; }
  .navbar-brand-text { font-size: 1.35rem; }
}

/* ---------- Dark Hero Banner (99acres-style) ---------- */
.hero-dark {
  background:
    linear-gradient(rgba(15,22,60,0.82), rgba(15,22,60,0.82)),
    url('https://images.unsplash.com/photo-1768230130990-6b4fe57778ce?fm=jpg&q=60&w=2400&auto=format&fit=crop') center 60% / cover no-repeat,
    linear-gradient(120deg, var(--primary-dark) 0%, #1B3A8C 55%, var(--primary) 100%);
  /* Real photo (city skyline / residential buildings), free to use under the
     Unsplash License — no attribution required. Currently hotlinked from
     Unsplash's CDN for simplicity; for a production site it's more reliable
     to download it once and self-host it at assets/img/hero-photo.jpg, then
     swap the url() above to url('../img/hero-photo.jpg'). */
  position: relative;
  overflow: hidden;
  padding-bottom: 4rem;
}
.hero-dark::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}
.hero-dark .container { position: relative; z-index: 1; }
.hero-dark-title {
  color: #fff;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  min-height: 1.3em;
}
.hero-dark-title span,
.hero-typewriter { color: var(--secondary); }
.hero-typewriter {
  display: inline-block;
  border-right: 3px solid var(--secondary);
  padding-right: 4px;
  animation: aa-blink 0.8s step-end infinite;
}
@keyframes aa-blink {
  0%, 100% { border-color: var(--secondary); }
  50% { border-color: transparent; }
}
.hero-dark-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}

/* Floating tab + search card, overlapping the dark banner */
.hero-search-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(22,34,90,0.18);
  margin-top: -3.5rem;
  padding: 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.hero-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.hero-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.hero-tab:hover { color: var(--primary); }
.hero-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.hero-tab-new {
  background: var(--secondary-light); color: var(--secondary-dark);
  font-size: 0.62rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 4px; vertical-align: middle;
}
.hero-tab-post {
  background: var(--primary-light); color: var(--primary) !important;
  border-radius: 8px 8px 0 0; font-weight: 400;
}
.hero-tab-free {
  background: var(--secondary); color: #fff;
  font-size: 0.62rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
}

.hero-search-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  padding: 1rem;
}
.hero-search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: 10px;
  padding: 0 0.9rem;
}
.hero-search-field i { color: var(--text-muted); }
.hero-search-field select, .hero-search-field input {
  background: transparent;
  border: none;
  box-shadow: none !important;
  padding: 0.7rem 0.3rem;
}
.hero-search-select { flex: 0 0 200px; }
.hero-search-text { flex: 1; }
.hero-search-btn { border-radius: 1px; padding: 0 1.8rem; font-weight: 400; }

@media (max-width: 767px) {
  .hero-search-row { flex-wrap: wrap; }
  .hero-search-select, .hero-search-text { flex: 1 1 100%; }
  .hero-search-btn { width: 100%; }
}


/* ---------- Category cards (Buy/Rent/PG-Hostel/Plots etc.) ---------- */
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  height: 100%;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.category-card .cat-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto 0.75rem;
  transition: all 0.2s ease;
}
.category-card:hover .cat-icon { background: var(--primary-light); }
.category-card.cat-pg .cat-icon { color: var(--secondary); border-color: var(--secondary-light); }
.category-card.cat-pg:hover .cat-icon { background: var(--secondary-light); }
.category-card .cat-title { font-weight: 700; color: var(--text-dark); font-size: 0.95rem; }
.category-card .cat-sub { font-size: 0.75rem; color: var(--text-muted); }

/* Distinct accent color per category — matches a colorful multi-icon
   reference layout instead of everything being the same blue/orange. */
.category-card.cat-purple .cat-icon { color: #7C3AED; border-color: #EDE4FE; }
.category-card.cat-purple:hover .cat-icon { background: #EDE4FE; }
.category-card.cat-blue .cat-icon { color: #DC0F62; border-color: var(--primary-light); }
.category-card.cat-blue:hover .cat-icon { background: var(--primary-light); }
.category-card.cat-orange .cat-icon { color: var(--secondary); border-color: var(--secondary-light); }
.category-card.cat-orange:hover .cat-icon { background: var(--secondary-light); }
.category-card.cat-pink .cat-icon { color: #EC4899; border-color: #FCE7F3; }
.category-card.cat-pink:hover .cat-icon { background: #FCE7F3; }
.category-card.cat-green .cat-icon { color: #16A34A; border-color: #DCFCE7; }
.category-card.cat-green:hover .cat-icon { background: #DCFCE7; }

/* Browse by Category — becomes a swipeable horizontal carousel on mobile
   instead of a 2-column grid that wraps into several rows. Desktop/tablet
   (≥768px) keeps the normal grid layout untouched. !important is used
   throughout because Bootstrap's own .row-cols-2 utility classes (width:50%
   on each card) were otherwise winning the cascade and leaving no overflow
   for the browser to actually scroll/slide. */
@media (max-width: 767px) {
  .category-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    margin: 0 -0.25rem;
  }
  .category-row::-webkit-scrollbar { display: none; }
  .category-row { scrollbar-width: none; }
  .category-row > .col {
    flex: 0 0 46% !important;
    width: 46% !important;
    max-width: 46% !important;
    scroll-snap-align: start;
    padding: 0 0.4rem;
  }
}

/* ---------- Explore by City (clean line-icon cards) ---------- */
.city-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 1.4rem 0.75rem 1.1rem;
  transition: all 0.2s ease;
  height: 100%;
}
.city-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.city-card .city-monument {
  width: 68px; height: 68px;
  margin: 0 auto 0.75rem;
  color: var(--primary);
}
.city-card .city-monument svg { width: 100%; height: 100%; }
.city-card .city-monument-photo {
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-light);
}
.city-card .city-monument-photo img { width: 100%; height: 100%; object-fit: cover; }
.city-card .city-label { color: var(--text-dark); font-weight: 700; font-size: 0.92rem; }
.city-card .city-count { display: block; font-weight: 400; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }


/* ---------- Stats counter ---------- */
.stats-strip { background: var(--primary-dark); color: #fff; padding: 2.5rem 0; }
.stats-strip .stat-num { font-size: 2.1rem; font-weight: 700; color: var(--secondary); }
.stats-strip .stat-lbl { font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* ---------- Testimonials ---------- */
.testimonial-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.testimonial-card .stars { color: var(--secondary); font-size: 0.85rem; margin-bottom: 0.5rem; }
.testimonial-card .quote { color: var(--text-muted); font-size: 0.9rem; font-style: italic; }
.testimonial-card .author { font-weight: 700; font-size: 0.85rem; margin-top: 0.75rem; }
.testimonial-card .author-role { font-size: 0.75rem; color: var(--text-muted); }

/* ---------- USP banner (Verified PG/Hostel) ---------- */
.usp-banner { background: linear-gradient(120deg, #9E0B47 0%, #DC0F628c 100%); border-radius: var(--radius); color: #fff; padding: 2.5rem; overflow: hidden; position: relative; }
.usp-banner .usp-badge { background: var(--secondary); color: #fff; font-weight: 400; font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 1px; display: inline-block; margin-bottom: 0.75rem; }

/* Compact variant — used for the side-by-side PG/Hostel + Flatmates cards,
   which previously each took a full-width section on their own and made
   the homepage feel very long. */
.usp-banner-compact {
  padding: 1.5rem;
  height: 100%;
}
.usp-banner-compact h4 { font-size: 1.15rem; }
.usp-banner-text { font-size: 0.88rem; opacity: 0.92; margin-bottom: 1rem; }

@media (max-width: 767px) {
  .hero-dark-title { font-size: 1.8rem; }
  .dash-sidebar { min-height: auto; }
}

/* Homepage banner carousel — image displays at its natural proportions
   (no forced aspect-ratio), so it's never cropped regardless of what
   dimensions the admin uploads. */
.banner-carousel { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.banner-carousel-img {
  width: 100%;
  height: auto;
  display: block;
}
.banner-carousel .carousel-caption {
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent 70%);
  border-radius: 0 0 var(--radius) var(--radius);
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1.25rem 1rem;
}
@media (max-width: 575px) {
  .banner-carousel .carousel-caption { padding: 1rem 0.85rem 0.6rem; }
  .banner-carousel .carousel-caption h5 { font-size: 1rem; margin-bottom: 0; }
}
.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next { width: 10%; }
@media (max-width: 575px) {
  .banner-carousel .carousel-control-prev-icon,
  .banner-carousel .carousel-control-next-icon { width: 1.5rem; height: 1.5rem; }
}

/* Sitewide "From Our Blog" carousel (above the footer, every page) */
/* "From Our Blog" — horizontally swipeable card row on every screen size
   (phones, tablets, desktop), same pattern as Browse-by-Category. */
.blog-scroll-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1.25rem;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
}
.blog-scroll-row::-webkit-scrollbar { display: none; }
.blog-scroll-card {
  flex: 0 0 260px;
  max-width: 260px;
  scroll-snap-align: start;
}
@media (max-width: 575px) {
  .blog-scroll-card { flex: 0 0 78%; max-width: 78%; }
}

/* Property detail gallery — responsive height (was a fixed 420px that ate
   most of the mobile viewport) and horizontally-scrolling thumbnails
   instead of wrapping into a cluttered multi-row grid on narrow screens. */
.property-gallery-main {
  height: 420px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 767px) {
  .property-gallery-main { height: 260px; }
}
@media (max-width: 480px) {
  .property-gallery-main { height: 220px; }
}
.property-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.property-gallery-thumbs::-webkit-scrollbar { display: none; }
