/* ==========================================================================
   WomensITI Global Responsive & 3-Dot Navigation Styles
   ========================================================================== */

/* ── Global Resets for Responsive Layout ────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
}

/* Ensure images never cause horizontal overflow */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* ── Top Utility Bar Responsive ────────────────────────────────────────── */
#top-nav-relative,
#top-nav {
  width: 100%;
  position: relative !important;
  z-index: 999;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
}

#top-nav>div,
#top-nav-relative>div {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

#top-nav .flex.h-11,
#top-nav-relative .flex.h-11,
#top-nav [class*="h-11"],
#top-nav-relative [class*="h-11"] {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 42px !important;
  height: auto !important;
  padding: 4px 0 !important;
}

#custom_language_selector {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0 !important;
  font-size: 13px !important;
  height: 32px !important;
  padding: 0 28px 0 12px !important;
  border-radius: 9999px !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  cursor: pointer !important;
}

/* ── Phone Number: Visible on Normal/Desktop Screens, Hidden on Small Screens ── */
#top-nav a[href^="tel:"],
#top-nav-relative a[href^="tel:"] {
  display: inline-flex !important;
}

@media (max-width: 768px) {
  #top-nav a[href^="tel:"],
  #top-nav-relative a[href^="tel:"],
  .top-nav-phone {
    display: none !important;
  }

  #top-nav>div,
  #top-nav-relative>div {
    padding: 0 8px !important;
  }

  #top-nav a,
  #top-nav-relative a {
    font-size: 11.5px !important;
    padding: 4px 8px !important;
  }
}

/* ── Main Institute Header Responsive ─────────────────────────────────── */
.site-header-container {
  max-width: 1550px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.site-header-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 500px;
}

.site-header-text {
  min-width: 0;
}

.site-header-title {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 26px);
  font-weight: 400;
  color: #1a2d5a;
  font-family: 'Barlow Condensed', Arial, sans-serif;
  line-height: 1.2;
  letter-spacing: 0.5px;
  word-break: break-word;
}

.site-header-sub {
  margin: 2px 0 0;
  font-size: clamp(12px, 1.3vw, 15px);
  color: #f47920;
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.site-header-badge {
  margin: 4px 0 0;
  font-size: clamp(10px, 1.1vw, 13px);
  color: #fff;
  background: #0b9444;
  display: inline-block;
  padding: 2px 10px 3px 10px;
  letter-spacing: 2px;
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 2px;
}

.site-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .site-header-container {
    padding: 10px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .site-header-branding {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .site-header-search {
    margin-left: 0;
    width: 100%;
  }

  .site-header-search input {
    flex: 1;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  .site-header-branding img {
    height: 50px !important;
  }

  .site-header-branding .divider-line {
    height: 50px !important;
  }
}

/* ── Orange Navigation Bar (Desktop vs Mobile 3-Dot) ─────────────────── */
.main-orange-nav {
  background: #f47920;
  padding: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 998;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  width: 100%;
}

/* Desktop Horizontal Menu */
.desktop-nav-container {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0 10px;
  height: 48px;
}

/* Mobile 3-Dot Bar */
.mobile-nav-bar {
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
  height: 46px;
  width: 100%;
  background: #f47920;
  box-sizing: border-box;
}

/* 3-Dot Button */
.dots-menu-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.dots-menu-btn:hover,
.dots-menu-btn:focus {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.dots-menu-btn .dot {
  width: 5px;
  height: 5px;
  background-color: #fff;
  border-radius: 50%;
  display: block;
}

@media (max-width: 1023px) {
  .desktop-nav-container {
    display: none !important;
  }

  .mobile-nav-bar {
    display: flex !important;
  }
}

/* ── Mobile Off-Canvas Slide-In Drawer ───────────────────────────────── */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  z-index: 9999;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.25);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  background: #f47920;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.drawer-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
}

.drawer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-nav-item {
  border-bottom: 1px solid #f1f5f9;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  color: #1a2d5a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  font-family: Arial, sans-serif;
  transition: background-color 0.15s, color 0.15s;
}

.drawer-nav-link:hover,
.drawer-nav-link:active {
  background-color: #fff7ed;
  color: #f47920;
}

.drawer-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  color: #1a2d5a;
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: Arial, sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}

.drawer-accordion-btn:hover {
  background-color: #fff7ed;
  color: #f47920;
}

.drawer-chevron {
  font-size: 11px;
  transition: transform 0.25s ease;
  color: #94a3b8;
}

.drawer-accordion-btn.expanded .drawer-chevron {
  transform: rotate(180deg);
  color: #f47920;
}

.drawer-submenu {
  display: none;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.drawer-submenu.open {
  display: block;
}

.drawer-sub-link {
  display: block;
  padding: 10px 20px 10px 32px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #edf2f7;
  transition: background-color 0.15s, color 0.15s, padding-left 0.15s;
}

.drawer-sub-link:hover {
  background-color: #fff7ed;
  color: #f47920;
  padding-left: 36px;
}

.drawer-nested-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 10px 32px;
  color: #475569;
  background: transparent;
  border: none;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.drawer-nested-btn.expanded .drawer-chevron {
  transform: rotate(180deg);
  color: #f47920;
}

.drawer-nested-menu {
  display: none;
  background: #f1f5f9;
}

.drawer-nested-menu.open {
  display: block;
}

.drawer-nested-link {
  display: block;
  padding: 9px 20px 9px 44px;
  color: #64748b;
  text-decoration: none;
  font-size: 13.5px;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.15s, color 0.15s;
}

.drawer-nested-link:hover {
  background-color: #ffedd5;
  color: #f47920;
}

.drawer-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.drawer-contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.drawer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.drawer-contact-item:hover {
  color: #f47920;
}

/* ── Page Banner Section Responsive ──────────────────────────────────── */
.page-banner-section {
  position: relative;
  width: 100%;
  min-height: 140px;
  height: 200px;
  overflow: hidden;
  border-bottom: 3px solid #f47920;
}

.page-banner-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-banner-title {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(22px, 5vw, 52px);
  font-weight: 700;
  color: #f5e100;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  line-height: 1.25;
  word-break: break-word;
}

/* ── Responsive Table Wrapper ────────────────────────────────────────── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.table-responsive table {
  min-width: 600px;
  width: 100%;
}

/* ── Homepage 3-Column Section Responsive ────────────────────────────── */
.three-column-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  background: #fff;
  min-height: 450px;
  border-bottom: 2px solid #eee;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .three-column-section {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .three-column-section>aside {
    width: 100% !important;
    min-width: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #e8e8e8 !important;
    padding: 20px 24px !important;
  }

  .three-column-section>main {
    width: 100% !important;
    border-bottom: 1px solid #e8e8e8 !important;
    padding: 24px 20px !important;
  }
}

/* ── Windmill Mission Banner Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .mission-banner-section {
    height: auto !important;
    min-height: 220px !important;
    padding: 24px 16px !important;
  }

  .mission-banner-row {
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px !important;
  }

  .mission-banner-row img {
    height: 70px !important;
  }
}

/* ── Admin Dashboard Mobile Drawer & Responsiveness ──────────────────── */
.admin-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #ffffff;
  z-index: 9999;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.admin-mobile-sidebar.open {
  transform: translateX(0);
}

/* ── Admin Logo Sizing Constraints ───────────────────────────────────── */
.admin-header-logo,
header img[src*="itilogo.png"],
.admin-mobile-sidebar img[src*="itilogo.png"] {
  height: 38px !important;
  max-height: 38px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

@media (max-width: 640px) {

  .admin-header-logo,
  header img[src*="itilogo.png"] {
    height: 32px !important;
    max-height: 32px !important;
    max-width: 130px !important;
  }
}

.admin-login-logo {
  height: 60px !important;
  max-height: 60px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
}

@media (min-width: 640px) {
  .admin-login-logo {
    height: 75px !important;
    max-height: 75px !important;
    max-width: 260px !important;
  }
}

/* ── Top Bar Single Line Alignment ───────────────────────────────────── */
#top-nav .flex.h-11,
#top-nav-relative .flex.h-11,
#top-nav [class*="h-11"],
#top-nav-relative [class*="h-11"] {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: nowrap !important;
}

#top-nav .flex-wrap,
#top-nav-relative .flex-wrap {
  flex-wrap: nowrap !important;
}

#top-nav a,
#top-nav button,
#top-nav select,
#top-nav-relative a,
#top-nav-relative button,
#top-nav-relative select {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ── Admin Feedback Master-Detail Responsive Styles ──────────────────── */
@media (max-width: 767px) {
  .admin-two-pane {
    height: auto !important;
    min-height: calc(100vh - 180px) !important;
    flex-direction: column !important;
  }

  .admin-pane-list {
    width: 100% !important;
    min-height: 400px;
  }

  .admin-pane-detail {
    width: 100% !important;
    min-height: 480px;
  }
}

/* ── Admin Table Responsive Helpers ──────────────────────────────────── */
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table-wrap table {
  min-width: 540px;
}

/* Custom smooth scrollbar for admin panels */
.admin-table-wrap::-webkit-scrollbar,
#feedbackList::-webkit-scrollbar,
#notificationsContainer::-webkit-scrollbar,
#resultsContainer::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.admin-table-wrap::-webkit-scrollbar-thumb,
#feedbackList::-webkit-scrollbar-thumb,
#notificationsContainer::-webkit-scrollbar-thumb,
#resultsContainer::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.admin-table-wrap::-webkit-scrollbar-thumb:hover,
#feedbackList::-webkit-scrollbar-thumb:hover,
#notificationsContainer::-webkit-scrollbar-thumb:hover,
#resultsContainer::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}