/* ==========================================================================
   ANFA INTERIOR — Architectural & Bespoke Interior Design
   Visual System for Pimpri Chinchwad, Moshi & Chikhali
   Mobile-Optimized Touch Experience & Precision Woodworking Showcase
   ========================================================================== */

:root {
  --bg-canvas: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-muted: #F3EFEA;
  --color-primary: #181716;        /* Deep obsidian */
  --color-primary-soft: #282624;
  --color-brass: #8F6B2E;          /* Brushed champagne brass */
  --color-brass-light: #F7F2E7;
  --color-brass-hover: #785822;
  --color-text-main: #242220;
  --color-text-muted: #6E6A65;
  --color-border: #E8E3DA;
  --color-border-dark: #32302D;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent body scroll when mobile menu or modal is open */
body.mobile-nav-open {
  overflow: hidden !important;
  touch-action: none !important;
}

h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* No-scrollbar utility for mobile horizontal swipe carousels & tabs */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glass Header */
.glass-header {
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

/* Hero Visual Layout */
.hero-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 40px -15px rgba(24, 23, 22, 0.12);
}

.hero-image-frame img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .hero-image-frame:hover img {
    transform: scale(1.03);
  }
}

/* Before / After Split Slider */
.before-after-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #181716;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.1);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.before-layer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;
  border-right: 2px solid #FFFFFF;
  pointer-events: none;
}

.before-layer img {
  pointer-events: none;
  user-select: none;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #FFFFFF;
  z-index: 25;
  pointer-events: none;
}

.handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #181716;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Video Card Netflix-Style */
.video-card {
  position: relative;
  background: #181716;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(24, 23, 22, 0.1);
  }
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(24, 23, 22, 0.85);
  border: 1.5px solid #C5A059;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .video-card:hover .play-badge {
    background: #8F6B2E;
    color: #FFFFFF;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Touch active state for mobile cards */
.video-card:active .play-badge {
  transform: translate(-50%, -50%) scale(0.95);
  background: #8F6B2E;
}

/* Calculator & Filter Tabs */
.calc-option-btn,
.room-tab-btn,
.filter-tab {
  background: #FFFFFF;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  transition: all 0.15s ease-out;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-option-btn:hover,
.room-tab-btn:hover,
.filter-tab:hover {
  border-color: var(--color-primary);
}

.calc-option-btn.active,
.room-tab-btn.active,
.filter-tab.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

/* Room tab specific styling */
.room-tab-btn {
  white-space: nowrap;
  font-weight: 600;
}

/* Video Modal */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* WhatsApp Floating Button (Sticky on Mobile, Tablet & Desktop) */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 45;
  background-color: #25D366;
  color: #FFFFFF;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: wa-pulse 3s infinite ease-in-out;
}

@keyframes wa-pulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 8px 26px rgba(37, 211, 102, 0.65), 0 0 0 8px rgba(37, 211, 102, 0);
  }
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

/* Mobile Sticky Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  padding: 6px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Responsive Breakpoints & Mobile Enhancements */
@media (max-width: 768px) {
  /* Show sticky bottom bar on mobile screens */
  .mobile-bottom-bar {
    display: flex;
  }

  /* Prevent page content from being hidden behind sticky bottom bar & respect iPhone home indicator */
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 8px));
  }

  /* Floating WhatsApp button sticks on mobile screen above bottom bar */
  .whatsapp-float {
    display: flex !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 8px) + 12px);
    right: 14px;
    width: 48px;
    height: 48px;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Touch hit areas for navigation and interactive elements */
  nav a,
  .calc-option-btn,
  .room-tab-btn,
  .filter-tab {
    min-height: 44px;
  }

  /* Ensure video modal close button has large touch hit area */
  #closeVideoModal {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none !important;
  }
  .whatsapp-float {
    display: flex;
  }
}
