/*
Theme Name: EPG Child Theme
Theme URI: https://epg.ingsch.com/
Description: Child theme of Twenty Twenty-Five that replicates the EPG live site design with WordPress backend integration
Author: EPG Team
Template: twentytwentyfive
Version: 1.0.0
Text Domain: epg-child
*/

/* --- HARMONYOS SANS FAMILY --- */

@font-face {
    font-family: 'HarmonyOS Sans';
    src: url('asset/fonts/HarmonyOS_Sans_Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans';
    src: url('asset/fonts/HarmonyOS_Sans_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans';
    src: url('asset/fonts/HarmonyOS_Sans_Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans';
    src: url('asset/fonts/HarmonyOS_Sans_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- 1. GLOBAL & TYPOGRAPHY --- */
/* Global Reset to HarmonyOS */
body, input, select, textarea, .wp-block-heading {
    font-family: 'HarmonyOS Sans', "PingFang SC", "Microsoft YaHei", "Microsoft YaHei UI", sans-serif !important;
}

/* --- HIDE GLOBAL SCROLLBAR --- */

/* Chrome, Safari, and Opera */
html::-webkit-scrollbar {
    display: none;
}

/* Firefox */
html {
    scrollbar-width: none;
}

/* IE and Edge */
html {
    -ms-overflow-style: none;
}

/* --- 2. THE HEADER (FLUID HEIGHT & WIDTH) --- */
header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: background-color 0.3s ease;
    
    /* CHANGE THIS: width: auto ensures padding stays INSIDE the 100% boundary */
    width: 100% !important; 
    max-width: none !important;
    box-sizing: border-box !important; /* Forces padding to be calculated inside width */
    
    /* Horizontal fluid padding 
    padding-left: clamp(1.25rem, 5vw, 5rem) !important;
    padding-right: clamp(1.25rem, 5vw, 5rem) !important;
    */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Target the main Flex Row inside the header */
header.wp-block-template-part .wp-block-group.is-layout-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Reset from space-between */
    gap: 0 !important; 
    width: 100% !important;
}

/* --- FLUID MARGINS --- */
/* Space after Logo */
header .wp-block-site-logo {
    margin-right: clamp(2rem, 4vw, 4.5rem) !important;
}

/* The 'Magic Push' - Pushes the second nav to the far right */
header.wp-block-template-part .wp-block-group.is-layout-flex > nav:nth-of-type(1) {
    margin-right: auto !important;
}

/* Ensure the Group block inside the header stretches 100% */
header.wp-block-template-part > .wp-block-group,
header.wp-block-template-part .is-layout-constrained {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 6. SEARCH TOGGLE LOGIC (RE-INTEGRATED) --- */

/* Hide the right-side menu when search is active */
header.wp-block-template-part nav.wp-block-navigation {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

header.search-is-active .wp-block-navigation:nth-of-type(2) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* 1. Wrapper - Detached 'X' gutter */
.epg-search-toggle .wp-block-search__inside-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    border: none !important;
    height: 46.88px;
    padding-right: 50px !important; 
}

/* 2. The Main Button (Cross trigger) */
header .wp-block-search__button {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 46.88px !important;
    width: 44px !important;
    position: absolute;
    right: 0;
    z-index: 30;
}

/* 3. The Input Field (Gray Box) */
.epg-search-toggle .wp-block-search__input {
    position: absolute;
    right: 50px; 
    width: 0 !important;
    max-width: 0 !important;
    height: 46.88px !important; 
    opacity: 0;
    background: #272727 !important; 
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    z-index: 10;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
}

/* 4. Active State: Expand Box */
header.search-is-active .epg-search-toggle .wp-block-search__input {
    width: 387px !important; 
    max-width: 387px !important; 
    opacity: 1;
    padding: 0 45px 0 15px !important; 
}

/* 5. The "Internal" Orange Submit Icon */
header.search-is-active .epg-search-toggle .wp-block-search__inside-wrapper::before {
    content: "";
    position: absolute;
    right: 60px; 
    width: 21px;
    height: 21px;
    background-color: #EA5504;
    pointer-events: none;
    z-index: 20;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M9.30049 17.601C13.8847 17.601 17.601 13.8847 17.601 9.30049C17.601 4.71627 13.8847 1 9.30049 1C4.71627 1 1 4.71627 1 9.30049C1 13.8847 4.71627 17.601 9.30049 17.601Z' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M15.2681 15.2676L19.4111 19.4106' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M9.30049 17.601C13.8847 17.601 17.601 13.8847 17.601 9.30049C17.601 4.71627 13.8847 1 9.30049 1C4.71627 1 1 4.71627 1 9.30049C1 13.8847 4.71627 17.601 9.30049 17.601Z' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M15.2681 15.2676L19.4111 19.4106' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* 6. Icon Swap Logic - Consolidated to use ::before */

/* Hide default WP SVG entirely */
header .wp-block-search__button svg { 
    display: none !important; 
}

/* Base Icon Styling */
header .wp-block-search__button::before {
    content: "";
    display: block;
    transition: all 0.2s ease;
    background-color: #EA5504; /* Default Orange */
    width: 21px;
    height: 21px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    /* Default Search SVG */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M9.30049 17.601C13.8847 17.601 17.601 13.8847 17.601 9.30049C17.601 4.71627 13.8847 1 9.30049 1C4.71627 1 1 4.71627 1 9.30049C1 13.8847 4.71627 17.601 9.30049 17.601Z' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M15.2681 15.2676L19.4111 19.4106' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M9.30049 17.601C13.8847 17.601 17.601 13.8847 17.601 9.30049C17.601 4.71627 13.8847 1 9.30049 1C4.71627 1 1 4.71627 1 9.30049C1 13.8847 4.71627 17.601 9.30049 17.601Z' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M15.2681 15.2676L19.4111 19.4106' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Transform to Gray Cross when active */
header.search-is-active .wp-block-search__button::before {
    background-color: #5F5F5F; /* Gray */
    width: 14px;
    height: 14px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M8.33032 7L13.7149 1.61539C14.095 1.23529 14.095 0.665158 13.7149 0.285068C13.3348 -0.0950226 12.7647 -0.0950226 12.3846 0.285068L7 5.66968L1.61538 0.285068C1.23529 -0.0950226 0.665158 -0.0950226 0.285068 0.285068C-0.0950226 0.665158 -0.0950226 1.23529 0.285068 1.61539L5.66968 7L0.285068 12.3846C-0.0950226 12.7647 -0.0950226 13.3348 0.285068 13.7149C0.665158 14.095 1.23529 14.095 1.61538 13.7149L7 8.33032L12.3846 13.7149C12.7647 14.095 13.3348 14.095 13.7149 13.7149C14.095 13.3348 14.095 12.7647 13.7149 12.3846L8.33032 7Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M8.33032 7L13.7149 1.61539C14.095 1.23529 14.095 0.665158 13.7149 0.285068C13.3348 -0.0950226 12.7647 -0.0950226 12.3846 0.285068L7 5.66968L1.61538 0.285068C1.23529 -0.0950226 0.665158 -0.0950226 0.285068 0.285068C-0.0950226 0.665158 -0.0950226 1.23529 0.285068 1.61539L5.66968 7L0.285068 12.3846C-0.0950226 12.7647 -0.0950226 13.3348 0.285068 13.7149C0.665158 14.095 1.23529 14.095 1.61538 13.7149L7 8.33032L12.3846 13.7149C12.7647 14.095 13.3348 14.095 13.7149 13.7149C14.095 13.3348 14.095 12.7647 13.7149 12.3846L8.33032 7Z' fill='black'/%3E%3C/svg%3E");
}

.wp-block-search.wp-block-search__button-only .wp-block-search__button:focus { outline: none; }

/* Add the 0.8rem spacing to match the live site's .menu margin-left */
header .wp-block-group.is-layout-flex > .epg-search-toggle {
    margin-left: calc(clamp(1rem, 2vw, 2.5rem) + 0.8rem) !important;
}

/* Ensure the wrapper doesn't collapse */
.epg-search-toggle {
    display: flex;
    align-items: center;
}

/* --- 3. TOP-LEVEL NAVIGATION (FLUID LINK HEIGHT) --- */

/* Fluid gap between menu items */
.wp-block-navigation .wp-block-navigation__container {
    gap: clamp(1rem, 2vw, 2.5rem) !important;
    display: flex;
    align-items: center;
}
.wp-block-navigation .wp-block-navigation-item__content {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8) !important; 
    display: inline-block;
    transition: color 0.3s ease;
	font-weight: 500;

    /* TARGET: 83.03px total height with Medium Font */
	padding-top: clamp(1.5rem, 1.7vw, 2.005rem) !important;
    padding-bottom: clamp(1.5rem, 1.7vw, 2.005rem) !important;
    
    /* Force consistent line-height to prevent vertical 'jumping' */
    line-height: 1.2 !important;
	
	font-size: clamp(12px, 0.833vw, 16px) !important;
}

/* Hover/Active State: Pure White Text */
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
.wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__content {
    color: rgba(255, 255, 255, 1) !important;
}

/* Continuous Scroll Underline Animation */
.wp-block-navigation .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 30%;
    left: 0;
    background-color: rgb(234, 85, 4); 
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.5, 1, 0.89, 1);
}

.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after,
.wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__content::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 1. Only target links that have the "Medium" font size selected in WP */
.wp-block-navigation .has-medium-font-size .wp-block-navigation-item__content {
    font-size: clamp(14px, 0.935vw, 20px) !important; 
}

/* 2. Your original Small font size remains controlled by theme.json/WP */
.wp-block-navigation .has-small-font-size .wp-block-navigation-item__content {
    /* No !important rule here, so it stays as 0.875rem from your JSON */
}

/* --- 4. DROPDOWN / SUBMENU (FLUID WIDTH & CENTERED) --- */

.wp-block-navigation .wp-block-navigation__submenu-container {
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    
    /* Fluid Width Logic */
    width: max-content !important; /* Width fits the text perfectly */
    min-width: 155px; /* Prevents it from being too narrow for short words */
    max-width: 220px; /* Prevents it from being awkwardly wide */
    
    /* Live Site Visuals */
    background: rgba(166, 166, 166, 0.5) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 0.7rem 0.26rem !important;
    border-radius: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.5, 1, 0.89, 1);
    z-index: 10000;
    list-style: none !important;
}

/* Orange Triangle Accent at Bottom Right */
.wp-block-navigation .wp-block-navigation__submenu-container::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ea5504;
    right: 0;
    bottom: 0;
    z-index: 2;
    -webkit-clip-path: polygon(50% 50%, 100% 0, 100% 100%, 0 100%);
    clip-path: polygon(50% 50%, 100% 0, 100% 100%, 0 100%);
}

/* Reveal Dropdown on Hover */
.wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) !important;
}

/* Dropdown Links: Orange Text Hover & Transparent Background */
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    color: rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
    font-size: 14px !important; 
    font-weight: 500 !important;
	text-align: center !important;
    transition: color 0.3s ease;
    display: block;
    width: 100%;
	box-sizing: border-box;
	line-height: 1.2;
	text-align: center !important;
    display: flex !important;       /* Use flex to center the inner text span */
    justify-content: center !important; 
    align-items: center !important;
	padding-top: 9px !important; 
    padding-bottom: 9px !important;
    padding-left: 20px !important; 
    padding-right: 20px !important;
    margin: 0 !important;
}

/* Remove WordPress default margin between dropdown items */
.wp-block-navigation .wp-block-navigation__submenu-container li {
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    color: #ea5504 !important; /* Orange text on hover */
    background: transparent !important;
}

/* Submenu Visual Cleanup */
.wp-block-navigation .wp-block-navigation__submenu-container li,
.wp-block-navigation .wp-block-navigation__submenu-container li:hover {
    background: transparent !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
    display: none !important; /* Remove underline animation for dropdown items */
}

/* --- OVERRIDE WORDPRESS CORE 200PX MIN-WIDTH --- */

/* We repeat the WP core selectors to ensure our '!important' wins the specificity battle */
.wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true]~.wp-block-navigation__submenu-container, 
.wp-block-navigation .has-child:not(.open-on-click):hover > .wp-block-navigation__submenu-container, 
.wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within > .wp-block-navigation__submenu-container {
    
    /* Force your desired width back */
    min-width: 145px !important; 
    width: max-content !important; 
    max-width: 220px !important;
    
    /* Ensure the padding from your Section 4 is maintained */
    padding: 0.7rem 0.26rem !important;
}

/* Ensure the list items inside this specific state don't stretch weirdly */
.wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
}

/* --- 7. THE FOOTER (COLUMNAR & FLUID) --- */
footer.wp-block-template-part {
    color: #ffffff;
    /*padding-top: clamp(2rem, 5vw, 4rem) !important;
    padding-bottom: clamp(2rem, 5vw, 4rem) !important;*/
    width: 100% !important;
    max-width: none !important;
	font-weight:normal;
}

/* Footer Container - Replicating the 4-Column Layout */
footer.wp-block-template-part .wp-block-group.is-layout-flex {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem !important;
    max-width: 1400px; /* Optional: Constrain the footer content width */
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 5rem);
}

/* Footer Headings */
footer h2, footer h3, footer p.has-medium-font-size {
    color: #ffffff !important;
    margin-bottom: 1.5rem !important;
}

/* Footer Navigation & Links */
footer .wp-block-navigation .wp-block-navigation-item__content {
    font-size: 0.875rem !important; /* Small font size for footer */
    color: rgba(255, 255, 255, 0.6) !important;
    padding: 5px 0 !important;
    transition: color 0.3s ease;
}

footer .wp-block-navigation .wp-block-navigation-item__content:hover {
    color: #ea5504 !important; /* Orange hover to match site */
}

/* Remove the underline animation from footer links if desired */
footer .wp-block-navigation .wp-block-navigation-item__content::after {
    display: none !important;
}

.footer_wrapper .footer-navigation .wp-block-navigation .wp-block-navigation__container { display: block; width:100%; }
footer .footer_wrapper .footer-navigation .wp-block-navigation .wp-block-navigation-item__content, .footer-connect-row { font-size: 1.004rem !important; }
.footer_wrapper .footer-navigation .wp-block-navigation .wp-block-navigation__container ul { width:100%; }
.footer_wrapper .footer-navigation .wp-block-navigation .wp-block-navigation__container li { width:100%; margin-bottom: 0.35rem; }
.footer_wrapper .footer-navigation .wp-block-navigation .wp-block-navigation__container a { color:#fff !important; font-weight: normal; display:block; width:100%; }
footer .footer_bottom_bar .wp-block-navigation .wp-block-navigation-item__content { padding:0 !important; }
footer .footer_bottom_bar .wp-block-navigation .wp-block-navigation-item__content { color:#fff !important; }

/* --- 7. FOOTER CONNECT (FORCE RESET) --- */

/* 1. Remove the 18px inline margins WP added to the figure wrapper */
.footer-connect-row .wp-block-image {
    margin: 0 !important; 
    width: 20px !important; /* Desired icon size */
    flex-shrink: 0 !important;
}

/* 2. Fix the image display within the figure */
.footer-connect-row .wp-block-image img {
    /*width: 20px !important;
    height: auto !important;*/
    display: block !important;
}

/* 3. Eliminate the line breaks (<br>) and align text */
.footer-connect-row p {
    margin: 0 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
}

/* Hide the <br> tags injected by the editor */
.footer-connect-row p br {
    display: none !important;
}

/* 4. Ensure the Flex Row stays tight and centered */
.footer-connect-row.wp-block-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important; /* Space between icon and text */
    margin-bottom: 0.8rem !important; /* Space between social rows */
    justify-content: flex-start !important;
}

footer.wp-block-template-part .footer_connect .wp-block-group.is-layout-flex { padding:0; }

/* Social Media Icons */
.wp-block-social-links.is-style-logos-only .wp-social-link {
    color: #ffffff !important;
    transition: transform 0.3s ease;
}

.wp-block-social-links.is-style-logos-only .wp-social-link:hover {
    transform: translateY(-3px);
    color: #ea5504 !important;
}

/* --- FOOTER BUTTON: JOIN US WITH ARROW --- */

/* 1. Reset the link to accommodate the icon */
.button-with-arrow .wp-block-button__link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important; /* Space between "Join Us" and Arrow */
    padding-right: 28px !important; /* Extra room for the arrow */
    position: relative;
    transition: all 0.3s ease !important;
}

/* 2. Insert your SVG via Pseudo-element */
.button-with-arrow .wp-block-button__link::after {
    content: "";
    display: inline-block;
    width: 13px;  /* Matches your SVG width */
    height: 9px;  /* Matches your SVG height */
    background-color: currentColor; /* Inherits text color (White) */
    
    /* Your SVG Path as a Mask */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='13' height='9' viewBox='0 0 13 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 4.32617L0.75 4.32617' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.92334 0.75L11.5003 4.32694L7.92334 7.90388' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='13' height='9' viewBox='0 0 13 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 4.32617L0.75 4.32617' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.92334 0.75L11.5003 4.32694L7.92334 7.90388' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    
    /* Animation */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 7. FOOTER CONNECT: BUTTON RESET --- */

/* 1. Remove the 'Button' appearance */
.footer_connect .wp-block-button__link {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important; /* Perfect vertical center */
    gap: 8px !important; /* Space between icon and text */
    font-family: 'HarmonyOS Sans', sans-serif !important;
    font-size: 1.004rem !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: opacity 0.3s ease;
}

.footer_connect .wp-block-buttons {
	gap:0;	
}

.footer_connect .linkedin .wp-block-button__link {
	gap: 14px !important; /* Space between icon and text */
}

/* 2. Style the Inline Image/Icon */
.footer_connect .wp-block-button__link img {
    filter: brightness(1); /* Ensures icons stay white/original */
}

/* 3. Space between the LinkedIn and WeChat buttons */
.footer_connect .wp-block-button {
    margin-bottom: 12px !important;
}

/* --- FOOTER QR CODE POSITIONING --- */

.footer_connect {
    position: relative !important;
}

.wechat-image {
    z-index: 999;
    position: absolute !important;
    
    /* Position exactly 12px below the button */
    bottom: 25% !important;
    left: 25px !important;
    
    /* Start State: Centered but scaled to 0 */
    transform: translateX(-25%) scale(0) !important;
    transform-origin: center top !important;
    
    /* Live Site Transition Timing */
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Visuals */
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    visibility: hidden;
    opacity: 0;
}

/* The Active State (Triggered by JS) */
.wechat-image.is-active {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(-25%) scale(1) !important;
}

/* Optional: Small triangle pointing up (common for this style) */
.wechat-image::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}

/* --- EXACT PU_COOKIE REPLICATION --- */

.pu-cookie-bar {
    position: fixed !important;
    bottom: 0; /* Floating slightly off bottom like many modern bars */
    left: 0;
    width: 100%;
    z-index: 99999;
    background: #021939 !important;
    padding: 1.426rem 2.623rem !important;
    display: none; /* Controlled by JS */
	font-size: 0.799rem !important;
}

.pu-cookie-bar.is-visible {
    display: block !important;
}

/* Main Content Wrapper */
.pu-cookie-main {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
	color: rgba(255, 255, 255, 0.5);
}

.pu-cookie-bar p, .pu-cookie-bar a {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.799rem !important;
    margin: 0 !important;
}

.pu-cookie-bar a {
    color: rgba(255, 255, 255, 0.5) !important;
	background:none;
	padding:0;
	font-weight: normal;
	position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

/* The Animated Underline */
.pu-cookie-bar a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px; /* Slightly thinner for the small footer text */
    bottom: -2px; /* Positioned just below the text */
    left: 0;
    background-color: #ea5504; /* White underline to match live site hover */
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.5, 1, 0.89, 1);
}

.pu-cookie-bar a:hover {
    color: #fff !important;
}

/* Trigger Animation on Hover */
.pu-cookie-bar a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.pu-cookie-bar .pu-cookie-close a::after { display:none; }

/* Right Side Buttons */
.pu-cookie-buttons {
    display: flex !important;
    gap: 35px;
    align-items: center;
    margin-block-start: 0;
	margin-right: 0 !important;
}

.pu-cookie-accept, .pu-cookie-refuse, .pu-cookie-close {
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.pu-cookie-accept, .pu-cookie-close, .pu-cookie-refuse {
    color: rgba(255, 255, 255, 0.5) !important;
}

.pu-cookie-accept:hover, .pu-cookie-refuse:hover, .pu-cookie-close:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pu-cookie-main {
        flex-direction: column;
        text-align: center;
    }
}

/* --- COOKIE BAR CLOSE BUTTON HOVER --- */

.pu-cookie-close svg {
    transition: all 0.3s ease;
}

/* Base state: White with 50% opacity (as seen in your HTML) */
.pu-cookie-close svg path {
    fill: white !important;
    fill-opacity: 0.5;
    transition: fill-opacity 0.3s ease;
}

/* Hover state: Solid white */
.pu-cookie-close:hover svg path {
    fill-opacity: 1; /* Makes the X fully white and bright */
}

/* Optional: Slight scale effect to match a 'button' feel */
.pu-cookie-close:hover svg {
    transform: scale(1.1);
}

/* --- 5. THE 'PREVIEW' & EDITOR SYNC --- */

/* This ensures the Site Editor Canvas (Preview) respects your 
   fluid padding and spacing just like the live site.
*/

/* 1. Force the Header width and padding in the editor */
.editor-styles-wrapper header.wp-block-template-part {
    padding-left: clamp(1.25rem, 5vw, 5rem) !important;
    padding-right: clamp(1.25rem, 5vw, 5rem) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. Fix the Navigation padding in the editor */
.editor-styles-wrapper .wp-block-navigation-item .wp-block-navigation-item__content {
    font-size: clamp(14px, 0.935vw, 20px) !important;
    padding-top: clamp(1.5rem, 1.7vw, 2.005rem) !important;
    padding-bottom: clamp(1.5rem, 1.7vw, 2.005rem) !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
}

/* 3. Sync the 'Magic Push' (Logo on left, Nav 2 on right) in the editor */
.editor-styles-wrapper .wp-block-group.is-layout-flex > nav:nth-of-type(1) {
    margin-right: auto !important;
}

/* 4. Match the gap between menu items in the editor */
.editor-styles-wrapper .wp-block-navigation__container {
    gap: clamp(1rem, 2vw, 2.5rem) !important;
}

/* 5. Match the Logo spacing in the editor */
.editor-styles-wrapper .wp-block-site-logo {
    margin-right: clamp(2rem, 4vw, 4.5rem) !important;
}

/* --- 5. THE 'PREVIEW' & EDITOR SYNC (ADD THIS) --- */

/* Force Search Input to be visible in the Editor so you can style it */
.editor-styles-wrapper .epg-search-toggle .wp-block-search__input {
    width: 20.8vw !important;
    max-width: 387px !important;
    opacity: 1 !important;
    padding: 0 15px !important;
    height: 46.88px !important;
    position: relative !important; /* Switch from absolute to see it next to icon */
    right: 0 !important;
    overflow: visible !important;
}

/* Ensure the button shows the Search Icon in the editor */
.editor-styles-wrapper header .wp-block-search__button::before {
    background-color: #EA5504 !important;
    width: 21px !important;
    height: 21px !important;
}

.editor-styles-wrapper .epg-search-toggle {
    margin-left: calc(clamp(1rem, 2vw, 2.5rem) + 0.8rem) !important;
}

.editor-styles-wrapper .footer_wrapper .wp-block-navigation-item a, .editor-styles-wrapper .footer_bottom_bar .wp-block-navigation-item a { padding: 5px 0 !important; }

.editor-styles-wrapper .pu-cookie-bar { display:block; }
.editor-styles-wrapper .pu-cookie-buttons { margin-block-start: 0; margin-right: 0 !important; }
.editor-styles-wrapper .pu-cookie-bar .wp-element-button {
    color: rgba(255, 255, 255, 0.5) !important;
	background:none;
	padding:0;
	font-weight: normal;
}
.editor-styles-wrapper .pu-cookie-bar .wp-block-buttons .wp-block-button__link { font-size: 0.799rem !important; }