/*
 * 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.
 */

/* ============================================
   GLOBAL MOBILE OVERFLOW FIX
   ============================================ */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============================================
   CSS CUSTOM PROPERTIES - Animation System
   ============================================ */
:root {
  /* Timing */
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;
  --duration-entrance: 600ms;

  /* Easing */
  --ease-smooth: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-gentle: cubic-bezier(0.22, 1, 0.36, 1);

  /* Colors - enhanced */
  --glow-yellow: rgba(242, 179, 34, 0.35);
  --glow-orange: rgba(212, 90, 29, 0.35);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-lifted: 0 20px 40px rgba(0, 0, 0, 0.18);
  --shadow-deep: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ============================================
   BASE TRANSITIONS
   ============================================ */
.btn,
.nav-link-light,
a,
button {
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-input {
  transition: border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth),
    background-color var(--duration-fast) var(--ease-smooth);
}

/* ============================================
   HOVER EFFECTS - Enhanced
   ============================================ */
.hover-lift {
  transition: transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
  will-change: transform;
}

.hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lifted);
}

/* Card hover glow effect */
.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
  box-shadow: 0 0 30px var(--glow-yellow);
  pointer-events: none;
}

.card-glow:hover::before {
  opacity: 1;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-smooth);
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px var(--glow-yellow);
}

/* ============================================
   LINK ANIMATIONS
   ============================================ */
.nav-link-light {
  position: relative;
}

.nav-link-light::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width var(--duration-fast) var(--ease-snappy);
}

.nav-link-light:hover::after {
  width: 100%;
}

/* Footer link underline animation */
footer a {
  position: relative;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--duration-fast) var(--ease-smooth);
}

footer a:hover::after {
  width: 100%;
}

/* ============================================
   FORM ENHANCEMENTS - Modern Polish
   ============================================ */

/* Form sections */
.form-section {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.form-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.form-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #06152A;
}

.form-section-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Form groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* Modern labels */
.form-label-modern {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.form-required {
  color: #ef4444;
  font-weight: 700;
}

.form-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Modern inputs */
.form-input-modern {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  color: #0f172a;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-input-modern::placeholder {
  color: #94a3b8;
}

.form-input-modern:hover {
  border-color: #cbd5e1;
}

.form-input-modern:focus {
  outline: none;
  border-color: #F2B322;
  box-shadow: 0 0 0 3px var(--glow-yellow);
}

/* Multi-select styling */
.form-select-multi {
  padding: 0.5rem;
}

.form-select-multi option {
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  margin-bottom: 0.125rem;
}

.form-select-multi option:checked {
  background: linear-gradient(0deg, #06152A 0%, #06152A 100%);
  color: white;
}

/* Input with icon */
.form-input-with-icon {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  pointer-events: none;
}

.form-input-with-icon-input {
  padding-left: 2.5rem;
}

/* Checkbox styling */
.form-checkbox-modern {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-checkbox-modern:hover {
  border-color: #F2B322;
  background: #fffbeb;
}

.form-checkbox-input {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  accent-color: #06152A;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

/* Media uploader */
.media-uploader {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-uploader-preview {
  width: 100%;
  aspect-ratio: 1;
  max-width: 200px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px dashed #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.media-uploader-preview-wide {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  height: 180px;
}

.media-uploader-preview:has(img) {
  border-style: solid;
  border-color: #e2e8f0;
}

.media-uploader-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-uploader-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.media-uploader-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.media-uploader-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #06152A;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.media-uploader-button:hover {
  border-color: #F2B322;
  background: #fffbeb;
}

/* Video dropzone */
.video-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.video-dropzone:hover {
  border-color: #F2B322;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.video-dropzone-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #06152A 0%, #0d2847 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.video-dropzone-content {
  flex: 1;
}

.video-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.video-progress,
.video-success,
.video-error {
  padding: 1rem;
  border-radius: 0.75rem;
}

.video-progress {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.video-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.video-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

/* Form actions */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

/* Legacy form-input focus (keep for compatibility) */
.form-input:focus {
  outline: none;
  border-color: #F2B322;
  box-shadow: 0 0 0 4px var(--glow-yellow);
}

.form-label {
  transition: color var(--duration-fast) var(--ease-smooth);
}

.form-input:focus+.form-label,
.form-input:focus~.form-label {
  color: #F2B322;
}

/* ============================================
   SCROLL REVEAL - Initial States
   ============================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
}

.fade-in-up.revealed,
.fade-in-up[data-revealed="true"] {
  opacity: 1;
  transform: translateY(0);
}

[data-animate] {
  opacity: 0;
}

[data-animate][data-revealed="true"] {
  opacity: 1;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
main {
  animation: pageEnter var(--duration-normal) var(--ease-smooth);
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Turbo loading indicator */
.turbo-progress-bar {
  background: linear-gradient(90deg, #D45A1D, #F2B322);
  height: 3px;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
a[href*="wa.me"],
a[href*="twitter"],
a[href*="facebook"],
a[href*="linkedin"] {
  transition: transform var(--duration-fast) var(--ease-bounce),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

a[href*="wa.me"]:hover,
a[href*="twitter"]:hover,
a[href*="facebook"]:hover,
a[href*="linkedin"]:hover {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.question-toggle svg {
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.question-toggle[aria-expanded="true"] svg,
.question-toggle.active svg {
  transform: rotate(180deg);
}

[data-answer] {
  overflow: hidden;
  transition: height var(--duration-normal) var(--ease-gentle),
    opacity var(--duration-normal) var(--ease-smooth);
}

/* ============================================
   CARD REFINEMENTS
   ============================================ */
.card-flat {
  transition: transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

.card-flat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

/* Episode/Article card image zoom */
.card-flat img,
.hover-lift img {
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.card-flat:hover img,
.hover-lift:hover img {
  transform: scale(1.05);
}

/* ============================================
   HEADER POLISH
   ============================================ */
header {
  transition: box-shadow var(--duration-normal) var(--ease-smooth),
    background-color var(--duration-normal) var(--ease-smooth);
}

header.scrolled {
  box-shadow: var(--shadow-deep);
}

/* Mobile menu animation */
[x-show*="mobileOpen"] {
  animation: slideInFromRight var(--duration-normal) var(--ease-snappy);
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mega menu animation */
[x-show*="megaOpen"] {
  animation: fadeScaleIn var(--duration-fast) var(--ease-smooth);
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scaleY(0.95);
  }

  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ============================================
   FOOTER POLISH
   ============================================ */
footer .h-9.w-9 {
  transition: transform var(--duration-fast) var(--ease-bounce),
    background-color var(--duration-fast) var(--ease-smooth);
}

footer .h-9.w-9:hover {
  transform: scale(1.12) translateY(-2px);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.1) 25%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   VIDEO PLAYER POLISH
   ============================================ */
.video-wrapper {
  transition: box-shadow var(--duration-normal) var(--ease-smooth);
}

.video-wrapper:hover,
.video-wrapper:focus-within {
  box-shadow: 0 0 0 4px var(--glow-orange);
}

/* ============================================
   REDUCED MOTION - Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in-up {
    opacity: 1;
    transform: none;
  }

  [data-animate] {
    opacity: 1;
  }

  main {
    animation: none;
  }
}

/* ============================================
   TRIX WYSIWYG EDITOR - Modern Polish
   ============================================ */

/* Container wrapper */
.trix-content,
trix-editor {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #0b1b2b;
}

/* Toolbar - Main container */
trix-toolbar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  transition: border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

trix-toolbar:focus-within {
  border-color: #F2B322;
  box-shadow: 0 -2px 8px rgba(242, 179, 34, 0.1);
}

/* Toolbar button groups */
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
}

trix-toolbar .trix-button-group {
  display: flex;
  gap: 0.125rem;
  margin-right: 0.375rem;
  padding-right: 0.375rem;
  border-right: 1px solid #e2e8f0;
}

trix-toolbar .trix-button-group:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

/* Individual toolbar buttons */
trix-toolbar .trix-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #64748b;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

trix-toolbar .trix-button:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #06152A;
}

trix-toolbar .trix-button:active {
  transform: scale(0.95);
}

trix-toolbar .trix-button.trix-active {
  background: #06152A;
  border-color: #06152A;
  color: white;
  box-shadow: 0 2px 4px rgba(6, 21, 42, 0.15);
}

trix-toolbar .trix-button.trix-active:hover {
  background: #0d2847;
}

/* Button icons - Custom SVGs matching Lucide style */
trix-toolbar .trix-button::before {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

trix-toolbar .trix-button:hover::before {
  opacity: 0.9;
}

trix-toolbar .trix-button.trix-active::before {
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* Bold - B icon */
trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z'/%3e%3cpath d='M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z'/%3e%3c/svg%3e");
}

/* Italic - I icon */
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='19' y1='4' x2='10' y2='4'/%3e%3cline x1='14' y1='20' x2='5' y2='20'/%3e%3cline x1='15' y1='4' x2='9' y2='20'/%3e%3c/svg%3e");
}

/* Strikethrough */
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M16 4H9a3 3 0 0 0-2.83 4'/%3e%3cpath d='M14 12a4 4 0 0 1 0 8H6'/%3e%3cline x1='4' y1='12' x2='20' y2='12'/%3e%3c/svg%3e");
}

/* Link */
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3e%3cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3e%3c/svg%3e");
}

/* Heading */
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M4 12h8'/%3e%3cpath d='M4 18V6'/%3e%3cpath d='M12 18V6'/%3e%3cpath d='m17 12 3-2v8'/%3e%3c/svg%3e");
}

/* Quote */
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z'/%3e%3cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3e%3c/svg%3e");
}

/* Code */
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='16 18 22 12 16 6'/%3e%3cpolyline points='8 6 2 12 8 18'/%3e%3c/svg%3e");
}

/* Bullet list */
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='8' y1='6' x2='21' y2='6'/%3e%3cline x1='8' y1='12' x2='21' y2='12'/%3e%3cline x1='8' y1='18' x2='21' y2='18'/%3e%3ccircle cx='3' cy='6' r='1' fill='%2306152A'/%3e%3ccircle cx='3' cy='12' r='1' fill='%2306152A'/%3e%3ccircle cx='3' cy='18' r='1' fill='%2306152A'/%3e%3c/svg%3e");
}

/* Number list */
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='10' y1='6' x2='21' y2='6'/%3e%3cline x1='10' y1='12' x2='21' y2='12'/%3e%3cline x1='10' y1='18' x2='21' y2='18'/%3e%3cpath d='M4 6h1v4'/%3e%3cpath d='M4 10h2'/%3e%3cpath d='M6 18H4c0-1 2-2 2-3s-1-1.5-2-1'/%3e%3c/svg%3e");
}

/* Decrease indent */
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='7 8 3 12 7 16'/%3e%3cline x1='21' y1='12' x2='9' y2='12'/%3e%3cline x1='21' y1='6' x2='11' y2='6'/%3e%3cline x1='21' y1='18' x2='11' y2='18'/%3e%3c/svg%3e");
}

/* Increase indent */
trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='3 8 7 12 3 16'/%3e%3cline x1='21' y1='12' x2='11' y2='12'/%3e%3cline x1='21' y1='6' x2='11' y2='6'/%3e%3cline x1='21' y1='18' x2='11' y2='18'/%3e%3c/svg%3e");
}

/* Attach files */
trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3e%3c/svg%3e");
}

/* Undo */
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3 7v6h6'/%3e%3cpath d='M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13'/%3e%3c/svg%3e");
}

/* Redo */
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2306152A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 7v6h-6'/%3e%3cpath d='M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7'/%3e%3c/svg%3e");
}

/* Toolbar dropdowns and dialogs */
trix-toolbar .trix-dialog {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  margin-top: -1px;
}

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

trix-toolbar .trix-dialog input[type="url"],
trix-toolbar .trix-dialog input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  transition: all var(--duration-fast) var(--ease-smooth);
}

trix-toolbar .trix-dialog input[type="url"]:focus,
trix-toolbar .trix-dialog input[type="text"]:focus {
  outline: none;
  border-color: #F2B322;
  box-shadow: 0 0 0 3px var(--glow-yellow);
  background: white;
}

trix-toolbar .trix-dialog .trix-button-group {
  display: flex;
  gap: 0.375rem;
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button {
  width: auto;
  height: auto;
  padding: 0.5rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button--dialog {
  background: #06152A;
  color: white;
  border-radius: 0.5rem;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button--dialog:hover {
  background: #0d2847;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button--dialog[data-trix-method="removeAttribute"] {
  background: #ef4444;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button--dialog[data-trix-method="removeAttribute"]:hover {
  background: #dc2626;
}

/* Editor area */
trix-editor {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  padding: 1rem 1.25rem;
  min-height: 240px;
  max-height: 500px;
  overflow-y: auto;
  transition: border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

trix-editor:focus {
  outline: none;
  border-color: #F2B322;
  box-shadow: 0 4px 12px rgba(242, 179, 34, 0.15);
}

/* Editor placeholder */
trix-editor:empty::before {
  content: attr(placeholder);
  color: #94a3b8;
  pointer-events: none;
}

/* Editor content styling */
trix-editor h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #06152A;
}

trix-editor a {
  color: #D45A1D;
  text-decoration: underline;
  text-underline-offset: 2px;
}

trix-editor a:hover {
  color: #b94a17;
}

trix-editor blockquote {
  border-left: 4px solid #F2B322;
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  color: #475569;
  font-style: italic;
  background: #fffbeb;
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

trix-editor pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'Fira Code', 'Monaco', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
}

trix-editor ul,
trix-editor ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

trix-editor li {
  margin: 0.25rem 0;
}

trix-editor ul li::marker {
  color: #F2B322;
}

trix-editor ol li::marker {
  color: #D45A1D;
  font-weight: 600;
}

/* Attachments */
trix-editor .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
  margin: 0.5rem 0;
}

trix-editor .attachment__caption {
  padding: 0.5rem;
  font-size: 0.8125rem;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
  border-radius: 0 0 0.5rem 0.5rem;
}

trix-editor .attachment--preview {
  text-align: center;
}

trix-editor .attachment--preview img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

trix-editor .attachment--file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

trix-editor .attachment--file .attachment__name {
  font-weight: 500;
  color: #06152A;
}

trix-editor .attachment--file .attachment__size {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Selection highlight */
trix-editor::selection,
trix-editor *::selection {
  background: rgba(242, 179, 34, 0.3);
}

/* Progress bar for uploads */
trix-editor .attachment__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e2e8f0;
  border-radius: 0 0 0.5rem 0.5rem;
  overflow: hidden;
}

trix-editor .attachment__progress .attachment__progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #D45A1D, #F2B322);
  transition: width 0.2s ease-out;
}

/* Toolbar responsive adjustments */
@media (max-width: 640px) {
  trix-toolbar {
    padding: 0.5rem;
  }

  trix-toolbar .trix-button {
    width: 1.75rem;
    height: 1.75rem;
  }

  trix-toolbar .trix-button-group {
    margin-right: 0.25rem;
    padding-right: 0.25rem;
  }

  trix-editor {
    padding: 0.75rem;
    min-height: 180px;
  }
}

/* ============================================
   RICH TEXT CONTENT ON DARK BACKGROUNDS
   Fix for trix-content in dark sections (FAQ, etc)
   ============================================ */
.section-navy .trix-content,
.section-navy action-text-attachment,
.bg-panel-navy .trix-content,
.bg-panel-navy action-text-attachment,
[data-answer] .trix-content,
[data-answer] action-text-attachment {
  color: inherit;
}

.section-navy .trix-content *,
.bg-panel-navy .trix-content *,
[data-answer] .trix-content * {
  color: inherit;
}

.section-navy .trix-content a,
.bg-panel-navy .trix-content a,
[data-answer] .trix-content a {
  color: #F2B322;
  text-decoration: underline;
}

.section-navy .trix-content a:hover,
.bg-panel-navy .trix-content a:hover,
[data-answer] .trix-content a:hover {
  color: #fbbf24;
}

.section-navy .trix-content blockquote,
.bg-panel-navy .trix-content blockquote,
[data-answer] .trix-content blockquote {
  border-left-color: #F2B322;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.section-navy .trix-content pre,
.bg-panel-navy .trix-content pre,
[data-answer] .trix-content pre {
  background: rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
}


/* ============================================
   ADMIN POLISH
   ============================================ */
aside nav a,
aside .space-y-1 a,
aside .space-y-1 button {
  transition: background-color var(--duration-fast) var(--ease-smooth),
    color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth);
}

aside nav a:hover,
aside .space-y-1 a:hover,
aside .space-y-1 button:hover {
  transform: translateX(4px);
}

/* Admin table row hover */
table tbody tr {
  transition: background-color var(--duration-fast) var(--ease-smooth);
}

table tbody tr:hover {
  background-color: rgba(242, 179, 34, 0.05);
}

/* Admin stat cards */
.admin-stat-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.admin-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.admin-stat-number {
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

/* Admin action cards */
.admin-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.admin-action-card:hover {
  border-color: #06152A;
  box-shadow: 0 8px 20px rgba(6, 21, 42, 0.08);
}

/* Admin content cards */
.admin-content-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Admin panel cards */
.admin-panel-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.admin-panel-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* ============================================
   PAGINATION POLISH
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #06152A;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-smooth);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagination-link:hover {
  background: #F2B322;
  border-color: #F2B322;
  color: #06152A;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 179, 34, 0.3);
}

.pagination-link:active {
  transform: translateY(0);
}

.pagination-current {
  background: #06152A;
  border-color: #06152A;
  color: white;
  cursor: default;
  pointer-events: none;
}

.pagination-prev,
.pagination-next,
.pagination-first,
.pagination-last {
  padding: 0 0.5rem;
}

.pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2.5rem;
  color: #9ca3af;
  font-weight: 600;
}

/* Dark theme pagination (for navy backgrounds) */
.bg-panel-navy .pagination-link,
.section-navy .pagination-link {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.bg-panel-navy .pagination-link:hover,
.section-navy .pagination-link:hover {
  background: #F2B322;
  border-color: #F2B322;
  color: #06152A;
}

.bg-panel-navy .pagination-current,
.section-navy .pagination-current {
  background: #F2B322;
  border-color: #F2B322;
  color: #06152A;
}

.bg-panel-navy .pagination-gap,
.section-navy .pagination-gap {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   HERO SLIDER POLISH
   ============================================ */
#hero-prev,
#hero-next {
  transition: all var(--duration-fast) var(--ease-bounce);
}

#hero-prev:hover,
#hero-next:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#hero-prev:active,
#hero-next:active {
  transform: scale(0.95);
}