/* TheGlobal skin - same look as the-global.biz, plus phone/tablet layout.
   Everything is scoped to #tg_page / #tg_footer so DNN's own edit UI is not touched. */

body { background: #fff url(../images/top_tail.gif) repeat-x top left; margin: 0; }

#tg_page, #tg_footer {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 13px; line-height: 18px; color: #262626;
}
#tg_page *, #tg_footer * { box-sizing: border-box; }
#tg_page a { color: #5C9E06; text-decoration: none; }
#tg_page a:hover { text-decoration: underline; }
#tg_page img { max-width: 100%; height: auto; }

.tg-wrap { width: 950px; max-width: 100%; margin: 0 auto; }

/* ===== HEADER ===== */
#tg_header { position: relative; display: flex; justify-content: space-between; align-items: flex-start; min-height: 149px; }
.tg-header-left { padding: 26px 0 0 20px; display: flex; align-items: flex-start; }
.tg-logo { display: block; flex: 0 0 auto; }
.tg-logo img { display: block; width: 325px; height: auto; }
.tg-slogan { font-family: "Lato", "Trebuchet MS", Arial, sans-serif; font-weight: 900; font-size: 14px; color: #262626; padding: 4px 0 0 20px; }
.tg-header-right { padding-top: 58px; text-align: right; white-space: nowrap; }
.tg-welcome { margin-right: 3px; }

/* ===== MENU ===== */
#tg_menu { position: relative; z-index: 50; background: #eee; }
#tg_menu_toggle { display: none; }
#tg_menu ul.tg-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
#tg_menu ul.tg-menu > li { position: relative; margin: 0; padding: 0; list-style: none; }
#tg_menu ul.tg-menu > li > a,
#tg_menu ul.tg-menu > li > span {
  display: block; height: 50px; line-height: 50px; padding: 0 19px;
  font-size: 12px; font-weight: bold; text-transform: uppercase; color: #000; background: #eee; text-decoration: none;
}
#tg_menu ul.tg-menu > li.parent > a { padding-right: 24px; background: #eee url(../images/arrow_down.png) no-repeat right 4px center; }
#tg_menu ul.tg-menu > li > a:hover,
#tg_menu ul.tg-menu > li.active > a,
#tg_menu ul.tg-menu > li:hover > a { background-color: #1b1b1b; color: #fff; text-decoration: none; }
#tg_menu .tg-sub-toggle { display: none; }
#tg_menu ul.tg-menu ul { display: none; position: absolute; top: 50px; left: 0; margin: 0; padding: 0; list-style: none; background: #eee; min-width: 180px; }
#tg_menu ul.tg-menu li:hover > ul { display: block; }
#tg_menu ul.tg-menu ul li { margin: 0; list-style: none; }
#tg_menu ul.tg-menu ul li a { display: block; padding: 6px 20px; min-height: 30px; color: #000; border-bottom: 1px solid #d6d6d6; white-space: nowrap; text-decoration: none; }
#tg_menu ul.tg-menu ul li a:hover,
#tg_menu ul.tg-menu ul li.active a { background: #1b1b1b; color: #fff; }

/* ===== SLIDER (950 x 320 banners, arrows bottom-left like the original) ===== */
#tg_slider { position: relative; overflow: hidden; aspect-ratio: 950 / 320; background: #e98b11; }
#tg_slider ul { list-style: none; margin: 0; padding: 0; }
#tg_slider .tg-track { display: flex; height: 100%; transition: transform .6s ease; }
#tg_slider .tg-slide { flex: 0 0 100%; height: 100%; }
#tg_slider .tg-slide img, #tg_slider .tg-slide a { display: block; width: 100%; height: 100%; object-fit: cover; }
#tg_slider .tg-default-slides { display: none; }
#tg_slider .tg-arrow { position: absolute; top: 50%; width: 35px; height: 35px; border: 0; padding: 0; cursor: pointer;
  background: url(../images/slider-arrows.jpg) no-repeat; text-indent: -9999px; overflow: hidden; }
#tg_slider .tg-prev { left: 0; background-position: left top; }
#tg_slider .tg-next { left: 35px; background-position: right top; }
#tg_slider .tg-prev:hover { background-position: left -35px; }
#tg_slider .tg-next:hover { background-position: right -35px; }
#tg_page:not(.tg-home) #tg_slider { display: none; }

/* ===== TOP BLOCKS ===== */
#tg_topblocks { display: flex; border-bottom: 4px solid #cfcfcf; color: #9f9f9f; }
.tg-topblocks-pane { flex: 0 0 649px; background: #1b1b1b; padding: 15px 23px 23px; min-height: 197px; }
.tg-topright-pane { flex: 1 1 auto; background: #AFBF39; color: #000; padding: 15px 23px 23px; min-height: 197px; }
.tg-topright-pane p { font-weight: bold; margin: 0 0 2px; }
#tg_topblocks h3 { color: #fff; font-weight: bold; font-size: 20px; line-height: 24px; margin: 18px 0 10px; }
.tg-blocks { display: flex; }
.tg-blocks .item { flex: 1 1 0; padding: 0 18px; }
.tg-blocks .item p { margin: 0 0 2px; }
#tg_topblocks a.readmore { display: block; text-align: right; font-size: 12px; color: #fff; text-transform: uppercase; font-weight: bold; text-decoration: none; }
#tg_topblocks a.readmore:hover { color: #9e9e9e; }
.tg-topright-pane a.readmore:hover { color: #facb86 !important; }

/* ===== MAIN ===== */
#tg_main { display: flex; align-items: flex-start; padding-bottom: 60px; }
.tg-home .tg-content { flex: 0 0 650px; padding: 5px 20px; }
.tg-home .tg-right { flex: 0 0 300px; min-width: 0; }
.tg-inner #tg_main { flex-direction: row-reverse; justify-content: flex-end; }
.tg-inner .tg-content { flex: 0 0 750px; padding: 5px 20px; }
.tg-inner .tg-right { flex: 0 0 200px; }
.tg-content p { margin: 1em 0; }
.tg-content h1 { font-size: 20px; color: #000; margin: 23px 0 0; }
.tg-content h2 { font-size: 19.5px; line-height: 1.25; color: #262626; font-weight: bold; margin: .75em 0; }
.tg-content h3 { font-size: 15px; margin: .83em 0; }
.tg-content ul { padding-left: 20px; }
.tg-content ul li { list-style: disc; }
.tg-content table { border-collapse: collapse; max-width: 100%; }

/* Right column boxes */
.tg-box h3, .tg-right h3 { color: #000; font-size: 20px; line-height: 24px; margin: 23px 0 10px; font-weight: bold; }
.tg-box .tg-box-body { border: 1px solid #cfcfcf; padding: 10px 12px; }
.tg-right ul { list-style: none; margin: 10px 0 0; padding: 0; }
.tg-right ul li { list-style: none; }

/* Buttons and inputs like the original */
#tg_page input[type=text], #tg_page input[type=email], #tg_page input[type=password], #tg_page textarea, #tg_page select {
  font-family: inherit; font-size: 13px; border: 1px solid #d3d3d3; padding: 2px 8px; color: #3d3d3d; max-width: 100%;
}
#tg_page input[type=text], #tg_page input[type=email], #tg_page input[type=password] { height: 26px; }
#tg_page .tg-button, #tg_page input[type=submit], #tg_page .dnnPrimaryAction {
  display: inline-block; background: #AFBF39; color: #fff !important; border: 0; border-bottom: 2px solid #AFBF39; border-radius: 0;
  font-size: 12px; height: 27px; line-height: 25px; padding: 0 6px; text-transform: uppercase; font-weight: bold; cursor: pointer; text-decoration: none !important; box-shadow: none; text-shadow: none;
}
#tg_page .tg-button:hover, #tg_page input[type=submit]:hover, #tg_page .dnnPrimaryAction:hover { background: #b8b8b8; border-bottom-color: #b8b8b8; }

/* Announcements ticker */
.tg-ticker { height: 80px; overflow: hidden; position: relative; }
.tg-ticker ul { margin: 0; padding: 0; animation: tgTicker 14s linear infinite; }
.tg-ticker:hover ul { animation-play-state: paused; }
@keyframes tgTicker { from { transform: translateY(80px); } to { transform: translateY(-100%); } }
.tg-ticker li a { font-weight: bold; }

/* ===== FOOTER ===== */
#tg_footer { background: #f1f1f1; clear: both; }
.tg-footer-inner { width: 950px; max-width: 100%; margin: 0 auto; min-height: 80px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 10px; padding: 16px 20px;
  color: #6d6d6d; text-transform: uppercase; }
#tg_footer a { color: #6d6d6d; text-decoration: none; margin: 0 4px; }
#tg_footer a:hover { text-decoration: underline; }
#tg_footer p { margin: 0; }

/* ===== DNN edit mode: show panes so modules can be dropped ===== */
.dnnEditState #tg_page .DNNEmptyPane { min-height: 60px; outline: 1px dashed #999; }
.dnnEditState #tg_page .tg-sliderpane { outline: 1px dashed #e98b11; min-height: 60px; }
.dnnEditState #tg_slider { display: none; }

/* ======================================================================
   TABLET (up to 980px): page fills the screen
   ====================================================================== */
@media (max-width: 980px) {
  .tg-wrap { width: 100%; }
  .tg-topblocks-pane { flex: 1 1 66%; }
  .tg-topright-pane { flex: 1 1 34%; }
  .tg-home .tg-content, .tg-inner .tg-content { flex: 1 1 auto; min-width: 0; }
  .tg-home .tg-right { flex: 0 0 280px; padding-right: 12px; }
  .tg-inner .tg-right { flex: 0 0 0; }
  .tg-inner .tg-right.DNNEmptyPane { display: none; }
  #tg_menu ul.tg-menu > li > a { padding: 0 12px; }
}

/* ======================================================================
   PHONE (up to 767px)
   ====================================================================== */
@media (max-width: 767px) {
  #tg_header { flex-direction: column; min-height: 0; padding: 0 16px 12px; }
  .tg-header-left { padding: 18px 0 0; flex-direction: column; align-items: center; width: 100%; }
  .tg-logo img { width: 240px; }
  .tg-slogan { padding: 8px 0 0; text-align: center; }
  .tg-header-right { position: absolute; top: 8px; right: 12px; padding: 0; font-size: 12px; }

  #tg_menu_toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 46px; padding: 0 16px; border: 0; background: #1b1b1b; cursor: pointer; }
  #tg_menu_toggle span { display: block; width: 24px; height: 3px; background: #fff; }
  #tg_menu ul.tg-menu { display: none; flex-direction: column; }
  #tg_menu.open ul.tg-menu { display: flex; }
  #tg_menu ul.tg-menu > li > a, #tg_menu ul.tg-menu > li > span { height: auto; line-height: 20px; padding: 13px 16px; border-bottom: 1px solid #d6d6d6; }
  #tg_menu ul.tg-menu > li.parent > a { background-image: none; padding-right: 56px; }
  #tg_menu .tg-sub-toggle { display: block; position: absolute; top: 0; right: 0; width: 50px; height: 47px; border: 0; border-left: 1px solid #d6d6d6;
    background: transparent url(../images/arrow_down.png) no-repeat center; cursor: pointer; }
  #tg_menu ul.tg-menu ul { position: static; min-width: 0; display: none; }
  #tg_menu ul.tg-menu li:hover > ul { display: none; }
  #tg_menu ul.tg-menu li.sub-open > ul { display: block; }
  #tg_menu ul.tg-menu ul li a { padding: 11px 16px 11px 32px; white-space: normal; }

  #tg_slider .tg-arrow { top: auto; bottom: 0; }
  #tg_slider .tg-arrow { display: none; }   /* phones: swipe instead, so the arrows never cover the banner text */
  .tg-topblocks-pane { color: #c8c8c8; }

  #tg_topblocks { flex-direction: column; }
  .tg-topblocks-pane, .tg-topright-pane { flex: 1 1 auto; min-height: 0; padding: 4px 16px 18px; }
  .tg-blocks { flex-direction: column; }
  .tg-blocks .item { padding: 0 0 6px; }

  #tg_main, .tg-inner #tg_main { flex-direction: column; }
  .tg-home .tg-content, .tg-inner .tg-content { flex: 1 1 auto; width: 100%; padding: 4px 16px; }
  .tg-home .tg-right, .tg-inner .tg-right { flex: 1 1 auto; width: 100%; padding: 0 16px; }
  .tg-content img[style*="float"] { float: none !important; display: block; margin: 10px auto !important; }
  .tg-content table, .tg-content table tbody, .tg-content table tr, .tg-content table td { display: block; width: 100% !important; }
  .tg-content p span[style*="x-large"] { font-size: 22px !important; line-height: 1.25; }

  .tg-footer-inner { flex-direction: column; text-align: center; font-size: 12px; line-height: 20px; }
}

/* Forms (contact + newsletter) */
.tg-form .tg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#tg_page .tg-form input[type=text], #tg_page .tg-form input[type=email], #tg_page .tg-form textarea { width: 100%; max-width: 420px; }
#tg_page .tg-right .tg-form input[type=email] { max-width: 100%; }
.tg-form textarea { height: auto; padding: 6px 8px; }
.tg-status.ok { color: #5C9E06; font-weight: bold; }
.tg-status.err { color: #b00; font-weight: bold; }

/* Page never wider than the screen (stops the browser shifting the page sideways) */
#tg_page { overflow-x: clip; }

/* ===== DNN "Account Login" module inside the right column: stacked like the original ===== */
#tg_page .tg-right .dnnForm { min-width: 0 !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; float: none !important; }
#tg_page .tg-right .dnnFormItem { display: block !important; width: 100% !important; margin: 0 0 10px !important; padding: 0 !important; float: none !important; clear: both; text-align: left !important; }
#tg_page .tg-right .dnnFormItem .dnnLabel,
#tg_page .tg-right .dnnFormItem > label { display: block !important; float: none !important; width: auto !important; text-align: left !important; margin: 0 0 3px !important; padding: 0 !important; }
#tg_page .tg-right .dnnFormItem .dnnLabel label { font-weight: normal; }
#tg_page .tg-right .dnnFormItem > span.dnnFormLabel { display: none !important; }
#tg_page .tg-right .dnnFormHelp, #tg_page .tg-right .dnnTooltip { display: none !important; }
#tg_page .tg-right .dnnFormItem input[type=text],
#tg_page .tg-right .dnnFormItem input[type=password] { display: block; width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0 !important; box-sizing: border-box; }
#tg_page .tg-right .dnnLoginRememberMe { display: flex; align-items: center; gap: 6px; margin: 0 !important; padding: 0 !important; float: none !important; width: auto !important; }
#tg_page .tg-right .dnnLoginRememberMe label, #tg_page .tg-right .dnnLoginRememberMe span { display: inline !important; float: none !important; width: auto !important; margin: 0 !important; }
#tg_page .tg-right a[id$="cancelLink"] { display: none !important; }
#tg_page .tg-right .dnnSecondaryAction { background: none !important; border: 0 !important; box-shadow: none !important; text-shadow: none !important; padding: 0 !important;
  color: #5C9E06 !important; font-weight: normal !important; font-size: 13px !important; text-transform: none !important; min-width: 0 !important; height: auto !important; line-height: 20px !important; }
#tg_page .tg-right .dnnSecondaryAction:hover { text-decoration: underline !important; }
#tg_page .tg-right .dnnLoginActions, #tg_page .tg-right ul.dnnActions { margin: 4px 0 0 !important; padding: 0 !important; float: none !important; width: auto !important; }
#tg_page .tg-right ul.dnnActions li { display: block !important; float: none !important; margin: 0 0 2px !important; padding: 0 !important; }

#tg_page .tg-right .tg-form input[type=email] { width: 100% !important; }

/* ===== 1.0.2: language dropdown (Google Translate) ===== */
.tg-lang { margin-bottom: 6px; }
.tg-lang label { margin-right: 2px; }
#tg_page .tg-lang select { font-size: 12px; height: 22px; padding: 0 2px; border: 1px solid #ccc; color: #262626; }
/* hide Google's own bar and highlight so the page looks unchanged */
body > .skiptranslate, iframe.skiptranslate, .goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ===== 1.0.2: login box like the original (fields stop inside the box) ===== */
#tg_page .tg-right .tg-box-body { overflow: hidden; }
#tg_page .tg-right .tg-box-body * { max-width: 100% !important; box-sizing: border-box !important; }
#tg_page .tg-right .tg-box-body .dnnForm, #tg_page .tg-right .tg-box-body .dnnForm div { width: auto !important; min-width: 0 !important; float: none !important; }
#tg_page .tg-right .dnnFormItem input[type=text],
#tg_page .tg-right .dnnFormItem input[type=password] { width: 90% !important; height: 30px !important; }
#tg_page .tg-right .dnnFormItem:has(.dnnLoginRememberMe) { display: none !important; }
#tg_page .tg-right .dnnFormItem { margin-bottom: 12px !important; }
@media (max-width: 767px) {
  .tg-header-right { text-align: right; }
  .tg-lang { margin-bottom: 2px; }
  .tg-logo { margin-top: 26px; }
}
#tg_page .tg-right ul.dnnActions { display: flex !important; flex-direction: column-reverse; }   /* "Forgot your password?" first, like the original */

/* ===== 1.0.3: compact login box like the original, no empty gaps ===== */
#tg_page .tg-right .tg-box-body .dnnForm,
#tg_page .tg-right .tg-box-body .dnnForm div { width: 100% !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
#tg_page .tg-right .dnnFormItem { margin: 0 0 12px !important; padding: 0 !important; }
#tg_page .tg-right .dnnFormItem:not(:has(input:not([type=hidden]), a, select, button, textarea)) { display: none !important; }  /* DNN's empty rows */
#tg_page .tg-right .tg-box-body div:empty, #tg_page .tg-right .tg-box-body .dnnClear:empty { display: none !important; }
#tg_page .tg-right .dnnFormItem input[type=text],
#tg_page .tg-right .dnnFormItem input[type=password] { width: 87% !important; height: 30px !important; }
#tg_page .tg-right .dnnLoginActions, #tg_page .tg-right ul.dnnActions { margin: 0 !important; }
#tg_page .tg-right ul.dnnActions li { margin: 0 !important; line-height: 22px; }
#tg_page .tg-right .tg-box-body > :last-child,
#tg_page .tg-right .tg-box-body .dnnForm > :last-child { margin-bottom: 0 !important; }
#tg_page .tg-right .tg-box-bordered .tg-box-body { padding: 14px 12px 12px; }
/* Announcements + Newsletter: no border, like the original (only the login box has one) */
#tg_page .tg-right .tg-box:not(.tg-box-bordered) .tg-box-body { border: 0; padding: 0; }
.tg-ticker { height: 80px; }
#tg_page .tg-right .tg-box-body .dnnForm div.dnnFormItem { margin: 0 0 12px !important; }
#tg_page .tg-right .tg-box-body .dnnForm div.dnnFormItem .dnnLabel { margin: 0 0 4px !important; }
#tg_page .tg-right .tg-box-body .dnnForm > div.dnnFormItem:last-of-type { margin-bottom: 0 !important; }
