/* ==========================================================================
   VIVREFR FRENCH ADMINISTRATION EXPLAINED - V1.01.034
   ========================================================================== */

:root {
  --vf-bg:               #f6f2ec;     /* Warm beige background */
  --vf-brand-beige:      #dcd6cc;     /* Warm brand neutral accent */
  --vf-surface:          #ffffff;     /* Card background */
  --vf-surface-soft:     #ece6de;     /* Muted background surface */
  --vf-navy:             #1c3281;     /* Primary brand color */
  --vf-navy-dark:        #14245c;     /* Hover state brand color */
  --vf-navy-deep:        #0c1a40;     /* Extra deep contrast text/titles */
  --vf-red-ui:           #c8321a;     /* Negative values / high cost */
  --vf-red-flag:         #e1000f;     /* Alert warnings */
  --vf-green-ui:         #16a34a;     /* Positive value */
  --vf-orange-ui:        #ea580c;     /* Moderate rating */
  --vf-ink:              #080f1e;     /* High contrast body text */
  --vf-muted:            #64748b;     /* Slate gray secondary text */
  --vf-espresso:         #6b5e4e;     /* Neutral secondary color */
  --vf-line:             rgba(0,0,0,0.08);  /* Soft borders */
  --vf-line-strong:      rgba(0,0,0,0.12);  /* High contrast borders */
  --vf-shadow:           0 10px 30px rgba(0,0,0,0.06);     /* Default clean box shadow */
  --vf-shadow-hover:     0 18px 50px rgba(28,50,129,0.10);  /* Soft navy glow on hover */
  
  /* Border Radii */
  --vf-r-sm:             10px;
  --vf-r-md:             18px;
  --vf-r-lg:             26px;
  --vf-r-xl:             36px;
  
  /* Fonts */
  --vf-display:          "Plus Jakarta Sans", sans-serif;
  --vf-body:             "Plus Jakarta Sans", sans-serif;
}

.vf-framework-wrapper {
  background-color: var(--vf-bg);
  font-family: var(--vf-body);
  color: var(--vf-ink);
  padding: 0 0 80px; /* Reduced top padding to prevent giant gaps under the header ribbon */
  width: 100%;
  box-sizing: border-box;
  scroll-margin-top: 130px;
}

/* Main Container */
.vf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.vf-hero {
  text-align: center;
  padding: 40px 0 40px;
}

/* New Premium Hero Section (Built from Scratch) */
.vf-new-hero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 800px !important;
  margin: 0 auto 10px !important;
  padding: 10px 24px 10px !important; /* Reduced top padding to match Cost of Living spacing */
  box-sizing: border-box !important;
}

.vf-new-hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(28, 50, 129, 0.08) !important;
  color: var(--vf-navy) !important;
  padding: 6px 16px !important;
  border-radius: 50px !important;
  margin-bottom: 20px !important;
}

.vf-badge-flag {
  font-size: 14px !important;
  line-height: 1 !important;
}

.vf-badge-text {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.vf-new-hero-title {
  font-family: var(--vf-display) !important;
  font-size: clamp(2.2rem, 5vw, 3.4rem) !important;
  font-weight: 500 !important;
  color: var(--vf-navy) !important;
  line-height: 1.15 !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  letter-spacing: -0.02em !important;
  text-align: center !important;
  width: 100% !important;
}

.vf-new-hero-subtitle {
  font-family: var(--vf-body) !important;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem) !important;
  color: var(--vf-muted) !important;
  max-width: 600px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
  text-align: center !important;
}

.vf-pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(28, 50, 129, 0.08);
  color: var(--vf-navy);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.vf-title {
  font-family: var(--vf-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--vf-navy);
  line-height: 1.15;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
  text-align: center !important;
}

.vf-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--vf-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  font-weight: 500;
}

/* Smart Search Box */
.vf-search-wrapper {
  max-width: 650px;
  margin: 0 auto 30px;
  position: relative;
}

.vf-search-bar {
  display: flex;
  align-items: center;
  background: var(--vf-surface);
  border: 1px solid var(--vf-line-strong);
  border-radius: var(--vf-r-md);
  padding: 6px 12px 6px 20px;
  box-shadow: var(--vf-shadow);
  transition: all 0.3s ease;
}

.vf-search-bar:focus-within {
  border-color: var(--vf-navy);
  box-shadow: 0 0 0 4px rgba(28, 50, 129, 0.12), var(--vf-shadow-hover);
}

.vf-search-icon-svg {
  color: var(--vf-muted);
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.vf-search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-family: var(--vf-body);
  font-size: 16px;
  color: var(--vf-ink);
  font-weight: 500;
  padding: 10px 0;
}

.vf-search-input::placeholder {
  color: var(--vf-muted);
  opacity: 0.8;
}

.vf-search-clear {
  background: var(--vf-surface-soft);
  border: none;
  color: var(--vf-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.2s;
  margin-right: 8px;
}

.vf-search-clear:hover {
  background: #cbd5e1;
  color: var(--vf-navy-deep);
}

/* Popular Searches */
.vf-popular {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.vf-popular-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vf-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vf-chip {
  background: var(--vf-surface-soft);
  border: 1px solid var(--vf-line);
  color: var(--vf-navy);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}

.vf-chip:hover {
  background: var(--vf-navy);
  color: #fff;
  border-color: var(--vf-navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(28, 50, 129, 0.08);
}

/* Main Layout: Sidebar & Content */
.vf-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  margin-top: 20px;
  align-items: start;
}

/* Sidebar Categories */
.vf-sidebar-container {
  position: sticky;
  top: 90px;
}

.vf-sidebar-title {
  font-family: var(--vf-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--vf-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  min-height: 33px; /* Align vertically with browse title line height */
  display: flex;
  align-items: center;
}

.vf-sidebar {
  background: var(--vf-surface);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-r-lg);
  padding: 16px;
  box-shadow: var(--vf-shadow);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Custom premium scrollbar for sidebar categories list */
.vf-sidebar::-webkit-scrollbar {
  width: 5px;
}
.vf-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.vf-sidebar::-webkit-scrollbar-thumb {
  background: var(--vf-line);
  border-radius: 10px;
}
.vf-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--vf-muted);
}

.vf-category-list,
.vf-category-list li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

.vf-category-list li::before,
.vf-category-list li::after {
  content: none !important;
  display: none !important;
}

.vf-category-btn {
  width: 100%;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  padding: 12px 16px;
  border-radius: 0 var(--vf-r-sm) var(--vf-r-sm) 0;
  font-family: var(--vf-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--vf-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 6px;
}

.vf-category-btn:hover {
  background: var(--vf-bg);
  color: var(--vf-navy);
  border-left-color: var(--vf-brand-beige);
}

.vf-category-btn.active {
  background: rgba(28, 50, 129, 0.06);
  color: var(--vf-navy);
  font-weight: 700;
  border-left-color: var(--vf-navy);
  box-shadow: inset 2px 0 0 rgba(28, 50, 129, 0.2);
}

.vf-category-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vf-category-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vf-category-count {
  font-size: 11px;
  background: var(--vf-surface-soft);
  color: var(--vf-muted);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  transition: all 0.2s;
}

.vf-category-btn.active .vf-category-count {
  background: var(--vf-navy);
  color: #ffffff;
}

/* Browse Section */
.vf-browse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.vf-browse-title {
  font-family: var(--vf-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--vf-navy-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vf-results-meta {
  font-size: 13px;
  color: var(--vf-muted);
  font-weight: 600;
}

/* Grid of Term Cards */
.vf-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.vf-term-card {
  background: var(--vf-surface);
  border: 1px solid var(--vf-line);
  border-left: 4px solid var(--vf-brand-beige);
  border-radius: var(--vf-r-md);
  padding: 24px;
  box-shadow: var(--vf-shadow);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.vf-term-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--vf-shadow-hover);
  border-color: var(--vf-navy);
  border-left-color: var(--vf-navy);
}

.vf-term-card-header {
  margin-bottom: 12px;
}

.vf-term-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vf-navy);
  background: rgba(28, 50, 129, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.vf-term-title {
  font-family: var(--vf-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--vf-navy-deep);
  margin-bottom: 2px;
}

.vf-term-english {
  font-size: 13px;
  font-weight: 600;
  color: var(--vf-muted);
  font-style: italic;
  margin-bottom: 10px;
}

.vf-term-excerpt {
  font-size: 13.5px;
  color: var(--vf-ink);
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 20px;
}

.vf-term-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--vf-navy);
}

.vf-term-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}

.vf-term-card:hover .vf-term-footer span {
  transform: translateX(4px);
}

/* Empty State / No Results */
.vf-no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--vf-surface);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-r-lg);
  box-shadow: var(--vf-shadow);
  grid-column: 1 / -1;
  display: none;
}

.vf-no-results-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.vf-no-results h3 {
  font-family: var(--vf-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--vf-navy-deep);
  margin-bottom: 6px;
}

.vf-no-results p {
  font-size: 14px;
  color: var(--vf-muted);
  margin-bottom: 20px;
}

/* ==========================================================================
   DETAIL MODAL VIEW (14-POINT PAGE TEMPLATE)
   ========================================================================== */

.vf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 15, 30, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vf-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.vf-modal-wrapper {
  background: var(--vf-bg);
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  border-radius: var(--vf-r-lg);
  box-shadow: 0 25px 60px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--vf-line);
  position: relative;
}

.vf-modal-overlay.open .vf-modal-wrapper {
  transform: translateY(0);
}

.vf-modal-header {
  background: var(--vf-surface);
  border-bottom: 1px solid var(--vf-line);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.vf-modal-title-area {
  padding-right: 40px;
}

.vf-modal-close-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vf-surface-soft);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--vf-navy-deep);
  transition: all 0.2s;
}

.vf-modal-close-btn:hover {
  background: var(--vf-brand-beige);
  transform: rotate(90deg);
}

.vf-modal-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vf-navy);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.vf-modal-title {
  font-family: var(--vf-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--vf-navy-deep);
  line-height: 1.15;
}

.vf-modal-english {
  font-size: 16px;
  font-weight: 600;
  color: var(--vf-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Modal Body */
.vf-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
}

/* Main Content Grid */
.vf-detail-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.vf-section {
  border-bottom: 1px solid var(--vf-line);
  padding-bottom: 28px;
  margin-bottom: 4px;
}

.vf-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.vf-section h2 {
  font-family: var(--vf-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--vf-navy-deep);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Answer Card */
.vf-quick-answer-card {
  background: linear-gradient(135deg, var(--vf-navy) 0%, var(--vf-navy-dark) 100%);
  color: #ffffff;
  padding: 24px 30px;
  border-radius: var(--vf-r-md);
  box-shadow: var(--vf-shadow);
  position: relative;
  overflow: hidden;
}

.vf-quick-answer-card::before {
  content: "💡";
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 100px;
  opacity: 0.08;
}

.vf-quick-answer-card h3 {
  color: #ffffff !important;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0.7;
}

.vf-quick-answer-card p {
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

/* Rich Explanation text */
.vf-desc-text {
  font-size: 14.5px;
  color: var(--vf-ink);
  line-height: 1.7;
  opacity: 0.95;
}

/* Common Mistakes Grid */
.vf-mistakes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.vf-mistake-item {
  background: var(--vf-surface);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-r-sm);
  padding: 16px 20px;
}

.vf-mistake-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.vf-mistake-icon-cross {
  color: var(--vf-red-ui);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.vf-mistake-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--vf-red-ui);
}

.vf-truth-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-top: 1px dashed var(--vf-line-strong);
  padding-top: 10px;
}

.vf-truth-icon-check {
  color: var(--vf-green-ui);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.vf-truth-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--vf-ink);
}

/* Stepper Checklist */
.vf-step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vf-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--vf-surface);
  padding: 14px 18px;
  border-radius: var(--vf-r-sm);
  border: 1px solid var(--vf-line);
}

.vf-step-num {
  background: rgba(28, 50, 129, 0.08);
  color: var(--vf-navy);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.vf-step-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--vf-ink);
}

/* Documents Grid list */
.vf-docs-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.vf-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--vf-surface);
  padding: 16px 20px;
  border-radius: var(--vf-r-sm);
  border: 1px solid var(--vf-line);
}

.vf-doc-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--vf-navy);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 3px;
}

.vf-doc-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vf-doc-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--vf-navy-deep);
}

.vf-doc-desc {
  font-size: 12px;
  color: var(--vf-muted);
}

/* Modal Sidebar */
.vf-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.vf-sidebar-box {
  background: var(--vf-surface);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-r-md);
  padding: 20px;
}

.vf-sidebar-box h3 {
  font-family: var(--vf-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--vf-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--vf-line);
  padding-bottom: 8px;
}

/* Target Audience badges */
.vf-audience-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vf-audience-badge {
  background: var(--vf-surface-soft);
  color: var(--vf-ink);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.vf-audience-badge.active {
  background: var(--vf-navy);
  color: #ffffff;
}

/* Timeline/Lifecycle Stepper */
.vf-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 18px;
  margin-top: 10px;
}

.vf-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--vf-brand-beige);
}

.vf-timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.vf-timeline-item:last-child {
  margin-bottom: 0;
}

.vf-timeline-node {
  position: absolute;
  left: -18px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vf-surface);
  border: 3px solid var(--vf-navy);
}

.vf-timeline-content {
  display: flex;
  flex-direction: column;
}

.vf-timeline-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vf-navy-deep);
  line-height: 1.3;
}

.vf-timeline-time {
  font-size: 11px;
  color: var(--vf-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Related items list links */
.vf-related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vf-related-link {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--vf-navy);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vf-related-link:hover {
  color: var(--vf-red-ui);
}

/* Official Resources buttons */
.vf-resources-container {
  background: rgba(22, 163, 74, 0.02);
  border: 1px solid rgba(22, 163, 74, 0.12);
  border-radius: var(--vf-r-md);
  padding: 16px;
  margin-top: 8px;
}

.vf-resources-verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--vf-green-ui);
  font-weight: 800;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vf-resource-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: var(--vf-surface);
  color: var(--vf-navy-deep);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  border: 1px solid rgba(22, 163, 74, 0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.vf-resource-btn:last-child {
  margin-bottom: 0;
}

.vf-resource-btn:hover {
  background: var(--vf-green-ui);
  color: #ffffff;
  border-color: var(--vf-green-ui);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.15);
}

.vf-resource-btn span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   SMART HOVER INTEGRATIONS / TOOLTIPS
   ========================================================================== */

.vf-tooltip-trigger {
  text-decoration: underline dashed var(--vf-navy);
  text-underline-offset: 4px;
  cursor: help;
  position: relative;
  font-weight: 600;
  color: var(--vf-navy);
}

.vf-tooltip-box {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  width: 260px;
  background: var(--vf-navy-deep);
  color: #ffffff;
  padding: 16px;
  border-radius: var(--vf-r-sm);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  font-size: 12.5px;
  line-height: 1.5;
}

.vf-tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--vf-navy-deep) transparent transparent transparent;
}

.vf-tooltip-trigger:hover .vf-tooltip-box {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.vf-tooltip-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 13.5px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
}

.vf-tooltip-more {
  display: block;
  margin-top: 8px;
  color: #38bdf8;
  font-weight: 700;
  text-decoration: none;
  text-align: right;
}

.vf-tooltip-more:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .vf-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .vf-sidebar-container {
    position: static;
    display: block;
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
  }

  .vf-browse-section {
    min-width: 0;
  }

  .vf-sidebar-title {
    font-size: 12px;
    margin-bottom: 8px;
    min-height: auto;
    padding-left: 2px;
  }

  .vf-sidebar {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  .vf-category-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 0 12px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
    scrollbar-width: none; /* Hide scrollbars for app tab feel */
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .vf-category-list li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
  }

  .vf-category-list li::before,
  .vf-category-list li::after {
    content: none !important;
    display: none !important;
  }

  .vf-category-list::-webkit-scrollbar {
    display: none;
  }

  .vf-category-btn {
    flex-shrink: 0;
    width: auto;
    margin-bottom: 0;
    padding: 8px 14px;
    border: 1px solid var(--vf-line-strong);
    background: var(--vf-surface);
    color: var(--vf-ink);
    border-radius: 50px; /* Clean pill chips */
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; /* Prevent multi-line wrapping */
  }

  .vf-category-btn:hover {
    border-color: var(--vf-navy);
    color: var(--vf-navy);
    background: var(--vf-surface);
  }

  .vf-category-btn.active {
    background: var(--vf-navy);
    color: #ffffff;
    border-color: var(--vf-navy);
    box-shadow: 0 4px 12px rgba(28, 50, 129, 0.15);
  }

  .vf-category-btn.active .vf-category-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden; /* Force horizontal overflow lock */
    position: relative;
    width: 100%;
  }

  body {
    padding-bottom: 40px;
  }

  /* Stack header items vertically to prevent wrapping overflow */
  .vf-header {
    padding: 14px 16px;
  }

  .vf-header-inner {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .vf-header-nav {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .vf-header-nav a {
    font-size: 13px;
    padding: 4px 6px;
  }

  .vf-container {
    padding: 0 16px;
    width: 100%;
    overflow: hidden;
  }

  .vf-hero {
    padding: 30px 0 20px;
  }

  /* Stack main browse titles vertically on mobile screens to prevent horizontal overflow */
  .vf-browse-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .vf-resource-btn span {
    white-space: normal;
    word-break: break-word;
  }

  /* Full screen modal wrapper on mobile */
  .vf-modal-wrapper {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    width: 100%;
  }

  .vf-modal-header {
    padding: 24px 20px;
    padding-right: 56px; /* Save room for close button */
  }

  /* Fixed close button so it floats at the top right while scrolling */
  .vf-modal-close-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1010;
    background: var(--vf-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--vf-line);
  }

  /* Flex column order stacking layout */
  .vf-modal-body {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 24px;
    overflow-x: hidden; /* Prevent modal body horizontal overflow */
  }

  /* Expose children directly to the flex-body layout container */
  #vfDetailMain,
  #vfDetailSidebar {
    display: contents;
  }

  /* Reading Order Stacking Sequence */
  #vfModalQuickAnswer {
    order: 1; /* Quick Answer card first */
  }

  #vfSidebarBoxWho {
    order: 2; /* Who Needs It immediately following */
  }

  #vfSidebarBoxWhen {
    order: 3; /* When You Need It timeline next */
  }

  #vfModalWhatIsIt {
    order: 4; /* Core What is it details */
  }

  #vfModalWhyItMatters {
    order: 5; /* Why it matters context */
  }

  #vfModalSectionHow {
    order: 6; /* How to get it checklist */
  }

  #vfModalSectionDocs {
    order: 7; /* Required Documents checklist */
  }

  #vfModalSectionMistakes {
    order: 8; /* Common Mistakes warning block */
  }

  #vfSidebarBoxOfficial {
    order: 9; /* Official resources verified block */
  }

  #vfSidebarBoxRelatedTerms {
    order: 10; /* Internal linking cards */
  }

  #vfSidebarBoxRelatedGuides {
    order: 11;
  }

  #vfSidebarBoxRelatedTools {
    order: 12;
  }

  /* Touch optimizations */
  .vf-doc-item {
    min-height: 48px;
    padding: 12px 14px;
    align-items: flex-start;
  }

  .vf-doc-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 2px;
  }

  .vf-chip, 
  .vf-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .vf-terms-grid {
    grid-template-columns: 1fr;
  }
}

/* Spinner and loading styles for dynamic fetches */
.vf-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--vf-line);
  border-top-color: var(--vf-navy);
  border-radius: 50%;
  animation: vf-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes vf-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   V1.1 ENHANCEMENTS: BREADCRUMBS, METADATA, PRINT, COPY LINK
   ========================================================================== */

.vf-modal-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vf-modal-breadcrumb {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--vf-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.vf-breadcrumb-link {
  color: var(--vf-brand-cyan);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.vf-breadcrumb-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.vf-breadcrumb-separator {
  color: var(--vf-line-dark);
}

.vf-breadcrumb-cat {
  color: var(--vf-navy-light);
}

.vf-breadcrumb-term {
  color: var(--vf-muted);
}

.vf-modal-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 24px;
}

.vf-modal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.vf-modal-meta-item {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vf-navy-light);
  background: var(--vf-surface-soft);
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vf-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-right: 48px; /* space for the overlay close button */
}

.vf-modal-action-btn {
  background: var(--vf-surface-soft);
  border: 1px solid var(--vf-line);
  color: var(--vf-navy-deep);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vf-modal-action-btn:hover {
  background: var(--vf-brand-beige);
  border-color: var(--vf-brand-cyan);
  color: var(--vf-brand-cyan);
}

/* Print Stylesheet */
@media print {
  body * {
    visibility: hidden;
  }
  
  #vfModalOverlay, #vfModalOverlay * {
    visibility: visible;
  }
  
  #vfModalOverlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #fff !important;
    overflow: visible !important;
    z-index: 9999;
  }
  
  .vf-modal-wrapper {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    transform: none !important;
  }
  
  .vf-modal-close-btn, 
  .vf-modal-actions, 
  .vf-modal-breadcrumb {
    display: none !important;
  }
  
  .vf-modal-body {
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    padding: 0 !important;
  }
  
  .vf-detail-grid {
    display: block !important;
  }
  
  .vf-detail-main, 
  .vf-detail-sidebar {
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin-bottom: 30px !important;
  }
  
  .vf-section {
    page-break-inside: avoid;
  }
}

/* Responsiveness for meta & actions */
@media (max-width: 768px) {
  .vf-modal-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .vf-modal-actions {
    width: 100%;
    justify-content: flex-start;
    padding-right: 0;
    margin-top: 0;
  }
}

/* Premium VivreFR style button declarations - Scoped to avoid collisions */
.vf-admin-btn {
  font-family: var(--vf-body);
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 50px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(28, 50, 129, 0.12);
  min-height: 44px;
  padding: 10px 24px;
  background: var(--vf-navy);
  color: #ffffff !important;
}

.vf-admin-btn:hover {
  background: var(--vf-navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 50, 129, 0.22);
}

.vf-admin-btn:active {
  transform: translateY(0);
}



