/* Responsive Base Styles */
:root {
  --primary: #2563eb;
  --secondary: #4f46e5;
  --accent: #22d3ee;
  --background: #f8fafc;
  --text: #1e293b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

/* Container and Grid */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  max-width: 1200px;
  contain: content;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
  contain: layout;
}

/* Responsive Columns */
.col-lg-4 {
  flex: 0 0 auto;
  width: 33.3333333333%;
}

.col-md-6 {
  flex: 0 0 auto;
  width: 50%;
}

.col-sm-12 {
  flex: 0 0 auto;
  width: 100%;
}

/* Card Design */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  contain: layout style paint;
}

.card.h-100 {
  height: 100%;
}

.card-header {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  background-color: var(--primary);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: white;
  border-radius: 15px 15px 0 0;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

.card-footer {
  padding: 1.25rem 1.5rem;
  background-color: var(--background);
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* Card Interactions */
.card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border-color: rgba(0,0,0,0.1);
}

.card:hover::before {
  transform: scaleX(1.2);
}

.card-header {
  position: relative;
  overflow: hidden;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.card:hover .card-header::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 0.3rem;
}

.btn:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

.btn:hover, .btn:focus {
  opacity: 0.9;
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text);
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.feature-heading {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Accessibility Focus States */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

/* Contrast */
.text-primary {
  color: var(--primary);
  transition: color 0.2s ease;
}

.text-primary:hover {
  color: var(--secondary);
}

/* Performance Optimizations */
/* Critical CSS */
.hero-section,
.features-section,
.plans-section {
  will-change: transform, opacity;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

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

/* Mobile First Media Queries */
@media (max-width: 575.98px) {
  .container {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero-section {
    padding: 3rem 0;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-item {
    padding: 1.5rem;
  }
  
  .plan-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .card-footer {
    padding: 1rem;
  }
}

/* Medium Devices */
@media (min-width: 768px) {
  .hero-section {
    padding: 6rem 0;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .card {
    margin-bottom: 1.5rem;
  }

  .plan-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Large Devices */
@media (min-width: 992px) {
  .hero-section {
    padding: 8rem 0;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .card {
    margin-bottom: 2rem;
  }

  .plan-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}
