body {
    background-color: #ffffff;
    color: #212529;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
      Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

h1, h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

table {
    font-size: 0.9rem;
}

table thead th {
    background-color: #f8f9fa;
    font-weight: 700;
}

.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.navbar {
    border-bottom: 1px solid #dee2e6;
}

.container {
    max-width: 960px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

form label {
    font-weight: 600;
}

/* Primary button styles */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Allocation UI tweaks */
.asset-checkbox .form-check-label {
    font-weight: 600;
}

.allocation-input {
    max-width: 160px;
}

/* Checkbox checked color and focus */
.form-check-input:checked {
    background-color: #F8AD63;
    border-color: #F8AD63;
}

.form-check-input:focus {
    border-color: #F8AD63;
    box-shadow: 0 0 0 0.25rem rgba(248, 173, 99, 0.5);
}

/* Increase vertical spacing between input groups */
.row.g-3.mb-3 > div {
    margin-bottom: 1.5rem;
}

/* Filter categories legend styling */
.filter-categories-legend {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

/* Mode label styling */
.mode-label {
    font-size: 1.5rem;
    color: #212529;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

/* Space after mode section */
.mode-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Space after Filter categories fieldset */
#individual_cat_fieldset {
    margin-bottom: 2rem;
}

/* Space around individual assets section */
#individual_section .row.gx-2.gy-2.mb-2 {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Basket section spacing between categories and allocations */
#basket_cat_fieldset {
    margin-bottom: 3rem;
}

/* ASSET */
.asset-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.5rem; /* vertical space between asset boxes */
  padding-right: 3rem; /* horizontal spacing between columns */
}

/* Base style for asset boxes - uniform orange for all */
.asset-item .form-check {
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  background-color: #fff3e0;  /* light orange background */
  border: 1.5px solid #F8AD63; /* orange border */
  box-shadow: 0 2px 8px rgba(248, 173, 99, 0.25);
  color: #212529; /* dark text */
  /* Transitions for smooth color and shadow changes */
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

/* Smooth hover effect */
.asset-item .form-check:hover {
  box-shadow: 0 4px 16px rgba(248, 173, 99, 0.4);
  transform: translateY(-3px);
}

/* Checkbox style */
.asset-item .form-check-input {
  margin-top: 0.3rem;
  width: 22px;
  height: 22px;
  accent-color: #F8AD63;
}

/* Label style */
.asset-item .form-check-label {
  font-weight: 700;
  font-size: 1rem;
  color: inherit !important; /* inherit from .form-check color */
}

/* Small category text under asset name */
.asset-item .form-check .small.text-muted {
  display: block;
  margin-top: 0.25rem;
  color: #6c757d; /* gray */
}

/* Hide any other extra info if exists */
.asset-item .text-muted:not(.small) {
  display: none;
}

/* When asset is selected - lighter orange background, border and subtle shadow */
.asset-item:has(.form-check-input:checked) .form-check {
  background-color: #fce6bf; /* lighter orange */
  border-color: #f9c56b;
  box-shadow: 0 4px 14px rgba(249, 197, 107, 0.6);
  color: #1b1b1b !important; /* dark text */
}

button.btn-run-simulation {
  background-color: #FFF3E0 !important;  /* Very light orange background */
  border-color: #FFB74D !important;      /* Slightly darker orange border */
  color: #6D4C41 !important;              /* Dark brown text */
  font-weight: 600;
}

button.btn-run-simulation:hover {
  background-color: #FFECB3 !important;  /* Even lighter orange on hover */
  border-color: #FFA726 !important;
  color: #5D4037 !important;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  z-index: 1000;
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

h1.mb-4 {
    padding-top: 60px;
    padding-bottom: 20px;
}

/* Card / blog tile */
.blog-card {
  border: 1px solid rgba(248, 173, 99, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
  background: #fff;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(21, 21, 21, 0.08);
}

/* Image area */
.card-image-wrap {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248,173,99,0.06), rgba(248,173,99,0.02));
}
.card-image-wrap .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Titles and accent color */
.blog-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8AD63; /* main accent */
  margin-bottom: 0.25rem;
}

/* Multi-line clamp with broad compatibility */
.excerpt {
  /* basic truncation */
  overflow: hidden;
  text-overflow: ellipsis;

  /* preferred modern syntax (draft) — some browsers implement unprefixed */
  line-clamp: 3;

  /* WebKit / Blink support */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  /* Fallback: cap height based on line-height so non-clamping browsers still truncate */
  line-height: 1.25em;          /* adjust to your typography */
  max-height: calc(1.25em * 3); /* lines * line-height */

  /* keep nice word wrapping */
  white-space: normal;
}


/* Hero image in post */
.hero-image {
  max-height: 420px;
  object-fit: cover;
}

/* Read More / primary accent button */
.btn-run-simulation {
  background-color: #FFE0B2;
  border-color: #FFB74D;
  color: #5D3A00;
  font-weight: 600;
  box-shadow: none;
}
.btn-run-simulation:hover {
  background-color: #FFD59A;
  border-color: #FFA726;
  color: #4a2f00;
}

/* Breadcrumb contrast on orange navbar pages */
.breadcrumb a {
  color: #6c6c6c;
}

/* Small screens: slightly larger card image */
@media (max-width: 576px) {
  .card-image-wrap {
    height: 200px;
  }
}

.card-image-wrap {
  margin-top: 1.5rem;    /* adds space above image */
  margin-bottom: 1.5rem; /* adds space below image */
  height: 320px;         /* keep your doubled height */
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248,173,99,0.06), rgba(248,173,99,0.02));
  border-radius: 8px;    /* optional: keep corners aligned nicely */
}


.card-image-wrap .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fills container, cropping as needed */
  object-position: center;
  display: block;
  border-radius: 0.5rem 0.5rem 0 0; /* round top corners to match container */
  transition: transform 0.35s ease;
}

.blog-card:hover .card-image {
  transform: scale(1.03);
}


/* Hero image (post page) */
.hero-wrap {
  width: 100%;
  max-height: 480px;          /* cap height for large screens */
  overflow: hidden;
  border-radius: 8px;
  background-color: #fff8f0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Fallback for browsers without aspect-ratio: set fixed height on small screens */
@supports not (aspect-ratio: 16/9) {
  .card-image-wrap {
    height: 160px;
  }

  @media (min-width: 768px) {
    .card-image-wrap { height: 180px; }
  }
}

/* Slightly taller images on small devices for card readability */
@media (max-width: 576px) {
  .card-image-wrap { aspect-ratio: 4 / 3; } /* taller on phones */
  .hero-wrap { max-height: 360px; }
}


.homepage-content .btn {
  margin-bottom: 1rem;  /* Adjust spacing as you like */
}

.bg-orange-strip {
  width: 100vw;            /* full viewport width */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;      /* center it horizontally */
  margin-right: -50vw;
  background-color: #FFF3E0; /* your light orange */
}

.allocation-text {
  font-size: 1.5rem; /* bigger text */
  transition: color 0.3s ease;
}

.allocation-text.valid {
  color: green;
}

.allocation-text.invalid {
  color: red;
}


  .allocation-text.invalid {
    color: red;
    font-weight: bold;
  }

  .allocation-text.valid {
    color: green;
    font-weight: 600;
  }

  /* Feature box base styles */
.bg-orange-strip .row > div > div {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Hover effect: lift and shadow */
.bg-orange-strip .row > div > div:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 30px rgba(248, 173, 99, 0.4);
  z-index: 5; /* make sure it’s above neighbors */
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-text {
  animation: fadeSlideIn 1.2s ease forwards;
  /* optional: start invisible before animation */
  opacity: 0;
}


.img-grow-on-hover {
  transition: transform 0.3s ease;
}

.img-grow-on-hover:hover {
  transform: scale(1.05);
}
