/* Maurya Group - Clean & Original Aesthetic */
section {
  scroll-margin-top: 90px;
}


/* Logo Styling */
.header .logo img {
  max-height: 100px !important;
  width: auto;
  transition: all 0.3s ease;
}

.header .logo .sitename {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  font-family: var(--nav-font);
  transition: all 0.3s ease;
}

/* Default state: Hide light, show dark (for subpages) */
.header .logo .logo-light {
  display: none;
}

.header .logo .logo-dark {
  display: block;
}

.header .logo .sitename {
  color: var(--nav-color);
}

/* Home Page Header (Transparent background - show light logo and white text) */
body.index-page:not(.scrolled) .header .logo .logo-light {
  display: block;
}

body.index-page:not(.scrolled) .header .logo .logo-dark {
  display: none;
}

body.index-page:not(.scrolled) .header .sitename {
  color: #ffffff;
}

/* Home Page Scrolled & Subpages (White background - show dark logo and dark text) */
body.index-page.scrolled .header .logo .logo-light {
  display: none;
}

body.index-page.scrolled .header .logo .logo-dark {
  display: block;
}

body.index-page.scrolled .header .sitename {
  color: var(--nav-color);
}

/* Hover effect */
.header .logo:hover img {
  transform: scale(1.05);
}

/* AI Search Button in Header */
#ai-chatbot-btn {
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

#ai-chatbot-btn:hover {
  transform: scale(1.05);
}

.btn-icon-search {
  background: transparent;
  border: none;
  color: var(--nav-color);
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-search:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--accent-color);
  transform: scale(1.1);
}

.btn-icon-search i {
  font-size: 24px;
}

/* AI Chatbot Modal */
.ai-chatbot-modal {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.5rem;
}

.ai-chatbot-modal.d-none {
  display: none;
}

.ai-chatbot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.ai-chatbot-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.18);
}

.ai-chatbot-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: #ffffff;
}

.ai-chatbot-body {
  padding: 1rem 1.25rem;
  background: #f5f7ff;
  overflow-y: auto;
  flex: 1;
}

.ai-chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-chatbot-message {
  max-width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 0.95rem;
  word-break: break-word;
}

.ai-chatbot-message.user {
  align-self: flex-end;
  background: #e7f1ff;
  color: #0f2a66;
  border-bottom-right-radius: 6px;
}

.ai-chatbot-message.bot {
  align-self: flex-start;
  background: #ffffff;
  color: #222222;
  border: 1px solid rgba(14, 69, 190, 0.08);
  border-bottom-left-radius: 6px;
}

.ai-chatbot-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.ai-chatbot-input {
  border-radius: 999px;
}

.ai-chatbot-close {
  color: #ffffff;
  opacity: 0.85;
}

.ai-chatbot-close:hover {
  opacity: 1;
}

@media (max-width: 576px) {
  .ai-chatbot-modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  .ai-chatbot-panel {
    width: 100%;
    max-height: 100vh;
  }
}

/* Ensure African Hero Image fits well in the original design */
.hero img {
  object-fit: cover;
  filter: brightness(0.8);
  /* Slight dim to make text readable */
}

/* Navmenu Highlight for Active Submenu */
.navmenu .dropdown ul a.active {
  color: var(--accent-color) !important;
  font-weight: 700 !important;
}

.navmenu .dropdown ul a.active:hover {
  color: var(--accent-color) !important;
}

/* Homepage Service Logo Scaling */
.services .service-item .icon {
  width: 120px !important;
  height: 120px !important;
  margin-right: 30px !important;
}

.services .service-item .icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* Textile Portfolio Cards - Equal Height Fix */
.row.pb-5 .col-md-6 {
  display: flex;
}

.row.pb-5 .col-md-6 .card {
  display: flex;
  flex-direction: column;
}

.row.pb-5 .col-md-6 .card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.row.pb-5 .col-md-6 .card .card-body .card-text {
  flex: 1;
}