/* ==========================================================================
   Uparjon Real Estate — custom theme (layered on top of Bootstrap 5 CDN)
   ========================================================================== */

:root {
  --up-primary: #14364d;      /* deep navy — brand primary */
  --up-primary-dark: #0c2536;
  --up-accent: #c9973a;       /* gold — real estate accent */
  --up-accent-dark: #a8792a;
  --up-light: #f6f7f9;
  --up-muted: #6c7680;
  --up-border: #e5e8eb;
  --up-radius: 10px;
  --up-shadow: 0 6px 24px rgba(20, 54, 77, 0.08);
  --up-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--up-font);
  color: #263238;
  background: #fff;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--up-primary);
  text-decoration: none;
}

a:hover {
  color: var(--up-accent);
}

.up-container {
  max-width: 1240px;
}

/* ---- Buttons ---- */
.btn-uparjon {
  background: var(--up-accent);
  border-color: var(--up-accent);
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.6rem;
  border-radius: var(--up-radius);
}

.btn-uparjon:hover {
  background: var(--up-accent-dark);
  border-color: var(--up-accent-dark);
  color: #fff;
}

.btn-uparjon-outline {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.6rem;
  border-radius: var(--up-radius);
}

.btn-uparjon-outline:hover {
  background: #fff;
  color: var(--up-primary);
}

/* ---- Navbar ---- */
.up-navbar {
  background: var(--up-primary);
  padding: .85rem 0;
}

.up-navbar .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: clamp(.95rem, 4vw, 1.4rem);
  letter-spacing: .5px;
  max-width: calc(100% - 60px);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.up-navbar .navbar-brand span {
  color: var(--up-accent);
}

.up-navbar .navbar-toggler {
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .up-navbar .navbar-brand {
    max-width: calc(100% - 52px);
  }
}

.up-navbar .nav-link {
  color: rgba(255, 255, 255, .85);
  font-weight: 500;
  padding: .5rem 1rem !important;
}

.up-navbar .nav-link:hover,
.up-navbar .nav-link.active {
  color: var(--up-accent);
}

.up-navbar .dropdown-menu {
  border: none;
  border-radius: var(--up-radius);
  box-shadow: var(--up-shadow);
}

/* ---- Hero ---- */
.up-hero {
  position: relative;
  background: linear-gradient(135deg, var(--up-primary), var(--up-primary-dark));
  color: #fff;
  padding: 5.5rem 0;
}

.up-hero h1 {
  font-weight: 700;
  font-size: 2.6rem;
}

.up-hero p.lead {
  color: rgba(255, 255, 255, .85);
  max-width: 640px;
}

/* ---- Homepage image slider ---- */
.up-slider {
  position: relative;
}

.up-slider .carousel-item {
  transition: opacity .8s ease;
}

.up-slide {
  position: relative;
  height: 70vh;
  min-height: 460px;
  max-height: 720px;
  overflow: hidden;
}

.up-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.carousel-item.active .up-slide-img {
  transform: scale(1.12);
}

.up-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 37, 54, .35) 0%, rgba(12, 37, 54, .75) 100%);
}

.up-slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  text-align: left;
}

.up-slide-content h1 {
  font-weight: 700;
  font-size: 2.6rem;
  max-width: 700px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* Hover-reveal caption + CTA: hidden until the visitor hovers the slide */
.up-slide-hover-text {
  max-width: 620px;
  color: rgba(255, 255, 255, .92);
  font-size: 1.1rem;
  margin-top: .75rem;
  max-height: 0;
  opacity: 0;
  transform: translateY(12px);
  overflow: hidden;
  transition: opacity .35s ease, transform .35s ease, max-height .35s ease;
}

.up-slide-btn {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease .05s, transform .35s ease .05s;
  margin-top: 1.25rem;
  display: inline-block;
}

.up-slide:hover .up-slide-hover-text {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
  margin-top: 1rem;
}

.up-slide:hover .up-slide-btn {
  opacity: 1;
  transform: translateY(0);
}

.up-slide:hover .up-slide-img {
  transform: scale(1.06);
  transition: transform 6s ease;
}

.up-slider .carousel-indicators [data-bs-target] {
  background-color: rgba(255, 255, 255, .5);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
}

.up-slider .carousel-indicators .active {
  background-color: var(--up-accent);
}

.up-slider .carousel-control-prev,
.up-slider .carousel-control-next {
  width: 4%;
}

@media (max-width: 767px) {
  .up-slide {
    height: 55vh;
    min-height: 380px;
  }

  .up-slide-content h1 {
    font-size: 1.8rem;
  }

  /* No hover on touch devices — always show the caption/CTA */
  .up-slide-hover-text,
  .up-slide-btn {
    opacity: 1;
    transform: none;
    max-height: none;
    margin-top: .75rem;
  }
}

.up-hero .carousel-caption-content {
  position: relative;
  z-index: 1;
}

/* ---- Scroll-reveal animation ---- */
.up-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.21, .6, .35, 1), transform .7s cubic-bezier(.21, .6, .35, 1);
}

.up-reveal-left {
  transform: translate(-40px, 0);
}

.up-reveal-right {
  transform: translate(40px, 0);
}

.up-reveal.up-in-view {
  opacity: 1;
  transform: none;
}

/* Stagger consecutive reveal items within the same row/grid */
.row > [class*="col-"]:nth-child(1) .up-reveal,
.row > [class*="col-"]:nth-child(1).up-reveal { transition-delay: 0s; }
.row > [class*="col-"]:nth-child(2) .up-reveal,
.row > [class*="col-"]:nth-child(2).up-reveal { transition-delay: .1s; }
.row > [class*="col-"]:nth-child(3) .up-reveal,
.row > [class*="col-"]:nth-child(3).up-reveal { transition-delay: .2s; }
.row > [class*="col-"]:nth-child(4) .up-reveal,
.row > [class*="col-"]:nth-child(4).up-reveal { transition-delay: .3s; }
.row > [class*="col-"]:nth-child(5) .up-reveal,
.row > [class*="col-"]:nth-child(5).up-reveal { transition-delay: .4s; }
.row > [class*="col-"]:nth-child(6) .up-reveal,
.row > [class*="col-"]:nth-child(6).up-reveal { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  .up-reveal,
  .up-reveal-left,
  .up-reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Section spacing ---- */
.up-section {
  padding: 4rem 0;
}

.up-section-title {
  font-weight: 700;
  color: var(--up-primary);
  margin-bottom: .5rem;
}

.up-section-subtitle {
  color: var(--up-muted);
  margin-bottom: 2.5rem;
}

.up-section-alt {
  background: var(--up-light);
}

/* ---- Project cards ---- */
.up-project-card {
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}

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

.up-project-card .up-project-img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.up-project-card .card-body {
  padding: 1.25rem;
}

.up-project-card .up-project-location {
  color: var(--up-muted);
  font-size: .9rem;
}

/* ---- Status badges ---- */
.up-badge-ongoing { background: #2f7dd1; }
.up-badge-upcoming { background: #c9973a; }
.up-badge-handed_over { background: #4caf50; }
.up-badge-ready { background: #6c5ce7; }

.up-status-badge {
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 50px;
  text-transform: capitalize;
  margin-right: .35rem;
}

.up-type-badge {
  background: var(--up-light);
  color: var(--up-primary);
  border: 1px solid var(--up-border);
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 50px;
}

/* ---- Projects listing page ---- */
.up-projects-banner {
  background: linear-gradient(135deg, var(--up-primary), var(--up-primary-dark));
  color: #fff;
  padding: 3.5rem 0;
}

.up-projects-banner h1 {
  font-weight: 700;
  margin-bottom: .5rem;
}

.up-projects-banner .lead {
  color: rgba(255, 255, 255, .85);
  margin: 0 auto;
  max-width: 560px;
}

.up-status-pills .nav-link {
  color: var(--up-primary);
  font-weight: 600;
  border-radius: 50px;
  padding: .5rem 1.25rem;
  margin: 0 .25rem .5rem;
  border: 1px solid var(--up-border);
}

.up-status-pills .nav-link.active {
  background: var(--up-accent);
  color: #fff;
  border-color: var(--up-accent);
}

.up-filter-bar {
  background: var(--up-light);
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 1.5rem;
}

/* ---- Project detail: image gallery ---- */
.up-gallery-main {
  position: relative;
  border-radius: var(--up-radius);
  overflow: hidden;
  background: var(--up-light);
}

.up-gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.up-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 37, 54, .55);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}

.up-gallery-nav:hover {
  background: var(--up-accent);
}

.up-gallery-prev { left: 12px; }
.up-gallery-next { right: 12px; }

.up-gallery-thumbs {
  display: flex;
  gap: .6rem;
  margin-top: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}

.up-gallery-thumb-nav {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: .6;
  border: 2px solid transparent;
  transition: opacity .2s ease, border-color .2s ease;
  flex-shrink: 0;
}

.up-gallery-thumb-nav:hover {
  opacity: .9;
}

.up-gallery-thumb-nav.active {
  opacity: 1;
  border-color: var(--up-accent);
}

/* ---- Project detail: at-a-glance box ---- */
.up-glance-card {
  background: #fff;
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 1.5rem;
  box-shadow: var(--up-shadow);
  position: sticky;
  top: 1rem;
}

.up-glance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.up-glance-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--up-border);
  font-size: .9rem;
}

.up-glance-list li:last-child {
  border-bottom: none;
}

.up-glance-list li span {
  color: var(--up-muted);
}

.up-glance-list li strong {
  color: var(--up-primary);
  text-align: right;
}

/* ---- Project detail: floor plans ---- */
.up-floor-plan-thumb {
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  background: #fff;
  padding: .5rem;
  width: 100%;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease;
}

.up-floor-plan-thumb:hover {
  box-shadow: var(--up-shadow);
  transform: translateY(-2px);
}

.up-floor-plan-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.up-floor-plan-thumb span {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--up-muted);
}

/* ---- Project detail: amenities ---- */
.up-amenity-item {
  padding: .5rem 0;
  color: var(--up-primary);
  font-size: .92rem;
}

@media (max-width: 767px) {
  .up-gallery-main img {
    height: 300px;
  }

  .up-glance-card {
    position: static;
  }
}

/* ---- Team / testimonial cards ---- */
.up-team-card,
.up-testimonial-card {
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 1.5rem;
  height: 100%;
  background: #fff;
}

.up-team-card img,
.up-testimonial-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
}

/* ---- Homepage stats bar ---- */
.up-stats-bar {
  background: var(--up-primary);
  padding: 2.75rem 0;
}

.up-stat-number {
  color: var(--up-accent);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.up-stat-label {
  color: rgba(255, 255, 255, .8);
  margin-top: .4rem;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---- Homepage feature (photo + text) section ---- */
.up-feature-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  box-shadow: var(--up-shadow);
}

/* ---- Homepage gallery preview ---- */
.up-gallery-thumb {
  border-radius: var(--up-radius);
  overflow: hidden;
  height: 160px;
  background: var(--up-light);
}

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

.up-gallery-thumb:hover img {
  transform: scale(1.08);
}

.up-gallery-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--up-primary);
  font-size: 1.5rem;
  background: var(--up-border);
}

/* ---- Homepage contact CTA ---- */
.up-cta {
  background: linear-gradient(135deg, var(--up-primary), var(--up-primary-dark));
  color: #fff;
  padding: 4.5rem 0;
}

.up-cta h2 {
  font-weight: 700;
  margin-bottom: .75rem;
}

.up-cta .lead {
  color: rgba(255, 255, 255, .85);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

/* ---- Forms ---- */
.up-form-card {
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 2rem;
  background: #fff;
  box-shadow: var(--up-shadow);
}

.form-label {
  font-weight: 600;
  font-size: .9rem;
}

/* ---- Footer ---- */
.up-footer {
  background: var(--up-primary-dark);
  color: rgba(255, 255, 255, .75);
  padding: 3rem 0 1.5rem;
}

.up-footer h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.up-footer a {
  color: rgba(255, 255, 255, .7);
}

.up-footer a:hover {
  color: var(--up-accent);
}

.up-footer .up-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  margin-right: .5rem;
}

.up-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: .85rem;
}

/* ---- Eyebrow labels ---- */
.up-eyebrow {
  display: inline-block;
  color: var(--up-accent);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ---- Hero floating quick-search ---- */
.up-hero-search-wrap {
  position: relative;
  z-index: 5;
  padding-bottom: 1.5rem;
}

.up-hero-search {
  background: #fff;
  border-radius: var(--up-radius);
  box-shadow: 0 20px 50px rgba(12, 37, 54, .25);
  padding: 1.5rem 1.5rem 1.25rem;
  margin-top: -70px;
  overflow: hidden;
  max-width: 100%;
}

.up-hero-search .form-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--up-muted);
  font-weight: 600;
  margin-bottom: .3rem;
}

.up-hero-search .form-select {
  border-radius: 8px;
  border-color: var(--up-border);
}

@media (max-width: 767px) {
  .up-hero-search {
    margin-top: -36px;
    padding: 1.1rem 1.1rem 1rem;
  }
}

/* ---- Horizontal scroll carousel (featured projects) ---- */
.up-scroll-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .25rem .25rem 1rem;
  scrollbar-width: none;
}

.up-scroll-track::-webkit-scrollbar {
  display: none;
}

.up-scroll-track > * {
  scroll-snap-align: start;
  flex: 0 0 320px;
}

.up-scroll-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--up-border);
  background: #fff;
  color: var(--up-primary);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.up-scroll-nav:hover {
  background: var(--up-accent);
  border-color: var(--up-accent);
  color: #fff;
}

/* ---- Project card media (image overlay, badges, hover CTA) ---- */
.up-project-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.up-project-media .up-project-img {
  transition: transform .5s ease;
}

.up-project-card:hover .up-project-media .up-project-img {
  transform: scale(1.08);
}

.up-project-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 37, 54, 0) 45%, rgba(12, 37, 54, .8) 100%);
}

.up-project-media-badges {
  position: absolute;
  top: .85rem;
  left: .85rem;
  display: flex;
  gap: .35rem;
  z-index: 2;
}

.up-project-media-cta {
  position: absolute;
  left: .9rem;
  bottom: -40px;
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  z-index: 2;
  transition: bottom .3s ease;
}

.up-project-card:hover .up-project-media-cta {
  bottom: .85rem;
}

.up-project-price {
  font-size: .88rem;
  color: var(--up-muted);
}

.up-project-price strong {
  color: var(--up-primary);
}

/* ---- Icon badges (mission / vision) ---- */
.up-icon-badge {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 151, 58, .12);
  color: var(--up-accent);
  margin-bottom: 1rem;
}

/* ---- Feature section floating stat badge ---- */
.up-feature-media {
  position: relative;
}

.up-feature-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  background: #fff;
  border-radius: var(--up-radius);
  box-shadow: 0 20px 40px rgba(12, 37, 54, .2);
  padding: 1.1rem 1.6rem;
  text-align: center;
  border-bottom: 4px solid var(--up-accent);
}

.up-feature-badge .up-stat-number {
  color: var(--up-primary);
  font-size: 1.9rem;
}

.up-feature-badge .up-stat-label {
  color: var(--up-muted);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
  margin-top: 0;
}

@media (max-width: 767px) {
  .up-feature-badge {
    position: static;
    display: inline-block;
    margin-top: -2rem;
    margin-left: 1rem;
  }
}

/* ---- Testimonial carousel ---- */
.up-testimonial-carousel .carousel-item {
  padding: 0 0 1rem;
}

.up-testimonial-quote {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.up-testimonial-quote img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--up-accent);
  margin: 0 auto .75rem;
  display: block;
}

.up-quote-mark {
  display: block;
  font-size: 3.5rem;
  color: var(--up-accent);
  line-height: 1;
  font-family: Georgia, serif;
  margin-bottom: -.5rem;
}

.up-stars {
  color: var(--up-accent);
  letter-spacing: 2px;
  margin-bottom: .5rem;
}

/* ---- Gallery hover caption ---- */
.up-gallery-thumb {
  position: relative;
}

.up-gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: .75rem;
  background: linear-gradient(180deg, rgba(12, 37, 54, 0) 50%, rgba(12, 37, 54, .85) 100%);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity .3s ease;
}

.up-gallery-thumb:hover .up-gallery-caption {
  opacity: 1;
}

/* ---- Modern CTA with background image ---- */
.up-cta-modern {
  position: relative;
  padding: 5rem 0;
  color: #fff;
  overflow: hidden;
}

.up-cta-modern .up-cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.42);
  transform: scale(1.05);
}

.up-cta-modern .up-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 54, 77, .88), rgba(12, 37, 54, .82));
}

.up-cta-modern .container {
  position: relative;
  z-index: 2;
}

.up-cta-modern h2 {
  font-weight: 700;
  margin-bottom: .75rem;
}

.up-cta-modern .lead {
  color: rgba(255, 255, 255, .85);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

/* ---- Floating contact button ---- */
.up-float-contact {
  position: fixed;
  right: calc(1.5rem + env(safe-area-inset-right));
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--up-accent);
  color: #fff;
  padding: .8rem 1.3rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(201, 151, 58, .45);
  transition: transform .2s ease, background .2s ease;
}

.up-float-contact:hover {
  transform: translateY(-3px);
  background: var(--up-accent-dark);
  color: #fff;
}

.up-float-contact .up-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: up-pulse 1.8s infinite;
}

@keyframes up-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
  70% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@media (max-width: 575px) {
  .up-float-contact .up-float-label {
    display: none;
  }

  .up-float-contact {
    padding: .75rem;
  }
}

/* ---- Momentum scrolling for horizontal carousels on touch devices ---- */
.up-scroll-track {
  -webkit-overflow-scrolling: touch;
}

/* ---- Touch devices: show hover-only content by default (no hover state exists) ---- */
@media (hover: none) {
  .up-project-media-cta {
    bottom: .85rem;
  }

  .up-gallery-caption {
    opacity: 1;
    background: linear-gradient(180deg, rgba(12, 37, 54, 0) 55%, rgba(12, 37, 54, .82) 100%);
  }
}

/* ---- Small-screen (phone) polish: tighter, app-like spacing ---- */
@media (max-width: 575px) {
  .up-section {
    padding: 2.75rem 0;
  }

  .up-section-title {
    font-size: 1.5rem;
  }

  .up-section-subtitle {
    margin-bottom: 1.5rem;
  }

  .up-hero-search {
    padding: 1rem .85rem;
  }

  .up-hero-search .row > [class*="col-"] {
    padding-left: .4rem;
    padding-right: .4rem;
  }

  .up-scroll-track > * {
    flex-basis: 82vw;
  }

  .up-cta-modern {
    padding: 3.25rem 0;
  }

  .up-cta-modern h2 {
    font-size: 1.5rem;
  }

  .up-testimonial-quote .lead {
    font-size: 1.02rem;
  }

  .up-quote-mark {
    font-size: 2.75rem;
  }

  .up-feature-badge {
    padding: .9rem 1.25rem;
  }

  .up-gallery-thumb {
    height: 130px;
  }
}

/* ==========================================================================
   Admin panel
   ========================================================================== */

.up-admin-body {
  background: var(--up-light);
}

.up-admin-sidebar {
  background: var(--up-primary);
  min-height: 100vh;
  color: rgba(255, 255, 255, .85);
}

.up-admin-sidebar .brand {
  color: #fff;
  font-weight: 700;
  padding: 1.25rem 1.25rem;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.up-admin-sidebar .nav-link {
  color: rgba(255, 255, 255, .75);
  padding: .65rem 1.25rem;
  border-radius: 0;
}

.up-admin-sidebar .nav-link:hover,
.up-admin-sidebar .nav-link.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-left: 3px solid var(--up-accent);
}

.up-admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--up-border);
  padding: .85rem 1.5rem;
}

.up-admin-card {
  background: #fff;
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 1.5rem;
  overflow-x: auto;
}

/* ---- Admin mobile menu toggle (hamburger) ---- */
.up-admin-toggle {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}

.up-admin-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--up-primary);
  border-radius: 2px;
}

.up-admin-backdrop {
  display: none;
}

/* ---- Admin sidebar becomes an off-canvas drawer below the md breakpoint ---- */
@media (max-width: 767px) {
  .up-admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }

  .up-admin-sidebar.show {
    transform: translateX(0);
  }

  .up-admin-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 37, 54, .5);
    z-index: 1045;
  }

  .up-admin-backdrop.show {
    display: block;
  }

  .up-admin-topbar {
    padding: .75rem 1rem;
  }

  .up-admin-body main {
    padding: 1.25rem !important;
  }
}

@media (max-width: 575px) {
  .up-admin-body main {
    padding: 1rem !important;
  }

  .up-admin-card {
    padding: 1rem;
  }
}

/* ---- Admin data tables become stacked cards below the md breakpoint ---- */
@media (max-width: 767px) {
  .up-admin-card table.table {
    border: none;
  }

  .up-admin-card table.table thead {
    display: none;
  }

  .up-admin-card table.table,
  .up-admin-card table.table tbody,
  .up-admin-card table.table tr,
  .up-admin-card table.table td {
    display: block;
    width: 100%;
  }

  .up-admin-card table.table tr {
    border: 1px solid var(--up-border);
    border-radius: var(--up-radius);
    margin-bottom: 1rem;
    padding: .85rem;
  }

  .up-admin-card table.table tr:last-child {
    margin-bottom: 0;
  }

  .up-admin-card table.table td {
    border: none;
    padding: .4rem 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
  }

  .up-admin-card table.table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--up-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
  }

  /* Actions column: no label, left-align, let buttons wrap onto their own lines */
  .up-admin-card table.table td.text-end {
    text-align: left !important;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .up-admin-card table.table td.text-end::before {
    content: none;
  }

  /* Empty-state rows ("No X yet.") stay centered, not label-prefixed */
  .up-admin-card table.table td[colspan] {
    display: block;
    text-align: center;
  }

  .up-admin-card table.table td[colspan]::before {
    content: none;
  }
}

.up-stat-card {
  background: #fff;
  border: 1px solid var(--up-border);
  border-radius: var(--up-radius);
  padding: 1.5rem;
  border-left: 4px solid var(--up-accent);
}

.up-stat-card .up-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--up-primary);
}

.up-admin-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

/* ---- Utilities ---- */
.up-text-accent { color: var(--up-accent); }
.up-bg-primary { background: var(--up-primary); }
