.company-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 4, 8, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.company-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.company-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  background: linear-gradient(145deg, #ffffff 0%, #fdfbf7 100%);
  border: 1.5px solid rgba(203, 168, 113, 0.45);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(85, 10, 18, 0.18),
              0 4px 24px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 36px 40px 32px;
  color: #232127;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.company-modal-backdrop.is-open .company-modal-dialog {
  transform: translateY(0) scale(1);
}

.company-modal-dialog::-webkit-scrollbar {
  width: 6px;
}
.company-modal-dialog::-webkit-scrollbar-track {
  background: rgba(85, 10, 18, 0.04);
  border-radius: 10px;
}
.company-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(203, 168, 113, 0.35);
  border-radius: 10px;
}
.company-modal-dialog::-webkit-scrollbar-thumb:hover {
  background: #cba871;
}

.company-modal-close {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  width: 40px;
  height: 40px;
  background: rgba(107, 14, 24, 0.05);
  border: 1px solid rgba(203, 168, 113, 0.35);
  border-radius: 50%;
  color: #550a12;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.company-modal-close:hover {
  background: #550a12;
  border-color: #cba871;
  color: #ffffff;
  transform: rotate(90deg) scale(1.05);
}

.company-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(203, 168, 113, 0.25);
  margin-bottom: 24px;
}

.company-modal-crest {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #550a12 0%, #7d121e 100%);
  border: 1px solid rgba(203, 168, 113, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7e7c8;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(85, 10, 18, 0.18);
}

.company-modal-header-titles {
  flex: 1;
}

.company-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #1a0407;
  letter-spacing: -0.01em;
  margin: 0 0 4px 0;
  background: linear-gradient(135deg, #1a0407 0%, #550a12 45%, #b68b48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.company-modal-subtitle {
  font-size: 13px;
  color: #54505c;
  margin: 0;
  line-height: 1.5;
}

.company-nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.company-nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid rgba(203, 168, 113, 0.28);
  border-radius: 12px;
  color: #38343e;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: start;
  box-shadow: 0 2px 8px rgba(85, 10, 18, 0.02);
}

.company-nav-tab:hover {
  background: #fffdfa;
  border-color: #cba871;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(85, 10, 18, 0.06);
}

.company-nav-tab.active {
  background: linear-gradient(135deg, #550a12 0%, #7d121e 100%);
  border: 1px solid #cba871;
  box-shadow: 0 6px 20px rgba(85, 10, 18, 0.22), inset 0 0 15px rgba(203, 168, 113, 0.12);
  color: #ffffff;
}

.company-tab-flag {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(203, 168, 113, 0.3);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.flag-iq {
  display: flex;
  flex-direction: column;
}
.flag-iq .stripe-red { background: #ce1126; height: 33.3%; }
.flag-iq .stripe-white {
  background: #ffffff;
  height: 33.3%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flag-iq .flag-motto {
  font-size: 6px;
  font-weight: 800;
  color: #007a3d;
  letter-spacing: -0.2px;
  line-height: 1;
}
.flag-iq .stripe-black { background: #000000; height: 33.4%; }

.flag-ae {
  display: flex;
  flex-direction: row;
}
.flag-ae .flag-vert.stripe-red {
  width: 30%;
  height: 100%;
  background: #ff0000;
}
.flag-ae .flag-horiz {
  width: 70%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.flag-ae .stripe-green { background: #00732f; height: 33.3%; }
.flag-ae .stripe-white { background: #ffffff; height: 33.3%; }
.flag-ae .stripe-black { background: #000000; height: 33.4%; }

.flag-cn {
  display: flex;
  background: #de2910;
  position: relative;
  align-items: center;
  justify-content: center;
}
.flag-cn .star-main {
  color: #ffde00;
  font-size: 13px;
  line-height: 1;
}

.company-tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.company-tab-text strong {
  font-size: 13px;
  color: #1a0407;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-nav-tab.active .company-tab-text strong {
  color: #ffffff;
}

.company-tab-text small {
  font-size: 11px;
  color: #7b5924;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.company-nav-tab.active .company-tab-text small {
  color: #f7e7c8;
}

.company-panels-viewport {
  position: relative;
}

.company-detail-panel {
  display: none;
  animation: companyFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.company-detail-panel.active {
  display: block;
}

@keyframes companyFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.company-card-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fbf8f3 100%);
  border: 1px solid rgba(203, 168, 113, 0.35);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 4px 18px rgba(85, 10, 18, 0.04);
}

.company-country-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(107, 14, 24, 0.06);
  border: 1px solid rgba(203, 168, 113, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #550a12;
  margin-bottom: 12px;
}

.country-gold-pin {
  color: #cba871;
  display: flex;
}

.country-badge-sub {
  background: #550a12;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: #ffffff;
  border: 1px solid rgba(203, 168, 113, 0.4);
}

.company-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a0407;
  margin: 0 0 6px 0;
}

.company-full-legal {
  font-size: 13.5px;
  color: #4a4652;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.company-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.company-role-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #550a12;
  background: rgba(107, 14, 24, 0.06);
  border: 1px solid rgba(203, 168, 113, 0.35);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.company-manager-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #2b2832;
  background: #ffffff;
  border: 1px solid rgba(203, 168, 113, 0.25);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.company-section-block {
  margin-bottom: 22px;
}

.company-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-icon-gold {
  color: #cba871;
  display: flex;
}

.company-section-header h5 {
  font-size: 15px;
  font-weight: 700;
  color: #550a12;
  margin: 0;
  letter-spacing: -0.01em;
}

.company-about-text-card {
  background: #fbf9f6;
  border: 1px solid rgba(203, 168, 113, 0.22);
  border-radius: 12px;
  padding: 18px 20px;
  border-inline-start: 4px solid #cba871;
}

.company-about-text-card p {
  font-size: 14.5px;
  line-height: 1.8;
  color: #3b3742;
  margin: 0;
}

.company-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.company-service-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(203, 168, 113, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(85, 10, 18, 0.02);
  transition: all 0.2s ease;
}

.company-service-item:hover {
  background: #fffdfa;
  border-color: #cba871;
  transform: translateX(-2px);
}

[dir="ltr"] .company-service-item:hover {
  transform: translateX(2px);
}

.service-tick-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(107, 14, 24, 0.06);
  border: 1px solid rgba(203, 168, 113, 0.35);
  color: #7b5924;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-name {
  font-size: 13.5px;
  color: #232127;
  font-weight: 500;
  line-height: 1.4;
}

.company-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f5ee;
  border: 1px solid rgba(203, 168, 113, 0.28);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.company-location-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cba871;
}

.location-text-group {
  display: flex;
  flex-direction: column;
}

.location-label {
  font-size: 11px;
  color: #635f6c;
  font-weight: 600;
  text-transform: uppercase;
}

.location-value {
  font-size: 14px;
  color: #1a0407;
  font-weight: 700;
}

.company-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-action-rfq-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #550a12 0%, #7d121e 100%);
  border: 1px solid #cba871;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(85, 10, 18, 0.22);
  transition: all 0.25s ease;
}

.company-action-rfq-btn:hover {
  background: linear-gradient(135deg, #700f1a 0%, #9a1727 100%);
  border-color: #dfbf88;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(85, 10, 18, 0.32);
}

.company-action-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid rgba(203, 168, 113, 0.45);
  color: #550a12;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.company-action-contact-btn:hover {
  background: rgba(107, 14, 24, 0.06);
  color: #3b050a;
  border-color: #550a12;
}

@media (max-width: 768px) {
  .company-modal-dialog {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .company-modal-header {
    gap: 12px;
  }

  .company-modal-title {
    font-size: 18px;
  }

  .company-nav-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .company-services-grid {
    grid-template-columns: 1fr;
  }

  .company-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .company-action-buttons {
    flex-direction: column;
  }

  .company-action-rfq-btn,
  .company-action-contact-btn {
    justify-content: center;
    width: 100%;
  }
}
