/* 
 * Modern CSS Optimizations for Balkrishna Banquets
 * Performance-focused styles with modern CSS features
 * Note: Theme-level styles handled by style.css - this file adds enhancements only
 */

/* CSS Custom Properties for better maintainability */
:root {
  /* Brand Colors (matching style.css) */
  --primary-color: #c38208;
  --primary-hover: #a06b07;
  --secondary-color: #ff9f38;
  --accent-color: #c38208;

  /* Neutral Colors */
  --text-dark: #2c2c2c;
  --text-light: #666;
  --text-muted: #999;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Typography */
  --font-family-primary:
    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-secondary:
    "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Font Sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Mobile Bottom Bar Height */
  --mobile-bottom-bar-height: 56px;
}

/* ========== MOBILE UI FIXES ========== */

/* Mobile Bottom Fixed Bar */
@media (max-width: 767.98px) {
  /* Prevent content from hiding behind fixed bottom bar */
  body {
    padding-bottom: var(--mobile-bottom-bar-height);
  }

  /* Fixed bottom bar styling */
  .fixed-bottom {
    z-index: 1040;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }

  .fixed-bottom .btn {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .fixed-bottom .btn i {
    font-size: 16px;
  }

  /* WhatsApp button position - above fixed bottom bar */
  .callBtn.showMobile {
    bottom: calc(var(--mobile-bottom-bar-height) + 15px) !important;
    right: 15px !important;
    width: 52px !important;
    height: 52px !important;
    line-height: 52px !important;
    z-index: 1030 !important;
  }

  /* Social proof toast - above bottom bar */
  .social-proof-toast {
    bottom: calc(var(--mobile-bottom-bar-height) + 70px) !important;
  }

  /* Mobile navigation improvements */
  .navbar-collapse {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 20px;
  }

  .navbar-nav .nav-link {
    padding: 12px 15px !important;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-nav .dropdown-menu {
    background-color: rgba(30, 30, 30, 0.98);
    border: none;
    padding: 10px 0;
  }

  .navbar-nav .dropdown-menu a {
    color: #ffffff !important;
    padding: 10px 20px;
  }

  /* Form improvements on mobile */
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 14px 16px !important;
  }

  /* Lead modal mobile fixes */
  .lead-modal-container {
    width: 95% !important;
    max-width: 400px;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .lead-modal-title {
    font-size: 18px !important;
    line-height: 1.4;
  }

  /* Hero section mobile */
  .swiper-slide h2,
  .hero-title {
    font-size: clamp(24px, 6vw, 48px) !important;
    line-height: 1.2 !important;
  }

  /* Fix button text wrapping */
  .btn {
    white-space: nowrap;
  }

  /* Footer spacing on mobile */
  footer {
    padding-bottom: calc(var(--mobile-bottom-bar-height) + 20px);
  }

  /* Card improvements */
  .card,
  .service-card {
    margin-bottom: 20px;
  }

  /* Gallery grid mobile */
  .gallery-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Section padding mobile */
  section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  /* Heading sizes mobile */
  h1 {
    font-size: clamp(28px, 7vw, 42px) !important;
  }
  h2 {
    font-size: clamp(24px, 6vw, 36px) !important;
  }
  h3 {
    font-size: clamp(20px, 5vw, 28px) !important;
  }

  /* Stats counter mobile */
  .counter-box,
  .funfact-box {
    padding: 20px 15px;
  }

  /* CTA section mobile */
  .cta-section .btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Small mobile devices */
@media (max-width: 575.98px) {
  .fixed-bottom .btn {
    font-size: 13px;
    padding: 12px 8px !important;
  }

  .lead-modal-container {
    padding: 25px 15px !important;
  }

  .lead-form-group input {
    padding: 12px 14px !important;
  }

  /* Gallery single column on very small screens */
  .gallery-grid,
  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .btn,
  .nav-link,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Disable hover effects on touch */
  .btn:hover,
  .card:hover,
  .service-card:hover {
    transform: none !important;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .lead-modal-container {
    max-height: 95vh;
    padding: 15px !important;
  }

  .lead-modal-icon {
    font-size: 32px !important;
    margin-bottom: 10px !important;
  }
}

/* ========== END MOBILE UI FIXES ========== */

/* Modern box-sizing only - don't reset margins/padding (handled by theme) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
}

/* Performance optimizations for images */
img {
  max-width: 100%;
  height: auto;
}

/* Lazy loading images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity var(--transition-normal);
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Button enhancements - don't override theme colors */
.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading state for buttons */
.btn-loading {
  display: none;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loading {
  display: inline-flex;
}

/* Form focus enhancements - don't override base styles */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(195, 130, 8, 0.25);
}

.form-control.is-valid {
  border-color: #28a745;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

/* Navigation improvements - Only add enhancements, don't override theme */
.navbar-brand img {
  transition: transform var(--transition-fast);
}

.navbar-brand:hover img {
  transform: scale(1.02);
}

/* Floating WhatsApp button */
.callBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  z-index: 1000;
  animation: pulse 2s infinite;
}

.callBtn:hover {
  transform: scale(1.1);
  color: white;
  text-decoration: none;
}

.callBtn.showMobile {
  display: none;
}

@media (max-width: 768px) {
  .callBtn.showDesktop {
    display: none;
  }

  .callBtn.showMobile {
    display: flex;
    bottom: 80px;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.scroll-progress.visible {
  opacity: 1;
}

.scroll-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.scroll-line {
  width: 2px;
  height: 100px;
  background-color: #e0e0e0;
  margin-top: var(--spacing-sm);
  position: relative;
}

.scroll-point {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  transition: height var(--transition-fast);
}

/* Performance optimizations for animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Critical above-the-fold styles */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
  position: relative;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: var(--spacing-xl);
  opacity: 0.9;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  :root {
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
  }
}

/* Print styles */
@media print {
  .callBtn,
  .scroll-progress,
  .navbar,
  .alert {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  a {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* High contrast mode support */
/* High contrast mode support - don't override theme colors */
@media (prefers-contrast: high) {
  /* Let the theme handle high contrast adjustments */
}

/* Dark mode support - minimal overrides */
@media (prefers-color-scheme: dark) {
  /* Let the theme handle dark mode adjustments */
}

/* Focus management for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
 * MODERN CSS FEATURES (2025 Update)
 * ======================================== */

/* CSS Container Queries */
@supports (container-type: inline-size) {
  .service-card-container {
    container-type: inline-size;
    container-name: service-card;
  }

  @container service-card (min-width: 300px) {
    .service-card {
      flex-direction: row;
      gap: 1rem;
    }
  }

  .gallery-container {
    container-type: inline-size;
    container-name: gallery;
  }

  @container gallery (min-width: 600px) {
    .gallery-grid {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
  }
}

/* CSS Nesting (Native - No preprocessor) */
@supports selector(&) {
  .card-modern {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    transition:
      transform var(--transition-normal),
      box-shadow var(--transition-normal);

    &:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-lg);
    }

    & .card-image {
      aspect-ratio: 16 / 9;
      object-fit: cover;
    }

    & .card-content {
      padding: var(--spacing-lg);
    }
  }
}

/* Modern aspect-ratio for media */
.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-1-1 {
  aspect-ratio: 1 / 1;
}

.aspect-golden {
  aspect-ratio: 1.618 / 1;
}

/* Object-fit utilities */
.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

/* CSS Gap utilities */
.gap-xs {
  gap: var(--spacing-xs);
}
.gap-sm {
  gap: var(--spacing-sm);
}
.gap-md {
  gap: var(--spacing-md);
}
.gap-lg {
  gap: var(--spacing-lg);
}
.gap-xl {
  gap: var(--spacing-xl);
}

/* Modern grid layouts with subgrid */
@supports (grid-template-columns: subgrid) {
  .grid-with-subgrid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-lg);
  }

  .grid-with-subgrid > * {
    grid-column: span 4;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
  }
}

/* Color-mix for dynamic colors */
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --primary-light: color-mix(in srgb, var(--primary-color) 50%, white);
    --primary-dark: color-mix(in srgb, var(--primary-color) 50%, black);
    --overlay-color: color-mix(in srgb, black 60%, transparent);
  }
}

/* Logical properties for internationalization */
.text-flow-start {
  text-align: start;
  margin-inline-start: 0;
}

.text-flow-end {
  text-align: end;
  margin-inline-end: 0;
}

.padding-inline {
  padding-inline: var(--spacing-lg);
}

.margin-block {
  margin-block: var(--spacing-lg);
}

/* Scroll-driven animations */
@supports (animation-timeline: scroll()) {
  .scroll-animate {
    animation: fadeSlideIn linear;
    animation-timeline: view();
    animation-range: entry 0% cover 50%;
  }

  @keyframes fadeSlideIn {
    from {
      opacity: 0;
      transform: translateY(50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform-origin: left;
    animation: scaleProgress linear;
    animation-timeline: scroll(root);
  }

  @keyframes scaleProgress {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
}

/* CSS :has() selector for parent styling */
@supports selector(:has(*)) {
  .form-group:has(input:focus) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(195, 130, 8, 0.1);
  }

  .form-group:has(input:invalid:not(:placeholder-shown)) {
    border-color: #dc3545;
  }

  .form-group:has(input:valid:not(:placeholder-shown)) {
    border-color: #198754;
  }

  .card:has(img:hover) .card-title {
    color: var(--primary-color);
  }
}

/* Modern text-wrap: balance for headings */
@supports (text-wrap: balance) {
  h1,
  h2,
  h3 {
    text-wrap: balance;
  }

  .card-title,
  .section-title {
    text-wrap: balance;
  }
}

/* Clamp for responsive typography */
.text-responsive-sm {
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.text-responsive-md {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.text-responsive-lg {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.text-responsive-xl {
  font-size: clamp(1.5rem, 4vw, 3rem);
}

/* View Transitions API styles */
@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.3s;
  }

  .page-transition {
    view-transition-name: page;
  }
}

/* Content-visibility for off-screen optimization */
.content-lazy {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Modern backdrop-filter with fallback */
.glass-effect {
  background: rgba(255, 255, 255, 0.85);
}

@supports (backdrop-filter: blur(10px)) {
  .glass-effect {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* Accent-color for form elements */
input[type="checkbox"],
input[type="radio"],
input[type="range"],
progress {
  accent-color: var(--primary-color);
}

/* Scrollbar styling */
@supports (scrollbar-width: thin) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Print styles */
@media print {
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  .no-print,
  .sticky-cta,
  .exit-popup-overlay,
  .callBtn,
  .scroll-progress {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODERN CSS 2024-2025 FEATURES
   Latest CSS specifications and browser support
   ═══════════════════════════════════════════════════════════════════════════════ */

/* CSS Layers - Cascade Control */
@layer reset, base, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
}

@layer base {
  :root {
    /* Modern Color Functions */
    --primary-oklch: oklch(0.65 0.18 65);
    --primary-light-oklch: oklch(0.75 0.15 65);
    --primary-dark-oklch: oklch(0.55 0.2 65);

    /* Color Mix (Modern Browser Support) */
    --primary-hover-mix: color-mix(in oklch, var(--primary-color) 85%, black);
    --primary-light-mix: color-mix(in oklch, var(--primary-color) 30%, white);

    /* Relative Color Syntax */
    color-scheme: light dark;
  }
}

/* Container Queries - Component-Level Responsiveness */
@supports (container-type: inline-size) {
  .cq-container {
    container-type: inline-size;
    container-name: card;
  }

  @container card (min-width: 300px) {
    .cq-card {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 1rem;
    }
  }

  @container card (min-width: 500px) {
    .cq-card {
      grid-template-columns: 1fr 3fr;
    }

    .cq-card__title {
      font-size: 1.5rem;
    }
  }
}

/* Subgrid Support */
@supports (grid-template-rows: subgrid) {
  .grid-with-subgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .grid-with-subgrid > .subgrid-item {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
  }
}

/* Has Selector - Parent Selection */
@supports selector(:has(*)) {
  .form-group:has(:focus-visible) {
    background: var(--primary-light-mix, rgba(195, 130, 8, 0.1));
    border-radius: var(--radius-md);
  }

  .form-group:has(:invalid) {
    --input-border-color: #dc3545;
  }

  .form-group:has(:valid) {
    --input-border-color: #28a745;
  }

  /* Card with image styling */
  .card:has(img) {
    padding-top: 0;
  }

  /* Navigation with dropdown */
  .nav-item:has(.dropdown-menu:hover) > .nav-link {
    color: var(--primary-color);
  }
}

/* Nesting Support (Native CSS) */
@supports selector(&) {
  .modern-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);

    & .card-header {
      margin-bottom: var(--spacing-md);
      font-weight: 600;
    }

    & .card-body {
      color: var(--text-light);

      & p {
        margin-bottom: var(--spacing-sm);
      }
    }

    &:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-2px);
    }
  }
}

/* Scroll-Driven Animations */
@supports (animation-timeline: scroll()) {
  .scroll-fade-in {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    transform-origin: left;
    animation: scaleProgress linear;
    animation-timeline: scroll(root);
  }

  @keyframes scaleProgress {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
}

/* Light-Dark Color Scheme */
@supports (color: light-dark(black, white)) {
  :root {
    --text-adaptive: light-dark(var(--text-dark), #f0f0f0);
    --bg-adaptive: light-dark(var(--bg-white), #1a1a2e);
    --border-adaptive: light-dark(#e0e0e0, #333);
  }

  .adaptive-card {
    background: light-dark(white, #2d2d44);
    color: light-dark(var(--text-dark), #f0f0f0);
    border: 1px solid light-dark(#e0e0e0, #444);
  }
}

/* Logical Properties (Better RTL Support) */
.modern-spacing {
  margin-block: var(--spacing-lg);
  padding-inline: var(--spacing-md);
  border-inline-start: 4px solid var(--primary-color);
}

.rtl-aware {
  margin-inline-start: auto;
  padding-inline-end: var(--spacing-sm);
  text-align: start;
}

/* Aspect Ratio */
.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.aspect-ratio-square {
  aspect-ratio: 1;
  object-fit: cover;
}

/* Content Visibility for Performance */
.content-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Text Wrap Balance */
@supports (text-wrap: balance) {
  h1,
  h2,
  h3,
  .balanced-text {
    text-wrap: balance;
  }

  .pretty-text {
    text-wrap: pretty;
  }
}

/* Focus Visible */
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Overscroll Behavior */
.no-overscroll {
  overscroll-behavior: contain;
}

/* Touch Action for Better Mobile */
.touch-manipulation {
  touch-action: manipulation;
}

/* Clamp for Responsive Typography */
.fluid-heading-xl {
  font-size: clamp(1.75rem, 4vw + 1rem, 3.5rem);
  line-height: 1.2;
}

.fluid-heading-lg {
  font-size: clamp(1.5rem, 3vw + 0.75rem, 2.5rem);
  line-height: 1.25;
}

.fluid-body {
  font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
  line-height: 1.6;
}

/* Gap Fallback */
.flex-gap {
  display: flex;
  gap: var(--spacing-md);
}

@supports not (gap: 1rem) {
  .flex-gap > * + * {
    margin-left: var(--spacing-md);
  }
}

/* Animation Performance */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

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

/* High Contrast Mode */
@media (prefers-contrast: more) {
  :root {
    --primary-color: #8b5a00;
    --text-dark: #000;
    --text-light: #333;
  }

  .btn-tussock {
    border: 2px solid currentColor;
  }
}

/* Dark Mode Preferences */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-white: #1a1a2e;
    --text-dark: #f0f0f0;
    --text-light: #b0b0b0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SOCIAL PROOF TOAST NOTIFICATION
   Dynamic customer interest notifications
   ═══════════════════════════════════════════════════════════════════════════════ */

.social-proof-toast {
  position: fixed;
  bottom: 100px;
  left: 20px;
  z-index: 9999;
  opacity: 0;
  transform: translateX(-120%);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.social-proof-toast.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.social-proof-content {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(195, 130, 8, 0.2);
  max-width: 320px;
  min-width: 280px;
  position: relative;
  overflow: hidden;
}

.social-proof-content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #d4a00a 100%);
  border-radius: 12px 0 0 12px;
}

.social-proof-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #d4a00a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(195, 130, 8, 0.3);
  animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(195, 130, 8, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(195, 130, 8, 0.5);
  }
}

.social-proof-icon i {
  font-size: 20px;
  color: #fff;
}

.social-proof-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.social-proof-text {
  flex: 1;
  padding-right: 8px;
}

.social-proof-text p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.social-proof-time {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.social-proof-time::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: blink-dot 1.5s infinite;
}

@keyframes blink-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.social-proof-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.social-proof-close:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #333;
  transform: scale(1.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .social-proof-toast {
    left: 10px;
    right: 10px;
    bottom: 80px;
  }

  .social-proof-content {
    max-width: 100%;
    min-width: unset;
    padding: 12px 14px;
  }

  .social-proof-icon {
    width: 38px;
    height: 38px;
  }

  .social-proof-icon i,
  .social-proof-icon svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }

  .social-proof-text p {
    font-size: 13px;
  }
}

/* Animation for entrance */
@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-120%);
  }
}

/* Print - hide social proof */
@media print {
  .social-proof-toast {
    display: none !important;
  }
}
