/* 
 * 株式会社テイ産業 ウェブサイト スタイルシート
 * 作成日: 2025年4月4日
 */

/* ===== 基本設定 ===== */
:root {
    --primary-color: #0056b3;
    --secondary-color: #004494;
    --accent-color: #ff6600;
    --text-color: #333;
    --light-text: #fff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --max-width: 1200px;
    --header-height: 80px;
    --footer-bg: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* 10px = 1rem */
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1.5rem auto 0;
}

/* ===== ヘッダー ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}
.logo a {
    font-weight: 500;
    font-size: 1.8rem;
}
.global-nav ul {
    display: flex;
    gap: 1rem;
}

.global-nav a {
    display: block;
    padding: 0.5rem 0;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

/* 通常リンクの下線アニメーション */
.global-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.global-nav a:not(.contact-btn):hover::after {
    width: 100%;
}

/* お問い合わせボタン（特殊デザイン） */
.global-nav .contact-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0.5rem 0;
    width: 200px;
    border-radius: 50px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    font-weight: 500;
    text-decoration: none;
    justify-content: center;
    margin-left : 1rem;
}

/* contact-btnは矢印だけを疑似要素で表示 */
.global-nav .contact-btn::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url('../images/arrow_01w.png'); /* 適切な相対パスに修正 */
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
    transform: translateX(0);
    position: relative;
    top: 1px;
}

/* ホバーで矢印が右に動く＆背景色が変わる */
.global-nav .contact-btn:hover {
    background-color: var(--secondary-color);
}

.global-nav .contact-btn:hover::after {
    transform: translateX(5px);
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* ===== メインビジュアル（Swiper対応）===== */
.main-visual {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    margin-top: var(--header-height);
    overflow: hidden;
}

/* Swiperの各スライド背景画像設定 */
.main-visual .swiper-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* オーバーレイマスク */
.main-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* テキスト配置 */
.main-visual-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    max-width: 1000px;
    padding: 0 2rem;
}

.main-visual h1 {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2rem;
}

.main-visual .main-copy {
    display: block;
    margin-bottom: 1rem;
}

.main-visual .sub-copy {
    display: block;
    font-size: 0.7em;
}

/* Swiperナビゲーションとページネーション（必要に応じて） */
.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    z-index: 3;
}

.swiper-pagination {
    z-index: 3;
}

/* ===== 会社の特徴 ===== */
.company-feature {
    padding: 8rem 0;
    background-color: var(--light-gray);
}

.feature-content {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.feature-content p {
    margin-bottom: 2rem;
}

.more-btn {
    text-align: center;
}

.more-btn a {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1.5rem 4rem;
    border-radius: 50px;
    font-weight: 500;
    position: relative;
}

.more-btn a::after {
    content: '▶';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.more-btn a:hover {
    background-color: var(--secondary-color);
}

/* ===== 数字で見るテイ産業 ===== */
.company-numbers {
    padding: 8rem 0;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.number-item {
    text-align: center;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 4rem 2rem;
    border-radius: 10px;
}

.number-item h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.number-value {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
}

.number-value .unit {
    font-size: 3rem;
}

.chart-container {
    margin-bottom: 2rem;
}

/* ===== INDEX ===== */
.index-section {
    padding: 8rem 0;
    background-color: var(--light-gray);
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.index-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.index-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.index-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.index-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-text);
    padding: 1.5rem;
    text-align: center;
    font-weight: 500;
}

/* ===== お問い合わせセクション ===== */
.contact-section {
    padding: 5rem 0;
    background: url('../images/tay_photo006.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    color: var(--light-text);
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 86, 179, 0.8);
}

.contact-section .container {
    position: relative;
    z-index: 1;
}

.contact-section .section-title {
    color: var(--light-text);
}

.contact-section .section-title::after {
    background-color: var(--light-text);
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.tel-info {
    text-align: center;
}

.tel-label {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.tel-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
}

.reception-time {
    /* font-size: 1.4rem; */
}

.contact-form-btn a {
    display: inline-block;
    background-color: var(--light-text);
    color: var(--primary-color);
    padding: 1rem 5rem;
    border-radius: 50px;
    font-weight: 500;
    position: relative;
}

.contact-form-btn a::after {
    content: '▶';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.contact-form-btn a:hover {
    background-color: var(--medium-gray);
}

/* ===== フッター ===== */
footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem 2rem;

    align-items: flex-end;
}

.footer-info {
    flex: 1;
    min-width: 300px;
}

.footer-logo {
    margin-bottom: 0.5rem;
}
.footer-logo a {
    color : #fff;
    font-size: 2rem;
    margin : 0;
    padding : 0;
}
.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-address p {
    font-size: 0.8rem;
}

.footer-nav {
    flex: 1;
    min-width: 300px;
}
.footer-nav ul {
    display: flex;
    flex-wrap: wrap; /* 折り返し可 */
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-nav li {
    /* 文字幅にフィットさせる */
    width: auto;
    white-space: nowrap; /* 折り返さず1行に */
}

.footer-nav a {
    color: var(--light-text);
    font-size: 0.8rem;
    padding: 0.5rem 0;
    display: inline-block;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
}

/* ===== ページヘッダー ===== */
.page-header {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-header h1 {
    color: var(--light-text);
    font-size: 2.5rem;
    font-weight: 700;
}

/* 各ページのヘッダー背景 */
.renovation-header {
    background-image: url('../images/tay_mv02.jpg');
}

.examples-header {
    background-image: url('../images/tay_mv02.jpg');
}

.contact-header {
    background-image: url('../images/tay_mv01.jpg');
}
.page-header.flow-header {
    background-image: url('../images/flow_header_bg.jpg');
}
.page-header.reason-header {
    background-image: url('../images/company_header_bg.jpg');
}
.page-header.sdgs-header {
    background-image: url('../images/sdgs_header_bg.jpg');
}

/* ===== 大規模修繕工事ページ ===== */
.renovation-overview {
    padding: 8rem 0;
}

.overview-content {
    max-width: 800px;
    margin: 0 auto;
}

.renovation-content {
    padding: 8rem 0;
    background-color: var(--light-gray);
}

.work-item {
    margin-bottom: 6rem;
}

.work-item:last-child {
    margin-bottom: 0;
}

.work-title {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.work-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.work-image {
    flex: 1;
    min-width: 300px;
}

.work-description {
    flex: 1;
    min-width: 300px;
}

/* ===== 施工事例ページ ===== */
.examples-section {
    padding: 8rem 0;
}

.example-category {
    margin-bottom: 6rem;
}

.example-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.example-item {
    margin-bottom: 4rem;
}

.example-item:last-child {
    margin-bottom: 0;
}

.before-after {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.before, .after {
    flex: 1;
    min-width: 300px;
}

.image-container {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.caption {
    text-align: center;
    font-weight: 500;
}

.before .caption {
    color: var(--dark-gray);
}

.after .caption {
    color: var(--primary-color);
}

.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.4rem;
}

.example-description {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== お問い合わせフォーム ===== */
.contact-form-section {
    padding: 8rem 0;
}

.contact-intro {
    text-align: center;
    margin-bottom: 4rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.required {
    color: var(--error-color);
    margin-left: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.privacy-policy {
    display: flex;
    align-items: flex-start;
}

.privacy-policy input {
    margin-top: 0.5rem;
    margin-right: 1rem;
}

.privacy-note {
    color: var(--dark-gray);
}

.form-submit {
    text-align: center;
    margin-top: 4rem;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1.5rem 6rem;
    border: none;
    border-radius: 50px;
    /* font-size: 1.8rem; */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.tel-contact-section {
    padding: 8rem 0;
    background-color: var(--light-gray);
}

.tel-contact-info {
    text-align: center;
}

.tel-number-large {
    font-size: 4.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== 編集可能な画像 ===== */
.editable-image {
    transition: all 0.3s ease;
}

.editable-image:hover {
    opacity: 0.8;
}

/* ===== JavaScript用クラス ===== */
.js-fadeIn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.js-fadeIn.is-show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== レスポンシブ対応 ===== */
@media (max-width: 1024px) {
    html {
        font-size: 58%;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .global-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 2rem;
    }
    
    .global-nav.is-active {
        display: block;
    }
    
    .global-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .global-nav a {
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .main-visual h1 {
        font-size: 3.6rem;
    }
    
    .main-visual .sub-copy {
        font-size: 2.8rem;
    }
    
    .numbers-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .work-content, .before-after {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 55%;
    }
    
    .section-title {
        font-size: 2.4rem;
    }
    
    .page-header {
        height: 200px;
    }
    
    .page-header h1 {
        font-size: 3rem;
    }
    
    .tel-number, .tel-number-large {
        font-size: 3.6rem;
    }
}

.form-errors {
    background-color: #ffeaea;
    border: 1px solid #ff5c5c;
    color: #d8000c;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    font-size: 0.95em;
  }
  
  .form-errors ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
  }
  
  .form-errors li {
    margin-bottom: 8px;
  }