/* ================================================================
   Header Navigation — Bold & Size
   Activities / Join / Members / News / Events
   Applied globally across all pages (AM / EN / RU)
   ================================================================ */

/* Desktop nav (visible ≥960px inside .menu_inner) */
.header .menu_inner > .menu_list > li > a {
  font-family: CormorantBold, GAAGayane-Bold, montserratarm-bold, montserrat-bold !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

/* Mobile nav (visible <960px inside .menu_block) */
@media screen and (max-width: 959px) {
  .header .menu_block .menu_list > li > a {
    font-family: CormorantBold, GAAGayane-Bold, montserratarm-bold, montserrat-bold !important;
    font-size: 17px !important;
    font-weight: 700 !important;
  }
}

/* ================================================================
   "About" dropdown — full restyle (AM / RU / EN)
   Selectors target .header .second_menu .submenu_list so they only
   affect the "About" popup, not the main-nav submenus.
   ================================================================ */

/* ── Desktop popup box ──────────────────────────────────────────── */
@media screen and (min-width: 960px) {
  /* Container */
  .header .second_menu .submenu_list {
    min-width: 280px !important;
    max-width: none  !important;
    width: max-content !important;
    padding-left:  24px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }

  /* Items */
  .header .second_menu .submenu_list li {
    display: block !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
  }
  .header .second_menu .submenu_list li:last-child {
    margin-bottom: 0 !important;
  }

  /* Links — full-width for easier hover hit area */
  .header .second_menu .submenu_list a {
    display: block !important;
    white-space: nowrap !important;
  }
}

/* ── Mobile (left sliding panel) ────────────────────────────────── */
@media screen and (max-width: 959px) {
  /* Override the built-in 92.3% shrink */
  .header .second_menu .submenu_list {
    font-size: 120% !important;
    padding-left:  24px !important;
    padding-right: 16px !important;
  }

  .header .second_menu .submenu_list li {
    display: block !important;
    padding: 6px 0 !important;
    margin-bottom: 4px !important;
  }
  .header .second_menu .submenu_list li:last-child {
    margin-bottom: 0 !important;
  }

  .header .second_menu .submenu_list a {
    display: block !important;
  }
}

/* ================================================================
   Global mobile polish — all pages that load header-nav.css
   ================================================================ */

@media screen and (max-width: 959px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .page_container,
  .content {
    max-width: 100%;
    box-sizing: border-box;
  }

  img,
  video,
  canvas {
    max-width: 100%;
    height: auto;
  }

  .header {
    box-sizing: border-box;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  .header .main_logo img {
    max-height: 46px;
    width: auto;
    max-width: min(200px, 46vw);
    object-fit: contain;
    display: block;
  }

  .header_org_name {
    min-width: 0;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  iframe {
    max-width: 100%;
  }

  pre {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .inner_content_section,
  .inner_content,
  .standard_text {
    max-width: 100%;
    min-width: 0;
  }

  /* Wide tables: scroll horizontally inside section */
  .inner_content_section .page_row,
  .inner_content .page_row,
  .inner_content .content_row,
  .publication_details {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* iOS Safari: մուտքի դաշտեր focus — առանց zoom */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .hero_inner p {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .section_head {
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
  }

  .section_head .view_all_link {
    width: 100%;
    margin-top: 4px;
  }
}

@media screen and (max-width: 600px) {
  .council_grid,
  .executive_grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .council_member_card,
  .executive_member_card {
    padding: 20px 16px !important;
  }

  .page_main_title {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .page_title h1 {
    font-size: clamp(1.2rem, 6vw, 1.65rem) !important;
    overflow-wrap: anywhere;
  }

  .listing_head .section_title,
  .page_head .section_title {
    font-size: clamp(1.05rem, 4.8vw, 1.45rem) !important;
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 480px) {
  .hero_dots {
    bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 92vw;
  }
}

/* ================================================================
   Mobile header: org name fully visible (RU / EN / AM)
   Centered text in a narrow grid cell overflowed left under
   .main_logo (z-index: 100), so the start of each line looked “cut off”.
   ================================================================ */
@supports selector(:has(*)) {
  @media screen and (max-width: 767px) {
    .header_main:has(.header_org_name) {
      display: grid !important;
      grid-template-columns: minmax(52px, 60px) minmax(0, 1fr) auto !important;
      grid-template-areas: "logo title actions" !important;
      align-items: center !important;
      column-gap: 8px !important;
      row-gap: 2px !important;
      min-height: 0 !important;
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
    }

    .header_main:has(.header_org_name) > .main_logo {
      grid-area: logo !important;
      align-self: center !important;
      margin: 0 !important;
      padding-right: 2px !important;
      overflow: visible !important;
      z-index: 1 !important;
      height: auto !important;
      max-height: none !important;
    }

    .header_main:has(.header_org_name) > .main_logo img {
      width: 54px !important;
      height: 54px !important;
      min-width: 54px !important;
      min-height: 54px !important;
      max-width: 54px !important;
      max-height: 54px !important;
      object-fit: contain !important;
      border-radius: 50% !important;
      display: block !important;
    }

    .header_main:has(.header_org_name) > .header_org_name {
      grid-area: title !important;
      justify-self: stretch !important;
      align-self: center !important;
      text-align: left !important;
      margin: 0 !important;
      padding: 2px 2px 2px 0 !important;
      min-width: 0 !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
      position: relative !important;
      z-index: 2 !important;
      overflow: visible !important;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      hyphens: auto !important;
      -webkit-hyphens: auto !important;
      font-size: clamp(11px, 3.2vw, 14px) !important;
      line-height: 1.22 !important;
      font-weight: 600 !important;
    }

    .header_main:has(.header_org_name) > .header_actions {
      grid-area: actions !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      flex-wrap: nowrap !important;
      gap: 2px !important;
      min-width: 0 !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
  }
}
