/*
Theme Name: Health & Safety Theme
Theme URI: https://healthandsafetytrainingcenter.com
Author: G Medical / Health & Safety Team
Description: Custom hybrid Bootstrap 5 theme for multiple blog feeds (CPR, Safety, Health, Training, Store)
Version: 1.0
*/

/* ========================================
   Modern Blog Styles
   ======================================== */

/* Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.training-hero {
  background: linear-gradient(135deg, #111827 0%, #0b1220 50%, #1f2937 100%);
}

.training-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 53, 69, 0.25), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(13, 110, 253, 0.22), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.20), transparent 45%);
}

.training-mini-card {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.training-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.10);
}

.training-mini-card .mini-thumb {
  width: 84px;
  height: 64px;
  background-size: cover;
  background-position: center;
}

.ratio iframe,
.ratio video {
  width: 100%;
  height: 100%;
}

.post-hero {
  background: #0b1220;
}

.post-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
  opacity: 0.35; /* "low opacity background image" request */
}

.post-hero-bg-fallback {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  opacity: 1;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(220, 53, 69, 0.25), transparent 45%),
              linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.min-vh-70 {
  min-height: 70vh;
}

.hero-badge {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero-stats .stat-number {
  font-size: 2rem;
  color: #fff;
}

.hero-stats .stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Featured Posts Stack */
.featured-posts-stack {
  position: relative;
  height: 400px;
}

.featured-card {
  width: 100%;
  height: 320px;
  transition: all 0.3s ease;
}

.featured-card.active {
  z-index: 3;
  transform: scale(1.05);
}

.featured-card:not(.active) {
  z-index: 1;
}

.featured-image {
  width: 100%;
  height: 100%;
}

.image-overlay {
  background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.featured-content {
  width: 100%;
  z-index: 2;
}

/* Category Navigation */
.category-nav {
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #6c757d;
  font-weight: 500;
  border-radius: 2rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.category-tab:hover,
.category-tab.active {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Featured Article */
.featured-article-image {
  height: 500px;
}

.article-overlay {
  background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
  width: 100%;
  height: 100%;
}

.article-content {
  width: 100%;
}

/* Post Cards */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.post-image {
  height: 250px;
  overflow: hidden;
}

.post-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
}

.post-category {
  z-index: 2;
}

.post-content {
  background: white;
}

.post-title a:hover {
  color: #dc3545;
}

.read-more-link {
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more-link:hover {
  color: #bb2d3b;
  transform: translateX(5px);
}

/* Newsletter CTA */
.bg-gradient-danger {
  background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
}

.newsletter-form .form-control {
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
}

.newsletter-form .form-control::placeholder {
  color: rgba(255,255,255,0.7);
}

.newsletter-form .form-control:focus {
  background: rgba(255,255,255,0.2);
  border-color: white;
  color: white;
}

/* Empty State */
.empty-state i {
  opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero {
    text-align: center;
    padding: 3rem 0;
  }

  .hero-stats {
    justify-content: center;
  }

  .featured-posts-stack {
    display: none;
  }

  .featured-article {
    margin-bottom: 2rem;
  }

  .featured-article-image {
    height: 300px;
  }

  .category-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .posts-grid .col-lg-4 {
    margin-bottom: 2rem;
  }

  .newsletter-cta {
    padding: 3rem 1.5rem;
  }

  .newsletter-form .col-md-6,
  .newsletter-form .col-md-3 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .article-content h2 {
    font-size: 1.75rem;
  }

  .mini-post {
    flex-direction: column;
    text-align: center;
  }

  .mini-thumbnail {
    align-self: center;
  }
}

/* ========================================
   WooCommerce Custom Styles
   ======================================== */

/* Product Cards */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  margin: 0 0 2em;
  padding: 0;
  position: relative;
  width: 100%;
  text-align: center;
}

/* Product Images */
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce-page ul.products li.product .woocommerce-loop-product__link img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.375rem 0.375rem 0 0;
}

/* Product Titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  padding: 0.5em 0;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Product Price */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  color: #dc3545;
  display: block;
  font-weight: 700;
  margin-bottom: 0.5em;
  font-size: 1.25rem;
}

/* Add to Cart Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background-color: #dc3545;
  color: white;
  border: 1px solid #dc3545;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background-color: #bb2d3b;
  border-color: #bb2d3b;
  color: white;
}

/* Single Product Page */
.woocommerce div.product .product_title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.woocommerce div.product p.price {
  color: #dc3545;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Quantity Input */
.woocommerce div.product form.cart .quantity {
  float: left;
  margin-right: 1rem;
}

.woocommerce .quantity .qty {
  width: 5em;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

/* Cart Page */
.woocommerce-cart table.cart td.actions .coupon {
  margin-bottom: 1rem;
}

.woocommerce-cart table.cart td.actions .coupon .input-text {
  padding: 0.5rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  margin-right: 0.5rem;
}

.woocommerce table.shop_table {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.woocommerce table.shop_table th {
  background-color: #f8f9fa;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
}

.woocommerce table.shop_table td {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Cart Totals */
.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.375rem;
}

/* Checkout Page */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.woocommerce form .form-row {
  margin-bottom: 1rem;
}

.woocommerce form .form-row label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

/* Order Review */
.woocommerce-checkout-review-order {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.375rem;
}

/* Messages & Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  border-radius: 0.375rem;
}

.woocommerce-message {
  background-color: #d1e7dd;
  border-color: #198754;
  color: #0f5132;
}

.woocommerce-info {
  background-color: #cfe2ff;
  border-color: #0d6efd;
  color: #084298;
}

.woocommerce-error {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #842029;
}

/* Breadcrumbs */
.woocommerce-breadcrumb {
  padding: 1rem 0;
  margin-bottom: 1rem;
  color: #6c757d;
}

.woocommerce-breadcrumb a {
  color: #dc3545;
  text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
  text-decoration: underline;
}

/* Product Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  padding: 0.75rem 1.5rem;
  display: block;
  text-decoration: none;
  color: #6c757d;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 0.375rem 0.375rem 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  background: white;
  color: #dc3545;
  border-color: #dee2e6;
  border-bottom-color: white;
}

/* Star Ratings */
.woocommerce .star-rating {
  color: #ffc107;
}

/* Responsive */
@media (max-width: 768px) {
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product {
    width: 100%;
    margin: 0 0 1.5em;
  }
  
  .woocommerce div.product .product_title {
    font-size: 1.75rem;
  }
  
  .woocommerce div.product p.price {
    font-size: 1.5rem;
  }
}