/* =========================================
   CoHome SG — Global Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
  /* Brand Colours */
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #c8a96e;
  --accent-hover: #b8954f;
  --accent-light: rgba(200, 169, 110, 0.12);
  --gold-gradient: linear-gradient(135deg, #c8a96e 0%, #e8d5a3 50%, #c8a96e 100%);

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f8f5f0;
  --light-grey: #f0ebe4;
  --mid-grey: #d4c9bc;
  --dark-grey: #6b6560;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5450;
  --text-muted: #9a928c;

  /* Status */
  --available: #2d7a4f;
  --available-bg: #eaf5ee;
  --occupied: #c0392b;
  --occupied-bg: #fdeaea;

  /* Typography */
  --font-heading: 'Abhaya Libre', Georgia, serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-pad: 80px 0;
  --section-pad-mobile: 50px 0;
  --container-max: 1280px;
  --container-pad: 0 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.08);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.12);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --shadow-xl: 0 24px 64px rgba(26, 26, 46, 0.2);

  /* Borders */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 20px;
  --border-radius-pill: 999px;
  --border: 1px solid rgba(200, 169, 110, 0.2);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--primary);
}
h1 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 600; }

p { color: var(--text-secondary); line-height: 1.75; }

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
}

/* ── Section ── */
.section { padding: var(--section-pad); }
.section-title {
  font-family: var(--font-heading);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold-gradient);
  margin: 16px auto 0;
  border-radius: var(--border-radius-pill);
}

/* ── Gold Accent Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-available { background: var(--available-bg); color: var(--available); }
.badge-occupied { background: var(--occupied-bg); color: var(--occupied); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--border-radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold-gradient);
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 169, 110, 0.55);
}

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
  background: #1fbd59;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}
.btn-whatsapp .material-icons { font-size: 1.1rem; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}

.navbar .navbar-links a,
.navbar .navbar-logo .logo-text {
  color: var(--primary);
}

.navbar .navbar-hamburger span {
  background: var(--primary);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}

.navbar-inner {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo img {
  display: block;
  height: 65px !important;
  width: auto;
}

.navbar-logo-text {
  display: none;
}

.navbar-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  transition: var(--transition);
}

.navbar.scrolled .navbar-logo .logo-text {
  color: var(--primary);
}

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

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: center;
}

.navbar-links a {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: var(--transition);
  position: relative;
}

.navbar.solid .navbar-links a {
  color: rgba(255,255,255,0.9);
}

.navbar.scrolled .navbar-links a {
  color: var(--text-primary);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.navbar-links a:hover { color: var(--accent); }
.navbar-links a:hover::after { width: 100%; }
.navbar-links a.active { color: var(--accent); }
.navbar-links a.active::after { width: 100%; }

.navbar-cta {
  background: var(--gold-gradient);
  color: var(--primary) !important;
  padding: 8px 20px;
  border-radius: var(--border-radius-pill);
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.35);
}
.navbar.solid .navbar-cta {
  border: 1px solid var(--accent);
}
.navbar-cta:hover { transform: translateY(-2px); }
.navbar-cta::after { display: none !important; }

.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.navbar-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar.scrolled .navbar-hamburger span {
  background: var(--primary);
}

/* WhatsApp mobile button — hidden on desktop */
.navbar-whatsapp-mobile {
  display: none;
}

/* WhatsApp desktop button */
.navbar-whatsapp-desktop {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: end;
  background: #25D366;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--border-radius-pill);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
  flex-shrink: 0;
}
.navbar-whatsapp-desktop:hover {
  background: #1fbd59;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--white);
  backdrop-filter: blur(20px);
  padding: 24px;
  z-index: 1002;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--light-grey);
  transform: translateY(-20px);
  opacity: 0;
  transition: var(--transition);
}
.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav a {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); }
.mobile-nav a:last-child { border-bottom: none; }

/* ── Footer ── */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-brand img {
  display: block;
  height: 180px !important;
}
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: 0.9rem; line-height: 1.8; color: rgba(255,255,255,0.6); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200, 169, 110, 0.2);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); padding-left: 4px; }

.footer-contact p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-contact .material-icons { font-size: 1rem; color: var(--accent); }

.footer-bottom {
  max-width: var(--container-max);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.825rem; color: rgba(255,255,255,0.4); }

/* ── Room Card ── */
.room-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-grey);
  transition: var(--transition);
  cursor: pointer;
  flex: 0 0 auto;
  width: 300px;
}
.room-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.room-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #f5f5f5;
}
.room-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.room-card:hover .room-card-img img { transform: scale(1.05); }

.room-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.room-card-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: var(--border-radius-pill);
  background: rgba(26, 26, 46, 0.78);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.room-card-body {
  padding: 16px;
}

.room-card-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}

.room-card-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.room-card-price span { font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }

.room-card-address {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.room-card-address .material-icons { font-size: 0.95rem; color: var(--accent); }

.room-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.room-card-feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--light-grey);
  padding: 3px 8px;
  border-radius: var(--border-radius-pill);
}
.room-card-feature .material-icons { font-size: 0.85rem; color: var(--accent); }

/* ── Utilities ── */
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Gold divider */
.gold-divider {
  width: 60px;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: var(--border-radius-pill);
  margin: 16px 0;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0ebe4 25%, #e8e0d5 50%, #f0ebe4 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: var(--border-radius-sm);
}
@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: var(--section-pad-mobile); }

  /* Compact mobile navbar */
  .navbar {
    height: 56px;
    padding: 0 16px;
  }
  .navbar-logo img {
    height: 36px !important;
  }
  .navbar-links { display: none; }
  .navbar-whatsapp-desktop { display: none; }
  .navbar-hamburger { display: flex; }

  /* WhatsApp icon button — left of mobile navbar */
  .navbar-whatsapp-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
    transition: var(--transition);
  }
  .navbar-whatsapp-mobile:hover {
    background: #1fbd59;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  }

  /* Logo centered absolutely so it's truly in the middle */
  .navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  .navbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
  }
  .navbar-logo-text {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
  }

  /* Mobile nav dropdown sits below compact bar */
  .mobile-nav {
    top: 56px;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
