/**
 * Bridge file to map Crafto/X-DMAIC template variables to dynamic WordPress Customizer Brandkit variables.
 */
:root {
    --base-color: var(--accent-primary) !important;
    --dark-gray: var(--bg-primary) !important;
    --medium-gray: var(--text-secondary) !important;
}

/* Nav Menu Alignment for dynamic WP Menu */
.navbar .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.navbar .navbar-nav .nav-item {
    position: relative;
}
.navbar .navbar-nav .nav-item a.nav-link {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2 !important; /* Shrink line height to eliminate extra vertical box space */
    padding-top: 14px !important; /* Balance vertical centering */
    padding-bottom: 6px !important; /* Keep bottom edge close to text baseline */
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Scoped Underline Hover Effect */
.navbar .navbar-nav .nav-item a.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0px; /* Sits tightly right below the text baseline now */
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: var(--accent-secondary) !important;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right;
}
.navbar .navbar-nav .nav-item a.nav-link:hover::after,
.navbar .navbar-nav .current-menu-item > a.nav-link::after {
    transform: scaleX(1) !important;
    transform-origin: left !important;
}

/* Live Search Overrides inside Crafto Navbar */
.navbar .search-form {
    margin: 0;
}
.navbar #sm-search-input {
    border-color: var(--border-color);
}
.navbar #sm-search-input:focus {
    border-color: var(--accent-secondary);
}

/* Header adjust */
/* Comment out to avoid overriding template's native navbar padding
header .navbar {
    padding: 15px 0;
}
*/
.navbar-brand {
    padding: 0;
}

/* Theme Toggle Button custom styling inside navbar */
.navbar .theme-toggle-btn {
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
}


/* ==========================================================================
   Light / Dark Mode Overrides (Professional Tech Standard Bridge)
   ========================================================================== */

/* 1. Global Dark Mode Body & Headings Overrides */
html[data-theme="dark"] body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='151' height='1' viewBox='0 0 151 1' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M76 -5H75V5H76V-5Z' fill='rgba(255, 255, 255, 0.03)'/%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] .text-dark-gray,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .accordion-header button,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .dropdown-menu a {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-dark-gray-hover:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .dropdown-menu a:hover {
    color: var(--accent-secondary) !important;
}

/* 2. Paragraphs & Secondary texts */
html[data-theme="dark"] p,
html[data-theme="dark"] .text-medium-gray,
html[data-theme="dark"] .prose p,
html[data-theme="dark"] .portfolio-caption div,
html[data-theme="dark"] .testimonial-author-position,
html[data-theme="dark"] .fs-14:not(.text-base-color):not(.text-dark-gray) {
    color: #e2e8f0 !important;
}

/* 3. Backgrounds & Containers */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-very-light-gray,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .accordion-item {
    background-color: var(--bg-secondary) !important;
}

html[data-theme="dark"] .bg-dark-gray {
    background-color: #0c101d !important; /* Extremely premium deep gray/blue */
}

html[data-theme="dark"] .glass-panel {
    background: rgba(21, 29, 48, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 4. Borders & Lines */
html[data-theme="dark"] .border-color-light-gray,
html[data-theme="dark"] .border-color-medium-gray,
html[data-theme="dark"] .border-color-dark-gray,
html[data-theme="dark"] .separator-line-1px,
html[data-theme="dark"] hr {
    border-color: var(--border-color) !important;
}

/* 5. Logo Inversion & Header Text */
html[data-theme="dark"] .navbar-brand img.is-default-logo,
html[data-theme="dark"] .footer-logo img.is-default-logo {
    filter: invert(1) brightness(2) !important; /* Dynamic white logo inversion */
}

/* 6. Buttons & Interactive Elements */
html[data-theme="dark"] .btn-dark-gray {
    background-color: var(--text-primary) !important;
    color: var(--bg-primary) !important;
    border-color: var(--text-primary) !important;
}
html[data-theme="dark"] .btn-dark-gray:hover {
    background-color: var(--accent-secondary) !important;
    color: #ffffff !important;
    border-color: var(--accent-secondary) !important;
}

html[data-theme="dark"] .swiper-pagination-bullet {
    background: #ffffff !important;
    opacity: 0.3;
}
html[data-theme="dark"] .swiper-pagination-bullet-active {
    background: var(--accent-secondary) !important;
    opacity: 1;
}

/* 7. Forms Controls */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] textarea {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus {
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15) !important;
}

/* 8. Large Backdrops / Decorative Elements Subtlety */
html[data-theme="dark"] .fs-250,
html[data-theme="dark"] .fs-200,
html[data-theme="dark"] .fs-170,
html[data-theme="dark"] .fs-100 {
    color: rgba(255, 255, 255, 0.02) !important; /* Lower contrast for dark theme readability */
}

/* ==========================================================================
   Light Mode Overrides (Professional Tech Standard Bridge)
   ========================================================================== */

/* 1. Global Light Mode Body & Headings Overrides */
html[data-theme="light"] body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='151' height='1' viewBox='0 0 151 1' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M76 -5H75V5H76V-5Z' fill='%23E7E7E7'/%3E%3C/svg%3E") !important;
}

html[data-theme="light"] .text-dark-gray,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .accordion-header button,
html[data-theme="light"] .nav-link,
html[data-theme="light"] .dropdown-menu a {
    color: var(--text-primary) !important;
}

html[data-theme="light"] .text-dark-gray-hover:hover,
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .dropdown-menu a:hover {
    color: var(--accent-secondary) !important;
}

/* 2. Paragraphs & Secondary texts */
html[data-theme="light"] p,
html[data-theme="light"] .text-medium-gray,
html[data-theme="light"] .prose p,
html[data-theme="light"] .portfolio-caption div,
html[data-theme="light"] .testimonial-author-position,
html[data-theme="light"] .fs-14:not(.text-base-color):not(.text-dark-gray) {
    color: var(--text-secondary) !important;
}

/* 3. Backgrounds & Containers */
html[data-theme="light"] .bg-white {
    background-color: var(--bg-primary) !important;
}

html[data-theme="light"] .bg-very-light-gray,
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .accordion-item {
    background-color: var(--bg-secondary) !important;
}

/* Override all dark sections to light gray in light mode to keep design unified */
html[data-theme="light"] .section-dark,
html[data-theme="light"] .bg-dark-gray {
    background-color: var(--bg-secondary) !important;
}

html[data-theme="light"] .glass-panel {
    background: var(--bg-glass) !important;
    border-color: var(--border-color) !important;
}

/* 4. Borders & Lines */
html[data-theme="light"] .border-color-light-gray,
html[data-theme="light"] .border-color-medium-gray,
html[data-theme="light"] .border-color-dark-gray,
html[data-theme="light"] hr {
    border-color: var(--border-color) !important;
}

/* Ensure separator lines match the border color in both modes */
html[data-theme="light"] .separator-line-1px.bg-white,
html[data-theme="light"] .separator-line-1px.bg-dark-gray,
html[data-theme="light"] .separator-line-1px {
    background-color: var(--border-color) !important;
}

html[data-theme="dark"] .separator-line-1px.bg-white,
html[data-theme="dark"] .separator-line-1px.bg-dark-gray,
html[data-theme="dark"] .separator-line-1px {
    background-color: var(--border-color) !important;
}

/* 5. Logo & Header Text */
html[data-theme="light"] .navbar-brand img.is-default-logo,
html[data-theme="light"] .footer-logo img.is-default-logo {
    filter: none !important; /* Keep original black logo on white bg */
}

/* 6. Buttons & Interactive Elements */
html[data-theme="light"] .btn-dark-gray {
    background-color: var(--text-primary) !important;
    color: var(--bg-primary) !important;
    border-color: var(--text-primary) !important;
}
html[data-theme="light"] .btn-dark-gray:hover {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
    border-color: var(--accent-primary) !important;
}

html[data-theme="light"] .swiper-pagination-bullet {
    background: #000000 !important;
    opacity: 0.3;
}
html[data-theme="light"] .swiper-pagination-bullet-active {
    background: var(--accent-primary) !important;
    opacity: 1;
}

/* 7. Forms Controls */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] textarea {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 94, 255, 0.15) !important;
}

/* 8. Large Backdrops / Decorative Elements Subtlety */
html[data-theme="light"] .fs-250,
html[data-theme="light"] .fs-200,
html[data-theme="light"] .fs-170,
html[data-theme="light"] .fs-100 {
    color: rgba(0, 0, 0, 0.02) !important; /* Very low contrast for light theme readability */
}

/* 9. Special override for text-white utility classes on backgrounds that become light */
html[data-theme="light"] .text-white:not(.team-member-name):not(.member-designation):not(.progress-bar-percent):not(.swiper-button-prev):not(.swiper-button-next) {
    color: var(--text-primary) !important;
}

/* 10. Automatically invert white partner SVG logos in light mode to dark gray */
html[data-theme="light"] img[src*="-white."] {
    filter: brightness(0) opacity(0.65) !important;
}

/* ==========================================================================
   Global Footer Overrides (Ensures correct background in both modes)
   ========================================================================== */
footer {
    background-color: transparent !important;
}

html[data-theme="light"] .footer-bottom {
    border-color: var(--border-color) !important;
}

/* ==========================================================================
   Global Sticky Elements Overrides (Ensures visual consistency across pages)
   ========================================================================== */
html[data-theme="dark"] .elements-social ul li,
html[data-theme="dark"] .elements-social ul li a {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .elements-social ul li a:hover {
    color: var(--accent-secondary) !important;
}

html[data-theme="light"] .elements-social ul li,
html[data-theme="light"] .elements-social ul li a {
    color: var(--text-primary) !important;
}
html[data-theme="light"] .elements-social ul li a:hover {
    color: var(--accent-secondary) !important;
}

/* Unified style for separator line in sticky social bar */
.elements-social ul li span.bg-dark-gray {
    background-color: var(--border-color) !important;
}

/* ==========================================================================
   Likes Box Custom Styling (Clapping Style, Dark Mode optimized)
   ========================================================================== */
.likes-box {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 25px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: var(--bg-glass) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
    cursor: pointer !important;
    user-select: none !important;
}

.likes-box:hover {
    transform: translateY(-2px) !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.15) !important;
}

.likes-box-top {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    font-family: var(--font-display) !important;
}

.likes-box-top i {
    color: #ff3e6c !important;
    transition: transform 0.2s ease !important;
}

.likes-box:active .likes-box-top i {
    transform: scale(1.3) !important;
}

.likes-box-label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--text-secondary) !important;
    margin-top: 5px !important;
}

/* Max Liked state visual hint */
.likes-box.max-liked {
    border-color: #ff3e6c !important;
    background: rgba(255, 62, 108, 0.05) !important;
}
.likes-box.max-liked .likes-box-label {
    color: #ff3e6c !important;
}

/* ==========================================================================
   Premium Table of Contents (TOC) Styling (Desktop & Mobile)
   ========================================================================== */
.toc-link {
    font-size: 0.92rem !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-block !important;
    padding: 3px 0 !important;
}

.toc-link:hover {
    color: var(--accent-primary) !important;
    transform: translateX(4px) !important;
}

/* Active heading scroll-spy highlight styling */
.toc-link.active {
    color: var(--accent-primary) !important;
    font-weight: 600 !important;
}

html[data-theme="dark"] .toc-link {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .toc-link:hover,
html[data-theme="dark"] .toc-link.active {
    color: var(--accent-secondary) !important;
}

/* Optimize FAQ/TOC Dropdown Card on Mobile */
.mobile-toc-details {
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
}

.mobile-toc-details .faq-question {
    padding: 1rem 1.2rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    border: none !important;
}

.mobile-toc-details .faq-answer {
    padding: 1rem 1.2rem !important;
    border-top: 1px solid var(--border-color) !important;
}

.mobile-toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.mobile-toc-list li.toc-level-3 {
    padding-left: 15px !important;
    position: relative !important;
}

.mobile-toc-list li.toc-level-3::before {
    content: "•" !important;
    position: absolute !important;
    left: 4px !important;
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
}

/* ==========================================================================
   Breadcrumbs Styling
   ========================================================================== */
.breadcrumb-container {
    opacity: 0.8;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "/" !important;
    color: var(--text-secondary) !important;
}
.breadcrumb-item.active {
    color: var(--text-secondary) !important;
}

/* ==========================================================================
   Key Takeaways Box (SGE Optimization)
   ========================================================================== */
.key-takeaways-box {
    padding: 1.8rem 2rem !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}
.takeaways-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
}
.takeaways-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}
.takeaways-list li {
    position: relative !important;
    padding-left: 24px !important;
    margin-bottom: 8px !important;
    color: var(--text-secondary) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}
.takeaways-list li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    color: var(--accent-secondary) !important;
    font-weight: bold !important;
}

html[data-theme="dark"] .takeaways-list li {
    color: #e2e8f0 !important;
}

/* ==========================================================================
   Social Share Buttons
   ========================================================================== */
.post-social-share .social-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    margin-right: 10px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}
.post-social-share .social-share-btn:hover {
    transform: translateY(-3px) !important;
    color: #fff !important;
    border-color: transparent !important;
}
.post-social-share .social-share-btn.facebook:hover {
    background-color: #1877F2 !important;
}
.post-social-share .social-share-btn.linkedin:hover {
    background-color: #0A66C2 !important;
}
.post-social-share .social-share-btn.twitter:hover {
    background-color: #000000 !important;
}
.post-social-share .social-share-btn.copy-link:hover {
    background-color: var(--accent-secondary) !important;
}

/* ==========================================================================
   Dedicated CRM Registration Page Styles
   ========================================================================== */
.crm-registration-wrapper .wa-crm-form-container {
  margin: 0 auto !important;
  box-shadow: 0 20px 50px rgba(0, 94, 255, 0.08) !important;
}
html[data-theme="dark"] .crm-registration-wrapper .wa-crm-form-container {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}
.crm-registration-wrapper .wa-crm-form-header {
  display: none !important;
}

/* CRM Process Timeline Row Styles */
.crm-process-timeline-row {
  border-top: 1px dashed var(--border-color) !important;
  margin-top: 5rem !important;
}

.crm-process-timeline-row h5 {
  font-family: var(--font-display), sans-serif !important;
  font-size: 20px !important;
  letter-spacing: -0.5px !important;
}

.timeline-step {
  position: relative !important;
  transition: transform 0.3s ease !important;
}

.timeline-step:hover {
  transform: translateY(-5px) !important;
}

.step-icon-box {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 70px !important;
  height: 70px !important;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05)) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 50% !important;
  margin-bottom: 20px !important;
  box-shadow: 0 10px 25px rgba(0, 94, 255, 0.03) !important;
  transition: all 0.3s ease !important;
}

.timeline-step:hover .step-icon-box {
  background: var(--bg-secondary) !important;
  border-color: var(--accent-primary, #005eff) !important;
  box-shadow: 0 10px 25px rgba(0, 94, 255, 0.1) !important;
}

.timeline-step i {
  color: var(--accent-primary, #005eff) !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.timeline-step:hover i {
  color: var(--accent-secondary, #06b6d4) !important;
}

.step-number-badge {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  width: 24px !important;
  height: 24px !important;
  background: linear-gradient(135deg, var(--accent-secondary, #06b6d4), var(--accent-primary, #005eff)) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 10px rgba(0, 94, 255, 0.2) !important;
}

.timeline-step h6 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
  font-family: var(--font-display), sans-serif !important;
}

.timeline-step p {
  color: var(--text-secondary) !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  max-width: 280px !important;
  margin: 0 auto !important;
}

html[data-theme="dark"] .step-icon-box {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .timeline-step:hover .step-icon-box {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Prevent Swiper double arrows icon bug by hiding Swiper's native arrow icons */
.swiper-button-prev::after,
.swiper-button-next::after {
  content: none !important;
}

/* Custom styling for SVG rotating circle text */
.animation-rotation {
  color: #1c1d1f !important; /* Dark charcoal in light theme */
  transition: color 0.3s ease;
}
html[data-theme="dark"] .animation-rotation {
  color: rgba(255, 255, 255, 0.7) !important; /* White in dark theme */
}

/* Show/hide correct logo based on active theme mode */
html[data-theme="light"] .logo-dark-theme {
  display: none !important;
}
html[data-theme="dark"] .logo-light-theme {
  display: none !important;
}



