/* Global Styles - Enhanced for Mobile-First Premium UI */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  margin-bottom: 60px;
  background-color: #f4f6f9; /* Softer background from lux-blog */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: #495057; /* Softer text color */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400; /* slightly bolder for better readability */
  color: #212529;
}

a {
  transition: all 0.25s ease-in-out; /* Smooth transition for everything */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom Styles for Enhanced UI - Integrated Premium Features */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
  font-weight: 600;
  text-align: center;
}

/* Golden Gradient Button for Premium Look */
.btn-gold-gradient {
  background-image: linear-gradient(45deg, #ffd700, #ffb700);
  border: none;
  color: #212529;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 16px;
}

.btn-gold-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
  color: #000;
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

/* Gradient Primary Background for Tags */
.bg-gradient-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: #ffffff !important;
  border: none;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.form-control {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-floating > .form-control {
  height: calc(3.5rem + 2px);
}

.alert {
  border-radius: 8px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.text-center a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.text-center a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Blog/Product Card for Index Page - $100k Look, Responsive Grid */
.blog-card, .product-card {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.blog-card:hover, .product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.blog-card-icon, .product-card-icon {
    flex-shrink: 0;
    width: 200px;
    background-image: linear-gradient(45deg, #007bff, #0056b3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-card-icon .bi, .product-card-icon .bi {
    font-size: 5rem;
    color: #ffffff;
    opacity: 0.8;
}

.blog-card-body, .product-card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.blog-card-title a, .product-card-title a {
  text-decoration: none;
  color: #212529;
  font-weight: 500;
}

.blog-card-title a:hover, .product-card-title a:hover {
  background: -webkit-linear-gradient(45deg, #007bff, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-card-meta, .product-card-meta {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.blog-card-excerpt, .product-card-excerpt {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: #495057;
}

/* Article/Product Detail Page - Premium Experience */
.article-header, .product-detail-header {
  padding: 2rem 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.9)), url('data:image/svg+xml,...');
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 2rem;
}

.article-header h1.display-4, .product-detail-header h1.display-4 {
  font-weight: 500;
  background: -webkit-linear-gradient(45deg, #212529, #6c757d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#article-content, #product-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #343a40;
}

#article-content p, #product-content p {
  margin-bottom: 1.75rem;
}

#article-content img, #product-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Comments Section - If Applicable */
.comment-form-container, .comment-card {
  background-color: #ffffff;
  border: none;
  padding: 2.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.comment-thread .d-flex {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease-in-out;
}

.comment-thread .d-flex:last-child { border-bottom: none; }
.comment-thread .d-flex:hover { background-color: #f8f9fa; }

/* Navbar Styles */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
.footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 0;
  text-align: center;
}

/* Mobile-First Responsive Adjustments - col-md for grids */
@media (max-width: 767px) {
  .card, .blog-card, .product-card {
    margin-bottom: 20px;
  }
  
  .btn-primary, .btn-gold-gradient {
    padding: 12px 20px;
    font-size: 18px;
  }
  
  .blog-card, .product-card {
    flex-direction: column; /* Stack icon and body on mobile */
  }
  
  .blog-card-icon, .product-card-icon {
      width: 100%;
      height: 300px;
  }
  
  /* Ensure full width on mobile */
  .col-12 { max-width: 100%; }
}

/* Animation for alerts and elements */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert {
  animation: fadeIn 0.3s ease-out;
}

/* Custom shadow effect */
.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Fix for dark text on primary buttons that are links */
a.btn-primary {
    color: #ffffff;
}