/* Team Cloud Associates - shared styles / Tailwind overrides */

  .legal-content h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.35rem; line-height: 1.3; font-weight: 700; color: #0F2042; margin: 2rem 0 0.75rem; }
  .legal-content p { color: #5B6472; font-size: 15px; line-height: 1.8; margin: 0 0 1rem; }
  .legal-content a { color: #0F2042; text-decoration: underline; text-underline-offset: 3px; }

  /* ---- Base / cross-device hardening ---- */
  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;              /* fallback for older in-app webviews */
    -webkit-tap-highlight-color: transparent;
  }
  body {
    min-width: 320px;
    overflow-x: clip;                /* clips stray overflow WITHOUT creating a scroll container, so sticky headers keep working */
    overflow-wrap: break-word;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  img, video, iframe { max-width: 100%; }
  a, button, select, summary, [role="tab"], [role="button"] { touch-action: manipulation; }
  [id] { scroll-margin-top: 5.5rem; } /* anchors land below the fixed/sticky header */
  body { font-family: 'Inter', sans-serif; color: #1C2536; }
  h1, h2, h3, h4, .font-display { font-family: 'Plus Jakarta Sans', sans-serif; }
  .eyebrow { letter-spacing: 0.04em; }
  .nav-link { position: relative; }
  .nav-link.active { color: #0F2042; font-weight: 600; }
  .nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #C7922E; border-radius: 2px; }
  [x-cloak] { display: none !important; }
  .fade-up { animation: fadeUp 0.6s ease-out both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-up { animation: none; }
  }
  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #C7922E; outline-offset: 2px;
  }
  .timeline-num { position: relative; }
  .timeline-line { position: absolute; left: 19px; top: 40px; bottom: -20px; width: 2px; background: #E5E7EB; }
  .timeline-item:last-child .timeline-line { display: none; }

  /* Home hero: full-bleed background image with left-side gradient overlay */
  .hero-bg {
    background-image: url("../img/home-page-hero.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  .hero-gradient {
    background-image: linear-gradient(
      100deg,
      rgba(7, 15, 30, 0.92) 0%,
      rgba(7, 15, 30, 0.82) 30%,
      rgba(7, 15, 30, 0.45) 58%,
      rgba(7, 15, 30, 0.05) 82%
    );
  }

  /* Services page: horizontal segmented filter tabs */
  .service-nav-btn {
    cursor: pointer;
  }
  .service-nav-btn .tab-arrow {
    display: inline-block;
    margin-left: 2px;
    opacity: 0.45;
    transition: opacity 0.2s, transform 0.2s;
  }
  .service-nav-btn:hover .tab-arrow,
  .service-nav-btn.is-active .tab-arrow {
    opacity: 0.9;
    transform: translateX(1px);
  }
  .service-nav-btn.is-active {
    background: #0F172A;
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15,23,42,0.18);
    transform: scale(1.05);
  }
  .service-nav-btn.is-active:hover {
    background: #0F172A;
  }

  /* Financial Markets Training: pill tabs on a dark section */
  .ft-tabs .ft-nav-btn {
    color: rgba(255,255,255,0.7);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
  }
  .ft-tabs .ft-nav-btn:hover {
    color: #FFFFFF;
    border-color: rgba(255,255,255,0.4);
  }
  .ft-tabs .ft-nav-btn.is-active {
    background: #FFFFFF;
    color: #0F2042;
    border-color: #FFFFFF;
  }
  .tool-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #1E293B;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
  }
  .tool-pill--dark {
    color: #FFFFFF;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
  }


  /* Home page: floating overlay header over the hero, solidifies on scroll.
     CTA is hidden until the header solidifies (i.e. past the hero fold). */
  .site-header {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  }
  .site-header.is-overlay {
    background: transparent;
    border-bottom-color: transparent;
  }
  .site-header.is-overlay .nav-link {
    color: rgba(255,255,255,0.88);
  }
  .site-header.is-overlay .nav-link:hover {
    color: #FFFFFF;
  }
  .site-header.is-overlay .nav-link.active {
    color: #FFFFFF;
  }
  .site-header.is-overlay .brand-text {
    color: #FFFFFF;
  }
  .site-header.is-solid .brand-text {
    color: #0F2042;
  }
  .site-header.is-solid {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: #E2E8F0;
    box-shadow: 0 1px 2px rgba(15,32,66,0.04);
  }
  .site-header.is-solid .nav-link {
    color: #5B6472;
  }
  .site-header.is-solid .nav-link:hover {
    color: #0F2042;
  }
  .site-header.is-solid .nav-link.active {
    color: #0F2042;
  }

  /* Header CTA: hidden by default in the transparent/overlay state, slides + fades in once solid */
  .header-cta {
    background: #0F2042;
    color: #FFFFFF;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  }
  .header-cta:hover {
    background: #16305C;
  }
  .site-header.is-overlay .header-cta {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }
  .site-header.is-solid .header-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Compact white pop-over dropdown menu (RESDOCO pattern) */
  .nav-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    max-width: 80vw;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15,32,66,0.16);
    padding: 8px;
    z-index: 60;
  }
  .nav-popover-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: #1C2536;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .nav-popover-link span {
    color: #94A3B8;
    font-weight: 400;
  }
  .nav-popover-link:hover {
    background: #F4F5F7;
    color: #0F2042;
  }
  .nav-popover-link.active {
    color: #0F2042;
    font-weight: 600;
    background: #F4F5F7;
  }

  /* Global floating contact actions — Call bottom-left, WhatsApp bottom-right */
  .fab {
    position: fixed;
    bottom: 20px;
    z-index: 55;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15,32,66,0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .fab:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 22px rgba(15,32,66,0.3);
  }
  .fab-call {
    left: 20px;
    background: #0F2042;
  }
  .fab-whatsapp {
    right: 20px;
    background: #25D366;
  }
  @media (max-width: 640px) {
    .fab { width: 40px; height: 40px; bottom: 16px; }
    .fab-call { left: 16px; }
    .fab-whatsapp { right: 16px; }
  }

  /* Contact page: force right-column card stack to distribute to the container's full
     stretched height so its bottom edge lines up with the form's submit row */
  .info-card-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
  }

  /* ---- Responsive refinements ---- */

  /* Hero: the left-weighted gradient leaves the right side too light for text once the
     copy spans the full width, so use an even scrim on tablet/mobile. */
  @media (max-width: 1023px) {
    .hero-gradient {
      background-image: linear-gradient(180deg, rgba(7,15,30,0.80) 0%, rgba(7,15,30,0.72) 100%);
    }
  }

  /* Floating call / WhatsApp buttons: respect iOS home indicator & notches */
  .fab { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .fab-call { left: calc(20px + env(safe-area-inset-left, 0px)); }
  .fab-whatsapp { right: calc(20px + env(safe-area-inset-right, 0px)); }

  @media (max-width: 640px) {
    .fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .fab-call { left: calc(16px + env(safe-area-inset-left, 0px)); }
    .fab-whatsapp { right: calc(16px + env(safe-area-inset-right, 0px)); }

    /* 16px+ form controls stop iOS Safari / in-app browsers auto-zooming on focus */
    input, select, textarea { font-size: 16px !important; }
  }

  /* Fixed header: keep content clear of notches in landscape */
  .site-header, header.sticky {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  /* Narrow phones (<=360px): tighten large type / pills so nothing clips */
  @media (max-width: 360px) {
    .tool-pill { font-size: 11.5px; padding: 0.3rem 0.6rem; }
    .service-nav-btn.is-active { transform: none; }
  }
