/* ICT Smart – public site styles */

/* ---------------------------------------------------------------
   Brand colour tokens
--------------------------------------------------------------- */
:root {
    --ict-navy:        #0d2535;
    --ict-navy-deep:   #081a26;
    --ict-green:       #7dc42e;
    --ict-green-dark:  #5e9820;
    --ict-green-light: #edf7d6;
    --ict-red:         #e02020;

    /* Override Bootstrap primary */
    --bs-primary:      #7dc42e;
    --bs-primary-rgb:  125, 196, 46;
    --bs-link-color:        #5e9820;
    --bs-link-hover-color:  #4a7a14;
    --bs-font-sans-serif: 'Kanit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------------------------------------------------------------
   Bootstrap component overrides (green primary)
--------------------------------------------------------------- */
.btn-primary {
    --bs-btn-bg:                #7dc42e;
    --bs-btn-border-color:      #7dc42e;
    --bs-btn-hover-bg:          #5e9820;
    --bs-btn-hover-border-color:#5e9820;
    --bs-btn-active-bg:         #4a7a14;
    --bs-btn-active-border-color:#4a7a14;
    --bs-btn-disabled-bg:       #7dc42e;
    --bs-btn-disabled-border-color:#7dc42e;
    --bs-btn-color:             #fff;
}
.btn-outline-primary {
    --bs-btn-color:             #5e9820;
    --bs-btn-border-color:      #5e9820;
    --bs-btn-hover-bg:          #7dc42e;
    --bs-btn-hover-border-color:#7dc42e;
    --bs-btn-hover-color:       #fff;
    --bs-btn-active-bg:         #5e9820;
    --bs-btn-active-border-color:#5e9820;
    --bs-btn-active-color:      #fff;
}

a { color: #5e9820; }
a:hover { color: #4a7a14; }

body {
    font-size: 1rem;
    line-height: 1.6;
}

/* ---------------------------------------------------------------
   Tap target minimum
--------------------------------------------------------------- */
.btn, .nav-link, a.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ---------------------------------------------------------------
   Site header / Navbar
--------------------------------------------------------------- */
.site-header {
    z-index: 1030;
}

.ict-navbar {
    background-color: var(--ict-navy) !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.ict-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}
.ict-navbar .navbar-brand:hover { color: #fff; }

.ict-navbar .navbar-brand img {
    height: 44px;
    width: auto;
}

/* Nav links */
.ict-navbar .nav-link {
    color: rgba(255,255,255,0.88) !important;
    padding: 0.45rem 0.9rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.ict-navbar .nav-link:hover,
.ict-navbar .nav-link:focus {
    color: #fff !important;
    background-color: var(--ict-green);
}
.ict-navbar .nav-link.active,
.ict-navbar .nav-link[aria-expanded="true"] {
    color: #fff !important;
    background-color: var(--ict-green);
}

/* Hamburger icon on dark bg */
.ict-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.4);
}
.ict-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* ---------------------------------------------------------------
   Language switcher button
--------------------------------------------------------------- */
.ict-lang-btn {
    border: 1.5px solid rgba(255,255,255,0.45);
    color: rgba(255,255,255,0.88) !important;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    min-height: 36px;
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s, color 0.15s;
}
.ict-lang-btn:hover {
    border-color: var(--ict-green);
    color: var(--ict-green) !important;
}

/* ---------------------------------------------------------------
   Level-1 dropdown
--------------------------------------------------------------- */
.ict-dropdown {
    border: none;
    border-radius: 0.375rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    padding: 0.375rem 0;
    min-width: 240px;
    background: #fff;
}

.ict-dropdown .dropdown-item {
    padding: 0.5rem 1.25rem;
    color: #2a2a2a;
    font-size: 0.9rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
    white-space: normal;
}
.ict-dropdown .dropdown-item:hover,
.ict-dropdown .dropdown-item:focus {
    background-color: var(--ict-green-light);
    color: var(--ict-green-dark);
    border-left-color: var(--ict-green);
}
.ict-dropdown .dropdown-divider { margin: 0.25rem 0; }

/* ---------------------------------------------------------------
   Level-2 flyout (desktop: right of parent; mobile: inline)
--------------------------------------------------------------- */
.dropdown-submenu {
    position: relative;
}

/* The flyout (sub-dropdown) */
.dropdown-submenu > .ict-dropdown-sub {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 2px;
}

/* Open on hover (desktop only) */
@media (min-width: 992px) {
    .dropdown-submenu:hover > .ict-dropdown-sub {
        display: block;
    }
}

/* chevron arrow on submenu parent item */
.dropdown-submenu > .dropdown-item .sub-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.55;
    transition: opacity 0.12s;
}
.dropdown-submenu:hover > .dropdown-item .sub-arrow,
.dropdown-submenu.open > .dropdown-item .sub-arrow {
    opacity: 1;
}

/* Mobile: inline expanded submenu */
@media (max-width: 991.98px) {
    .ict-navbar .dropdown-menu {
        box-shadow: none;
        border-radius: 0;
        background: rgba(255,255,255,0.06);
        border-top: 1px solid rgba(255,255,255,0.12);
    }
    .ict-navbar .dropdown-menu .dropdown-item {
        color: rgba(255,255,255,0.85);
        border-left-color: transparent;
        padding-left: 1.5rem;
    }
    .ict-navbar .dropdown-menu .dropdown-item:hover {
        background-color: rgba(125,196,46,0.2);
        color: var(--ict-green);
        border-left-color: var(--ict-green);
    }
    .dropdown-submenu > .ict-dropdown-sub {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(255,255,255,0.04);
        border-top: 1px solid rgba(255,255,255,0.07);
        border-radius: 0;
        margin: 0;
    }
    .dropdown-submenu.open > .ict-dropdown-sub {
        display: block;
    }
    .dropdown-submenu > .dropdown-item .sub-arrow {
        transition: transform 0.2s;
    }
    .dropdown-submenu.open > .dropdown-item .sub-arrow {
        transform: rotate(90deg);
        opacity: 1;
    }
}

/* ---------------------------------------------------------------
   Product detail – Row 1
--------------------------------------------------------------- */
.product-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    object-fit: contain;
}

.product-features ul {
    padding-left: 1.25rem;
}
.product-features li {
    margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------
   Gallery – Row 2
--------------------------------------------------------------- */
.product-gallery .gallery-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: zoom-in;
    transition: opacity 0.2s, transform 0.2s;
    width: 100%;
}
.product-gallery .gallery-thumb:hover {
    opacity: 0.85;
    transform: scale(1.04);
}
/* Zoom-in cursor on main product image when lightbox is active */
.product-hero-image a.glightbox {
    cursor: zoom-in;
}
.product-hero-image a.glightbox img {
    transition: opacity 0.2s;
}
.product-hero-image a.glightbox:hover img {
    opacity: 0.92;
}

/* ---------------------------------------------------------------
   Raw-HTML blocks – Rows 3/4
--------------------------------------------------------------- */
.raw-html-block {
    overflow-x: auto;
    max-width: 100%;
}
.raw-html-block table {
    max-width: 100%;
}

/* ---------------------------------------------------------------
   Contact form – Row 5
--------------------------------------------------------------- */
.contact-form .form-control,
.contact-form .form-select {
    min-height: 44px;
    font-size: 1rem;
}
.contact-form textarea.form-control {
    min-height: 120px;
}

/* ---------------------------------------------------------------
   Page hero banner (inner pages)
--------------------------------------------------------------- */
.page-hero {
    min-height: 350px;
    background-image: url('https://ictsmart.co.th/wp-content/uploads/2015/10/About-me-Title.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}
/* Navy overlay for text legibility */
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 37, 53, 0.58);
    pointer-events: none;
}
.page-hero-content {
    position: relative;
    z-index: 1;
}
.page-hero h1 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.page-hero .page-hero-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* Home hero is taller */
.page-hero--home {
    min-height: 450px;
}

/* Disable fixed attachment on mobile (performance + iOS bug) */
@media (max-width: 991.98px) {
    .page-hero {
        background-attachment: scroll;
        min-height: 200px;
    }
    .page-hero--home {
        min-height: 280px;
    }
}

/* ---------------------------------------------------------------
   Breadcrumb
--------------------------------------------------------------- */
.breadcrumb-section {
    background: #f0f0f0;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}
.breadcrumb-item a {
    color: #5e9820;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
    background-color: var(--ict-navy) !important;
    margin-top: auto;
}

/* ---------------------------------------------------------------
   Responsive: Row 1 two-column → stack on phones
--------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .product-hero .row > [class*="col-"] + [class*="col-"] {
        margin-top: 1.5rem;
    }
}
