p.empty_page b.bold_text {
    font-size: 36px;
    padding-right: 10px;
}

a {
    text-decoration: none;
}

p.empty_page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 36px;
    margin: 0;
}

section#banner {
    width: 100%;
    background-color: #FFFFFF;
    display: flex;
    /*justify-content: center;*/
    /*align-items: center;*/
    position: relative;
    overflow: hidden;
}

section#banner img.banner {
    position: relative; /* Keeps it above the background */
    z-index: 2;        /* Higher number = on top */
    max-height: 40vh;
    width: auto;
    max-width: 100%;
    display: block;
}

section#banner img.background {
    position: absolute; /* Takes it out of the normal flow */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the image */
    z-index: 1;        /* Lower number = behind */

    /* This makes it "lose" parts of itself to fill the area */
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* Optional: darkens background to pop the banner */
}

.category-title {
    color: white;
    text-wrap: nowrap;
}

article {
    width: 100%;
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
    margin: 0;
}

section#content {
    align-items: center;
}

article h1 {
    color: var(--primary-color);
    font-size: 24px;
}



/* CHANGED TO USE CLASS .horizontal-line INSTEAD OF ID */
section.horizontal-line div {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

section.horizontal-line {
    width: 100%;
    background-color: #FFFFFF; /* Ensure it covers anything behind it */
    position: relative;
    z-index: 10; /* Put it above the banner */
}

/* Ensure the main content section stretches to fill vertical space */
section#content {
    display: flex;
    flex: 1; /* Pushes the footer down and stretches this container */
    align-items: stretch; /* Forces sidebar and content to same height */
    flex-direction: row;
    z-index: 9998;
}

/* Stretch the sidebar perfectly down */
section#content aside {
    width: 320px;
    background: #ffffff;
    flex-shrink: 0; /* Prevents sidebar from squishing */
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5edf7;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.06);
    justify-content: flex-start;
    position: relative;
    padding: 18px 16px 22px;
    gap: 12px;
}


section#content aside img {
    margin: 20px;
    width: 280px;
}

section#content aside > a {
    margin-top: auto !important;;
    /*margin-bottom: 0;*/
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

section#content aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

section#content aside ul li {
    border-top: none;
}

section#content aside ul li a {
    padding: 12px 14px;
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e7eef8;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

section#content aside ul li a:hover,
section#content aside ul li a.active {
    background: linear-gradient(180deg, #f2f7ff 0%, #e2ebf8 100%);
    color: var(--primary-color);
    box-shadow: 0 10px 22px rgba(0, 23, 96, 0.08);
    transform: translateX(2px);
}

section#content aside h2 {
    padding: 0 6px 4px;
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.02em;
}

article {
    flex-grow: 1;
    padding: 30px; /* Optional: adds some breathing room to main content */
    display: flex;
    flex-direction: column;
}

section#content article {
    background:
        radial-gradient(circle at top left, rgba(166, 209, 240, 0.45), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0, 23, 96, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

section#content article > :not(script) {
    width: min(100%, 1024px);
    margin-left: auto;
    margin-right: auto;
}

aside div.category {
    position: sticky;
    top: 143px;
    /*padding-top: 18px;*/
}

section#content article p {
    padding-top: 20px;
    padding-left: 20px;
    text-indent: 2em;
    line-height: 1.5;
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

p, li {
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

/* Footer paragraphs: use a simpler system font and slightly smaller size so they don't inherit
   the main content paragraph styling. This excludes footer <p> from the global p rule. */
footer p {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px;
    color: #7b8794;
    margin: 0;
}

/* Utility class for the contact paragraph used by the user.
   Centers content and allows small vertical adjustment of the icon image. */
.contact-center {
    text-align: center;
    padding-left: 0 !important;
    margin: 0.25rem 0;
}
.contact-center img.nav-contact {
    vertical-align: middle; /* baseline alignment for the icon */
    transform: translateY(-2px); /* shift icon slightly down */
    margin-right: 6px;
}

li b {
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

section#content article ul li {
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

section#content article h3 {
    font-family: "Anuphan", Arial, Helvetica, sans-serif !important;
}

section#content article p b {
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

section#content article section#before-footer p {
    text-indent: 0;
}

aside h2 {
    color: var(--primary-color);
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

section#content hr {
    margin: 30px 30px;       /* Space above and below */
}

div.error {
    margin-left: 50px;
    margin-top: 50px;
}

#bottom_nav {
    display: grid;
    /* 3 columns per row */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

#bottom_nav a div.button-content span.arrow img {
    width: 30px;
    height: 30px;
    color: var(--primary-color);
}

#bottom_nav a {
    display: flex;
    flex-direction: row; /* Image left, Text right */
    align-items: center;
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: var(--primary-color);
    background-color: #FFFFFF;
    transition: all 0.2s ease;
}

#bottom_nav a:hover {
    background-color: #f0f7ff;
    transform: translateY(-2px);
}

#bottom_nav a img {
    height: 45px; /* Smaller image */
    width: auto;
    margin-right: 15px;
    flex-shrink: 0;
}

#bottom_nav a .button-content {
    display: flex;
    flex-direction: column; /* Stack text and arrow */
}

#bottom_nav a .button-text {
    font-size: 20px; /* Large text */
    font-weight: bold;
    line-height: 1.2;
}

#bottom_nav a .arrow {
    font-size: 18px;
    margin-top: 5px;
    color: var(--primary-color);
}

section#bottom_nav a.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    color: #555555;
    border-color: #555555;
    pointer-events: none;   /* Prevents clicking entirely */
}

section#before-footer {
    text-align: center;
    color: var(--primary-color);
}

.logo-slider {
    background: white;
    height: 250px;
    margin: auto;
    overflow: hidden; /* Hides images outside the box */
    position: relative;
    width: 100%;
}

.logo-slide-track {
    display: flex;
    width: calc(250px * 14); /* Total width = (Width of 1 image * Total images) */
    animation: scroll 40s linear infinite;
}

.slide {
    height: 250px;
    width: 250px;
}

.slide img {
    height: 250px; /* Adjust based on your logo size */
    padding: 2px;
}

/* The Animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 7)); } /* Scroll half the track width */
}

section.search_box {
    display: flex;
    align-items: center;
    width: 120px;
    height: 40px;
    margin: 20px;
}

section.search_box form {
    display: flex;
    align-items: center;
    width: calc(100% - 50px);
    height: 35px;
    margin: 20px;
}

section.search_box input {
    flex: 1; /* Grows to fill available space */
    height: 100%;
    border: 2px solid var(--primary-color);
    border-right: none; /* Prevents a double-border between input and button */
    padding: 0 12px;
    box-sizing: border-box; /* Ensures padding doesn't break the 40px height */
    outline: none;
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

section.search_box button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-left: none;
    border-top: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    color: white;
    height: 100%;
    width: 45px; /* Slightly wider for better click area */
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

/*section.search_box button:hover {*/
/*    background-color: #002aab;*/
/*    border-color: #002aab;*/
/*}*/

section.search_box img {
    height: 20px;
    width: 20px;
    display: block; /* Removes weird whitespace gaps below images */
}

article a.go-back {
    text-decoration: none;
    color: var(--primary-color);
    margin: 20px 20px 20px 0;
    /*justify-content: center;*/
    align-items: center;    justify-self: center;
    /*text-align: center;*/
    display: flex;
    /*align-items: center;*/
}

div#search-box a.go-back {
    align-items: center;
}

article a.go-back img {
    margin-right: 10px;
}

div#search-box {
    display: flex;
}

div#search-box h1 {
    width: fit-content;
    white-space: nowrap;
    align-self: center;
    font-weight: normal;
}

/* Search box controls within the product list page */
#search-box .search-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	max-width: 800px; /* Constrain width on desktop */
	margin-left: auto;
	margin-right: auto;
}
#search-box .search_box {
	flex-grow: 1;
}
#search-box .search_box form {
	display: flex;
	width: 100%;
}
#search-box .search_box input[type="text"] {
	flex-grow: 1;
}
#search-box .product-filter-reset-link {
	white-space: nowrap; /* Prevent "Reset" text from wrapping */
    color: #888888;
}

li.search_box section.search_box {
    width: 300px;
    margin: 0 0 0 20px;
}

/*li.search_box section.search_box button:hover {*/
/*    border-color: var(--primary-color);*/
/*}*/

/* Service Card Image Darkening */
.service-card-media .media-item {
    position: relative;
    overflow: hidden;
}

.service-card-media .media-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.service-card-media .media-item:hover::before {
    background-color: rgba(0, 0, 0, 0);
}