/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Color Variables
 *
 * Each instance picks a palette with the LIBRARY_THEME env var, which the
 * layout renders as data-theme on <html>. Rules elsewhere in this file use the
 * legacy palette names, which alias the semantic tokens below. */
:root,
[data-theme="cache_valley"] {
  --color-text: #43403D;
  --color-bg: #f0f0f0;
  --color-primary: #213F3D;
  --color-primary-soft: #B3D2B3;
  --color-accent: #FB5D3E;
  --color-accent-soft: #CBDBFF;
  --color-secondary: #5B183E;
}

[data-theme="sage"] {
  --color-text: #3A3B35;
  --color-bg: #F1F2ED;
  --color-primary: #46614E;
  --color-primary-soft: #C6D8C2;
  --color-accent: #B4502F;
  --color-accent-soft: #DFE7D6;
  --color-secondary: #6E2F3A;
}

[data-theme="coastal"] {
  --color-text: #333A40;
  --color-bg: #EEF2F5;
  --color-primary: #2C4A63;
  --color-primary-soft: #BCD5E3;
  --color-accent: #C6503F;
  --color-accent-soft: #D8E6F1;
  --color-secondary: #7A2E3E;
}

[data-theme="sunset"] {
  --color-text: #3A322D;
  --color-bg: #EFEDE9;
  --color-primary: #5C4033;
  --color-primary-soft: #E2CDB8;
  --color-accent: #B4502A;
  --color-accent-soft: #F0DFC8;
  --color-secondary: #6D2437;
}

:root {
  --charcoal: var(--color-text);
  --off-white: var(--color-bg);
  --forest-green: var(--color-primary);
  --tea-green: var(--color-primary-soft);
  --plum: var(--color-secondary);
  --periwinkle: var(--color-accent-soft);
  --blood-orange: var(--color-accent);

  /* Bootstrap's 1rem paragraph gap plus half a line of the current text size */
  --paragraph-spacing: calc(1rem + 0.5lh);
}

/* Font Families */
@font-face {
  font-family: 'PAALALABAS';
  src: url("/fonts/PaalalabasDisplay-Wide.woff2") format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url("/assets/BricolageGrotesque-latin-ext-wght-normal-50e25c3f.woff2") format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url("/assets/BricolageGrotesque-latin-wght-normal-3084aa15.woff2") format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Satisfy';
  src: url("/assets/Satisfy-latin-400-normal-dff6e622.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Note: Antique Olive still needs to be added if available */
/* To add Antique Olive font, uncomment and update path:
@font-face {
  font-family: 'Antique Olive';
  src: url("/fonts/AntiqueOlive.woff2") format('woff2'),
       url("/fonts/AntiqueOlive.woff") format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
*/

/* Body and general styling */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Antique Olive', 'Bricolage Grotesque', sans-serif;
  color: var(--charcoal);
  background-color: var(--off-white);
}

.container-fluid.px-4 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--off-white);
}

main {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'PAALALABAS', 'Impact', 'Arial Black', sans-serif;
  color: var(--charcoal);
}

/* Override heading colors in card headers with dark backgrounds */
.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6,
.card-header.bg-primary .display-1,
.card-header.bg-primary .display-2,
.card-header.bg-primary .display-3,
.card-header.bg-primary .display-4,
.card-header.bg-primary .display-5,
.card-header.bg-primary .display-6 {
  color: var(--off-white) !important;
}

.card-header.bg-danger h1,
.card-header.bg-danger h2,
.card-header.bg-danger h3,
.card-header.bg-danger h4,
.card-header.bg-danger h5,
.card-header.bg-danger h6,
.card-header.bg-danger .display-1,
.card-header.bg-danger .display-2,
.card-header.bg-danger .display-3,
.card-header.bg-danger .display-4,
.card-header.bg-danger .display-5,
.card-header.bg-danger .display-6 {
  color: var(--off-white) !important;
}

.lead, p, body {
  font-family: 'Antique Olive', 'Bricolage Grotesque', sans-serif;
}

/* Bootstrap's .mb-* utilities are !important, so components that set their own
   spacing keep it and only free-standing body copy picks this up. */
p {
  margin-bottom: var(--paragraph-spacing);
}

.text-muted, small, .small {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 200;
}

.cursive, .satisfy {
  font-family: 'Satisfy', cursive;
}

/* Site footer */
.site-footer {
  background-color: var(--forest-green);
  color: var(--off-white);
  margin-top: auto;
}

.site-footer__inner {
  text-align: center;
}

.site-footer__brand {
  font-family: 'PAALALABAS', 'Impact', 'Arial Black', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--tea-green);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
}

.site-footer__link {
  color: var(--off-white);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-footer__link:hover {
  color: var(--tea-green);
  text-decoration: underline;
}

.site-footer__sep {
  color: var(--tea-green);
  opacity: 0.7;
}

.site-footer__copy {
  font-size: 0.85rem;
  opacity: 0.8;
}

.site-footer .site-footer__version {
  font-size: 0.6rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--off-white) 30%, transparent);
  opacity: 1;
  margin-top: 0.35rem;
}

/* Cookie consent banner */
.has-cookie-banner {
  padding-bottom: 8.5rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: var(--forest-green);
  color: var(--off-white);
  border-top: 3px solid var(--tea-green);
  padding: 1rem 0;
  box-shadow: 0 -0.5rem 1.25rem rgba(0, 0, 0, 0.18);
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner__text {
  flex: 1 1 18rem;
  font-size: 0.95rem;
}

.cookie-banner__link {
  color: var(--tea-green);
  text-decoration: underline;
}

.cookie-banner__link:hover {
  color: var(--off-white);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Navbar styling */
.navbar {
  background-color: var(--tea-green) !important;
  border-bottom-color: var(--forest-green) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'PAALALABAS', 'Impact', 'Arial Black', sans-serif;
  color: var(--forest-green) !important;
}

.nav-link {
  color: var(--charcoal) !important;
  font-family: 'Antique Olive', 'Bricolage Grotesque', sans-serif;
}

.navbar .navbar-nav .nav-link.nav-link-carriers {
  background-color: var(--forest-green);
  color: var(--off-white) !important;
  font-size: 1.1rem;
  padding: 0.4rem 0.8rem !important;
  border: 2px solid var(--forest-green);
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.navbar .navbar-nav .nav-link.nav-link-carriers:hover {
  background-color: transparent;
  color: var(--forest-green) !important;
}

.navbar-toggler {
  border-color: var(--charcoal);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(67, 64, 61, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Admin notifications bell */
.navbar .nav-link .notification-badge {
  top: 0.35rem;
  left: auto;
  right: 0.15rem;
  font-size: 0.65rem;
  padding: 0.2em 0.4em;
}

.notifications-panel {
  width: 360px;
  max-width: 92vw;
  overflow: hidden;
}

.notifications-panel--page {
  width: 100%;
  max-width: none;
}

.notifications-panel .notifications-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.25rem 0 0.5rem;
}

.notifications-panel .dropdown-header {
  padding: 0.85rem 1.25rem 0.35rem;
  margin-bottom: 0;
}

.notifications-panel--page .notifications-body {
  max-height: none;
  padding: 0.35rem 0 0.75rem;
}

.notifications-panel--page .notifications-header {
  padding: 1rem 1.25rem;
}

.notifications-panel .notification-item {
  white-space: normal;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.7rem 1.25rem;
}

.notification-item:last-of-type {
  border-bottom: none;
}

.notification-item--unread {
  background-color: var(--periwinkle);
}

.notification-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: var(--forest-green);
}

.notification-item__icon--return_request,
.notification-item__icon--member_expiration {
  background-color: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--blood-orange);
}

.notification-item__dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
}

.notifications-footer a {
  text-decoration: none;
}

.notifications-mark-all {
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Product card hover effects - only for carrier/product cards */
.card.product-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card.product-card .carrier-tile-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.card.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Button styling */
.btn-primary {
  background-color: var(--blood-orange);
  border-color: var(--blood-orange);
  color: var(--off-white);
  font-family: 'Antique Olive', 'Bricolage Grotesque', sans-serif;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: color-mix(in srgb, var(--color-accent) 88%, black);
  border-color: color-mix(in srgb, var(--color-accent) 88%, black);
  color: var(--off-white);
}

.btn-outline-primary {
  color: var(--forest-green);
  border-color: var(--forest-green);
  font-family: 'Antique Olive', 'Bricolage Grotesque', sans-serif;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--forest-green);
  border-color: var(--forest-green);
  color: var(--off-white);
}

.btn-success {
  background-color: var(--forest-green);
  border-color: var(--forest-green);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: color-mix(in srgb, var(--color-primary) 80%, black);
  border-color: color-mix(in srgb, var(--color-primary) 80%, black);
  color: var(--off-white);
}

.btn-danger {
  background-color: var(--plum);
  border-color: var(--plum);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background-color: color-mix(in srgb, var(--color-secondary) 80%, black);
  border-color: color-mix(in srgb, var(--color-secondary) 80%, black);
  color: var(--off-white);
}

.btn-warning {
  background-color: var(--tea-green);
  border-color: var(--tea-green);
  color: var(--charcoal);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background-color: color-mix(in srgb, var(--color-primary-soft) 88%, black);
  border-color: color-mix(in srgb, var(--color-primary-soft) 88%, black);
  color: var(--charcoal);
}

.btn-info {
  background-color: var(--periwinkle);
  border-color: var(--periwinkle);
  color: var(--charcoal);
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
  background-color: color-mix(in srgb, var(--color-accent-soft) 90%, black);
  border-color: color-mix(in srgb, var(--color-accent-soft) 90%, black);
  color: var(--charcoal);
}

.btn-secondary {
  background-color: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--off-white);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: color-mix(in srgb, var(--color-text) 68%, black);
  border-color: color-mix(in srgb, var(--color-text) 68%, black);
  color: var(--off-white);
}

.btn {
  font-weight: 500;
}

/* Override Bootstrap's default blue focus box-shadow */
.btn:focus,
.btn:focus-visible {
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--color-text) 25%, transparent) !important;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
  border-color: var(--tea-green);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--color-primary-soft) 25%, transparent);
}

/* Link styling */

/* Alert styling */
.alert {
  border: none;
  border-left: 4px solid;
}

.alert-success {
  background-color: var(--tea-green);
  border-left-color: var(--forest-green);
  color: var(--charcoal);
}

.alert-danger {
  background-color: #f8d7da;
  border-left-color: var(--plum);
  color: var(--plum);
}

.alert-warning {
  background-color: #fff3cd;
  border-left-color: var(--blood-orange);
  color: var(--charcoal);
}

.alert-info {
  background-color: var(--periwinkle);
  border-left-color: var(--forest-green);
  color: var(--charcoal);
}

/* Card styling */
.card-header.bg-primary {
  background-color: var(--forest-green) !important;
  color: var(--off-white) !important;
}

.card-header.bg-primary,
.card-header.bg-primary *,
.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6 {
  color: var(--off-white) !important;
}

.card-header.bg-info {
  background-color: var(--periwinkle) !important;
  color: var(--charcoal) !important;
}

.card-header.bg-info,
.card-header.bg-info *,
.card-header.bg-info h1,
.card-header.bg-info h2,
.card-header.bg-info h3,
.card-header.bg-info h4,
.card-header.bg-info h5,
.card-header.bg-info h6 {
  color: var(--charcoal) !important;
}

.taxonomy-table-filter {
  width: 12rem;
  max-width: 100%;
}

.taxonomy-table-filter .form-control {
  color: var(--charcoal) !important;
  background-color: #fff !important;
}

.taxonomy-per-page {
  width: auto;
  min-width: 4.5rem;
}

.taxonomy-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  flex-shrink: 0;
}

.taxonomy-collapse-toggle:hover {
  opacity: 0.7;
}

.taxonomy-collapse-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.taxonomy-collapse-toggle .admin-nav-caret {
  transform: rotate(-45deg);
}

.taxonomy-collapse-toggle[aria-expanded="true"] .admin-nav-caret {
  transform: rotate(45deg);
}

.card-header.bg-danger {
  background-color: var(--plum) !important;
  color: var(--off-white) !important;
}

.card-header.bg-danger,
.card-header.bg-danger *,
.card-header.bg-danger h1,
.card-header.bg-danger h2,
.card-header.bg-danger h3,
.card-header.bg-danger h4,
.card-header.bg-danger h5,
.card-header.bg-danger h6 {
  color: var(--off-white) !important;
}

.card-header.bg-warning {
  background-color: var(--tea-green) !important;
  color: var(--charcoal) !important;
}

.card-header.bg-warning,
.card-header.bg-warning *,
.card-header.bg-warning h1,
.card-header.bg-warning h2,
.card-header.bg-warning h3,
.card-header.bg-warning h4,
.card-header.bg-warning h5,
.card-header.bg-warning h6 {
  color: var(--charcoal) !important;
}

/* Activity stats cards */
.bg-light.rounded {
  background-color: var(--periwinkle) !important;
}

/* Badge colors */
.badge.bg-primary {
  background-color: var(--forest-green) !important;
}

.badge.bg-success {
  background-color: var(--forest-green) !important;
}

.badge.bg-info {
  background-color: var(--periwinkle) !important;
  color: var(--charcoal) !important;
}

.badge.bg-warning {
  background-color: var(--tea-green) !important;
  color: var(--charcoal) !important;
}

.badge.bg-danger {
  background-color: var(--plum) !important;
}

.badge.bg-secondary {
  background-color: var(--charcoal) !important;
}

/* Text colors */
.text-primary {
  color: var(--forest-green) !important;
}

.text-danger {
  color: var(--plum) !important;
}

.text-warning {
  color: var(--blood-orange) !important;
}

.text-info {
  color: var(--forest-green) !important;
}

/* Border colors */
.border-primary {
  border-color: var(--forest-green) !important;
}

.border-success {
  border-color: var(--forest-green) !important;
}

.border-danger {
  border-color: var(--plum) !important;
}

.border-info {
  border-color: var(--periwinkle) !important;
}

.border-warning {
  border-color: var(--tea-green) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .display-3 {
    font-size: 2rem;
  }
  
  .display-4 {
    font-size: 1.75rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Link colors */
a {
  color: var(--forest-green);
}

/* Navbar background override */
.navbar-light,
.navbar-dark {
  background-color: var(--tea-green) !important;
}

.navbar-light .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link {
  color: var(--charcoal) !important;
}

.navbar-light .navbar-nav .nav-link.nav-link-carriers,
.navbar-dark .navbar-nav .nav-link.nav-link-carriers {
  color: var(--off-white) !important;
}

.navbar-light .navbar-nav .nav-link.nav-link-carriers:hover,
.navbar-dark .navbar-nav .nav-link.nav-link-carriers:hover {
  color: var(--forest-green) !important;
}

/* Dropdown menu styling */
.dropdown-menu {
  background-color: var(--off-white);
  border-color: var(--tea-green);
}

.dropdown-item {
  color: var(--charcoal);
}

/* Collapsible Admin dropdown groups (NES-8) */
button.admin-nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--charcoal);
}

button.admin-nav-toggle:hover,
button.admin-nav-toggle:focus-visible {
  background-color: color-mix(in srgb, var(--tea-green) 40%, white);
  color: var(--charcoal);
}

.admin-nav-caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

button.admin-nav-toggle[aria-expanded="true"] .admin-nav-caret {
  transform: rotate(-135deg);
}

.admin-nav-section .dropdown-item {
  padding-left: 1.75rem;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--periwinkle) 100%);
  border-radius: 0 0 2rem 2rem;
}

.hero-section h1 {
  color: var(--forest-green);
}

.hero-section .lead {
  color: var(--charcoal);
  font-size: 1.25rem;
}

.hero-image img {
  max-height: 420px;
  width: 100%;
  object-fit: contain;
}

/* How It Works Section */
.how-it-works-section .step-number .badge {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.how-it-works-section h4 {
  color: var(--forest-green);
}

/* Benefits Section */
.benefits-section {
  background: linear-gradient(180deg, var(--off-white) 0%, var(--periwinkle) 100%);
}

.benefits-section ul li {
  font-size: 1.1rem;
}

/* Category Links */
.category-link {
  color: var(--charcoal);
  transition: all 0.2s ease-in-out;
  border: 2px solid transparent;
}

.category-link:hover {
  background-color: var(--tea-green) !important;
  color: var(--forest-green);
  border-color: var(--forest-green);
  transform: translateY(-2px);
}

.category-link small {
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  border-top: 4px solid var(--tea-green);
}

/* Featured Carriers Section */
.featured-carriers {
  background-color: var(--off-white);
}

.featured-carriers-carousel-viewport,
.featured-blog-posts-carousel-viewport {
  overflow: hidden;
  margin: 0 2.5rem;
}

.featured-carriers-carousel-track,
.featured-blog-posts-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.featured-carriers-carousel-item,
.featured-blog-posts-carousel-item {
  flex: 0 0 25%;
  min-width: 0;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

/* Home blog carousel */
.featured-blog-posts {
  background: linear-gradient(180deg, var(--off-white) 0%, color-mix(in srgb, var(--color-primary-soft) 28%, transparent) 100%);
}

.home-blog-tile {
  display: block;
  color: inherit;
  height: 100%;
}

.home-blog-tile__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-blog-tile:hover .home-blog-tile__card {
  border-color: var(--forest-green);
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.home-blog-tile__media {
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--periwinkle) 100%);
}

.home-blog-tile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-blog-tile__placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(135deg, var(--tea-green) 0%, var(--periwinkle) 100%);
}

.home-blog-tile__body {
  padding: 0.9rem 1rem 1.1rem;
  flex: 1;
}

.home-blog-tile__title {
  color: var(--forest-green);
  margin-bottom: 0.25rem;
}

.home-blog-tile__excerpt {
  color: var(--charcoal);
  line-height: 1.5;
}

.featured-carriers-carousel .featured-carrier-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.featured-carriers-carousel .card-title {
  font-size: 0.95rem;
}

.featured-carriers-carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--forest-green);
  opacity: 0.9;
}

.featured-carriers-carousel-control:hover {
  opacity: 1;
}

.featured-carriers-carousel-control-prev {
  left: 0;
}

.featured-carriers-carousel-control-next {
  right: 0;
}

.featured-carriers-carousel-control .carousel-control-prev-icon,
.featured-carriers-carousel-control .carousel-control-next-icon {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 767.98px) {
  .featured-carriers-carousel-viewport,
  .featured-blog-posts-carousel-viewport {
    margin: 0 2rem;
  }
}

/* Page Content Styling
   Trix resets all descendant margins (`.trix-content * { margin: 0 }`), so
   heading/paragraph gaps have to be set on the heading tags themselves with
   enough specificity to win. H3 already had page-content spacing; H1 inside
   the article body did not. */
.trix-content h1 {
  color: var(--forest-green);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.page-content h2,
.trix-content h2 {
  color: var(--forest-green);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content h3,
.trix-content h3 {
  color: var(--charcoal);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-content ul,
.page-content ol,
.trix-content ul,
.trix-content ol {
  margin-bottom: var(--paragraph-spacing);
}

.page-content ul li,
.page-content ol li,
.trix-content li {
  margin-bottom: 0.5rem;
}

.page-content p,
.trix-content p {
  margin-bottom: var(--paragraph-spacing);
  line-height: 1.7;
}

.trix-content > :first-child {
  margin-top: 0;
}

.page-intro p:last-child {
  margin-bottom: 0;
}

/* Affiliate tiles */
.affiliate-tile .affiliate-tile-body p:last-child {
  margin-bottom: 0;
}

.affiliate-tile .card-title {
  color: var(--forest-green);
}

.affiliate-tile-actions .affiliate-code .form-control {
  background-color: #fff;
}

/* Blog */
.blog-tile {
  display: block;
  color: inherit;
  height: 100%;
}

.blog-tile__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-tile:hover .blog-tile__card {
  border-color: var(--forest-green);
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.blog-tile__media {
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tea-green) 0%, var(--periwinkle) 100%);
}

.blog-tile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-tile__placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(135deg, var(--tea-green) 0%, var(--periwinkle) 100%);
}

.blog-tile__body {
  padding: 1.25rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-tile__title {
  color: var(--forest-green);
  margin-bottom: 0.35rem;
}

.blog-tile__excerpt {
  color: var(--charcoal);
  line-height: 1.6;
}

.blog-article__hero-image {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
}

.recent-blogs__panel {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  padding: 1.25rem;
}

.recent-blogs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.recent-blogs__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.recent-blogs__actions .btn-link {
  text-decoration: none;
  padding: 0.15rem 0.35rem;
}

.recent-blogs__item + .recent-blogs__item {
  margin-top: 0.65rem;
}

.recent-blogs__link {
  color: var(--forest-green);
  text-decoration: none;
  font-weight: 500;
}

.recent-blogs__link:hover {
  color: var(--blood-orange);
  text-decoration: underline;
}

.recent-blogs__restore {
  width: 100%;
}

.blog-comments__item {
  padding: 1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}

.blog-comments__item:last-child {
  border-bottom: none;
}

.blog-comments__body p:last-child {
  margin-bottom: 0;
}

.blog-comments__login-prompt {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  padding: 1.25rem;
}

/* Trix Editor Styling */
trix-editor {
  min-height: 300px;
  border-radius: 0.375rem;
}

trix-editor.trix-editor--compact,
.trix-editor--compact trix-editor {
  min-height: 8rem;
}

.lead .trix-content {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.lead .trix-content p,
.lead .trix-content div {
  margin-bottom: 0.5em;
}

.lead .trix-content > :last-child {
  margin-bottom: 0;
}

.trix-content a {
  color: var(--forest-green);
  text-decoration: underline;
}

.trix-content u {
  text-decoration: underline;
}

trix-toolbar .trix-button--icon-underline::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 4h2.2v8.2c0 1.7 1.2 2.8 2.8 2.8s2.8-1.1 2.8-2.8V4H17v8.3c0 3-2.2 5-5 5s-5-2-5-5V4zm-1 16h12v1.5H6V20z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.1em;
}

/* Keep button rows from blowing the layout; never clip the link dialog. */
trix-toolbar .trix-button-row {
  overflow-x: auto;
  overflow-y: hidden;
}

trix-toolbar .trix-dialog[data-trix-active] {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}

trix-toolbar .trix-dialog--link {
  max-width: none;
}

trix-toolbar .trix-dialog__link-fields {
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

trix-toolbar .trix-dialog__field {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  gap: 0.2rem;
}

trix-toolbar .trix-dialog__label {
  font-size: 0.9em;
  font-weight: 600;
  color: #333;
}

trix-toolbar .trix-dialog__link-fields .trix-input--dialog {
  flex: 1 1 100%;
  margin-right: 0;
  width: 100%;
}

trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 auto;
}

/* Alignment wrappers in the editor and published content */
trix-editor align-left,
trix-editor align-center,
trix-editor align-right,
.trix-content align-left,
.trix-content align-center,
.trix-content align-right {
  display: block;
}

trix-editor align-center,
.trix-content align-center {
  clear: both;
  text-align: center;
}

/* Floated images let following paragraphs wrap; centered images break the wrap. */
.trix-content align-left .attachment--preview,
.trix-content align-left action-text-attachment,
trix-editor align-left .attachment--preview {
  float: left;
  width: min(46%, 22rem);
  max-width: 46%;
  margin: 0.25rem 1.25rem 1rem 0;
  text-align: left;
}

.trix-content align-right .attachment--preview,
.trix-content align-right action-text-attachment,
trix-editor align-right .attachment--preview {
  float: right;
  width: min(46%, 22rem);
  max-width: 46%;
  margin: 0.25rem 0 1rem 1.25rem;
  text-align: right;
}

.trix-content align-center .attachment--preview,
.trix-content align-center action-text-attachment,
trix-editor align-center .attachment--preview {
  float: none;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.25rem auto;
  text-align: center;
}

.trix-content::after,
trix-editor::after {
  content: "";
  display: block;
  clear: both;
}

.trix-content u,
trix-editor u {
  text-decoration: underline;
}

trix-toolbar .trix-button--icon-underline::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 4h2v8a4 4 0 1 0 8 0V4h2v8a6 6 0 1 1-12 0V4zm-1 15h14v2H5v-2z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

trix-toolbar .trix-button--icon-align-left::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M4 6.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm0 4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0 4a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm0 4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

trix-toolbar .trix-button--icon-align-center::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M4 6.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm2 4a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm-2 4a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm2 4a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

trix-toolbar .trix-button--icon-align-right::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M4 6.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm6 4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm-6 4a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5zm6 4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

trix-toolbar {
  background-color: var(--off-white);
  border-radius: 0.375rem 0.375rem 0 0;
  border: 1px solid #dee2e6;
  border-bottom: none;
  max-width: 100%;
  overflow: visible;
}

trix-toolbar .trix-dialogs {
  overflow: visible;
}

/* Allow Bootstrap columns to shrink so the Trix toolbar doesn't blow out the layout */
.row > [class*="col-"]:has(trix-toolbar) {
  min-width: 0;
}

/* Print styles */
@media print {
  .navbar,
  .site-footer,
  .cookie-banner,
  .btn,
  .card-header {
    display: none;
  }
}

.photo-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(92vh, 860px);
}

.photo-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-lightbox-caption {
  min-height: 1.5rem;
}

.carrier-photo-stage {
  height: 520px;
  margin-bottom: 1rem;
}

.carrier-photo-stage .carousel,
.carrier-photo-stage .carousel-inner,
.carrier-photo-stage .carousel-item {
  height: 100%;
}

.carrier-photo-stage .carrier-show-photo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.carrier-photo-hint {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  line-height: 1.2;
  pointer-events: none;
}

.carrier-photo-card {
  position: relative;
}

.carrier-photo-card-header {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
}

.carrier-photo-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  color: #495057;
  cursor: grab;
  touch-action: none;
}

.carrier-photo-drag-handle:active {
  cursor: grabbing;
}

.carrier-photo-drag-icon {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M5 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M5 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.carrier-photo-card.is-dragging,
[data-carrier-photo-manager-target="existingItem"].is-dragging .carrier-photo-card,
[data-pending-index].is-dragging .carrier-photo-card {
  opacity: 0.55;
  outline: 2px dashed #0d6efd;
  outline-offset: 2px;
}
