section#content.contact-page article p {
    padding-left: 0;
    text-indent: 0;
}

section#contact-form {
    display: flex;
    flex-direction: column;
}

#contact-form {
    max-width: 500px; /* Limits width so it doesn't stretch too far */
    font-family: inherit;
}

#contact-form h1 {
    color: #002366;
    margin-bottom: 20px;
}

#contact-form form {
    display: flex;
    flex-direction: column; /* Stacks items vertically */
    gap: 15px; /* Adds space betwee/* --- Variables --- */
    :root {
        --primary-color: #002366;
        --border-color: #ccc;
        --bg-light: #f8f8f8;
        --text-color: #333;
    }

    /* --- Base & Article Layout --- */
    section#content.contact-page article p {
        padding-left: 0;
        text-indent: 0;
    }

    .contact-divider {
        margin: 40px 0;
        border: 0;
        border-top: 1px solid var(--border-color);
    }

    /* --- Form Container --- */
    .contact-form-container {
        max-width: 500px;
        font-family: inherit;
        padding: 20px 0;
    }

    .contact-form-container h2 {
        color: var(--primary-color);
        margin-bottom: 25px;
    }

    #contact-form {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* --- Form Fields --- */
    .form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .form-group label {
        font-weight: bold;
        color: var(--text-color);
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px; /* Clean, modern input corners */
        box-sizing: border-box;
        font-family: inherit;
        transition: border-color 0.2s ease;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .form-group textarea {
        height: 150px;
        resize: vertical;
        border-radius: 12px; /* Slightly rounder for large text blocks */
    }

    /* --- Form Buttons --- */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .form-actions button {
        width: 100%;
        padding: 14px;
        border-radius: 999px; /* Pill-shaped buttons */
        font-weight: bold;
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .btn-submit {
        background-color: var(--primary-color);
        color: white;
        border: none;
    }

    .btn-clear {
        background-color: var(--bg-light);
        color: var(--text-color);
        border: 1px solid #999;
    }

    .form-actions button:hover {
        opacity: 0.85;
    }

    /* --- Category Details & Flex/Grid Logic --- */
    div.category-detail {
        display: flex;
        padding: 20px;
        gap: 20px;
    }

    div.category-detail p {
        padding-top: 10px;
    }

    article div.category-detail iframe {
        height: 150px;
        margin: 0 0 0 auto;
    }

    /* Specific Location Details */
    div#detail-hq,
    div#detail-warehouse {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    div#detail-hq p,
    div#detail-warehouse p {
        order: 1;
        width: 420px;
    }

    div#detail-hq img,
    div#detail-warehouse img {
        order: 2;
        margin-right: 30px;
        margin-top: auto;
    }

    div#detail-hq iframe,
    div#detail-warehouse iframe {
        order: 3;
        flex-grow: 1;
        width: auto;
    }

    /* Email Field Layout */
    div#detail-email_field {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    div#detail-email_field p {
        order: 1;
        width: 420px;
    }

    div#detail-email_field > img:not(.text-icon) {
        order: 2;
        width: 100px;
        height: 100px;
        border: 0;
    }

    div#detail-email_field a,
    div#detail-email_field p:has(a) {
        display: none; /* Default hidden state based on original code */
    }

    /* --- Responsive Media Queries --- */
    @media (max-width: 1024px) {
        div.category-detail {
            flex-direction: column;
            align-items: center;
        }

        .category-title {
            align-self: center;
        }

        article div.category-detail img {
            width: 30%;
            height: auto;
        }

        article div.category-detail iframe {
            width: 100%;
            margin-top: 20px;
            margin-left: 0;
        }

        div#detail-hq p,
        div#detail-warehouse p {
            width: 100%;
        }

        div#detail-hq img:not(.text-icon),
        div#detail-warehouse img:not(.text-icon) {
            display: none;
        }

    }

    /* Pointer interactions (Touch screens) */
    @media (pointer: coarse) {
        div#detail-email_field > img {
            display: none;
        }

        article div#detail-email_field a {
            display: flex !important;
            order: 2;
            width: auto;
            height: 50px;
            margin-top: 20px;
            margin-left: 20px;
            align-self: center;
        }

        div#detail-email_field p:has(a) {
            display: contents;
            width: 100%;
        }

        @media (max-width: 1024px) {
            div#detail-email_field p {
                width: 100%;
            }
        }
    }

    @media (max-width: 767px) {
        article div#detail-email_field a {
            margin: 20px auto 0;
        }
    }
}

div.width-400 {
    width: 400px;
}

/* Forces labels and inputs to take up their own lines */
#contact-form label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

#contact-form input,
#contact-form textarea {
    width: 100%; /* Makes inputs fill the container width */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

#contact-form textarea {
    height: 120px;
    resize: vertical;
}

/* Button styling */
#contact-form button {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    background-color: #f8f8f8;
    border: 1px solid #999;
    cursor: pointer;
    font-weight: bold;
}

#contact-form button[type="submit"] {
    background-color: #002366; /* Primary action color */
    color: white;
    border: none;
    margin-top: 40px;
}

#contact-form button:hover {
    opacity: 0.9;
}

section#contact-form form button,
section#contact-form form input {
    border-radius: 999px;
}


section#contact-form form textarea {
    border-radius: 20px;
    resize: none;
    height: 200px;
}

div.category-detail {
    display: flex;
    padding: 20px;
}

div.category-detail p {
    padding-top: 10px;
}



article div.category-detail iframe {
    margin-right: 0;
    padding-right: 0;
    /*margin-left: auto;*/
    height: 150px;
    /*width: 100%;*/
}

div#detail-email_field {
    /*display: grid;*/
}

div#detail-email_field p {
    width: 420px;
}

section#content div#detail-hq img,
section#content div#detail-warehouse img {
    order: 2;
    margin-bottom: 0;
    margin-top: auto;
    margin-right: 30px;
}

section#content div#detail-hq p,
section#content div#detail-warehouse p {
    order: 1;
    width: 420px;
}

section#content div#detail-hq iframe,
section#content div#detail-warehouse iframe {
    order: 3;
    width: auto;
    margin-right: 0;
    margin-left: auto;
    flex-grow: 1;
}

div img.text-icon {
    width: 20px !important;
    height: 20px !important;
}

div:not(.row-box) {
    color: #64748B;
    font-family: "Google Sans", "Anuphan", Tahoma, sans-serif !important;
}

div#detail-email_field > img:not(.text-icon) {
    order: 2;
    width: 100px;
    height: 100px;
    /*margin-top: 10px;*/
    /*margin-left: 20px;*/
    border: 0;
    padding: 0;
}

div#detail-email_field p:has(a) {
    display: none;
}

div#detail-email_field a {
    order: 2;
    display: none;
}

div#detail-email_field p {
    order: 1;
}

@media (max-width: 1024px) {
    article div.category-detail {
        display: flex;
        flex-direction: column;
    }

    .category-title {
        align-self: center;
    }

    section#company_banner div {
        align-items: center;
        text-align: center;
        justify-content: center;
        align-self: center;
        width: calc(100% - 30px);
    }

    article div.category-detail img {
        width: 30%;
        height: auto;
    }

    article div.category-detail iframe {
        width: 100%;
        margin-top: 30px;
        margin-left: 0 !important;
    }

    section#content div#detail-hq p,
    section#content div#detail-warehouse p {
        width: 100%;
    }

    section#content div#detail-hq img:not(.text-icon),
    section#content div#detail-warehouse img:not(.text-icon) {
        display: none;
    }

    section#content div#detail-hq img.text-icon,
    section#content div#detail-warehouse img.text-icon {
        width: 20px;
        height: 20px;
    }
}

@media (pointer: coarse) {
    div#detail-email_field > img {
        order: 3;
        display: none;
    }

    article div#detail-email_field a {
        width: 100%;
    }

    article div#detail-email_field a > img {
        padding: 0;
        border: 0;
        border-radius: 0;
    }

    article div#detail-email_field p:has(a) {
        padding-left: 0;
    }

    article div#detail-email_field a,
    article div#detail-email_field a > img {
        order: 2;
        display: flex !important;
        height: 50px;
        width: auto;
        align-self: center;
        margin-top: 20px;
        margin-left: 20px;
        margin-right: auto;
    }



    div#detail-email_field p:has(a) {
        display: contents;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (pointer: coarse) and (max-width: 1024px) {
    div#detail-email_field p {
        width: 100%;
    }
}

@media (pointer: coarse) and (min-width: 1024px) {
    article div#detail-email_field a > img,
    article div#detail-email_field a {
        margin-left: 0;
        margin-top: 0
    }
}

@media (max-width: 767px) {
    article div#detail-email_field a,
    article div#detail-email_field a > img {
        order: 2;
        display: flex !important;
        height: 50px;
        width: auto;
        align-self: center;
        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
    }

    div.width-400 {
        width: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#content.contact-page article {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}