@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&display=swap');

:root {
    --color-body: #f5f5f5;
    --color-heading: #2a2a2a;
    --color-base: #4a5a6f;
    --color-base2: #5a6a7f;
    --color-brand: #5a7a9f;
    --color-brand2: #6a8aaf;
    --sidbar-width: 240px;
    --font-base: "Bai Jamjuree";
}

.field.error .item{
    border-color: red;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-base2);
    color: var(--color-body);
    font-family: var(--font-base), sans-serif;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* Responsive Typography */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h5 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

h6 {
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.display-4 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

@media (max-width: 768px) {
    .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .lead {
        font-size: 1rem;
    }
}

#extra-pic {
    display: none;  /*Hide the image by default */
    margin: 0 auto 2rem;
    object-fit: cover;
}

@media (max-width: 991px) {
    #extra-pic {
        display: block;
        height: auto;
        max-width: 250px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    #extra-pic {
        max-width: 200px;
    }
}

a {
    text-decoration: none;
    color: var(--color-body);
    transition: all 0.4s ease;
}

a:hover {
    color: var(--color-brand);
}

img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Responsive images */
.card-custom-image img,
.service img,
.iconbox img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.text-brand {
    color: #ffffff;
    font-weight: 600;
}

.bg-base {
    background-color: var(--color-base);
}

.full-height {
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
    border-bottom: 2px solid rgba(255,255,255, 0.2);
}

@media (max-width: 768px) {
    .full-height {
        padding-top: 100px;
        padding-bottom: 60px;
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .full-height {
        padding-top: 80px;
        padding-bottom: 40px;
    }
}

.shadow-effect {
    transition: all 0.5s;
}

.shadow-effect:hover {
    box-shadow: -6px 6px 0 0 var(--color-brand);
}

.iconbox {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background-color: var(--color-brand);
    color: var(--color-base);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .iconbox {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
}

/* NAVBAR */
.navbar {
    background-color: var(--color-base);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.25rem;
}

.navbar .nav-link {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-body);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--color-brand);
}

.navbar .nav-link.active {
    color: var(--color-brand);
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .navbar {
        padding: 0.75rem 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-collapse {
        background-color: var(--color-base);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 8px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .navbar .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .navbar .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* Ensure content doesn't hide behind navbar */
    #content-wrapper {
        padding-top: 70px;
    }
}

@media (min-width: 992px) {
    .navbar {
        min-height: 100vh;
        width: var(--sidbar-width);
        background: linear-gradient(rgba(74, 90, 111, 0.75), rgba(90, 106, 127, 0.8)), url(../images/sidebar-img.jpg);
        background-size: cover;
        background-position: center;
    }

    .navbar-brand img {
        border: 8px solid var(--color-brand);
        max-width: 150px;
    }

    /* CONTENT WRAPPER */
    #content-wrapper {
        padding-left: var(--sidbar-width);
    }
}

/* BTN */
.btn {
    padding: 12px 28px;
    font-weight: 700;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

.btn-brand {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: #ffffff;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--color-brand2);
    color: #ffffff;
    border-color: var(--color-brand2);
}

.link-custom {
    font-weight: 700;
    position: relative;
    display: inline-block;
    word-break: break-word;
}

.link-custom::after {
    content: "";
    width: 0%;
    height: 2px;
    background-color: var(--color-brand);
    position: absolute;
    left: 0;
    top: 110%;
    transition: all 0.4s;
}

.link-custom:hover::after {
    width: 100%;
}

@media (max-width: 576px) {
    .link-custom {
        font-size: 0.95rem;
        white-space: normal;
    }
}

/* CARD */
.card-custom {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-custom .card-custom-image {
    overflow: hidden;
    height: 250px;
}

.card-custom .card-custom-image img {
    transition: all 0.4s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-custom:hover .card-custom-image img {
    transform: scale(1.1);
}

.card-custom-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-custom-content h4 {
    margin-bottom: 1rem;
}

.card-custom-content p {
    flex: 1;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .card-custom .card-custom-image {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .card-custom .card-custom-image {
        height: 180px;
    }
    
    .card-custom-content {
        padding: 1.5rem !important;
    }
}

/* CONTACT */
#contact .form-control {
    background-color: var(--color-base);
    border-color: var(--color-base);
    color: var(--color-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#contact .form-control:focus {
    border-color: var(--color-brand);
    box-shadow: none;
    background-color: var(--color-base);
    color: var(--color-body);
}

#contact .form-control::placeholder {
    color: var(--color-body);
    opacity: 0.7;
}

#contact input.form-control {
    height: 44px;
}

@media (max-width: 576px) {
    #contact .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #contact input.form-control {
        height: 48px;
    }
    
    #contact textarea.form-control {
        min-height: 120px;
    }
}

/* SOCIAL ICONS 
.social-icons {

}*/

.social-icons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-base);
    border-radius: 100px;
    font-size: 24px;
}

/* Service Cards */
.service {
    height: 100%;
    transition: all 0.3s ease;
}

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

@media (max-width: 768px) {
    .service {
        margin-bottom: 1.5rem;
    }
}

/* Container and Spacing */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .px-lg-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Section Spacing */
section {
    overflow-x: hidden;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

.row > * {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Text Alignment */
@media (max-width: 768px) {
    .text-lg-center {
        text-align: center !important;
    }
}

/* Home Section Specific */
#home h1 {
    word-wrap: break-word;
}

#home .btn,
#home .link-custom {
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    #home .btn {
        width: 100%;
        margin-right: 0 !important;
    }
    
    #home .link-custom {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Footer */
footer {
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    footer {
        font-size: 0.85rem;
        text-align: center;
    }
}

