/* ==========================================================================
   Slot Chai - Modern & Dynamic Custom Styles
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Root Variables --- */
:root {
  /* Modern Color Palette */
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --primary-hover: #4338ca;
  --secondary-bg: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  
  /* Shadows & Radius */
  --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);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Overrides --- */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--secondary-bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Redefine Bootstrap Primary Buttons to match our modern theme */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: 0 4px 14px 0 rgba(var(--bs-primary-rgb), 0.39);
  transition: var(--transition-smooth);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.4);
}
.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  transition: var(--transition-smooth);
}
.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px 0 rgba(var(--bs-primary-rgb), 0.2);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 5rem 0 6rem;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* Decorative background blur */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.0;
  background: linear-gradient(135deg, #1e293b 0%, var(--bs-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out;
}

/* Glassmorphism Hero Card */
.hero-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem !important;
  animation: slideInRight 0.8s ease-out 0.2s both;
}

/* ==========================================================================
   Categories Section
   ========================================================================== */
.section-surface {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.cat-card {
  background: var(--surface-color);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  height: 100%;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out both;
}

/* Staggered loading for category cards */
.col-6:nth-child(1) .cat-card { animation-delay: 0.1s; }
.col-6:nth-child(2) .cat-card { animation-delay: 0.2s; }
.col-6:nth-child(3) .cat-card { animation-delay: 0.3s; }
.col-6:nth-child(4) .cat-card { animation-delay: 0.4s; }
.col-6:nth-child(5) .cat-card { animation-delay: 0.5s; }
.col-6:nth-child(6) .cat-card { animation-delay: 0.6s; }

.cat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.cat-icon {
  width: 50px;
  height: 50px;
  background: #eff6ff;
  color: var(--bs-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition-bounce);
}

.cat-card:hover .cat-icon {
  background: var(--bs-primary);
  color: #ffffff;
  transform: scale(1.1) rotate(5deg);
}

.cat-card .badge {
  font-weight: 500;
  color: var(--text-muted) !important;
  transition: var(--transition-fast);
}

.cat-card:hover .badge {
  background-color: #f1f5f9 !important;
  color: var(--bs-primary) !important;
  border-color: #cbd5e1 !important;
}

/* ==========================================================================
   Featured Services Section
   ========================================================================== */
.section-title {
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.sub {
  color: var(--text-muted);
  font-size: 1rem;
}

.service-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  animation: zoomIn 0.6s ease-out both;
}

/* Staggered loading for service cards */
.row.g-3 > div:nth-child(1) .service-card { animation-delay: 0.2s; }
.row.g-3 > div:nth-child(2) .service-card { animation-delay: 0.3s; }
.row.g-3 > div:nth-child(3) .service-card { animation-delay: 0.4s; }
.row.g-3 > div:nth-child(4) .service-card { animation-delay: 0.5s; }

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

/* Image Wrapper and Hover Effects */
.service-card a:first-child {
  display: block;
  overflow: hidden;
  position: relative;
}

.service-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  background-color: #f1f5f9; /* placeholder while loading */
}

.service-card:hover .service-cover {
  transform: scale(1.08);
}

.service-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  transition: color var(--transition-fast);
}

.service-card:hover .service-title {
  color: var(--bs-primary);
}

.muted2 {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Truncate Multi-line Text Utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mini Actions (Call, Map, More) */
.mini-actions {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-light);
  font-size: 0.875rem;
  font-weight: 500;
}

.mini-actions a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mini-actions a:hover {
  color: var(--bs-primary);
  transform: scale(1.05);
}

.mini-actions i {
  font-size: 1rem;
}

.btn-wide {
  width: 100%;
  font-weight: 600;
  padding: 0.6rem 1rem;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
    text-align: center;
  }
  
  .hero-card {
    padding: 1.5rem !important;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .service-cover {
    height: 160px; /* Smaller images on mobile to fit screen nicely */
  }

  .cat-card {
    padding: 1rem;
  }
  
  .cat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  /* On very small screens, make columns single instead of half-width for better readability if desired */
  .mini-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}