/* --- Theme Variables --- */
:root {
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: rgba(229, 156, 6, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --accent: #e59c06;
    --header-top-bg: transparent;
}

body.dark-theme {
    --bg-body: #0a0a0a;
    --bg-card: #151515;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --header-top-bg: transparent;
}

/* --- Smooth Scrolling & Global Theme Transitions --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    cursor: url('../cursor/Cursor.cur'), default;
}

/* Custom Cursors - Precision Hover Hotspots */
a,
button,
.theme-toggle,
.flexslider .flex-direction-nav a,
.owl-prev,
.owl-next,
.owl-dot,
[role="button"] {
    cursor: url('../cursor/Link.cur'), pointer !important;
}

input,
textarea,
[contenteditable="true"] {
    cursor: url('../cursor/Handwrite.cur'), text !important;
}

img,
video,
iframe,
.alternate-cursor {
    cursor: url('../cursor/UpArrow.cur'), crosshair !important;
}

/* Global Text Contrast Fixes */
.section,
.sectionbg,
.hmabout,
.services,
.container.pb40,
.highlight {
    background-color: var(--bg-body) !important;
    transition: background-color 0.4s ease;
}

/* Global headings follow theme... */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
}

/* Banner text syncs with theme */
.bnnerafter h2,
.bnnerafter h4,
.bnnerafter h5,
.flexslider h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .bnnerafter h2,
body.dark-theme .bnnerafter h4,
body.dark-theme .bnnerafter h5,
body.dark-theme .flexslider h2 {
    color: #000000 !important;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3) !important;
}

/* --- Theme Toggle UI --- */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-left: 20px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(229, 156, 6, 0.1);
    color: var(--accent);
    transition: all 0.3s ease;
    border: 1px solid rgba(229, 156, 6, 0.2);
}

.theme-toggle:hover {
    background: rgba(229, 156, 6, 0.2);
    transform: rotate(15deg);
}

.theme-toggle i {
    font-size: 1.2rem;
}

.nav-hm {
    display: flex !important;
    align-items: center;
}

/* Header: 100% Transparent at top, Glass on Scroll */
.header-main {
    background: transparent !important;
    position: absolute;
    width: 100%;
    z-index: 1001;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Navigation Text: Always White at the very top (over banner) */
#cssmenu>ul>li>a {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* On scroll logic */
body.fixed .header-main {
    position: fixed !important;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: 0 4px 30px var(--glass-shadow) !important;
}

/* On scroll text color transition to theme values */
body.fixed #cssmenu>ul>li>a {
    color: var(--text-main) !important;
    text-shadow: none;
}

/* --- Submenu Arrow: Right chevron next to text, rotates down on hover --- */

/* Kill any legacy ::after on links without submenus */
#cssmenu>ul>li>a::after {
    content: none !important;
}

/* Products link (has submenu) - force inline layout so arrow sits next to text */
#cssmenu>ul>li#m3>a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* The arrow itself */
#cssmenu>ul>li#m3>a::after {
    content: '\f105' !important;
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    font-size: 0.75em !important;
    color: inherit !important;
    display: inline-block !important;
    transition: transform 0.3s ease;
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
}

/* Rotate arrow on hover */
#cssmenu>ul>li#m3:hover>a::after {
    transform: rotate(90deg);
}

body.fixed #cssmenu>ul>li>a:hover,
body.fixed #cssmenu>ul>li.active>a {
    color: #e59c06 !important;
}

/* --- Dropdown: Override menu.css solid black bg with glass matching header --- */
#cssmenu ul ul,
#cssmenu>ul>li>ul {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px var(--glass-shadow) !important;
    padding: 8px 0 !important;
}

body.dark-theme #cssmenu ul ul,
body.dark-theme #cssmenu>ul>li>ul {
    background: rgba(0, 0, 0, 0.55) !important;
}

/* Dropdown link text */
#cssmenu ul ul li a {
    color: var(--text-main) !important;
    padding: 10px 20px !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

#cssmenu ul ul li:hover>a,
#cssmenu ul ul li a:hover {
    color: #e59c06 !important;
    background: rgba(229, 156, 6, 0.1) !important;
}


@media (max-width: 992px) {
    body.fixed #cssmenu {
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    body.fixed #cssmenu #menu-button {
        background: #e59c06 !important;
        color: #fff !important;
    }
}

/* --- Enhanced Service Cards --- */
.services .inner-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease,
        border-color 0.3s ease;
}

.services .inner-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--glass-shadow);
    border-color: rgba(229, 156, 6, 0.25);
}

.services .inner-box i {
    transition: transform 0.3s ease;
}

.services .inner-box:hover i {
    transform: scale(1.15);
}

/* --- Enhanced Product Cards (box5) --- */
.box5 {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease;
}

.box5:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.box2 img,
.box5 img {
    width: 100% !important;
    height: 280px !important; /* Force all product images to the same height */
    aspect-ratio: 1 / 1 !important; 
    object-fit: contain !important;
    background-color: #ffffff !important;
    display: block !important;
    padding: 15px !important;
}

/* --- Enhanced Application/Sector Cards (box1) --- */
.box1 {
    transition: transform 0.3s ease;
}

.box1:hover {
    transform: translateY(-4px);
}

.box1 img {
    transition: border-color 0.3s ease, transform 0.5s ease;
    border-radius: 8px;
}

.box1:hover img {
    transform: scale(1.03);
}

/* --- Highlight Section Enhancement --- */
.highlight .contact-btn {
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.highlight .contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(229, 156, 6, 0.3);
}

/* --- Enhanced WhatsApp Button --- */
.hdwatsp {
    bottom: 85px !important;
    right: 15px !important;
}

.hdwatsp a {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.hdwatsp a:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* --- Button Enhancements --- */
.btn-enq a,
.custbtn,
.contact-btn {
    transition: all 0.3s ease !important;
}

.btn-enq a:hover,
.custbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 156, 6, 0.25);
}

/* --- Form Input Enhancements --- */
.form .text-field {
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.form .text-field:focus {
    border-color: rgba(229, 156, 6, 0.4);
    box-shadow: 0 0 0 3px rgba(229, 156, 6, 0.08);
}

/* --- Subtle Animations for "wow" Elements --- */
@keyframes fadeInUpSmooth {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Section Image Enhancement --- */
.hmabout img {
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.hmabout img:hover {
    transform: scale(1.02);
}

/* --- Page Head (Inner Pages) Enhancement --- */
.page-head {
    transition: all 0.3s ease;
}

.page-head h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* --- Contact Items Enhancement --- */
.contact-item {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--glass-shadow);
    border-color: rgba(229, 156, 6, 0.15);
}

/* --- Gallery Box Enhancements --- */
.box7 {
    border-radius: 12px;
    overflow: hidden;
}

.box8 {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box8:hover {
    transform: translateY(-5px);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #e59c06;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffb11a;
}

/* --- Page Loading Transition --- */
body {
    opacity: 0;
    animation: pageLoad 0.4s ease forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
    }
}

/* --- Footer Developer Credit Glow --- */
.aozora-credit {
    color: #e59c06;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.aozora-credit:hover {
    color: #ffca28;
    text-shadow: 0 0 10px rgba(255, 202, 40, 0.8), 0 0 20px rgba(255, 202, 40, 0.4);
    text-decoration: none;
}