
/* 1. Resetting default browser margins/padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Improving the body link style */
a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s; /* Smooth color change on hover */
}

a:hover {
    opacity: 0.7;
}

/* Font focus for Japanese readability */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    background-color: #fcfcfc;
    color: #333;
    line-height: 1.8;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header with Sub-logo style */
header {
    background: #fff;
    padding: 10px 0;
    border-bottom: 3px solid #004098; /* Classic Japanese Corporate Blue */
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none; /* Removes the underline */
    color: inherit;        /* Inherits the color from the H1 (e.g., #004098) */
    display: block;        /* Makes the entire area clickable */
}

.logo a span {
    font-size: 12px;
    color: #aaa;
    margin-left: 10px;
}

.logo a:hover {
    opacity: 0.8;          /* Gives a subtle visual cue when hovered */
}

.sub-logo {
    font-size: 12px;
    color: #888;
    margin-top: -5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    font-size: 20px;
}

nav ul li a.active { color: #004098; }

/* Main Visual */
.main-visual {
    width: 100%;
    aspect-ratio: 1024 / 552;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url("Top1.jpg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: column; /* Stack H2 and P vertically */
    align-items: center;
    justify-content: center;
    color: #fff; /* Make text white to stand out */
    text-align: center;
    margin-bottom: 20px;
}

.main-visual h2 {
    font-size: 28px;
    letter-spacing: 0.1em; /* Essential for Japanese titles */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 2-Column Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    margin-top: 40px;
}

/* Section Titles with Japanese/English mix */
.section-title {
    border-left: 5px solid #004098;
    padding-left: 15px;
    margin-bottom: 20px;
    font-size: 20px;
}

.section-title span {
    font-size: 12px;
    color: #aaa;
    margin-left: 10px;
}

.side-news .section-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.news-list-sidebar dt {
    font-size: 12px;
    color: #004098; /* Corporate Blue */
    font-weight: bold;
    margin-bottom: 2px;
}

.news-list-sidebar dd {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px; /* Gap between news items */
    padding-bottom: 10px;
    border-bottom: 1px dotted #ccc;
    margin-left: 0; /* Resetting margin from main-content version */
}

.news-list-sidebar dd a {
    color: #333;
    text-decoration: none;
}

.news-list-sidebar dd a:hover {
    color: #004098;
    text-decoration: underline;
}

/* Corporate Data Table */
.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th, .company-table td {
    padding: 15px;
    border: 1px solid #eee;
    text-align: left;
}

.company-table th {
    background: #f9f9f9;
    width: 30%;
}

/* Sidebar Banners */
.side-banner a {
    display: block;
    background: #004098;
    color: white;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: bold;
}

.side-banner.secondary a { background: #555; }

.side-contact {
    border: 2px solid #004098;
    padding: 20px;
    text-align: center;
}

.tel {
    font-size: 20px;
    font-weight: bold;
    color: #004098;
    margin: 10px 0;
}

footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

/* --- Greeting Section (Appeal) --- */

.intro-text {
    padding: 10px;
    background-color: #f9f9f9; /* Light grey background to make it stand out */
    margin-bottom: 10px;
}

.intro-text h4 {
    font-size: 18px;
    color: #004098;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Product Section Layout */
.product-grid {
    display: grid;
    /* Create 3 equal columns with a 20px gap */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.product-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    text-align: center; /* Centers text and images */
    transition: transform 0.3s ease;

    /* Add these lines */
    display: flex;
    flex-direction: column; /* Stacks children vertically */
    height: 100%;           /* Ensures all boxes in the grid are equal height */
}

/* Create a wrapper in your HTML around the H4 and UL/P tags */
.product-text-content {
    margin-top: auto;       /* The "Magic" line: pushes this div to the bottom */
    padding-top: 15px;      /* Space between the image and the text */
}

/* Hover effect to make it interactive */
.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    margin-bottom: 15px;
    background: #f0f0f0; /* Placeholder color if image is missing */
    aspect-ratio: 4 / 3; /* Keeps all images the same size */
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the box without stretching */
}

.product-item h4 {
    color: #004098;
    font-size: 16px;
    margin-bottom: 10px;
}

.product-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}


/* ------------------------------------------ */
/* Container for the whole row */
.product-detail-row {
    margin-bottom: 0px;
}

/* The header at the top of each row */
.row-header {
    border-bottom: 1px solid #333; /* The horizontal divider line */
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.row-header h4 {
    font-size: 20px;
    color: #004098;
    font-weight: bold;
}

.row-content {
    display: flex;
    gap: 40px;           /* Space between the two main columns */
    align-items: flex-start;
}

/* Left Column Styling */
.left-col {
    flex: 0 0 45%;       /* Takes up 45% of the width */
}

.product-detail-image img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    margin-bottom: 15px; /* Space between image and overview text */
}

/* Right Column Styling */
.right-col {
    flex: 1;             /* Takes up the remaining 55% space */
}

/* Typography Adjustments */
.section-label {
    color: #004098;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

.overview-box {
    background-color: #f9f9f9; /* Subtle background for the overview area */
    padding: 15px;
    border-radius: 4px;
}

/* The text area expands to fill the rest of the width */
.product-detail-text {
    flex: 1; 
}

.product-detail-text h3 {
    font-size: 32px; /* Large blue text like image_8cf983.png */
    color: #004098;
    border-left: 4px solid #004098;
    padding-left: 15px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.content-section {
    margin-bottom: 20px;
}

.section-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.product-detail-text p {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

/* ------------------------------------------ */
/* About Page Specific Styles */
.about-row {
    margin-bottom: 50px;
}

/* Company Profile Table */
.company-profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.company-profile-table th, 
.company-profile-table td {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    line-height: 1.6;
}

.company-profile-table th {
    background-color: #f8f9fa;
    color: #004098;
    width: 25%;
    font-size: 15px;
}

.company-profile-table td {
    font-size: 15px;
}

/* Access and Map */
.access-info {
    margin: 15px 0;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #eee;
}

.map-container {
    width: 100%;
    margin-top: 15px;
    border: 1px solid #ddd;
}

/* ------------------------------------------ */

/* --- Contact Section Styles --- */
.contact-hero {
    background-color: #0d1b2a; /* Dark background matching your hero */
    color: white;
    text-align: center;
    padding: 80px 20px 60px;
}

.contact-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.contact-hero p {
    font-size: 1rem;
    opacity: 0.8;
}

.form-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.95rem;
}

.required::after {
    content: "*";
    color: #e11d48;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}


/* ----------------------------------- */

/* Success Page Specific Styles */
.success-content {
    padding: 100px 20px; /* High vertical padding to center the message on screen */
    text-align: center;
    background: #fff;
    margin: 40px 0;
    border: 1px solid #eee;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #004098; /* Your Corporate Blue */
    color: #fff;
    font-size: 40px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-content h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
}

.success-content p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 10px;
}

.success-sub {
    font-size: 13px;
    color: #999 !important;
    margin-top: 20px;
}

.btn-area {
    margin-top: 40px;
}

.back-btn {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #004098; /* Changes to blue on hover */
}

/* ----------------------------------- */
/* Phone setting */
@media (max-width: 768px) {
    .header-flex, .main-grid {
        display: block; /* Stack everything vertically */
    }

    nav ul {
        flex-direction: column;
        padding-top: 20px;
    }

    aside {
        margin-top: 40px; /* Give the sidebar space when it moves below main */
    }
}