/**
 * GnT — Company module responsive
 * Desktop-first 1440px. Breakpoints: 1200px, 1024px, 768px
 */

/* About intro: <1200px — hide divider, keep text + logo side-by-side (desktop ≥1200px unchanged in company.css) */
@media (max-width: 1199px) {
  .company-page .company-about-section {
    padding: 5rem 2rem 4rem;
    box-sizing: border-box;
  }

  .company-about-section__container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2.25rem);
    width: 100%;
  }

  .company-about-section__divider {
    display: none;
  }

  .company-about-section__text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(100%, 38rem);
    text-align: left;
  }

  .company-about-section__headline {
    font-size: clamp(1.375rem, 2.4vw, 2rem);
    margin-bottom: 1rem;
  }

  .company-about-section__description {
    font-size: clamp(1rem, 1.1vw, 1.125rem);
  }

  .company-about-section__logo-wrap {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: min(40%, 260px);
    min-width: 100px;
  }

  .company-about-section__logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* <=1024px (~1000px dan kichik) inner hero biroz balandroq */
@media (max-width: 1024px) {
  .company-page .company-hero,
  .rd-page .company-hero,
  .pr-page .company-hero,
  .contact-page .company-hero,
  .product-page .company-hero {
    height: 38vh;
    min-height: 38vh;
    max-height: 38vh;
  }

  .company-page .company-hero__title,
  .rd-page .company-hero__title,
  .pr-page .company-hero__title,
  .contact-page .company-hero__title,
  .product-page .company-hero__title {
    font-size: 48px;
  }

  .company-page .company-tabs,
  .rd-page .company-tabs,
  .pr-page .company-tabs,
  .product-page .company-tabs {
    padding: 60px 40px 0;
  }

  .company-page .company-tabs__link,
  .rd-page .company-tabs__link,
  .pr-page .company-tabs__link,
  .product-page .company-tabs__link {
    min-height: 52px;
    font-size: 17px;
  }

  .company-page .company-content {
    padding-block: 60px 64px;
  }

  .company-page .company-content__container {
    padding-inline: 1.5rem;
  }
}

/* CEO: ≤1100px stacked (image → card); image scales, card natural height */
@media (max-width: 1100px) {
  .company-page .company-ceo-section {
    padding: 2rem 0 2.75rem;
    box-sizing: border-box;
  }

  .company-page .company-ceo-container {
    padding: 0 2.5rem;
    gap: 1.75rem;
    align-items: stretch;
    max-width: 100%;
  }

  .company-page .company-ceo-image-wrap {
    width: 100%;
    max-width: min(600px, 100%);
    margin-inline: auto;
    flex: 0 0 auto;
  }

  .company-page .company-ceo-image {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .company-page .company-ceo-card {
    width: 100%;
    max-width: min(680px, 100%);
    margin-inline: auto;
    margin-top: 0;
    padding: 2.5rem 2.25rem;
    text-align: left;
    border-radius: 20px;
    min-height: 0;
    flex: 0 0 auto;
    align-self: stretch;
    justify-content: flex-start;
  }

  .company-page .company-ceo-title {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 768px) {
  /* Hero must stack above .company-tabs (z-index: 90) so fixed navbar + #navbar-root stay above the mobile tabs dropdown */
  .company-page .company-hero,
  .rd-page .company-hero,
  .pr-page .company-hero,
  .contact-page .company-hero,
  .product-page .company-hero {
    height: 24vh;
    min-height: 24vh;
    max-height: 24vh;
    z-index: 110;
  }

  .company-page .company-hero__content,
  .rd-page .company-hero__content,
  .pr-page .company-hero__content,
  .contact-page .company-hero__content,
  .product-page .company-hero__content {
    padding: 1.5rem 1rem;
  }

  .company-page .company-hero__title,
  .rd-page .company-hero__title,
  .pr-page .company-hero__title,
  .contact-page .company-hero__title,
  .product-page .company-hero__title {
    font-size: 36px;
  }

  .company-page .company-tabs,
  .rd-page .company-tabs,
  .pr-page .company-tabs,
  .product-page .company-tabs {
    padding: 40px 24px 0;
  }

  .company-page .company-tabs__list,
  .rd-page .company-tabs__list,
  .pr-page .company-tabs__list,
  .product-page .company-tabs__list {
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .company-page .company-tabs__item,
  .rd-page .company-tabs__item,
  .pr-page .company-tabs__item,
  .product-page .company-tabs__item {
    flex: 0 0 auto;
    min-width: 0;
  }

  .company-page .company-tabs__link,
  .rd-page .company-tabs__link,
  .pr-page .company-tabs__link,
  .product-page .company-tabs__link {
    min-height: 48px;
    padding-inline: 1rem;
    font-size: 15px;
    white-space: nowrap;
  }

  /* Mobile: custom dropdown (JS) — no horizontal scroll; hover on panel links */
  .company-tabs--dropdown .company-tabs__list {
    display: none;
  }

  .company-tabs__dropdown {
    position: relative;
    z-index: 100;
    width: 100%;
  }

  .company-tabs__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    font-family: var(--font-pretendard);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    color: #ffffff;
    background-color: #cf0006;
    border: 1px solid #cf0006;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .company-tabs__toggle-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .company-tabs__toggle-chevron {
    flex-shrink: 0;
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
  }

  .company-tabs__dropdown--open .company-tabs__toggle-chevron {
    transform: rotate(180deg);
  }

  .company-tabs__toggle:hover {
    background-color: #e01218;
    border-color: #e01218;
  }

  .company-tabs__toggle:focus {
    outline: none;
    border-color: #cf0006;
    box-shadow: 0 0 0 2px rgba(207, 0, 6, 0.25);
  }

  .company-tabs__toggle:focus:not(:focus-visible) {
    box-shadow: none;
  }

  .company-tabs__toggle:focus-visible {
    box-shadow: 0 0 0 2px rgba(207, 0, 6, 0.25);
  }

  .company-tabs__panel {
    position: absolute;
    z-index: 101;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  }

  /* Keep mobile tabs/dropdown above section content, but below burger drawer */
  .company-page .company-tabs,
  .rd-page .company-tabs,
  .pr-page .company-tabs,
  .product-page .company-tabs {
    position: relative;
    z-index: 90;
    overflow: visible;
  }

  /* When burger drawer is open, force subpage controls below drawer layers */
  body.navbar--drawer-open .company-page .company-tabs,
  body.navbar--drawer-open .rd-page .company-tabs,
  body.navbar--drawer-open .pr-page .company-tabs,
  body.navbar--drawer-open .product-page .company-tabs,
  body.navbar--drawer-open .company-tabs__dropdown,
  body.navbar--drawer-open .company-tabs__panel,
  body.navbar--drawer-open .awards-filter-wrap,
  body.navbar--drawer-open .awards-filter,
  body.navbar--drawer-open .location-section__filters,
  body.navbar--drawer-open .clients-section__pills {
    position: relative;
    z-index: 1 !important;
  }

  .company-tabs__panel-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .company-tabs__panel-item {
    margin: 0;
  }

  .company-tabs__panel-link {
    display: block;
    padding: 0.7rem 1rem;
    font-family: var(--font-pretendard);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    color: #151515;
    text-decoration: none;
    border-radius: 6px;
    margin-inline: 0.35rem;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .company-tabs__panel-link:hover {
    background-color: #f3f4f6;
    color: #151515;
  }

  .company-tabs__panel-link:focus {
    outline: none;
  }

  .company-tabs__panel-link:focus-visible {
    background-color: #f3f4f6;
    box-shadow: inset 0 0 0 2px rgba(207, 0, 6, 0.35);
  }

  .company-tabs__panel-link--active {
    font-weight: 600;
    color: #cf0006;
    background-color: #fff5f5;
    box-shadow: inset 3px 0 0 #cf0006;
  }

  .company-tabs__panel-link--active:hover {
    background-color: #ffeded;
    color: #b00005;
  }

  .company-tabs__panel-link--active:focus-visible {
    outline: 2px solid rgba(207, 0, 6, 0.4);
    outline-offset: 2px;
  }

  .company-page .company-content {
    padding-block: 48px 56px;
  }

  .company-page .company-content__container {
    padding-inline: 1.25rem;
  }

  .company-page .company-content__inner {
    gap: 1.25rem;
  }

  .company-page .company-about-section {
    padding: 2.75rem 1.25rem 2.25rem;
    box-sizing: border-box;
  }

  .company-about-section__container {
    gap: clamp(0.75rem, 2.5vw, 1.25rem);
  }

  .company-about-section__text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .company-about-section__headline {
    margin-bottom: 0.75rem;
    font-size: clamp(1.125rem, 4.2vw, 1.5rem);
  }

  .company-about-section__description {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .company-about-section__logo-wrap {
    max-width: min(36%, 200px);
    min-width: 88px;
  }

  .company-about-section__logo {
    max-width: 100%;
    height: auto;
  }

  .company-page .company-ceo-section {
    padding: 1.75rem 0 2.25rem;
  }

  .company-page .company-ceo-container {
    padding: 0 1.25rem;
    gap: 1.25rem;
  }

  .company-page .company-ceo-card {
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: 18px;
    text-align: left;
  }

  .company-page .company-ceo-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .company-page .company-ceo-body {
    font-size: 0.9375rem;
    line-height: 1.65;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .company-page .company-ceo-image-wrap {
    max-width: min(100%, 440px);
  }
}
