/* ===== 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: 1rem 0;
    margin-bottom: 2rem;
    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;
    }
}

/* ===== COMPANY TABS NAVIGATION ===== */
.company-tabs {
    display: flex;
    gap: 0;
    margin: 3rem 0 3rem 0;
    border-bottom: 1px solid #e5e7eb;
    background-color: transparent;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Webkit系ブラウザのスクロールバー */
.company-tabs::-webkit-scrollbar {
    height: 4px;
}

.company-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.company-tabs::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 2px;
}

.company-tabs::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.company-tab {
    flex: 1;
    min-width: 100px;
    padding: 0.625rem 1rem;
    text-align: center;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    background-color: transparent;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
    outline: none; /* フォーカス時の枠線を削除 */
}

.company-tab:focus {
    outline: none; /* フォーカス時の枠線を削除 */
}

.company-tab:last-child {
    border-right: none;
}

.company-tab:hover {
    color: #dc2626;
    background-color: #f9fafb;
}

.company-tab.active {
    color: #dc2626;
    background-color: transparent;
    border-bottom-color: #dc2626;
    font-weight: 600;
}

@media (max-width: 767px) {
    .company-tabs {
        /* margin: 0.75rem 0 2rem 0; */
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .company-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-width: 90px;
        flex-shrink: 0;
        scroll-snap-align: start;
        touch-action: manipulation;
    }

    .company-tab:first-child {
        padding-left: 0.5rem;
    }

    .company-tab:last-child {
        padding-right: 0.5rem;
    }

    /* スマホでのホバー効果を無効化 */
    .company-tab:hover {
        background-color: transparent;
    }

    /* タッチ時のアクティブ状態 */
    .company-tab:active {
        background-color: #f3f4f6;
    }
}

@media (max-width: 480px) {
    .company-tabs {
        /* margin: 0.5rem 0 1.75rem 0; */
    }

    .company-tab {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        min-width: 85px;
    }
}

/* ===== 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,
.company-container ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

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

.mgl li:last-child,
.company-container 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 ===== */
.map-container {
    margin: 1rem 0 2rem 0;
}

.map-container 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: 0 auto 1rem auto;
}

.map-link-wrapper {
    text-align: center;
    margin-top: 0.75rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: #ffffff;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #dc2626;
    border-radius: 0.175rem;
    transition: all 0.2s ease;
}

.map-link:hover {
    background-color: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.map-link:active {
    transform: translateY(0);
}

.map-link-icon {
    font-size: 1rem;
    line-height: 1;
}

.map-link-text {
    line-height: 1;
}

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

    .map-link {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .map-link-icon {
        font-size: 0.875rem;
    }
}

/* ===== 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;
    }
}

/* ===== BUSINESS PAGE SPECIFIC STYLES ===== */
.business-page .history-group dt {
    width: 300px;
    min-width: 250px;
}

@media (max-width: 767px) {
    .business-page .history-group dt {
        width: 100%;
        min-width: auto;
    }
}

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

.contact-form,
.wpcf7-form {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.form-group,
.wpcf7-form-control-wrap {
    margin-bottom: 1.5rem;
    display: block;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-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;
    box-sizing: border-box;
}

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

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

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

.submit-button,
.wpcf7-submit,
#contact-submit-btn {
    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,
.wpcf7-submit:hover,
#contact-submit-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.submit-button:active,
.wpcf7-submit:active,
#contact-submit-btn:active {
    transform: translateY(0);
}

.submit-button:disabled,
.wpcf7-submit:disabled,
#contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
}

.submit-button:disabled:hover,
.wpcf7-submit:disabled:hover,
#contact-submit-btn:disabled:hover {
    background-color: #dc2626;
    transform: none;
}

/* CF7 バリデーションエラーメッセージ */
.wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    border: 2px solid #dc2626;
    background-color: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.wpcf7-mail-sent-ok {
    border: 2px solid #10b981;
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.wpcf7-response-output {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.375rem;
}

/* CF7 スピナー（ローディング表示） */
.wpcf7-spinner {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ===== SUBMIT LOADING STYLES ===== */
.submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    color: #dc2626;
    font-size: 0.9rem;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-weight: 500;
}

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

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

    .submit-loading {
        margin-left: 0;
        margin-top: 0.5rem;
        display: block;
    }
}

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

/* ===== CONTACT SUCCESS MODAL ===== */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999 !important;
    animation: fadeIn 0.3s ease;
}

.contact-modal[style*="display: block"],
.contact-modal[style*="display:block"] {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.contact-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    margin: 5% auto;
    z-index: 10000;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.contact-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.contact-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.contact-modal-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.contact-modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin: 0 0 1rem 0;
    line-height: 1;
    font-weight: bold;
}

.contact-modal-body p {
    margin: 0.75rem 0;
    color: #374151;
    line-height: 1.6;
    font-size: 1rem;
}

.contact-modal-note {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1rem !important;
}

.contact-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.contact-modal-button {
    background-color: #dc2626;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    min-width: 120px;
}

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

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

.contact-modal-button:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* ===== RESPONSIVE MODAL ===== */
@media (max-width: 767px) {
    .contact-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .contact-modal-header {
        padding: 1.25rem;
    }

    .contact-modal-header h2 {
        font-size: 1.25rem;
    }

    .contact-modal-body {
        padding: 1.5rem 1rem;
    }

    .success-icon {
        font-size: 3rem;
    }

    .contact-modal-footer {
        padding: 1rem;
    }

    .contact-modal-button {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}
