/* Basic Reset & Body Style */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Meiryo, 'Hiragino Kaku Gothic ProN', 'MS PGothic', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9; /* A light, clean background */
    color: #333;
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: #005a9c;
    background-image: 
        linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.8)),
        url('../images/header.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    border-bottom: 5px solid #002d4e;
    padding: 60px 5%;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header h1 {
    color: #ffffff;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
    font-size: 4em; /* Larger for better impact on image background */
    margin-bottom: 10px;
}

nav {
    width: 100%;
    margin-top: 30px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Arrange navigation items horizontally */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: flex-start;
}

nav ul li {
    margin-right: 15px;
    margin-bottom: 10px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff; /* White text for dark background */
    font-weight: bold;
    padding: 10px 20px;
    font-size: 1.1em;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    background-color: #ffffff;
    color: #005a9c;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Main Content Area */
main {
    padding: 40px 5%;
    width: 100%;
    min-height: 60vh; /* Ensure content area has a decent height */
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 5%;
    margin-top: 40px;
    background-color: #333;
    color: #fff;
    width: 100%;
}

/* Section Styling */
main section {
    margin-bottom: 40px;
}

main h2 {
    border-bottom: 2px solid #005a9c;
    padding-bottom: 5px;
    margin-bottom: 20px;
    color: #005a9c;
}

/* Table Styling for Company Overview */
#overview table {
    width: 100%;
    border-collapse: collapse;
}

#overview th, #overview td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

#overview th {
    background-color: #f2f2f2;
    width: 25%;
    font-weight: bold;
}

#overview td ul {
    margin: 0;
    padding-left: 20px;
}

/* Definition List Styling for History */
#history dl {
    border-left: 3px solid #005a9c;
    padding-left: 20px;
}

#history dt {
    font-weight: bold;
    margin-top: 15px;
}

#history dd {
    margin-left: 0;
    padding-left: 10px;
}

/* Hero Image Styling for Top Page */
.hero-container {
    position: relative;
    text-align: center;
    color: white;
    margin: 40px 0; /* Increased margin */
    overflow: hidden;
    border-radius: 8px; /* Rounded corners for the container */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient that darkens the center for better contrast with white text */
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.hero-image {
    width: 100%;
    height: 500px; /* Increased height for index hero */
    display: block;
    object-fit: cover;
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: #ffffff; /* Pure white for maximum contrast */
    font-size: clamp(1.5em, 4.5vw, 3.5em);
    font-weight: 900; /* Extra bold */
    letter-spacing: 0.2em; /* Spacious letter spacing for premium look */
    text-align: center;
    width: 90%;
    /* Multi-layered shadow for readability on any background */
    text-shadow: 
        0 0 20px rgba(0, 0, 0, 0.8),
        2px 2px 10px rgba(0, 0, 0, 1);
    line-height: 1.2;
}

/* Service Page Styling */
.service-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Reverse layout for odd sections */
.service-section.reverse {
    flex-direction: row-reverse;
}

.service-image {
    flex: 1; /* Each part takes up equal space */
}

.service-image img {
    width: 100%;
    height: 400px; /* Set a fixed height */
    object-fit: cover; /* Ensure images cover the area without distortion */
    display: block;
    border-radius: 5px;
}

.service-description {
    flex: 1; /* Each part takes up equal space */
}

.service-description h2 {
    border-bottom: none;
    margin-top: 0;
}

/* Responsive adjustments for service sections */
@media (max-width: 768px) {
    .service-section, .service-section.reverse {
        flex-direction: column;
    }
}

/* Home Page Sections */
.home-sections-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 30px;
    margin-top: 40px;
}

.home-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.home-section h2 {
    border-bottom: none;
    margin-top: 0;
}

.cta-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #005a9c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #003d6b;
}

/* Responsive adjustments for home sections */
@media (max-width: 768px) {
    .home-sections-container {
        grid-template-columns: 1fr; /* Stack to a single column */
    }
}

/* Contact Page Styling */
#contact-form-section {
    max-width: 800px;
    margin: 0 auto 60px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.8;
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.contact-form .required {
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #005a9c;
    box-shadow: 0 0 5px rgba(0, 90, 156, 0.2);
    outline: none;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing only */
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit .cta-button {
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    border: none;
    font-size: 1.1em;
}

/* Response styles for mobile */
@media (max-width: 768px) {
    #contact-form-section {
        padding: 20px;
    }
}

#job-opening h3 {
    margin-top: 0;
    font-size: 1.5em;
    color: #005a9c;
}

#job-opening table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#job-opening th, #job-opening td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

#job-opening th {
    background-color: #f2f2f2;
    width: 25%;
    font-weight: bold;
}

#benefits ul {
    list-style-type: '✓ '; /* Custom bullet point */
    background-color: #fff;
    padding: 30px 30px 30px 50px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#benefits li {
    margin-bottom: 10px;
}

#application-process {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}
/* Styles for under construction pages */
.under-construction {
    text-align: center;
    padding: 50px 20px;
}

.under-construction img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Center image and add space below */
}

.under-construction p {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 10px;
}

/* New Grid Layout for Service Section */
.service-section.service-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    grid-template-rows: 1fr 1fr;    /* Two equal rows */
    gap: 20px; /* Gap between grid items */
    align-items: stretch; /* Stretch items to fill grid cells */
    background-color: #fff; /* Re-apply background from original service-section */
    padding: 30px; /* Re-apply padding */
    border-radius: 8px; /* Re-apply border-radius */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Re-apply shadow */
}

.service-description {
    grid-column: 1; /* Place in the first column */
    grid-row: 1;    /* Place in the first row */
    /* Ensure text content fills its grid cell */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px; /* Add some padding around text */
}

.service-location-label {
    display: inline-block;
    background-color: #005a9c;
    color: #fff;
    padding: 5px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 50px;
    margin-bottom: 15px;
    align-self: flex-start;
}

.service-main-title {
    font-size: 2em;
    line-height: 1.3;
    color: #333;
    margin: 0 0 20px 0;
    font-weight: 800;
}

.service-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-details li {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.service-details li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: #005a9c;
    font-size: 0.8em;
    top: 0.2em;
}

.service-section.service-grid-layout .service-grid-image img {
    width: 100%;
    height: 100%; /* Make image fill its container */
    max-height: 400px; /* Limit image height */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 5px; /* Re-apply border-radius */
}

/* Specific placement for images in the grid */
.service-section.service-grid-layout .service-grid-image:nth-of-type(2) { /* First image div after description */
    grid-column: 2;
    grid-row: 1;
}

.service-section.service-grid-layout .service-grid-image:nth-of-type(3) { /* Second image div after description */
    grid-column: 1;
    grid-row: 2;
}

.service-section.service-grid-layout .service-grid-image:nth-of-type(4) { /* Third image div after description */
    grid-column: 2;
    grid-row: 2;
}

/* Responsive adjustments for the new grid layout */
@media (max-width: 768px) {
    .service-section.service-grid-layout {
        grid-template-columns: 1fr; /* Stack to a single column */
        grid-template-rows: auto;   /* Auto height for rows */
    }
    .service-section.service-grid-layout .service-description {
        grid-column: auto;
        grid-row: auto;
    }
    .service-section.service-grid-layout .service-grid-image:nth-of-type(2),
    .service-section.service-grid-layout .service-grid-image:nth-of-type(3),
    .service-section.service-grid-layout .service-grid-image:nth-of-type(4) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Specific overrides for reversed grid layout */
.service-section.service-grid-layout.reverse .service-description {
    grid-column: 2; /* Place in the second column for reverse layout */
    grid-row: 1;    /* Place in the first row */
}

.service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(2) { /* First image div after description */
    grid-column: 1;
    grid-row: 1;
}

.service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(3) { /* Second image div after description */
    grid-column: 1;
    grid-row: 2;
}

.service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(4) { /* Third image div after description */
    grid-column: 2;
    grid-row: 2;
}

/* Media query adjustments for reversed grid layout */
@media (max-width: 768px) {
    .service-section.service-grid-layout.reverse .service-description {
        grid-column: auto;
        grid-row: auto;
    }
    .service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(2),
    .service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(3),
    .service-section.service-grid-layout.reverse .service-grid-image:nth-of-type(4) {
        grid-column: auto;
        grid-row: auto;
    }
}