/*
 Theme Name:   Weave Asia - GeneratePress Child Theme
 Theme URI:    https://weave.asia/
 Description:  Custom GeneratePress child theme developed by Weave Asia.
 Author:       Weave Asia
 Author URI:   https://weave.asia/
 Template:     generatepress
 Version:      0.1
*/ 

body {
    padding: 0;
    margin: 0;
    font-size: 18px; /* Set a base font size */
    overflow-x: hidden; /* Hide horizontal scrollbar */
}

h1, h2, h3, h4, p {
	margin-bottom: 0;
}

html {
  scroll-behavior: smooth; /* enable smooth scroll globally */
}

/* Offset for the "development" section */
#development {
  scroll-margin-top: 50px; /* adjust to match your fixed header height */
}

#deep {
  scroll-margin-top: 100px; /* adjust to match your fixed header height */
}

#intellectual {
  scroll-margin-top: 100px; /* adjust to match your fixed header height */
}

#development-zh {
  scroll-margin-top: 70px; /* adjust to match your fixed header height */
}

#deep-zh {
  scroll-margin-top: 100px; /* adjust to match your fixed header height */
}

#intellectual-zh {
  scroll-margin-top: 100px; /* adjust to match your fixed header height */
}

/* Frosted background for sticky menu */
#sticky-navigation.stuckElement {
    background: rgba(255, 255, 255, 0.7); /* semi-transparent white */
    backdrop-filter: blur(10px);           /* frosted glass blur effect */
    -webkit-backdrop-filter: blur(10px);   /* Safari support */
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* Only for sticky menu */
#sticky-navigation.stuckElement #primary-menu a::after {
    bottom: 0px !important;
}


/* Only hide the featured image container on Chinese pages */
html[lang="zh-hant"] .featured-image.page-header-image.grid-container.grid-parent {
    display: none !important;
}

html[lang="zh-hant"] div#primary-menu {
    font-family: 'KaiTi', serif;
}

html[lang="zh-hant"] h1.gb-text.gb-text-3038872c {
    font-family: 'KaiTi', serif;
} 

html[lang="zh-hant"] .slideout-navigation a {
    /* Example styles for Chinese menu links */
    font-family: "KaiTi";  /* Chinese font */
    font-weight: 400;      /* optional */
    text-decoration: none; /* optional */
}

/* WPML */
.wpml-ls-statics-shortcode_actions .wpml-ls-current-language > a {
    color: #ffffff;
    background-color: transparent;
}

.wpml-ls-statics-shortcode_actions a {
	background-color: transparent !important;
	font-size: 15px;
	font-family: "Montserrat" !important;
	font-weight: 600;
}

.wpml-ls-legacy-list-horizontal {
    border: none;
    padding: 0px;
}


/* === Header Styles === */
#primary-menu {
	font-family: "Nunito Sans", sans-serif;
	color: #373737;
}

#primary-menu a {
	font-size: 1em;
	font-weight: 400;
	position: relative;
	display: inline-block;
	text-decoration: none;
}

/* underline base */
#primary-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -10px;
	width: 100%;
	height: 5px;
	background-color: #1a1c31;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* fade in on hover */
#primary-menu .menu-item a:hover::after {
	opacity: 1;
}

/* active menu underline always visible by default */
#primary-menu .current-menu-item a::after {
	opacity: 1;
}

/* BUT hide active underline when hovering over any other menu item */
#primary-menu:hover .current-menu-item a::after {
	opacity: 0;
}

/* restore it when hovering back on the active item */
#primary-menu .current-menu-item a:hover::after {
	opacity: 1;
}

/* text colors */
#primary-menu .menu-item a:hover {
	color: #1a1c31 !important;
}

#primary-menu .current-menu-item a {
	color: #1a1c31;
}

/* Homepage */
.page-id-236 .gb-element-9f65cdef {
  position: relative;
  overflow: hidden; /* ensures only the image moves within bounds */
}

.page-id-236 .gb-element-9f65cdef img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
  transform-origin: center center; /* zoom from center */
}

.page-id-236 .gb-element-9f65cdef img:hover {
  transform: scale(1.1);
}

.services-container:hover .services-icon-hover {
    transform: scale(1.1); /* Scale up to 120% */
    transition: transform 0.3s ease;
}

/* Optional: Add smooth transition for normal state */
.services-icon-hover {
    transition: transform 0.3s ease;
}

.service-learn-more:hover .gb-shape svg path {
    fill: #002155;
    transition: fill 0.3s ease, opacity 0.3s ease;
}

/* Add smooth transition for normal state */
.gb-shape svg path {
    transition: fill 0.3s ease, opacity 0.3s ease;
}

/* Capabilities & Services */
.hover-scale-bg {
    position: relative;
    overflow: hidden;
}

.hover-scale-bg > * {
        position: relative;
        z-index: 2; /* Put content above background */
    }

.hover-scale-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(26, 28, 49, 0.55) 0%, rgba(26, 28, 49, 0.55) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hover-scale-bg:hover::after {
    opacity: 0.45; /* Lower opacity = lighter overlay */
}

.capabilities-services-learn-more:hover .gb-shape svg path {
    fill: #cecece;
    transition: fill 0.3s ease;
}

.capabilities-services-learn-more .gb-shape svg path {
    transition: fill 0.3s ease;
}

.inside-left-sidebar {
    margin-top: 30px;
}

#nav_menu-3 .widget-title {
	font-family: "Montserrat",sans-serif;
	color: #373737;
	font-size: 1.3em;
	font-weight: 700;
	line-height: 36px;
	position: relative;
  display: inline-block; /* optional, to make underline fit text */
}

#nav_menu-3 .widget-title::before {
		width: 55px;
    height: 5px;
    background-color: #0a0434;
    content: "";
    left: 0px;
    position: absolute;
    bottom: -5px;
}

#nav_menu-3 .widget-title::after {
		width: 100%;
    height: 1px;
    background-color: #7b7b7b57;
    content: "";
    left: 0px;
    position: absolute;
    bottom: -4px;
}

#menu-capabilities-services li a {
  font-size: 1em;
  letter-spacing: 0;
  line-height: 24px;
  color: #7b7b7b;
  font-weight: 400;
  font-family: "Nunito", sans-serif;
	text-decoration: none
}

#menu-capabilities-services li.current-menu-item a {
    color: #2f2f2f;
    font-weight: 700;
}

.career-label {
	font-weight: 800;
}


/* Careers */

.career-popup-country {
	width: 30%;
	margin-top: 20px;
}

/* Overlay */
.career-popup-overlay {
  opacity: 0;                  /* start invisible */
  pointer-events: none;        /* not clickable when hidden */
  transition: opacity 0.3s ease; /* smooth fade */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); /* darker background */
  z-index: 99999;

}

/* Active overlay */
.career-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;        /* enable interaction */
}

/* Popup container */
.career-popup-container {
  background: #fff;
  width: 90%;
  max-width: 1200px;
  max-height: 80vh; /* limit height */
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(-50px); /* start slightly above */
  opacity: 0;                   /* invisible initially */
  transition: transform 0.3s ease, opacity 0.3s ease; /* smooth slide + fade */
}

/* Slide in + fade in when active */
.career-popup-overlay.active .career-popup-container {
  transform: translateY(0);
  opacity: 1;
}

/* Scrollable content */
.career-popup-content {
  overflow-y: auto; /* scroll inside the popup */
  flex: 1;
  padding: 20px; /* optional spacing */
}

/* Close button fixed outside content */
.career-popup-close {
  position: fixed; /* fixed to viewport */
  top: 48px;
  right: 30px;
  font-size: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #fff; /* white on dark overlay */
  z-index: 100000; /* above overlay */
}

/* Trigger buttons */
.career-open-btn {
  cursor: pointer;
}

/* ===== MOBILE VERSION ===== */
@media (max-width: 768px) {

    /* Country dropdown */
    .career-popup-country {
        width: 100%;
        margin-top: 15px;
    }

    /* Popup container */
    .career-popup-container {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
    }

    /* Content spacing */
    .career-popup-content {
        padding: 15px;
        font-size: 15px;
        line-height: 1.45;
    }

    /* Close button (smaller & inside container) */
    .career-popup-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
        color: #000;              /* easier to see on small screens */
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        z-index: 100001;
    }

    /* Fade/Slide stays smooth but shorter */
    .career-popup-container {
        transform: translateY(-30px);
    }
    .career-popup-overlay.active .career-popup-container {
        transform: translateY(0);
    }
}


.gb-element-4d941188 a:hover {
	color: #20a3da;
}

html[lang="zh-hant"] ul#menu-capabilities-services li a {
font-family: 'KaiTi';
}

html[lang="zh-hant"] #nav_menu-3 .widget-title {
    font-family: 'KaiTi';
}

/*html[lang="zh-hant"] .gb-text-795614e0 a {
    font-family: 'KaiTi', serif !important;
}*/

html[lang="zh-hant"] .dynamic-entry-content {
    font-family: 'KaiTi';
	font-weight: 400;
}

html[lang="zh-hant"] .dynamic-entry-content p {
    font-family: 'KaiTi';
}


/* CF7 Message Style */
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.payment-required .wpcf7-response-output {
    border-color: #D8000C;
	color: #D8000C;
    background-color: #FFBABA;
}

.wpcf7 form.sent .wpcf7-response-output {
    border-color: #270;
	color: #270;
    background-color: #DFF2BF;
}

.wpcf7-not-valid-tip {
    color: #FFBABA;
}


.h-captcha {
    width: 100% !important;
}

/* function custom_fonts_enqueue() {
    // Nunito from Google Fonts
    wp_enqueue_style('nunito-font', 'https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');
}
add_action('wp_enqueue_scripts', 'custom_fonts_enqueue'); */

/* Container styling */
.gb-query-loop-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base styles for all pagination items (numbers and next) */
.gb-query-loop-pagination a, 
.gb-query-loop-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    text-decoration: none;
    color: #333333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

/* Hover state for clickable links */
.gb-query-loop-pagination a:hover {
    background-color: #f5f5f5;
    border-color: #adadad;
    color: #000000;
}

/* Active/Current page styling */
.gb-query-loop-pagination .page-numbers.current {
    background-color: #0073aa; /* Change this to your brand color */
    color: #ffffff;
    border-color: #0073aa;
    cursor: default;
}

/* "Next" button specific styling */
.gb-query-loop-pagination a.gb-text {
    padding: 0 16px;
    margin-left: 4px;
}