/* =============================================================================
   CATEGORY SECTION STYLES
   ============================================================================= */

/* Category Section */
.deva-category-section {
  background-color: #f0f5ef;
  padding: 80px 20px;
}

.category-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
}

.category-header h2 {
  color: #304624;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.category-header p {
  color: #304624;
  font-size: 1.2rem;
  line-height: 1.6;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch; /* Equal height for all cards */
}

/* Make the 5th category full width when there are 5 or more categories */
.category-grid.has-fifth-card .category-card:nth-child(5) {
  grid-column: 1 / span 2; /* Explicitly span 2 columns */
}

.category-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure full height usage */
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card .category-link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.category-card .category-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 20px;
}

.category-card .category-image {
  flex: 0 0 120px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card .category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card .category-placeholder {
  background: linear-gradient(135deg, #b5d1a7, #9bc48a);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card .arrow-icon {
  font-size: 18px;
  color: #48733d;
  font-weight: bold;
  transition: all 0.3s ease;
}

.category-card:hover .arrow-icon {
  color: #3d6234;
  transform: translateX(3px);
}

/* DEVA Category Display 50/50 Section */
.deva-category-display-section {
  padding: 80px 20px;
}

.category-display-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 40px;
}

/* Category Card - Left Side (same as deva_categories but no arrow) */
.category-display-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
}

.category-display-card:hover {
  transform: translateY(-5px);
}

.category-display-card .category-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-display-card .category-label {
  color: #999;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.category-display-card h3 {
  color: #304624;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.2;
}

.category-display-card .category-products {
  list-style: disc;
  padding: 0 0 0 20px;
  margin: 0 0 30px 0;
  flex: 1;
}

.category-display-card .category-products li {
  color: #666;
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.3;
}

.category-display-card .category-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.category-display-card .category-number {
  color: #304624;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Category Display Card specific arrow with green 40x40 background */
.category-display-card .arrow-icon {
  width: 40px;
  height: 40px;
  background: #48733d;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.category-display-card:hover .arrow-icon {
  background: #3d6234;
  transform: translateX(3px);
}

/* Category Image - Right Side */
.category-display-image {
  position: relative;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-display-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-display-image:hover img {
  transform: scale(1.05);
}

.category-display-image .category-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #48733d, #3d6234);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

/* Responsive category cards */
@media (max-width: 768px) {
  .category-card .category-link {
    flex-direction: column;
  }

  .category-card .category-content {
    padding-right: 0;
    padding-bottom: 15px;
  }

  .category-card .category-image {
    flex: 0 0 100px;
    width: 100%;
  }

  .category-grid,
  .category-grid.has-fifth-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-grid.has-fifth-card .category-card:nth-child(5) {
    grid-column: 1;
  }

  .category-display-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .category-display-image {
    height: 250px;
  }

  .category-display-card {
    padding: 30px;
    min-height: 300px;
  }

  .category-display-card h3 {
    font-size: 1.5rem;
  }
}
