/* RMD Credit Risk Analytics Main CSS */

/* Base viewport safety — uses clip instead of hidden so position:sticky sidebars work everywhere */
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.glass-panel-dark {
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.3);
}

/* Active tab gradient bar */
.active-accent-bar {
  position: relative;
}
.active-accent-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0d47a1 0%, #00affe 100%);
  border-radius: 2px 0 0 2px;
}

/* Button & Card Micro Interactions */
.card-hover-lift {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -6px rgba(13, 71, 161, 0.12);
}

/* Code & Numerical Monospace */
.tnum {
  font-feature-settings: 'tnum' 1, 'zero' 1;
}

/* Form Styles - High-End Financial Agency Aesthetic */
.rmd-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem; /* 12px rounded-xl */
  font-size: 0.875rem;
  color: #0f172a;
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rmd-input::placeholder {
  color: #94a3b8;
}
.rmd-input:hover {
  border-color: #94a3b8;
}
.rmd-input:focus {
  outline: none;
  border-color: #0284c7;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12), 0 2px 4px rgba(15, 23, 42, 0.04);
}
/* Preserve left/right icon padding utilities when combined with .rmd-input */
.rmd-input.pl-9  { padding-left: 2.25rem; }
.rmd-input.pl-10 { padding-left: 2.5rem; }
.rmd-input.pl-11 { padding-left: 2.75rem; }
.rmd-input.pl-12 { padding-left: 3rem; }
.rmd-input.pr-10 { padding-right: 2.5rem; }
.rmd-input.pr-12 { padding-right: 3rem; }

/* Ensure all modals always layer above floating contact hub (z-index: 9990) */
.rmd-modal {
  z-index: 10000 !important;
}

/* Native Select Dropdown Enhancement across all pages */
select.rmd-input,
.rmd-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.15rem;
  padding-right: 2.75rem;
  cursor: pointer;
}
select.rmd-input option {
  padding: 10px 14px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.875rem;
}

/* Custom Select Dropdown Component */
.rmd-custom-select-trigger {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.rmd-custom-select.open .rmd-chevron {
  transform: rotate(180deg);
}
.rmd-custom-select-options {
  animation: rmdFadeSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes rmdFadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rmd-custom-select-options .rmd-option.selected {
  background-color: #eff6ff;
  border-left: 3px solid #2563eb;
}

/* Navigation Fixed Shadow */
.header-scrolled {
  background: rgba(250, 248, 255, 0.95) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08) !important;
}

/* Contact Form 7 & WPForms Compatibility Styles */
.rmd-plugin-form-container .wpcf7-form,
.rmd-plugin-form-container .wpforms-form {
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}
.rmd-plugin-form-container input[type="text"],
.rmd-plugin-form-container input[type="email"],
.rmd-plugin-form-container input[type="tel"],
.rmd-plugin-form-container input[type="url"],
.rmd-plugin-form-container select,
.rmd-plugin-form-container textarea {
  width: 100% !important;
  padding: 0.625rem 0.875rem !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  color: #131b2e !important;
  margin-top: 0.25rem !important;
  margin-bottom: 0.75rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
}
.rmd-plugin-form-container input:focus,
.rmd-plugin-form-container select:focus,
.rmd-plugin-form-container textarea:focus {
  outline: none !important;
  border-color: #0091ea !important;
  box-shadow: 0 0 0 3px rgba(0, 176, 254, 0.15) !important;
}
.rmd-plugin-form-container input[type="submit"],
.rmd-plugin-form-container button[type="submit"],
.rmd-plugin-form-container .wpforms-submit {
  width: 100% !important;
  padding: 0.875rem 1.5rem !important;
  background: linear-gradient(135deg, #0d47a1 0%, #0091ea 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  border: none !important;
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px -2px rgba(13, 71, 161, 0.3) !important;
  transition: all 0.2s ease !important;
}
.rmd-plugin-form-container input[type="submit"]:hover,
.rmd-plugin-form-container button[type="submit"]:hover,
.rmd-plugin-form-container .wpforms-submit:hover {
  box-shadow: 0 6px 20px -2px rgba(13, 71, 161, 0.45) !important;
  transform: translateY(-1px) !important;
}
.rmd-plugin-form-container .wpcf7-response-output {
  margin-top: 1rem !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
}

/* ==========================================================================
   WordPress Post & Research Article Typography (Gutenberg Content Fix)
   Ensures headings, bold text, tables, quotes, and lists render with high fidelity
   regardless of Tailwind CDN preflight CSS resets.
   ========================================================================== */
.rmd-post-content,
.prose.rmd-post-content {
  color: #334155;
  font-size: 1rem;
  line-height: 1.85;
}

/* Headings */
.rmd-post-content h1,
.prose h1 {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
  margin-top: 2.25rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.02em !important;
}

.rmd-post-content h2,
.prose h2,
.wp-block-heading h2 {
  font-size: 1.625rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.015em !important;
  border-left: 4px solid #0d47a1 !important;
  padding-left: 14px !important;
  display: block !important;
}

.rmd-post-content h3,
.prose h3,
.wp-block-heading h3 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
}

.rmd-post-content h4,
.prose h4 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  line-height: 1.4 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Paragraphs & Lead Text */
.rmd-post-content p,
.prose p {
  font-size: 1rem !important;
  line-height: 1.85 !important;
  color: #334155 !important;
  margin-bottom: 1.25rem !important;
}

.rmd-post-content p.lead,
.prose p.lead {
  font-size: 1.125rem !important;
  line-height: 1.8 !important;
  color: #1e293b !important;
  font-weight: 500 !important;
}

/* Strong / Bold Elements */
.rmd-post-content strong,
.rmd-post-content b,
.prose strong,
.prose b {
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Lists */
.rmd-post-content ul,
.prose ul,
.wp-block-list:not(ol) {
  list-style-type: disc !important;
  padding-left: 1.75rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 1.5rem !important;
}

.rmd-post-content ol,
.prose ol,
ol.wp-block-list {
  list-style-type: decimal !important;
  padding-left: 1.75rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 1.5rem !important;
}

.rmd-post-content li,
.prose li {
  margin-bottom: 0.5rem !important;
  line-height: 1.75 !important;
  color: #334155 !important;
}

/* Blockquotes */
.rmd-post-content blockquote,
.prose blockquote,
.wp-block-quote {
  border-left: 4px solid #0d47a1 !important;
  background: #f8fafc !important;
  padding: 1.25rem 1.5rem !important;
  margin: 1.75rem 0 !important;
  border-radius: 0 0.75rem 0.75rem 0 !important;
  color: #1e293b !important;
  font-style: normal !important;
  border-top: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.rmd-post-content blockquote p,
.prose blockquote p,
.wp-block-quote p {
  margin-bottom: 0.5rem !important;
  color: #1e293b !important;
}

/* Tables & Gutenberg wp-block-table */
.rmd-post-content table,
.prose table,
.wp-block-table table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.75rem 0 !important;
  font-size: 0.875rem !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.rmd-post-content table th,
.prose table th,
.wp-block-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  padding: 0.85rem 1rem !important;
  border: 1px solid #cbd5e1 !important;
  text-align: left !important;
}

.rmd-post-content table td,
.prose table td,
.wp-block-table td {
  padding: 0.85rem 1rem !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  vertical-align: top !important;
}

.rmd-post-content table tr:nth-child(even),
.prose table tr:nth-child(even),
.wp-block-table tr:nth-child(even) {
  background-color: #f8fafc !important;
}

.rmd-post-content table tr:hover,
.prose table tr:hover,
.wp-block-table tr:hover {
  background-color: #f1f5f9 !important;
}

/* Captions & Footnotes */
.rmd-post-content figcaption,
.prose figcaption,
.wp-element-caption {
  font-size: 0.8rem !important;
  color: #64748b !important;
  text-align: center !important;
  margin-top: 0.5rem !important;
  font-style: italic !important;
}

/* Inline Code & Pre */
.rmd-post-content code,
.prose code {
  font-family: 'JetBrains Mono', 'SF Mono', monospace !important;
  font-size: 0.85em !important;
  background-color: #f1f5f9 !important;
  color: #0d47a1 !important;
  padding: 0.2em 0.4em !important;
  border-radius: 0.25rem !important;
}

/* ========================================================
   Header Navigation, Dropdowns & Mega Menu (Taste & Reliability)
   Guaranteed explicit widths - immune to Tailwind compiler variations
   ======================================================== */
.rmd-nav-item,
.rmd-megamenu-wrapper {
  position: relative;
}

.rmd-nav-dropdown {
  display: block;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px; /* Safe hover bridge */
  transform: translateY(6px);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
}

/* Hover Bridge: ensures pointer does not lose hover across header padding */
.rmd-nav-dropdown::before,
.rmd-megamenu-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
}

/* Show on hover or keyboard focus-within */
.rmd-nav-item:hover > .rmd-nav-dropdown,
.rmd-nav-item:focus-within > .rmd-nav-dropdown,
.rmd-nav-item.is-open > .rmd-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown Arrow Rotation on Hover */
.rmd-dropdown-arrow {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.rmd-nav-item:hover .rmd-dropdown-arrow,
.rmd-nav-item.is-open .rmd-dropdown-arrow,
.rmd-nav-item:focus-within .rmd-dropdown-arrow,
.rmd-megamenu-wrapper:hover .rmd-dropdown-arrow,
.rmd-megamenu-wrapper.is-open .rmd-dropdown-arrow {
  transform: rotate(180deg);
  color: #0d47a1 !important;
}

/* Explicit 12-column Mega Menu Grid Layout (Guaranteed regardless of Tailwind build) */
.rmd-megamenu-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
}
.rmd-col-span-5 {
  grid-column: span 5 / span 5 !important;
}
.rmd-col-span-4 {
  grid-column: span 4 / span 4 !important;
}
.rmd-col-span-3 {
  grid-column: span 3 / span 3 !important;
}

/* Specific Dropdown Dimensions */
.rmd-dropdown-courses {
  width: 440px !important;
  min-width: 440px !important;
  max-width: calc(100vw - 2rem) !important;
  left: 0;
}

.rmd-dropdown-services {
  width: 480px !important;
  min-width: 480px !important;
  max-width: calc(100vw - 2rem) !important;
  left: 0;
}

/* 3-Column Mega Menu Panel */
.rmd-megamenu-panel {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50% !important;
  transform: translateX(-50%) translateY(6px) !important;
  width: min(880px, calc(100vw - 2rem)) !important;
  min-width: min(880px, calc(100vw - 2rem)) !important;
  padding-top: 10px;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.rmd-nav-item:hover > .rmd-megamenu-panel,
.rmd-nav-item:focus-within > .rmd-megamenu-panel,
.rmd-megamenu-wrapper:hover .rmd-megamenu-panel,
.rmd-megamenu-wrapper.is-open .rmd-megamenu-panel {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto !important;
}

/* Dropdown Shell Glassmorphism */
.rmd-dropdown-shell {
  background-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1rem; /* 16px */
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 20px 40px -12px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
}

/* Individual Item Card */
.rmd-menu-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  text-decoration: none;
  background: transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.rmd-menu-item-card:hover {
  background-color: rgba(248, 250, 252, 0.9);
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .rmd-nav-dropdown,
  .rmd-megamenu-panel,
  .rmd-menu-item-card {
    transition: none !important;
    transform: none !important;
  }
  .rmd-nav-item:hover > .rmd-megamenu-panel,
  .rmd-nav-item:focus-within > .rmd-megamenu-panel {
    transform: translateX(-50%) !important;
  }
}

.rmd-course-filter-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
.rmd-course-filter-btn:active {
  transform: scale(0.97);
}

.rmd-course-card {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* ========================================================
   Corporate Navy Hero & Spotlight Gradients
   ======================================================== */
.rmd-hero-navy {
  background-color: #071b40 !important;
  background-image: linear-gradient(180deg, #071b40 0%, #002663 50%, #003178 100%) !important;
  color: #ffffff !important;
}

.rmd-spotlight-card {
  background-color: #071b40 !important;
  background-image: linear-gradient(135deg, #071b40 0%, #002663 55%, #003178 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 175, 254, 0.25) !important;
}

.rmd-navy-card {
  background-color: #071b40 !important;
  background-image: linear-gradient(180deg, #071b40 0%, #002663 100%) !important;
  color: #ffffff !important;
}

/* Keyframe animations for modal & dialog entrances */
@keyframes rmdFadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-in {
  animation: rmdFadeInZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}


