/*
========================================================================
NTC 2026 UI KIT STYLES
========================================================================

TABLE OF CONTENTS
------------------
1.  COLOR & THEME SYSTEM
    1.1  Root Variables (Light Theme)
    1.2  Dark Theme Overrides
2.  BASE & TYPOGRAPHY
    2.1  Body & Root
    2.2  Typography Scale
    2.3  Links & Helpers
3.  LAYOUT
    3.1  Utility Header
    3.2  Primary Navigation
    3.3  Mega Menus
    3.4  Multi-level Dropdowns
    3.5  Sticky Social Bar
    3.6  Footer
    3.7  Floating Contact Button
4.  COMPONENTS
    4.1  Buttons
    4.2  Cards
    4.3  Forms
    4.4  Modals & Offcanvas
    4.5  Tooltips
    4.6  Alerts & Badges
5.  ACCESSIBILITY & UTILITIES
    5.1  Focus Styles
    5.2  Spacing

========================================================================
*/

/*
========================================================================
1. COLOR & THEME SYSTEM
========================================================================
*/

:root {
    /* 1.1 Root Variables (Light Theme) */
    --bs-primary: #007b5e;
    --bs-primary-rgb: 0, 123, 94;
    --bs-primary-dark: #004434;
    --bs-primary-dark-rgb: 0, 68, 52;
    --bs-primary-light: #e6f2ef;
    
    --bs-secondary: #4A4A4A;
    --bs-secondary-rgb: 74, 74, 74;

    --bs-success: #28a745;
    --bs-info: #17a2b8;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;

    --bs-light: #f8f9fa;
    --bs-dark: #212529;

    /* Custom Grayscale Neutrals */
    --ntc-gray-100: #f8f9fa;
    --ntc-gray-200: #e9ecef;
    --ntc-gray-300: #dee2e6;
    --ntc-gray-400: #ced4da;
    --ntc-gray-500: #adb5bd;
    --ntc-gray-600: #6c757d;
    --ntc-gray-700: #495057;
    --ntc-gray-800: #343a40;
    --ntc-gray-900: #212529;

    /* Custom System Variables */
    --ntc-body-bg: #ffffff;
    --ntc-body-color: var(--ntc-gray-800);
    --ntc-heading-color: var(--ntc-gray-900);
    --ntc-border-color: var(--ntc-gray-300);
    --ntc-card-bg: #ffffff;
    --ntc-card-border: var(--ntc-border-color);
    --ntc-link-color: var(--bs-primary);
    --ntc-link-hover-color: var(--bs-primary-dark);

    /* Spacing Scale */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 3rem;     /* 48px */
}

/* 1.2 Dark Theme Overrides */
[data-bs-theme="dark"] {
    --bs-secondary: #a0a0a0;
    --bs-secondary-rgb: 160, 160, 160;

    --bs-light: #343a40;
    --bs-dark: #f8f9fa;

    --ntc-body-bg: #1a1a1a;
    --ntc-body-color: var(--ntc-gray-300);
    --ntc-heading-color: var(--ntc-gray-100);
    --ntc-border-color: var(--ntc-gray-700);
    --ntc-card-bg: var(--ntc-gray-900);
    --ntc-card-border: var(--ntc-gray-700);
    --ntc-link-color: var(--bs-primary);
    --ntc-link-hover-color: #33a48a;

    .utility-header, .site-footer {
        background-color: #111;
    }

    .primary-nav, .dropdown-menu, .modal-content, .offcanvas {
        background-color: var(--ntc-gray-900) !important;
    }
}


/*
========================================================================
2. BASE & TYPOGRAPHY
========================================================================
*/

/* 2.1 Body & Root */
body {
    background-color: var(--ntc-body-bg);
    color: var(--ntc-body-color);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content {
    flex-grow: 1;
}

/* 2.2 Typography Scale */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-weight: 600;
    color: var(--ntc-heading-color);
}

/* 2.3 Links & Helpers */
a {
    color: var(--ntc-link-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--ntc-link-hover-color);
    text-decoration: underline;
}

/*
========================================================================
3. LAYOUT
========================================================================
*/

/* 3.1 Utility Header */
#site-header {
    padding-top: 40px; /* Height of the absolute utility header */
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: top 0.3s ease-in-out;
    overflow: hidden; /* Hide the utility header when site-header is shifted up */
}

.utility-header {
    padding: var(--space-xs) 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--ntc-border-color);
    font-size: 0.875rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1031; /* Above primary nav */
    transition: transform 0.3s ease-in-out;
}

/* .utility-header.header-hidden {
    transform: translateY(-100%);
} */

.utility-header a {
    color: var(--ntc-body-color);
    text-decoration: none;
    margin: 0 var(--space-md);
    transition: color 0.2s ease;
}

.utility-header a:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

.utility-header .utility-contact,
.utility-header .utility-social,
.utility-header .utility-actions {
    display: flex;
    align-items: center;
}

.utility-header i {
    margin-right: var(--space-xs);
    color: var(--bs-primary);
}

.utility-social a { margin: 0 var(--space-sm); }
.utility-contact a, .utility-actions a { margin-left: var(--space-md); }

.primary-nav .theme-switcher-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    padding: var(--space-xs) 0;
}
.theme-icon-dark { display: none; }
.theme-icon-light { display: inline-block; }
[data-bs-theme="dark"] .theme-icon-dark { display: inline-block; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }


/* 3.2 Primary Navigation */
.primary-nav {
    background-color: var(--ntc-body-bg);
    border-bottom: 1px solid var(--ntc-border-color);
    z-index: 1029;
    padding: 0.25rem 0; /* Single source of vertical padding */
}
/* Removed primary-nav-bumped as sticky behavior moved to #site-header */
/* This is the key: vertically center the direct children of the flex container */
.primary-nav > .container-fluid {
    align-items: center;
}

/* Remove padding from wrappers, as the parent handles it now */
.primary-nav .theme-switcher-wrapper {
    padding: 0;
}
.primary-nav .nav-link {
    font-weight: 600;
    color: var(--ntc-heading-color);
    padding: .5rem var(--space-lg); /* Add some padding back for click area, but less */
}
.primary-nav .nav-link:hover,
.primary-nav .nav-item.show .nav-link {
    color: var(--bs-primary);
}


/* 3.3 Mega Menus */
.dropdown-mega .dropdown-menu {
    border-radius: 0;
    border: none;
    border-top: 3px solid var(--bs-primary);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    padding: var(--space-xl);
}

@media (min-width: 992px) {
    .dropdown-mega {
        position: static;
    }
    .dropdown-mega .dropdown-menu {
        width: 95vw;
        max-width: 1600px;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
    }
}

.dropdown-mega h5 {
    color: var(--bs-primary);
    margin-bottom: var(--space-md);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.dropdown-mega .dropdown-item {
    padding: var(--space-sm) 0;
    font-weight: 500;
}

.mega-menu-card {
    background-color: var(--bs-primary-light);
    border: none;
}
[data-bs-theme="dark"] .mega-menu-card {
    background-color: var(--ntc-gray-800);
}

.mega-menu-product-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    height: 100%;
}
.mega-menu-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

/* 3.4 Multi-level Dropdowns */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* Make dropdowns open on hover */
@media (min-width: 992px) {
    .primary-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}


/* 3.5 Sticky Social Bar */
.sticky-social-bar {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 1020;
}

.sticky-social-bar .social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background-color: var(--ntc-card-bg);
    color: var(--bs-primary);
    font-size: 1.25rem;
    border: 1px solid var(--ntc-border-color);
    border-right: none;
    margin-bottom: -1px; /* Overlap borders */
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.2s ease,
                color 0.2s ease;
}

.sticky-social-bar .social-icon:first-child {
    border-top-left-radius: 8px;
}
.sticky-social-bar .social-icon:last-child {
    border-bottom-left-radius: 8px;
}

.sticky-social-bar .social-icon:hover {
    background-color: var(--bs-primary);
    color: #fff;
    transform: translateX(-10px) scale(1.1);
    text-decoration: none;
    z-index: 1;
}

/* 3.6 Footer */
.site-footer {
    background-color: #f8f9fa;
    color: var(--ntc-body-color);
    padding: var(--space-xl) 0 0;
    border-top: 1px solid var(--ntc-border-color);
}
.site-footer .footer-heading {
    font-weight: 700;
    color: var(--ntc-heading-color);
    margin-bottom: var(--space-lg);
}
.site-footer .footer-links {
    padding-left: 0;
}
.site-footer .footer-links li {
    margin-bottom: var(--space-sm);
}
.site-footer .footer-links a {
    text-decoration: none;
    color: var(--ntc-body-color);
}
.site-footer .footer-links a:hover {
    text-decoration: underline;
    color: var(--bs-primary);
}
.site-footer .footer-social a {
    font-size: 1.5rem;
    margin-right: var(--space-md);
    color: var(--ntc-body-color);
}
.site-footer .footer-social a:hover {
    color: var(--bs-primary);
}
.site-footer .footer-bottom {
    border-top: 1px solid var(--ntc-border-color);
    padding: var(--space-lg) 0;
    margin-top: var(--space-xl);
    text-align: center;
    font-size: 0.875rem;
}

/* 3.7 Floating Contact Button */
.floating-contact-btn {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 1.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1025;
}



/*
========================================================================
4. COMPONENTS
========================================================================
*/

/* 4.1 Buttons */
.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-bg: var(--bs-primary-dark);
    --bs-btn-active-border-color: var(--bs-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

/* Unify size of right-aligned nav buttons */
.primary-nav .ms-auto .btn {
    width: 42px;
    height: 42px;
}

/* 4.2 Cards */
.card {
    background-color: var(--ntc-card-bg);
    border-color: var(--ntc-card-border);
}


/* 4.4 Modals & Offcanvas */
.modal-content, .offcanvas {
    background-color: var(--ntc-body-bg);
    border: 1px solid var(--ntc-border-color);
}

/* 4.5 Tooltips */
.tooltip-inner {
    background-color: var(--bs-primary);
    color: #fff;
}
.tooltip .tooltip-arrow::before {
    border-left-color: var(--bs-primary);
    border-right-color: var(--bs-primary);
    border-top-color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}


/*
========================================================================
5. ACCESSIBILITY & UTILITIES
========================================================================
*/

/* 5.1 Focus Styles */
a:focus-visible, 
button:focus-visible, 
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
    box-shadow: none; /* remove bootstrap's default */
}
.sticky-social-bar .social-icon:focus-visible {
    transform: translateX(-10px) scale(1.1);
    background-color: var(--bs-primary);
    color: #fff;
    z-index: 1;
}

/* Reset for elements where default outline is better */
:focus-visible {
   outline-color: var(--bs-primary)
}

/* Make body have a top margin to not be covered by the sticky header */
body {
    /* padding-top: 70px; */ /* Removed to fix large gap above navbar */
}




