﻿/* Global styles – بصمة عقار (Arabic RTL) */

/* ===== CSS VARIABLES ===== */
:root {
  --primary:       #0a3d4e;   /* dark teal – logo background */
  --secondary:     #00b4c8;   /* cyan-teal – logo gradient */
  --accent:        #00d4a0;   /* green-teal – logo gradient end */
  --dark:          #020c10;   /* near black */
  --light:         #f0f9fb;   /* very light teal tint */
  --gray:          #64748b;
  --base-font:     'Cairo', sans-serif;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
  overflow-x: hidden;
  font-family: var(--base-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--dark);
  background: #ffffff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: #f1f5f9; }
::-webkit-scrollbar-thumb  { background: var(--secondary); border-radius: 999px; }
*  { scrollbar-width: thin; scrollbar-color: var(--secondary) #f1f5f9; }

/* ===== SELECTION ===== */
::selection { background: var(--secondary); color: white; }

/* ===== PRELOADER ===== */
#preloader {
  background: var(--primary);
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

/* ===== SCROLL TO TOP ===== */
#scrollTopBtn {
  transform: translateY(20px);
  transition: opacity .4s, transform .4s;
}
#scrollTopBtn.show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0);
}
#scrollTopBtn.show:hover { animation: pulseGlow 1.5s infinite; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 200, .4); }
  50%       { box-shadow: 0 0 0 10px rgba(0, 180, 200, 0); }
}

/* ===== NAV ACTIVE LINK ===== */
.nav-active {
  color: var(--secondary) !important;
  font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary);
  color: white;
  border-radius: 0.75rem;
  padding: .6rem 1.4rem;
  font-weight: 600;
  transition: background .25s, transform .2s, box-shadow .25s;
}
.btn-primary:hover {
  background: var(--dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 61, 78, .35);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  border-radius: 0.75rem;
  padding: .6rem 1.4rem;
  font-weight: 600;
  transition: background .25s, transform .2s, box-shadow .25s;
}
.btn-secondary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 180, 200, .35);
}

.btn-outline {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  border-radius: 0.75rem;
  padding: .5rem 1.4rem;
  font-weight: 600;
  transition: background .25s, color .25s;
}
.btn-outline:hover { background: var(--secondary); color: white; }

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(10, 61, 78, .08);
  transition: box-shadow .3s, transform .3s;
}
.card:hover {
  box-shadow: 0 8px 30px rgba(10, 61, 78, .15);
  transform: translateY(-3px);
}

/* ===== SECTION TITLE ===== */
.section-title {
  position: relative;
  display: inline-block;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--primary);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 50%;
  height: 3px;
  background: linear-gradient(to left, var(--secondary), var(--accent));
  border-radius: 9999px;
}

/* ===== CATEGORY BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 9999px;
}
.badge-residential { background: #e0f2f1; color: #00796b; }
.badge-industrial   { background: #fce4ec; color: #c62828; }
.badge-recreational { background: #f3e5f5; color: #6a1b9a; }
.badge-commercial   { background: #e3f2fd; color: #1565c0; }

/* ===== STATUS BADGES ===== */
.status-pending  { background: #fff8e1; color: #f57f17; }
.status-approved { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #ffebee; color: #c62828; }

/* ===== FORM ELEMENTS ===== */
select{
  padding: .65rem 2rem !important;  
}
.form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: .75rem;
  padding: .65rem 1.2rem !important;
  font-family: var(--base-font);
  font-size: .95rem;
  color: var(--dark);
  transition: border-color .25s, box-shadow .25s;
  outline: none;
  background: #fff;
}
.form-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 180, 200, .15);
}
.form-input::placeholder { color: #94a3b8; }

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .35rem;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ADMIN LAYOUT ===== */
#admin-layout { min-height: 100vh; }
#admin-sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--primary);
  transition: transform .3s;
  flex-shrink: 0;
}
#admin-sidebar a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  color: rgba(255,255,255,.75);
  border-radius: .75rem;
  margin: .2rem .75rem;
  transition: background .25s, color .25s;
  font-size: .9rem;
}
#admin-sidebar a:hover,
#admin-sidebar a.sidebar-active {
  background: rgba(0, 180, 200, .15);
  color: var(--secondary);
}
#admin-sidebar a.sidebar-active { font-weight: 700; }

/* ===== MOBILE OVERLAY & DRAWER ===== */
#mobile-drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
#mobile-drawer.show {
  transform: translateX(0);
}

/* ===== HEADER SCROLL EFFECT ===== */
#main-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Initial state (Top of page) - mostly transparent if on homepage with hero */
#main-header.header-top {
  background-color: transparent;
  box-shadow: none;
}
/* Scrolled state - Solid/Glass */
#main-header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  padding-top: 0;
  padding-bottom: 0;
} 
#main-header.header-scrolled .h-20 {
  height: 4.5rem; /* Shrink height on scroll */
}

/* Active Link Indicator */
.nav-link.active span { width: 100%; }
.nav-link.active { color: var(--primary); }

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float-btn {
  animation: waPulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.whatsapp-float-btn:hover {
  animation: none; /* Stop pulse on hover */
  transform: scale(1.05);
}
@keyframes waPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    transform: scale(1.03);
  }
}

/* ===== HEADER SPACER ===== */
/* Hidden on pages where the hero overlaps the header (add .no-header-spacer to <body>) */
body.no-header-spacer .header-spacer { display: none; }


/* ===================================================
   ROLE CARDS – App-Like Homepage (3 sections)
   =================================================== */

/* Grid wrapper: CSS Grid for layout control */
.role-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  padding: 0 2px;
}

/* Base card */
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 8px 14px;
  border-radius: 18px;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(13,94,120,0.55) 0%, rgba(10,61,78,0.75) 100%);
  border: 1px solid rgba(0,212,160,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
  min-height: 180px;
}

.role-card:hover {
  transform: translateY(-6px) scale(1.025);
  box-shadow:
    0 18px 44px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,212,160,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(0,212,160,0.45);
}

/* Shine overlay */
.role-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    transparent 55%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Featured (center) card – مالك عقار – GREEN accent */
.role-card--featured {
  background: linear-gradient(145deg, rgba(0,155,100,0.45) 0%, rgba(0,100,70,0.80) 100%);
  border-color: rgba(0,212,160,0.45);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,212,160,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
  z-index: 1;
}
.role-card--featured:hover {
  transform: translateY(-6px);
  box-shadow:
    0 22px 56px rgba(0,0,0,0.42),
    0 0 0 1px rgba(0,212,160,0.60),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border-color: rgba(0,212,160,0.60);
}

/* Searcher card – باحث عن – TEAL/SECONDARY accent */
.role-card--searcher {
  background: linear-gradient(145deg, rgba(0,140,180,0.50) 0%, rgba(0,80,120,0.80) 100%);
  border-color: rgba(0,180,200,0.35);
}
.role-card--searcher:hover {
  box-shadow:
    0 18px 44px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,180,200,0.50),
    inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(0,180,200,0.55);
}
.role-card--searcher .role-card__icon-wrap {
  background: rgba(0,180,200,0.18);
  border-color: rgba(0,180,200,0.35);
}
.role-card--searcher:hover .role-card__icon-wrap {
  background: rgba(0,180,200,0.28);
}
.role-card--searcher .role-card__svg {
  filter: drop-shadow(0 2px 6px rgba(0,180,200,0.5));
}
.role-card--searcher .role-card__btn {
  border-color: rgba(0,180,200,0.35);
  background: rgba(0,180,200,0.12);
}

/* Complaints card – شكاوى – WARM GOLD accent + horizontal on MOBILE */
.role-card--complaints {
  background: linear-gradient(145deg, rgba(180,110,0,0.45) 0%, rgba(100,55,0,0.80) 100%);
  border-color: rgba(245,158,11,0.35);
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: auto;
  padding: 14px 16px;
}
.role-card--complaints:hover {
  box-shadow:
    0 18px 44px rgba(0,0,0,0.35),
    0 0 0 1px rgba(245,158,11,0.50),
    inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(245,158,11,0.55);
}
.role-card--complaints .role-card__icon-wrap {
  background: rgba(245,158,11,0.18);
  border-color: rgba(245,158,11,0.35);
}
.role-card--complaints:hover .role-card__icon-wrap {
  background: rgba(245,158,11,0.28);
}
.role-card--complaints .role-card__svg {
  filter: drop-shadow(0 2px 6px rgba(245,158,11,0.5));
}
.role-card--complaints .role-card__btn {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.12);
}
.role-card--complaints .role-card__icon-wrap {
  margin: 0;
  flex-shrink: 0;
}
.role-card--complaints .role-card__text-wrap {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.role-card--complaints .role-card__text-wrap .role-card__desc {
  margin-bottom: 0;
}
.role-card--complaints .role-card__btn {
  width: auto;
  flex-shrink: 0;
  padding: 6px 14px;
}

/* Text wrap (used for complaints card layout) */
.role-card__text-wrap {
  display: contents; /* transparent wrapper by default */
}

/* SVG icon inside icon wrap */
.role-card__svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 6px rgba(0,212,160,0.4));
}

.role-card__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(6px);
  transition: background 0.3s, transform 0.3s;
}
.role-card__icon-wrap i {
  font-size: 1.85rem;
  color: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0,212,160,0.45));
}
.role-card:hover .role-card__icon-wrap {
  background: rgba(0,212,160,0.20);
  transform: scale(1.08);
}

/* Featured icon – bigger */
.role-card__icon-wrap--featured {
  width: 58px;
  height: 58px;
  background: rgba(0,212,160,0.18);
  border-color: rgba(0,212,160,0.35);
}
.role-card__icon-wrap--featured i {
  font-size: 2.1rem;
  filter: drop-shadow(0 3px 8px rgba(0,212,160,0.55));
}

/* Card title */
.role-card__title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

/* Card description */
.role-card__desc {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
  margin-bottom: 10px;
  flex: 1;
}

/* CTA button inside card */
.role-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background 0.25s, border-color 0.25s;
}
.role-card__btn i {
  font-size: 0.7rem;
  transition: transform 0.25s;
}
.role-card:hover .role-card__btn {
  background: rgba(0,212,160,0.22);
  border-color: rgba(0,212,160,0.55);
}
.role-card:hover .role-card__btn i {
  transform: translateX(-3px);
}

/* Featured CTA button */
.role-card__btn--featured {
  background: rgba(0,212,160,0.18);
  border-color: rgba(0,212,160,0.45);
}
.role-card--featured:hover .role-card__btn--featured {
  background: rgba(0,212,160,0.30);
}

/* ── Responsive: md+ (≥768px) ── */
/* On desktop: 3 equal columns, complaints becomes vertical like others */
@media (min-width: 768px) {
  .role-cards-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    max-width: 860px;
  }
  .role-card {
    padding: 32px 22px 26px;
    min-height: 300px;
  }
  .role-card--featured {
    min-height: 340px;
    transform: scale(1.04);
  }
  .role-card--featured:hover {
    transform: scale(1.04) translateY(-6px);
  }
  /* Complaints revert to vertical on desktop */
  .role-card--complaints {
    grid-column: auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    min-height: 300px;
    padding: 32px 22px 26px;
  }
  .role-card--complaints .role-card__icon-wrap {
    margin: 0 auto 16px;
  }
  .role-card--complaints .role-card__text-wrap {
    text-align: center;
  }
  .role-card--complaints .role-card__text-wrap .role-card__desc {
    margin-bottom: 10px;
  }
  .role-card--complaints .role-card__btn {
    width: 100%;
    padding: 10px 18px;
  }
  .role-card__svg          { width: 44px; height: 44px; }
  .role-card__icon-wrap    { width: 84px; height: 84px; margin: 0 auto 16px; }
  .role-card__icon-wrap--featured { width: 96px; height: 96px; }
  .role-card__title        { font-size: 1.3rem; margin-bottom: 8px; }
  .role-card__desc         { font-size: 0.88rem; margin-bottom: 18px; }
  .role-card__btn          { font-size: 0.9rem; padding: 10px 18px; }
}

/* ===== HERO / STEPS PAGES ===== */
/* Used by index.html, seeker-*, owner-*, complaints.html */
.steps-page body, body.steps-page {
  font-family: 'Cairo', sans-serif;
  overflow-x: hidden;
  background: #0a3d4e;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageEnter .6s ease-out both; }

/* Category grid – 3 cols for 10 items */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  padding: 0 2px;
}
@media (max-width: 500px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
.cat-grid .role-card__title  { font-size: 0.78rem; }
.cat-grid .role-card__desc   { font-size: 0.58rem; }
.cat-grid .role-card         { min-height: 160px; padding: 12px 6px; }
.cat-grid .role-card__icon-wrap { width: 46px; height: 46px; }
.cat-grid .role-card__svg    { width: 24px; height: 24px; }

/* ===== USER MESSAGES PAGE ===== */
.chat-layout  { height: calc(100vh - 80px - 4.5rem); min-height: 500px; }
.conv-item    { transition: background .2s; }
.conv-item:hover  { background: #f0f9fb; }
.conv-item.active { background: linear-gradient(135deg, rgba(10,61,78,.07), rgba(0,180,200,.07)); border-right: 3px solid #0a3d4e; }
.bubble-out {
  background: linear-gradient(135deg, #0a3d4e, #0d5268);
  color: #fff;
  border-radius: 1rem 1rem 0 1rem;
  max-width: 70%;
}
.bubble-in {
  background: #fff; color: #1e293b;
  border-radius: 1rem 1rem 1rem 0;
  border: 1px solid #e2e8f0;
  max-width: 70%;
}
.bubble-in  .bubble-meta { color: #94a3b8; }
.bubble-out .bubble-meta { color: rgba(255,255,255,.6); }
.unread-dot {
  width: 8px; height: 8px;
  background: #00b4c8; border-radius: 9999px; flex-shrink: 0;
}
.unread-count {
  min-width: 20px; height: 20px;
  background: #0a3d4e; color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.conv-scroll, .msg-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.conv-scroll::-webkit-scrollbar, .msg-scroll::-webkit-scrollbar { width: 4px; }
.conv-scroll::-webkit-scrollbar-thumb, .msg-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.empty-chat { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-8px); } }
.tick-read { color: #00b4c8; }
.tick-sent { color: rgba(255,255,255,.5); }
#conv-sidebar.open { transform: translateX(0) !important; }

/* ===== LISTING PAGE ===== */
.active-filter-type  { background: #0a3d4e; color: #fff !important; border-color: #0a3d4e; }
.filter-type-btn     { color: #64748b; }
.active-rooms-btn    { background: #0a3d4e; color: #fff !important; border-color: #0a3d4e; }
.active-view         { background: white; color: #0a3d4e; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.property-card-link  { display: block; text-decoration: none; color: inherit; }
.property-card-link:hover { text-decoration: none; }
.property-card-link .property-card { height: 100%; }

/* List view layout */
#properties-container.list-view { grid-template-columns: 1fr !important; }
#properties-container.list-view .property-card-link { display: block !important; width: 100%; }
#properties-container.list-view .property-card {
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  grid-template-rows: 1fr;
  min-height: 140px; overflow: hidden;
}
#properties-container.list-view .property-card > div:first-child      { grid-column: 1; grid-row: 1; overflow: hidden; }
#properties-container.list-view .property-card > div:first-child > div:first-child { width: 100% !important; height: 100% !important; min-height: 140px !important; border-radius: 0 !important; }
#properties-container.list-view .property-card > div:nth-child(2)     { grid-column: 2; grid-row: 1; min-width: 0; padding: 0.75rem !important; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
#properties-container.list-view .property-card h3                     { font-size: 0.78rem !important; }
#properties-container.list-view .property-card p,
#properties-container.list-view .property-card span                   { font-size: 0.7rem !important; }

/* ===== OPS GRID (seeker-operation.html) ===== */
.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  padding: 0 2px;
}
@media (max-width: 500px) { .ops-grid { grid-template-columns: 1fr 1fr; } }

/* ===== EVENTS GRID (seeker-events.html) ===== */
.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}
@media (max-width: 500px) { .events-grid { grid-template-columns: 1fr 1fr; } }

/* ===== SUB GRID (owner-type.html) ===== */
.sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}
.sub-grid.four-col { grid-template-columns: 1fr 1fr; }
@media (min-width: 600px) { .sub-grid.four-col { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.sub-grid .role-card          { min-height: 170px; padding: 12px 8px; }
.sub-grid .role-card__title   { font-size: 0.80rem; }
.sub-grid .role-card__desc    { font-size: 0.59rem; }
.sub-grid .role-card__icon-wrap { width: 46px; height: 46px; }
.sub-grid .role-card__svg     { width: 24px; height: 24px; }
