/* ===== COMPANY PAGES CSS ===== */
/* Unified styling for company HTML files to match main site design */

main.main {
    margin-top: 20px;
}

/* ===== BASE STYLES ===== */
.company-page {
    font-family: "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
    letter-spacing: 0.025em;
}

/* ===== CONTAINER & LAYOUT ===== */
.company-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .company-container {
        padding: 3rem 2rem;
    }
}

/* ===== BANNER SECTION ===== */
#bana01 {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* #bana01::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
} */

#bana01 h1 {
    position: relative;
    z-index: 2;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    #bana01 h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 767px) {
    #bana01 h1 {
        font-size: 1.4rem;
    }
}

/* ===== TABLE STYLES ===== */
.tablestyle01,
.tablestyle02,
.tablestyle03 {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tablestyle01 th,
.tablestyle02 th,
.tablestyle03 th,
.tablestyle01 td,
.tablestyle02 td,
.tablestyle03 td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.tablestyle01 th,
.tablestyle02 th,
.tablestyle03 th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    width: 150px;
    min-width: 120px;
}

.tablestyle01 td,
.tablestyle02 td,
.tablestyle03 td {
    background-color: white;
    color: #4b5563;
}

.tablestyle01 tr:hover,
.tablestyle02 tr:hover,
.tablestyle03 tr:hover {
    background-color: #f8fafc;
}

.tablestyle01 tr:last-child th,
.tablestyle01 tr:last-child td,
.tablestyle02 tr:last-child th,
.tablestyle02 tr:last-child td,
.tablestyle03 tr:last-child th,
.tablestyle03 tr:last-child td {
    border-bottom: none;
}

/* ===== NESTED TABLES (for corporate history) ===== */
.tablestyle02 td table,
.bobt table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

.tablestyle02 td table td,
.bobt table td {
    padding: 0.5rem 0;
    border-bottom: none;
    background: transparent;
}

.tablestyle02 td table td:first-child,
.bobt table td:first-child {
    font-weight: 600;
    color: #dc2626;
    min-width: 80px;
    padding-right: 1rem;
}

/* ===== RESPONSIVE TABLE DESIGN ===== */
@media (max-width: 767px) {
    .tablestyle01,
    .tablestyle02,
    .tablestyle03 {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tablestyle01 th,
    .tablestyle02 th,
    .tablestyle03 th {
        min-width: 100px;
        width: auto;
    }

    .tablestyle01 td,
    .tablestyle02 td,
    .tablestyle03 td {
        min-width: 200px;
    }
}

/* ===== LIST STYLES ===== */
.mgl,
ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.mgl li,
ul li {
    margin-bottom: 0.5rem;
    color: #4b5563;
    line-height: 1.6;
}

.mgl li:last-child,
ul li:last-child {
    margin-bottom: 0;
}

/* ===== PARAGRAPH AND TEXT STYLES ===== */
/* p {
  margin: 1rem 0;
  line-height: 1.6;
  color: #4b5563;
} */

p.bana_b {
    font-weight: 600;
    font-size: 1.1rem;
    color: #dc2626;
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid #dc2626;
    display: inline-block;
}

p[align="right"] {
    text-align: right;
    font-style: italic;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===== LINK STYLES ===== */
/* a {
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s ease;
} */

/* a:hover {
    color: #b91c1c;
    text-decoration: underline;
} */

/* ===== IFRAME (Google Maps) RESPONSIVE ===== */
iframe {
    display: block;
    width: 80%;
    max-width: 100%;
    height: 500px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
}

@media (max-width: 767px) {
    iframe {
        /* width: 100% !important; */
        max-height: 30vh;
    }
}

/* ===== GROUP/LINK TABLE SPECIAL STYLING ===== */
.tablestyle03 {
    text-align: center;
}

.tablestyle03 th {
    text-align: center;
    vertical-align: middle;
    width: 120px;
    background-color: #f3f4f6;
}

.tablestyle03 td:nth-child(2) {
    font-weight: 600;
    color: #374151;
}

.tablestyle03 td:nth-child(3) {
    font-family: monospace;
    font-size: 0.9rem;
}

.tablestyle03 img {
    max-width: 80px;
    height: auto;
    border-radius: 0.25rem;
    transition: transform 0.2s ease;
}

.tablestyle03 a:hover img {
    transform: scale(1.05);
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-2 {
    margin-top: 1rem;
}

/* ===== PRINT STYLES ===== */
@media print {
    #bana01 {
        background: #dc2626 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }

    .tablestyle01,
    .tablestyle02,
    .tablestyle03 {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    iframe {
        display: none;
    }
}

.recruitment-notice {
    font-weight: bold;
    font-size: 1.5em;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
/* @media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
} */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tablestyle01 th,
    .tablestyle02 th,
    .tablestyle03 th {
        background-color: #000;
        color: #fff;
    }

    .tablestyle01 td,
    .tablestyle02 td,
    .tablestyle03 td {
        border: 2px solid #000;
    }
}

/* ===== HISTORY LIST STYLES (for corporate history) ===== */
.history-list {
    margin: 2rem 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-group {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.history-group:last-child {
    border-bottom: none;
}

.history-group:hover {
    background-color: #f8fafc;
}

.history-group dt {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    padding: 1rem;
    border-right: 1px solid #e5e7eb;
    width: 150px;
    min-width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.history-group dd {
    padding: 1rem;
    margin: 0;
    flex-grow: 1;
}

.history-group dd p {
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: flex-start;
}

.history-group dd p:last-child {
    margin-bottom: 0;
}

.history-group dd .date {
    font-weight: 600;
    color: #dc2626;
    min-width: 95px;
    padding-right: 1rem;
    flex-shrink: 0;
}

/* ===== RESPONSIVE HISTORY LIST ===== */
@media (max-width: 767px) {
    .history-group {
        flex-direction: column;
    }
    .history-group dt {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
        font-size: 1.1rem;
    }
    .history-group dd {
        padding-top: 1.25rem;
    }
    .history-group dd p {
        flex-direction: column;
    }
    .history-group dd .date {
        padding-bottom: 0.25rem;
        min-width: auto;
    }
}

/* ===== CONTACT FORM STYLES ===== */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
    padding: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.required {
    color: #dc2626;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-submit {
    margin-top: 2rem;
}

.submit-button {
    background-color: #dc2626;
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.submit-button:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.submit-button:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE FORM DESIGN ===== */
@media (max-width: 767px) {
    .contact-form {
        max-width: 100%;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    border-radius: 2px;
}
