/* Base styles and compatibility fixes */
* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* Remove underline from all links */
a {
    text-decoration: none !important;
}

/* Custom Bootstrap overrides for better compatibility */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}
@media (max-width: 992px) {
    .navbar-nav {
       padding-top: 2rem; 
    }
    .navbar-nav .nav-item {
        border-top: 1px solid rgba(0,0,0,0.1);
        padding: 0.5rem 1rem;
    }
    .navbar-nav .nav-item .active {
        border-bottom: 0px solid #023e8a !important;
    }
    .language-switcher {
        text-align: right;
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 1rem;
    }
    .business-introduction {
        background-size: 220% !important;
        background-position: top right !important;
    }
}
/* Header and navigation */
.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* Brand logo styles */
.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 24px;
}

.navbar-brand img {
    height: 50px;
    display: block;
}
.navbar-nav .nav-item .active {
    color: #023e8a;
    border-bottom: 2px solid #023e8a;
}
/* Language switcher styles */
.language-icon {
    height: 24px;
    vertical-align: middle;
}
.language-text {
    display: inline-block;
    text-decoration: none;
    color: #666666;
    margin-right: 5px;
    font-size: 14px;
}

.language-text.active {
    font-weight: bold;
    color: #023e8a;
}
/* Hero section */
.hero {
    background-image: url('../img/banner_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem 0;
    color: white;
}
.carousel-item {
    height: 500px;
}
.index-h2 {
    border-bottom: 1px solid rgb(173, 173, 173);
    padding-bottom: 20px;
    position: relative;
    color: #023e8a;
}
.index-h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: rgba(2, 62, 138, 0.5);
    position: absolute;
    bottom: 0;
    left: 0;
}
.index-h2::after { 
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background:  rgba(2, 62, 138, 1);
    position: absolute;
    bottom: 0;
    left: 0;
}
.index-h2 span {
    font-size: 18px;
    color: #c5c5c5;
}
.business-introduction {
    background-image: url('../img/business_bg.jpg');
    background-size: 100%;
    background-position: top center;
    background-repeat: no-repeat;
}
.business-introduction .container {
    background-color: #fff;
    text-align: center;
}
.business-text-h2 {
    color: #023e8a;
    margin-bottom: 20px;
    text-align: center;
    padding-top: 30px;
}
.business-text-h3 {
    color: #c5c5c5;
    margin-bottom: 20px;
    text-align: center;
}
.business-title {
    position: relative;
}
.business-title::before { 
    content: '';
    display: block;
    width: 40%;
    height: 1px;
    background: rgba(171, 171, 171, 0.5);
    position: absolute;
    bottom: -30px;
    left: calc(60% - 30%);
}
.business-btn {
    border: 2px solid #023e8a;
    background-color: transparent;
    color: #023e8a;
    border-radius: 50px;
    margin-bottom: 30px;
    width: 50%;
    font-size: 20px;
}
.business-btn:hover { 
    background-color: #023e8a;
    color: white;
}
/* Footer */
footer {
    background-color: #343a40;
    color: white;
}
.bg-lanm_01 {
    background: linear-gradient(rgba(2, 62, 138, 0.5), rgba(100, 181, 246, 0.5)), url('../img/lanm_01.jpg'); 
}
.bg-lanm_02 {
    background: linear-gradient(rgba(2, 62, 138, 0.5), rgba(100, 181, 246, 0.5)), url('../img/lanm_02.jpg');
}
.bg-lanm_03 {
    background: linear-gradient(rgba(2, 62, 138, 0.5), rgba(100, 181, 246, 0.5)), url('../img/lanm_03.jpg');
}
.bg-lanm_04 {
    background: linear-gradient(rgba(2, 62, 138, 0.5), rgba(100, 181, 246, 0.5)), url('../img/lanm_04.jpg');
}
.bg-lanm_05 {
    background: linear-gradient(rgba(2, 62, 138, 0.5), rgba(100, 181, 246, 0.5)), url('../img/lanm_05.jpg');
}
.bg-cover {
    background-size: cover;
    background-position: center;
    padding: 100px 0; 
    width: 100%; 
    margin: 0;
}
/* IE11 specific fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* IE11 flexbox fix */
    .d-flex {
        display: -ms-flexbox !important;
        display: flex !important;
    }
    
    .row {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        margin-right: -15px;
        margin-left: -15px;
    }
}

/* Print styles */
@media print {
    .navbar, footer {
        display: none !important;
    }
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Custom button styles */
.btn-transparent-white {
    background-color: transparent !important;
    border: 2px solid white !important;
    color: white !important;
    transition: all 0.3s ease !important;
    border-radius: 50px !important;
    padding-left: 50px !important;
    padding-right: 50px !important;
}

.btn-transparent-white:hover {
    background-color: white !important;
    color: #333 !important;
}

/* Custom blue button */
.btn-custom-blue {
    background-color: #005bac !important;
    border-color: #005bac !important;
    color: white !important;
    border-radius: 50px !important;
    padding-left: 50px !important;
    padding-right: 50px !important;
}

.btn-custom-blue:hover {
    background-color: #012a63 !important;
    border-color: #012a63 !important;
}

.company-overview h5 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #005bac;
    border-bottom: 1px solid #005bac;
    padding-bottom: 10px;
}
.company-overview p {
    line-height: 200%;
}
.company-overview li {
    list-style-type: decimal;
    line-height: 200%;
    padding-bottom: 20px;
}
.company-overview ul {
    padding-left: 20px;
}
.services .card-title {
    position: relative;
}
.services .card-title:before { 
    content: "";
    position: absolute;
    bottom: -20px;
    left: calc(50% - 3%);
    width: 6%;
    height: 3px;
    background-color: #005bac;
}
.services .card-body .card-text {
    line-height: 200%;
    padding-left: 20px;
    padding-right: 20px;
}

.product-catalog a.product-link {
    color: #000;
    text-decoration: none;
}

.product-catalog a.product-link:hover .row {
    background-color: #f0f7ff;
}
.product-catalog a.product-link img {
    width: 100%;
    height: 200px;
}
.product-title {
    position: relative;
    padding-left: 40px;
}
.product-title::before { 
    content: "";
    position: absolute;
    left: 20px;
    width: 5px;
    height: 34px;
    background-color: #005bac;
}
.product-categories .product-title {
    padding-left: 20px;
}
.product-categories .product-title::before {
    left: 0px;
}
.product-categories .list-group-item {
    font-size: 1.25rem;
    padding: 15px 20px;
}
.product-categories .list-group-item:hover {
    background-color: #f0f7ff;
}
.product-categories .list-group-item a {
    color: #333;
}
.product-pagination .pagination {
    justify-content: center;
}
.featured-products .card-img-top {
    height: 200px;
    object-fit: cover;
}
.featured-products .card-title {
    min-height: 60px;
}

/* Category toggle styles */
.category-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-toggle:hover {
    color: #0d6efd !important;
    font-weight: bold;
}

.category-toggle.active-category {
    color: #0d6efd !important;
    font-weight: bold;
    border-left: 3px solid #0d6efd;
    padding-left: 10px;
}

.list-group-item {
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Product display transitions */
.product-link {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

/* Japanese text line break control */
@media (max-width: 768px) {
    .m-text1,
    .m-text2,
    .m-text3 {
        padding-left: 2rem;
        padding-right: 2rem;
        text-align: center;
        align-content: flex-start;
    }
    .m-text1 h1,
    .m-text2 h1,
    .m-text3 h1 {
        font-size: 1.6rem !important;
    }
    .m-text1 p,
    .m-text2 p,
    .m-text3 p {
        font-size: 1.1rem !important;
    }
    .m-text1 img,
    .m-text2 img,
    .m-text3 img {
        width: 80%;
    }
   
    .m-text1 .col-lg-5,
    .m-text2 .col-lg-5,
    .m-text3 .col-lg-5 {
        order: 1;
        margin-bottom: 20px;
    }
    
    .m-text1 .col-lg-7,
    .m-text2 .col-lg-7,
    .m-text3 .col-lg-7 {
        order: 2;
    }
}
