/**
 * Homepage Styling
 */

/* Hero Stacked Cards (Featured Articles on Right Side) */
.hero-stacked-card {
  /* Additional spacing and styling */
}

/* DISABLED - These rules were hiding cards incorrectly
.hero-stacked-card:not(:has(img)) {
  display: none !important;
}

.hero-stacked-card:has(.group-hover\:scale-105:empty) {
  display: none !important;
}

.hero-stacked-card .w-32:has(.group-hover\:scale-105:empty) {
  display: none;
}

.hero-stacked-card:has(.w-32 .group-hover\:scale-105:empty) {
  display: none !important;
}
*/

/* Ensure image container has proper dimensions */
.hero-stacked-card .w-32.h-32 {
  width: 128px;
  height: 128px;
  min-width: 128px;
  min-height: 128px;
}

.hero-stacked-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* News Cards - Add padding so text doesn't touch borders */
.news-card {
  padding: 2rem 1.5rem !important;
}

.news-card a {
  text-decoration: none;
  padding: 0 1rem;
  display: block;
}

/* Add padding to news card content */
.news-card h2 {
  padding: 0;
  margin-bottom: 0.75rem;
}

.news-card .flex.items-center.gap-4 {
  margin-top: 0.5rem;
}

/* News card image styling */
.news-card .rounded-lg {
  border-radius: 0.5rem;
}

/* Responsive news card layout */
@media (max-width: 767px) {
  .news-card {
    padding: 1.5rem !important;
  }
}

/* Grid container for news cards */
.grid.grid-cols-1.md\:grid-cols-3 {
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid.grid-cols-1.md\:grid-cols-3 {
    gap: 2rem;
  }
}

/* Gear & Reviews Section - Equal Height Cards */
.gear-section .node--type-travel-gear {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gear-section .node--type-travel-gear:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Make image container consistent */
.gear-section .node--type-travel-gear .node__content {
  flex: 0 0 auto;
  order: -1; /* Move image to top */
}

.gear-section .node--type-travel-gear .field--name-field-featured-image {
  position: relative;
  width: 100%;
  padding-bottom: 66.67%; /* 3:2 aspect ratio */
  overflow: hidden;
}

.gear-section .node--type-travel-gear .field--name-field-featured-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header takes remaining space */
.gear-section .node--type-travel-gear header {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.gear-section .node--type-travel-gear .node__title {
  flex: 0 0 auto;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.gear-section .node--type-travel-gear .node__title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gear-section .node--type-travel-gear .node__title a:hover {
  color: #3b82f6;
}

.gear-section .node--type-travel-gear .node__meta {
  margin-top: auto;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Ensure grid items are equal height */
.gear-section .grid {
  display: grid;
  grid-auto-rows: 1fr;
}
