/*
Theme Name:   Zox News Child
Theme URI:    https://themeforest.net/user/mvpthemes/
Description:  Zox News Child Theme - Thaiger header for chiangraitimes.com/th/
Author:       MVP Themes
Author URI:   https://themeforest.net/user/mvpthemes/portfolio
Template:     zox-news
Version:      1.5.0
License:      GNU General Public License v3 or later
License URI:  http://www.gnu.org/licenses/gpl-3.0.html
Tags:         two-columns, custom-background, custom-colors, custom-menu, featured-images, theme-options, threaded-comments, translation-ready
Text Domain:  zox-news-child
*/

/* ===== Thaiger-style header (top bar + main nav) ===== */
#crt-thaiger-header { display: block !important; visibility: visible !important; width: 100%; position: relative; z-index: 1000; background: #fff; }
.crt-topbar-utility { background: #fff !important; color: #333; font-size: 14px; border-bottom: 1px solid #e5e7eb; }
.crt-topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 8px 0; gap: 16px; max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.crt-breaking-label { background: #dc2626; color: #fff !important; padding: 4px 10px; font-weight: 700; white-space: nowrap; }
.crt-breaking-wrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.crt-breaking-box { flex: 1; min-width: 0; overflow: hidden; }
.crt-breaking-typing-wrap { min-height: 1.5em; display: flex; align-items: center; }
.crt-breaking-typing-line { flex: 1; min-width: 0; }
.crt-breaking-typing-line .crt-breaking-link { color: #111; text-decoration: none; font-weight: 600; }
.crt-breaking-typed { display: inline; }
.crt-breaking-cursor { display: inline-block; animation: crt-cursor-blink 1s step-end infinite; color: #dc2626; margin-left: 2px; }
@keyframes crt-cursor-blink { 50% { opacity: 0; } }
.crt-ticker-nav { background: #e5e7eb; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 18px; line-height: 1; color: #374151; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.crt-ticker-nav:hover { background: #d1d5db; color: #111; }
.crt-topbar-right { display: flex; align-items: center; gap: 16px; }
.crt-flags { display: flex; gap: 6px; }
.crt-flag-icon { display: inline-block; width: 22px; height: 16px; background-size: cover; background-position: center; border-radius: 2px; line-height: 0; }
.crt-flag-icon svg { display: block; width: 22px; height: 16px; }
/* British flag: vibrant Union Jack (no border, matches screenshot); full opacity so it’s clearly visible in top header */
.crt-flag-gb { border: none; }
img.crt-flag-gb { background: none !important; display: block; object-fit: cover; }
.crt-topbar-utility .crt-flag-gb { min-width: 22px; min-height: 16px; width: 24px; height: 20px; }
.crt-flag-th { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect fill='%23A51931' width='3' height='2'/%3E%3Crect fill='%23fff' y='0.4' width='3' height='0.2'/%3E%3Crect fill='%230F4DA1' y='0.8' width='3' height='0.4'/%3E%3Crect fill='%23fff' y='1.4' width='3' height='0.2'/%3E%3C/svg%3E"); border: 2px solid #F6A630; }
.crt-weather { display: flex; align-items: center; gap: 6px; color: #374151; }
.crt-weather-icon { font-size: 1.1rem; }
.crt-socials { display: flex; gap: 10px; }
.crt-social-icon { color: #4b5563; display: inline-flex; align-items: center; justify-content: center; }
.crt-social-icon:hover { color: #111; }
.crt-social-icon svg { width: 18px; height: 18px; }
/* Main nav bar: 90px height, logo and nav vertically centered, full-height orange hover. */
.crt-nav-bar { background: #000 !important; color: #fff; }
.crt-nav-bar-inner { display: flex; align-items: stretch; justify-content: space-between; gap: 24px; padding: 0 20px; max-width: 1200px; margin: 0 auto; min-height: 90px; }
.crt-nav-hamburger { display: none; flex-shrink: 0; align-items: center; justify-content: center; padding: 0 16px; cursor: pointer; color: #fff; }
.crt-nav-hamburger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 3px 0; transition: opacity 0.2s; }
.crt-nav-hamburger span:nth-child(4) { display: none; }
.crt-logo { flex-shrink: 0; display: flex; align-items: center; }
.crt-logo-link { display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; font-size: 1.5rem; min-height: 90px; }
.crt-logo-link .crt-logo-img { max-height: 40px; width: auto; display: block; vertical-align: middle; }
.crt-logo-link.crt-logo-text-only { font-weight: 700; }
.crt-primary-nav { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.crt-primary-menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; justify-content: flex-end; }
.crt-primary-menu-list li { margin: 0; padding: 0; position: relative; display: flex; align-items: stretch; }
/* Main menu: full-height (90px) orange hover, no text decoration */
.crt-primary-menu-list > li > a { display: inline-flex; align-items: center; text-decoration: none !important; font-weight: 600; font-size: 0.9rem; padding: 0 14px; white-space: nowrap; border-radius: 0; transition: background 0.2s ease; min-height: 90px; }
.crt-primary-menu-list > li > a:hover { text-decoration: none !important; background: var(--crt-nav-hover-bg, #f97316); color: #fff !important; }
.crt-primary-menu-list > li.menu-item-has-children:hover > a .crt-nav-caret { color: #fff !important; }
/* Drop icon: only for items that have sub-menu (down arrow) */
.crt-nav-caret { display: none; font-size: 0.5em; margin-left: 4px; vertical-align: middle; line-height: 1; }
.crt-primary-menu-list > li.menu-item-has-children > a .crt-nav-caret { display: inline-block; }
.crt-header-search { display: flex; align-items: stretch; flex-shrink: 0; margin-left: 8px; }
.crt-search-toggle { background: transparent; border: none; cursor: pointer; padding: 0 12px; min-height: 90px; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.crt-search-toggle:hover { background: var(--crt-nav-hover-bg, #f97316); }
.crt-search-toggle svg { width: 20px; height: 20px; }
.crt-nav-mobile-right { display: none; flex-shrink: 0; align-items: center; }
.crt-nav-mobile-right .crt-flags { display: flex; gap: 6px; }
.crt-nav-bar .crt-nav-mobile-right .crt-flag { color: #fff; }
.crt-nav-bar .crt-nav-hamburger:hover { background: var(--crt-nav-hover-bg, #f97316); color: #fff; }
/* Sub-menu: hover = 100% width background #F6A630 */
.crt-primary-menu-list .sub-menu { list-style: none; margin: 0; padding: 0; position: absolute; top: 100%; left: 0; background: #222 !important; min-width: 200px; width: 200px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 1000; display: none; border: none; }
.crt-primary-menu-list li.menu-item-has-children:hover > .sub-menu { display: block; }
.crt-primary-menu-list .sub-menu li { margin: 0; }
.crt-primary-menu-list .sub-menu li a { display: flex; align-items: center; justify-content: space-between; width: 100%; box-sizing: border-box; padding: 10px 16px; text-decoration: none !important; font-weight: 600; font-size: 0.9rem; color: #fff !important; transition: background 0.2s ease; position: relative; min-height: 0; }
.crt-primary-menu-list .sub-menu li a:hover { text-decoration: none !important; background: #F6A630 !important; color: #fff !important; }
/* Sub-menu items with children: right-arrow (►) on the right; no orange bar */
.crt-primary-menu-list .sub-menu li.menu-item-has-children > a::after { content: "\25B6"; font-size: 0.65em; opacity: 0.9; margin-left: 8px; }
.crt-primary-menu-list .sub-menu li.menu-item-has-children > a:hover::before { display: none; }
.crt-primary-menu-list .sub-menu li.menu-item-has-children > a .crt-nav-caret { display: none; }
/* Nested sub-menu: second level has down-caret; third level opens to the right with right-arrow */
.crt-primary-menu-list .sub-menu li.menu-item-has-children > a .crt-nav-caret { display: none; }
.crt-primary-menu-list .sub-menu .sub-menu { top: 0; left: 100%; margin-left: 0; min-width: 200px; width: 200px; }
.crt-primary-menu-list .sub-menu li.menu-item-has-children { position: relative; }
.crt-primary-menu-list .sub-menu li.menu-item-has-children:hover > .sub-menu { display: block; }
/* Mobile and tablet: hide top header; single bar = hamburger | logo (centered) | flags */
@media (max-width: 1024px) {
    .crt-topbar-utility { display: none !important; }
    .crt-nav-bar-inner { min-height: 90px; align-items: center; }
    .crt-nav-hamburger { display: flex !important; align-items: center; justify-content: center; min-height: 0; padding: 0 16px; }
    .crt-nav-bar .crt-nav-hamburger:hover { background: transparent !important; }
    .crt-logo { flex: 1; justify-content: center; display: flex; align-items: center; }
    .crt-logo-link { min-height: 90px; display: inline-flex; align-items: center; }
    .crt-primary-nav { display: none !important; }
    .crt-header-search { display: none !important; }
    .crt-nav-mobile-right { display: flex !important; align-items: center; }
    /* UK flag visible on mobile: force size and background */
    .crt-nav-mobile-right .crt-flag-icon { width: 24px; height: 18px; min-width: 24px; min-height: 18px; }
}
@media (max-width: 768px) {
    .crt-nav-bar-inner { flex-wrap: nowrap; padding: 0 16px; }
}