:root {
  /* Modern Web Design Color Palette */
  --primary-color: #6366f1;
  /* Indigo */
  --primary-hover: #4f46e5;
  --secondary-color: #ec4899;
  /* Pink */
  --accent-color: #14b8a6;
  /* Teal */

  --bg-color: #fafafa;
  --surface-color: #ffffff;
  --surface-color-transparent: rgba(255, 255, 255, 0.8);

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-text: linear-gradient(to right, #6366f1, #ec4899);
  --gradient-hero: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);

  --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-colored: 0 10px 25px -5px rgba(99, 102, 241, 0.4);

  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease-in-out;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* Utilities */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-surface {
  background-color: var(--surface-color);
}

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

.glass-panel {
  background: var(--surface-color-transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

/* Navbar overrides */
.navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.hero-section {
  padding: 6rem 0;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn-premium {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: var(--shadow-colored);
  transition: var(--transition-normal);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
  color: white;
}

.btn-outline-premium {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-normal);
}

.btn-outline-premium:hover {
  background: var(--primary-color);
  color: white;
}

/* Features Section */
.feature-card {
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface-color);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.03);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Testimonials */
.testimonial-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
}

/* Listing Cards (Posts) */
.listing-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-color);
  border: none;
  transition: var(--transition-normal);
  height: 100%;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.listing-img-container {
  overflow: hidden;
  position: relative;
  padding-top: 75%;
  /* 4:3 Aspect Ratio */
}

.listing-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.5s ease;
}

.listing-card:hover .listing-img {
  transform: scale(1.05);
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Masonry overrides */
.grid-item {
  margin-bottom: 1.5rem;
}

/* Footer redesign */
footer {
  background: var(--surface-color);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 4rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-section {
    padding: 4rem 0;
  }
}

/* Helper Utilities */
.section-padding {
  padding: 5rem 0;
}

.blob {
  position: absolute;
  filter: blur(40px);
  z-index: -1;
  opacity: 0.5;
  animation: blob-bounce 10s infinite ease-in-out alternate;
}

@keyframes blob-bounce {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

/* Input/Form Styles */
.form-control {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #e5e7eb;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Google Button modern override */
.gsi-material-button {
  width: 100%;
  justify-content: center;
  border-radius: 50px !important;
  box-shadow: var(--shadow-sm) !important;
}

/*For loading spinner from uiverse.io*/
.spinner {
  width: 1em;
  height: 1em;
  position: relative;
  margin: 1em;
  cursor: not-allowed;
  border-radius: 50%;
  border: 1px solid #444;
  box-shadow: -10px -10px 10px #6359f8, 0px -10px 10px 0px #9c32e2, 10px -10px 10px #f36896, 10px 0 10px #ff0b0b, 10px 10px 10px 0px#ff5500, 0 10px 10px 0px #ff9500, -10px 10px 10px 0px #ffb700;
  animation: rot55 0.7s linear infinite;
}

.spinnerin {
  border: 1px solid #444;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: rot55 0.7s linear infinite;
}

@keyframes rot55 {
  10% {
    transform: rotate(90deg);
  }

  20% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(30deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* HTMX Indicator */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
  display: block;
}