/* ==========================================================
   FT Consulting – site helpers (replaces Elementor/ElementsKit JS-driven bits)
   ========================================================== */

/* ---------- Popup modal ---------- */
.ftc-popup[hidden] { display: none !important; }
.ftc-popup {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(0, 0, 0, .8);
  padding: 20px; overflow-y: auto;
  animation: ftcFade .25s ease;
}
.ftc-popup .dialog-widget-content {
  position: relative; background: #fff; max-width: 100%; max-height: calc(100vh - 40px);
  overflow: auto; box-shadow: 2px 8px 23px 3px rgba(0,0,0,.2);
  animation: ftcZoom .3s ease;
}
.ftc-popup .dialog-message { display: flex; width: 640px; max-width: 100%; padding: 0; overflow: visible; }
.ftc-popup .dialog-close-button {
  position: absolute; top: 14px; right: 14px; z-index: 10; display: flex !important;
  width: 30px; height: 30px; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; cursor: pointer; text-decoration: none;
}
.ftc-popup .dialog-close-button svg { width: 1em; height: 1em; fill: #1f2124; }
.elementor-popup-modal [data-elementor-type=popup],
.ftc-popup [data-elementor-type=popup],
.ftc-popup-preview [data-elementor-type=popup] { display: block !important; width: 100%; }
body.ftc-popup-open { overflow: hidden; }
@keyframes ftcFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ftcZoom { from { transform: scale(.94); opacity: 0 } to { transform: none; opacity: 1 } }
@media (max-width: 767px) {
  .ftc-popup { padding: 10px; }
  .ftc-popup .dialog-message { width: 100%; }
}

/* ---------- Forms ---------- */
.elementor-form .elementor-message { margin: 10px 0 0; font-size: 15px; width: 100%; }
.elementor-form .elementor-message-success { color: #2e7d32; }
.elementor-form .elementor-message-danger { color: #c62828; }
.elementor-form button[disabled] { opacity: .65; cursor: wait; }
.ftc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Scroll to top ---------- */
#ast-scroll-top { cursor: pointer; }

/* ---------- Mobile menu (ElementsKit) ---------- */
@media (max-width: 1024px) {
  .ekit_menu_responsive_tablet .elementskit-megamenu-panel { width: 100% !important; }
}
body.ftc-menu-open { overflow: hidden; }

/* ---------- Builder blocks (used by the visual editor's element library) ---------- */
.ftb-section { position: relative; padding: 60px 20px; background-size: cover; background-position: center; }
.ftb-container { max-width: 1140px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; align-items: stretch; }
.ftb-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ftb-col > * { margin-top: 0; margin-bottom: 0; }
.ftb-heading { margin: 0; font-family: var(--e-global-typography-primary-font-family, inherit), sans-serif; }
.ftb-text p { margin: 0 0 1em; }
.ftb-text p:last-child { margin-bottom: 0; }
.ftb-image img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.ftb-btn {
  display: inline-block; padding: 12px 28px; border-radius: 4px; text-decoration: none !important;
  background: var(--e-global-color-accent, #61ce70); color: #fff !important; font-weight: 500; transition: opacity .2s;
}
.ftb-btn:hover { opacity: .88; }
.ftb-spacer { height: 50px; }
.ftb-divider { border: 0; border-top: 1px solid #ddd; margin: 10px 0; width: 100%; }
.ftb-video { position: relative; padding-top: 56.25%; }
.ftb-video iframe, .ftb-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ftb-map { position: relative; height: 350px; }
.ftb-card { background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.08); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.ftb-card img { width: 100%; height: auto; border-radius: 6px; }
.ftb-list { margin: 0; padding-left: 1.2em; }
.ftb-list li { margin-bottom: 6px; }
.ftb-quote { border-left: 4px solid var(--e-global-color-accent, #61ce70); padding: 10px 20px; font-style: italic; margin: 0; }
.ftb-form { display: flex; flex-direction: column; gap: 12px; }
.ftb-form input, .ftb-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font: inherit; }
.ftb-form button { align-self: flex-start; border: 0; cursor: pointer; }
@media (max-width: 767px) {
  .ftb-section { padding: 40px 16px; }
  .ftb-container { flex-direction: column; gap: 20px; }
}

/* Visibility helpers (match Elementor breakpoints) */
@media (min-width: 1025px) { .ftb-hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .ftb-hide-tablet { display: none !important; } }
@media (max-width: 767px) { .ftb-hide-mobile { display: none !important; } }

/* Part canvas (editor preview of popup / mega menu) */
.ftc-part-canvas { padding: 40px 20px; background: repeating-linear-gradient(45deg,#f4f6f8,#f4f6f8 10px,#eef1f4 10px,#eef1f4 20px); min-height: 60vh; }
.ftc-part-canvas-label { text-align: center; font: 600 13px/1 system-ui, sans-serif; color: #667; margin-bottom: 20px; text-transform: uppercase; letter-spacing: .08em; }
.ftc-popup-preview { position: static !important; display: flex !important; justify-content: center; background: transparent !important; }
.ftc-popup-preview .dialog-widget-content { background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.ftc-popup-preview .dialog-message { width: 640px; max-width: 100%; display: flex; }

/* ==========================================================
   Blog
   ========================================================== */
.ftc-blog { font-family: "Poppins", sans-serif; color: #333; }
.ftc-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.ftc-wrap--narrow { max-width: 860px; }
.ftc-blog-hero { background: linear-gradient(135deg, #0b1220 0%, #1c2a44 100%); color: #fff; padding: 90px 0 70px; text-align: center; }
.ftc-blog-hero h1 { color: #fff; font-family: "Poppins", sans-serif; font-weight: 700; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.2; margin: 10px 0 14px; }
.ftc-blog-hero p { color: #c9d3e3; font-size: 17px; max-width: 680px; margin: 0 auto; }
.ftc-eyebrow { display: inline-block; background: rgba(255,255,255,.12); color: #fff !important; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 30px; text-decoration: none !important; }
.ftc-blog-hero--post { text-align: left; padding: 70px 0 60px; }
.ftc-blog-hero--post h1 { font-size: clamp(28px, 4vw, 42px); }
.ftc-back { display: block; color: #9fb0cc !important; font-size: 14px; margin-bottom: 18px; text-decoration: none !important; }
.ftc-back:hover { color: #fff !important; }
.ftc-blog-hero .ftc-post-meta { color: #b8c4d8; }

.ftc-blog-list { padding: 50px 20px 80px; }
.ftc-blog-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; justify-content: center; }
.ftc-blog-chips a { padding: 7px 16px; border-radius: 30px; border: 1px solid #dfe3ea; color: #333 !important; font-size: 14px; text-decoration: none !important; background: #fff; }
.ftc-blog-chips a.on, .ftc-blog-chips a:hover { background: #000; border-color: #000; color: #fff !important; }
.ftc-blog-chips small { opacity: .6; }
.ftc-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.ftc-post-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(15, 25, 45, .08); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.ftc-post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(15, 25, 45, .14); }
.ftc-post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e9edf3; }
.ftc-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ftc-post-card:hover .ftc-post-thumb img { transform: scale(1.04); }
.ftc-post-thumb--empty { display: grid; place-items: center; background: linear-gradient(135deg, #1c2a44, #0b1220); }
.ftc-post-thumb--empty span { color: #fff; font-size: 54px; font-weight: 700; opacity: .5; }
.ftc-post-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ftc-post-cat { align-self: flex-start; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #1c6dd0 !important; text-decoration: none !important; }
.ftc-post-body h3 { font-family: "Poppins", sans-serif; font-size: 19px; line-height: 1.35; margin: 0; font-weight: 600; }
.ftc-post-body h3 a { color: #111 !important; text-decoration: none !important; }
.ftc-post-body h3 a:hover { color: #1c6dd0 !important; }
.ftc-post-body p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #5d6574; }
.ftc-post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #8a92a1; }
.ftc-post-meta span + span::before { content: "•"; margin-right: 16px; opacity: .6; }
.ftc-post-more { margin-top: auto; font-weight: 600; font-size: 14px; color: #000 !important; text-decoration: none !important; }
.ftc-blog-empty { grid-column: 1 / -1; text-align: center; color: #777; padding: 40px 0; }
.ftc-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.ftc-pagination a, .ftc-pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 8px; border: 1px solid #dfe3ea; color: #333 !important; text-decoration: none !important; font-size: 14px; }
.ftc-pagination .current, .ftc-pagination a:hover { background: #000; color: #fff !important; border-color: #000; }

/* single post */
.ftc-draft-note { background: #fff4d6; color: #7a5600; text-align: center; padding: 10px; font-weight: 600; }
.ftc-post-main { padding-top: 40px; padding-bottom: 70px; }
.ftc-post-featured { margin: 0 0 36px; border-radius: 14px; overflow: hidden; }
.ftc-post-featured img { width: 100%; height: auto; display: block; }
.ftc-article { font-size: 17px; line-height: 1.8; color: #2d3340; }
.ftc-article h2, .ftc-article h3, .ftc-article h4 { font-family: "Poppins", sans-serif; color: #111; line-height: 1.3; margin: 1.8em 0 .6em; font-weight: 600; }
.ftc-article h2 { font-size: 28px; } .ftc-article h3 { font-size: 22px; } .ftc-article h4 { font-size: 19px; }
.ftc-article p { margin: 0 0 1.2em; }
.ftc-article a { color: #1c6dd0; text-decoration: underline; }
.ftc-article ul, .ftc-article ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.ftc-article li { margin-bottom: .45em; }
.ftc-article img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; }
.ftc-article blockquote { margin: 1.6em 0; padding: 14px 24px; border-left: 4px solid #000; background: #f6f7f9; font-style: italic; border-radius: 0 8px 8px 0; }
.ftc-article table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.ftc-article th, .ftc-article td { border: 1px solid #e3e6eb; padding: 10px 12px; text-align: left; }
.ftc-article th { background: #f6f7f9; }
.ftc-article iframe { max-width: 100%; }
.ftc-article .ql-align-center { text-align: center; } .ftc-article .ql-align-right { text-align: right; } .ftc-article .ql-align-justify { text-align: justify; }
.ftc-article .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.ftc-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 40px 0 30px; padding-top: 24px; border-top: 1px solid #e8ebf0; font-size: 14px; }
.ftc-share a { padding: 6px 14px; border: 1px solid #dfe3ea; border-radius: 30px; color: #333 !important; text-decoration: none !important; }
.ftc-share a:hover { background: #000; color: #fff !important; border-color: #000; }
.ftc-post-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #0b1220; color: #fff; border-radius: 14px; padding: 30px 34px; }
.ftc-post-cta h3 { color: #fff; margin: 0 0 6px; font-size: 21px; font-family: "Poppins", sans-serif; }
.ftc-post-cta p { margin: 0; color: #b8c4d8; }
.ftc-post-cta .ftb-btn { background: #fff; color: #000 !important; flex: none; }
.ftc-related { background: #f6f8fb; padding: 60px 0 80px; }
.ftc-related h2 { font-family: "Poppins", sans-serif; text-align: center; margin: 0 0 34px; font-size: 30px; }

/* home "Our Resources" cards (Elementor posts widget) */
.elementor-widget-posts .elementor-post__excerpt p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: #666; }
.elementor-widget-posts .elementor-post__thumbnail__link { display: block; width: 100%; margin-bottom: 0 !important; }
.elementor-widget-posts .elementor-post__thumbnail { position: relative; padding-bottom: 0 !important; aspect-ratio: 16 / 10; overflow: hidden; }
.elementor-widget-posts .elementor-post__thumbnail img { position: absolute !important; inset: 0 !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover; transform: none !important; transition: transform .4s !important; }
.elementor-widget-posts .elementor-post:hover .elementor-post__thumbnail img { transform: scale(1.04) !important; }
.elementor-widget-posts .elementor-post__title a, .elementor-widget-posts .elementor-post__read-more { text-decoration: none !important; }
.elementor-widget-posts .elementor-post__card .elementor-post__text { margin-top: 24px; }

@media (max-width: 1024px) { .ftc-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .ftc-post-grid { grid-template-columns: 1fr; }
  .ftc-blog-hero { padding: 60px 0 50px; }
  .ftc-post-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  .ftc-article { font-size: 16px; }
}

/* ---------- Elementor Pro nav menu (no SmartMenus JS) ---------- */
.elementor-nav-menu--main .elementor-nav-menu li:hover > ul,
.elementor-nav-menu--main .elementor-nav-menu li:focus-within > ul,
.elementor-nav-menu ul.ftc-open { display: block !important; }
.elementor-nav-menu--main .elementor-nav-menu > li > ul { top: 100%; left: 0; z-index: 9999; }
.elementor-nav-menu--main .elementor-nav-menu ul ul { top: 0; left: 100%; }
.elementor-nav-menu--main .elementor-nav-menu li { position: relative; }
.elementor-nav-menu--dropdown.elementor-nav-menu__container .elementor-nav-menu ul { position: static; width: auto; }
.elementor-nav-menu .sub-arrow { cursor: pointer; }

/* ---------- Lightbox ---------- */
.ftc-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; animation: ftcFade .2s; }
.ftc-lightbox figure { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.ftc-lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.ftc-lightbox figcaption { color: #ddd; font: 14px/1.4 system-ui, sans-serif; margin-top: 10px; }
.ftc-lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; font-size: 34px; width: 52px; height: 52px; border-radius: 50%; line-height: 1; }
.ftc-lightbox button:hover { background: rgba(255,255,255,.25); }
.ftc-lb-close { top: 18px; right: 18px; }
.ftc-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.ftc-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Floating contact buttons ---------- */
.ftc-float { position: fixed; z-index: 9990; bottom: 25px; display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; }
.ftc-float.left { left: 25px; } .ftc-float.right { right: 25px; }
.ftc-float a, .ftc-float button { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); border: 0; cursor: pointer; padding: 0; position: relative; text-decoration: none; transition: transform .2s; }
.ftc-float a:hover, .ftc-float button:hover { transform: scale(1.06); }
.ftc-float svg { width: 54px; height: 54px; }
.ftc-float .ftc-float-toggle svg { width: 28px; height: 28px; fill: #fff; }
.ftc-float .ftc-float-items { display: flex; flex-direction: column-reverse; gap: 12px; }
.ftc-float.collapsible:not(.open) .ftc-float-items { display: none; }
.ftc-float [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); white-space: nowrap; background: #fff; color: #222; font: 500 13px/1 system-ui, sans-serif; padding: 7px 10px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ftc-float.right [data-tip]::after { left: auto; right: calc(100% + 10px); }
.ftc-float [data-tip]:hover::after { opacity: 1; }

/* ---------- Background slideshow ---------- */
.ftc-bg-slideshow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ftc-bg-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; }
.ftc-bg-slide.on { opacity: 1; }
.ftc-bg-slideshow.kb .ftc-bg-slide.on { transform: scale(1.12); }
.ftc-bg-slideshow ~ .elementor-background-overlay { z-index: 1; }
.ftc-bg-slideshow ~ .elementor-container, .ftc-bg-slideshow ~ .e-con-inner { position: relative; z-index: 2; }

/* Editor: show elements that wait for an entrance animation */
body.ftc-edit-mode .elementor-invisible { visibility: visible !important; opacity: 1 !important; }


/* Dropdown sizes to its longest item (Elementor's SmartMenus script did this in WordPress) */
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu { width: auto !important; min-width: 12em; max-width: 20em; }
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu a { white-space: nowrap; }
