/* ==========================================================================
   Responsive Scaling (Design System)
   ========================================================================== */

/* Laptop / Desktop (1024px to 1440px) */
@media (max-width: 1440px) {
  :root {
    --padding-x: 80px;
  }
  .hero__content-col {
    padding-left: var(--padding-x);
  }
  .hero__title {
    font-size: 54px;
    line-height: 1.15;
  }
  .heading-2 {
    font-size: 44px;
  }
}

/* Tablet (768px to 1023px) */
@media (max-width: 1024px) {
  :root {
    --padding-x: 40px;
  }
  .hero__content-col {
    padding-left: var(--padding-x);
  }
  .hero__title {
    font-size: 44px;
  }
  .heading-2 {
    font-size: 36px;
  }
}

/* Mobile (Landscape & Portrait) */
@media (max-width: 767.98px) {
  :root {
    --padding-x: 20px;
    --section-padding: 50px 0;
  }
  .hero__content-col {
    padding-left: var(--padding-x);
    padding-right: var(--padding-x);
  }
  .hero__title {
    font-size: 34px;
    line-height: 1.2;
  }
  .heading-2 {
    font-size: 30px;
  }
  .about-text-container p {
    font-size: 16px !important;
  }

  .header__logo {
    font-size: 1.5rem;
  }
}

/* Container Width Constraint */
.container {
  max-width: 1200px !important;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* ── Mobile / Tablet Navbar Overrides (≤991px) ── */
@media (max-width: 991.98px) {
  .header {
    padding: 10px 0;
  }

  .header__menu {
    gap: 0;
    margin-top: 15px;
    padding-bottom: 15px;
  }

  .header__menu .nav-item {
    margin-bottom: 6px;
  }

  .header__menu .nav-link {
    display: inline-block;
    font-size: 15px !important;
    padding: 6px 8px !important;
  }

  /* Mobile dropdown: position static, stacks vertically */
  .header__menu .dropdown-menu {
    display: none;
    position: static !important;
    float: none;
    box-shadow: none;
    border-radius: 6px;
    background: #f8f9fa;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
    margin-top: 4px;
    margin-bottom: 4px;
    opacity: 0;
    visibility: hidden;
    transform: none !important;
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;
  }

  /* Submenu also stacks on mobile */
  .header__menu .dropdown-submenu > .dropdown-menu {
    display: none;
    position: static !important;
    left: auto;
    margin-left: 0;
    box-shadow: none;
    background: #edf0f4;
    padding-left: 0.75rem;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: none !important;
  }

  /* Show opened dropdowns */
  .header__menu .dropdown.show > .dropdown-menu,
  .header__menu .dropdown-submenu.show > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Hide the right-arrow › on mobile (use down caret instead) */
  .header__menu .dropdown-submenu > .dropdown-item::after {
    content: "\25BE"; /* ▾ small downward triangle */
    font-size: 14px;
  }

  .header__menu .dropdown-submenu.show > .dropdown-item::after {
    content: "\25B4"; /* ▴ small upward triangle */
  }

  .header__actions {
    margin-left: 0;
    margin-top: 10px;
    padding-bottom: 10px;
  }
}

/* Mobile (Portrait) and below */
@media (max-width: 575.98px) {
  .contact-hero {
    min-height: 320px !important;
    padding: 2rem 0;
  }

  .contact-hero h1 {
    font-size: clamp(2rem, 7vw, 2.7rem) !important;
  }

  .contact-hero p {
    font-size: 14px !important;
  }

  .offices-section .office-card__content {
    padding: 1.25rem !important;
  }

  .offices-section h3 {
    font-size: 26px !important;
  }

  .offices-section .contact-detail-icon {
    width: 18px;
    height: 18px;
  }

  .offices-section .contact-info-text {
    font-size: 15px !important;
    line-height: 1.5;
  }
}

/* Contact page responsive tweaks */
@media (max-width: 767.98px) {
  .contact-hero {
    min-height: 360px;
  }

  .contact-hero h1 {
    font-size: clamp(2.2rem, 5.4vw, 3rem) !important;
  }

  .offices-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .offices-section .office-card__content {
    padding: 1.25rem !important;
  }

  .offices-section .contact-detail-row {
    align-items: flex-start;
  }
}

/* Services Accordion Responsive */
@media (max-width: 767.98px) {
  .custom-accordion .accordion-button {
    font-size: 20px;
    padding: 20px 0;
  }
  .custom-accordion .accordion-item {
    padding-left: 15px;
  }
}

/* ==========================================================================
   Transactions Page Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
  /* Stack filtering tabs on smaller screens if they don't fit */
  .transactions-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .transactions-pills {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  /* On mobile, stack logo and info sections of Deal Card */
  .deal-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .deal-card__logo {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #eaeaea;
    padding-right: 0 !important;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .deal-card__info {
    width: 100% !important;
    padding-left: 0 !important;
  }

  .careers-accordion .accordion-button {
    align-items: flex-start;
    padding: 22px 18px;
  }

  .careers-accordion .accordion-body {
    padding: 0 18px 22px 18px;
  }

  .careers-opening-actions {
    gap: 10px;
  }

  .careers-opening-btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    white-space: normal;
  }
}
