/* 全体のリセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Noto Sans JP', "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    height: 100%;
    scroll-behavior: smooth;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-family: 'yu-mincho', 'Yu Mincho', '游明朝体', 'Hiragino Mincho Pro', 'ヒラギノ明朝 Pro W3', 'メイリオ', Meiryo, Osaka, 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    font-family: 'yu-mincho', 'Yu Mincho', '游明朝体', 'Hiragino Mincho Pro', 'ヒラギノ明朝 Pro W3', 'メイリオ', Meiryo, Osaka, 'ＭＳ Ｐ明朝', 'MS PMincho', serif;
}

h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: #0047AB;
    margin: 15px auto 0;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0047AB;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #3356f4;
    opacity: 0.8;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav ul {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    color: #333;
    font-weight: 500;
    position: relative;
}

.nav ul li a:hover {
    color: #1f7bfc;
}

.nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0047AB;
    transition: width 0.3s ease;
}

.nav ul li a:hover:after {
    width: 100%;
}

.contact-btn {
    background-color: #FFD700;
    color: #000080 !important;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #FFD700;
}

.contact-btn:hover {
    background-color: transparent;
    color: #000080 !important;
    opacity: 1;
}

.menu-btn {
    display: none;
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.menu-btn span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.menu-btn span:nth-child(1) {
    top: 0;
}

.menu-btn span:nth-child(2) {
    top: 11px;
}

.menu-btn span:nth-child(3) {
    bottom: 0;
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* ローディングインジケーター */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 71, 171, 0.2);
    border-top-color: #0047AB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* スワイパースタイル */
.main {
    height: 100vh;
    position: relative;
}

.swiper-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 80px 0 0;
    position: relative;
}

.content-inner {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ヒーローエリア */
.hero {
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 15%;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 5.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: #FFD700;
    color: #000080;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 50px;
    text-align: center;
    margin-top: 1rem;
    border: 2px solid #FFD700;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: #fff;
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: #fff;
    z-index: 1;
    animation: bounce 2s infinite;
}

.sp-indicator {
    display: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 課題提起エリア */
.problems {
    background-color: #f9f9f9;
}

.problems-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.problem-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.problem-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.problem-item .icon {
    margin-bottom: 1rem;
}

.problem-item h3 {
    color: #0047AB;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

/* 強みエリア */
.strengths {
    background-color: #f5f9ff;
}

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

.strength-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: all 0.3s ease;
}

.strength-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.strength-item .icon {
    margin-bottom: 1rem;
}

.strength-item h3 {
    color: #0047AB;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

/* 施工事例エリア */
.works {
    background-color: #f8f8f8;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 20px;
    margin: 0 10px 10px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background-color: #0047AB;
    color: #fff;
    border-color: #0047AB;
}

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

.work-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 250px;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 71, 171, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-item:hover img {
    transform: scale(1.1);
}

.work-overlay h3 {
    margin-bottom: 0.5rem;
}

.view-detail {
    background-color: #FFD700;
    color: #000080;
    font-weight: 600;
    padding: 8px 15px;
    border: none;
    border-radius: 30px;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-detail:hover {
    background-color: #fff;
    color: #0047AB;
}

/* サービスエリア */
.service {
    background-color: #fff;
}

.service-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.area-map img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.area-text h3 {
    color: #0047AB;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.area-text ul {
    margin-bottom: 2rem;
}

.emergency {
    background-color: #FFD700;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.emergency h3 {
    color: #000080;
    margin-top: 0;
}

/* お問い合わせエリア */
.contact {
    background-color: #f0f9ff;
}

.contact-form-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

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

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

.required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0047AB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.inquiry-only,
.estimate-only {
    display: none;
}

.form-message {
    text-align: center;
    margin-top: 1rem;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.form-message.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.form-message.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.submit-btn {
    background-color: #0047AB;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: block;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.submit-btn:hover {
    background-color: #003380;
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.company-info {
    text-align: center;
    margin-top: 3rem;
}

.company-info h3 {
    color: #0047AB;
}

/* フッタースタイル */
.footer {
    background-color: #22256d;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin: 0 auto;
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    background-color: #fff;
    max-width: 900px;
    width: 90%;
    margin: 50px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease;
}

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

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #0047AB;
}

.modal-body {
    padding: 2rem;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.modal-text h3 {
    color: #0047AB;
    margin-bottom: 1rem;
}

.modal-description {
    margin-bottom: 1.5rem;
}

.modal-specs {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin-top: 1.5rem;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 5px;
}

.modal-specs dt {
    font-weight: 600;
    color: #555;
}

/* レスポンシブスタイル */
@media (max-width: 1024px) {
    .problems-list, .strengths-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html, body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-top: 1.5rem;
    }
    
    .header-inner {
        padding: 10px 5%;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 2rem 2rem;
        z-index: 999;
        transition: right 0.4s ease;
        overflow-y: auto;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav ul {
        flex-direction: column;
        text-align: left;
    }
    
    .nav ul li {
        margin: 0 0 1.5rem;
    }
    
    .nav ul li a {
        display: block;
        font-size: 1.1rem;
    }
    
    .menu-btn {
        display: block;
    }
    
    .content-inner {
        padding: 3rem 1.5rem;
    }
    
    .problems-list, .strengths-list, .service-area {
        grid-template-columns: 1fr;
    }
    
    .swiper-slide {
        flex-direction: column;
        padding-top: 70px; /* ヘッダー高さ+余白に合わせて調整 */
    }
    
    .hero {
        padding-top: 0; /* スマホでのヒーロー位置調整 */
        min-height: 70vh; /* スマホでの高さ調整 */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-content {
        position: absolute;
        top: 40%;
        transform: translateY(-50%);
        transform: translateX(-50%);
        left: 50%;
        width: 90%;
        margin: 0 auto;
}
    }
    
    .hero h1 {
        font-size: 1.8rem; /* スマホでのフォントサイズ縮小 */
    }
    
    .hero p {
        font-size: 1rem; /* スマホでのフォントサイズ縮小 */
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .sp-indicator {
        display: inline-block;
    }
    
    .pc-indicator {
        display: none;
    }
    
    .scroll-indicator {
        animation: bounce-horizontal 2s infinite;
    }
    
    @keyframes bounce-horizontal {
        0%, 20%, 50%, 80%, 100% {
            transform: translateX(0);
        }
        40% {
            transform: translateX(-10px);
        }
        60% {
            transform: translateX(-5px);
        }
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

@media (max-width: 480px) {
    .works-gallery {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .hero h1 {
        font-size: 1.7rem; /* さらに小さく */
        padding-top: 10px; /* 上部余白追加 */
    }
    
    .hero p {
        font-size: 0.9rem; /* さらに小さく */
    }
    
    .cta-button {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    .content-inner {
        padding: 2rem 1rem; /* 余白縮小 */
    }
    
    h2 {
        font-size: 1.6rem;
        margin-top: 1.8rem; /* ヘッダーとの間隔を確保 */
    }
    
    .modal-specs {
        grid-template-columns: 1fr;
    }
    
    .modal-specs dt {
        margin-top: 0.8rem;
    }
    
    .modal-specs dt:first-child {
        margin-top: 0;
    }
    
    .swiper-slide {
        padding-top: 60px; /* さらに調整 */
    }
}

/* セクション内スクロールバーのスタイリング */
.swiper-slide {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 71, 171, 0.5) rgba(255, 255, 255, 0.2);
}

.swiper-slide::-webkit-scrollbar {
    width: 6px;
}

.swiper-slide::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.swiper-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 71, 171, 0.5);
    border-radius: 3px;
}

/* スワイプヒント */
.swipe-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 71, 171, 0.8);
    color: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 100;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.swipe-hint i {
    margin-right: 5px;
    animation: swipe-arrow 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes swipe-arrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@media (min-width: 1025px) {
    .swipe-hint {
        display: none !important;
    }
}

.swipe-hint.fade-out {
    opacity: 0;
    transition: opacity 1s ease;
}
