/* Top Page CSS - トップページ専用スタイル */

/* ヒーローセクション */
.header {
    position: relative;
    width: 100%;
    z-index: 1055;
}

.hero-section {
    /* position: relative; */
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 6s ease-in-out forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.03);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 35, 35, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: unset;
    padding: 120px 0 80px;
}

/* ヒーローテキスト */
.hero-text {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.hero-title {
    position: relative;
    top: 0;
    left: 0;
    font-size: 50px;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    transform: translate(0);
    margin-bottom: 20px;
}

.hero-bottom-content {
    display: flex;
    align-items: flex-end;
    gap: 100px;
    margin-top: auto;
}

.hero-description {
    flex: 1;
    font-size: 15px;
    line-height: 1.8;
}

.hero-description p {
    margin-bottom: 20px;
}

/* ニュースセクション */
.news-section {
    flex-shrink: 0;
    padding: 30px;
    border-radius: 5px;
    min-width: 450px;
}

.news-title {
    font-size: 24px;
    color: white;
    font-weight: 400;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-calendar {
    font-size: 15px;
    color: white;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid white;
    text-decoration: none;
    padding: 8px 16px;
}

.news-content {
    height: 100%;
    max-height: 250px;
    overflow: auto;
    padding-right: 10px;
    margin-bottom: 0;
}

.news-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    color: white;
    font-size: 15px;
    border-bottom: 1px solid white;
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-item:hover {
    opacity: 0.8;
    color: white;
    text-decoration: none;
}

.news-date {
    width: 74px;
    text-align: center;
    margin-right: 20px;
    font-size: 15px;
}

.news-text {
    flex: 1;
    font-size: 15px;
}

/* トップページセクションタイトル */
.section-title {
    font-size: 28px;
    font-weight: 900;
    color: white;
    margin-bottom: 60px;
    text-align: left;
}

/* 三山技研の強みセクション */
.strengths-section {
    position: relative;
    padding-bottom: 100px;
    z-index: 2;
}

.strengths-grid {
    display: flex;
    flex-direction: column;
    row-gap: 30px;
    width: 100%;
    margin: 0 auto;
}

.strength-item {
    position: relative;
    width: 100%;
	max-width: 300px;
    height: 100px;
    display: block;
}

.strength-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.strength-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strength-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 35, 35, 0.5);
}

.strength-number {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-family: 'Toppan Bunkyu Mincho', serif;
    font-size: 28px;
    font-weight: 900;
    color: #21a0db;
    z-index: 3;
}

.strength-text {
    position: absolute;
    top: 50%;
    left: 65px;
    right: 20px;
    transform: translateY(-50%);
    font-family: 'Toppan Bunkyu Mincho', serif;
    color: white;
    z-index: 3;
}

.strength-text h3 {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Modal styling for strength items */
.modal-strength-card .btn-close {
    z-index: 10;
    opacity: 1;
}

.modal-strength-card .modal-strength-image {
    height: 100%;
}

.modal-strength-card .modal-strength-image img.object-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-strength-card .modal-strength-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

/* New overlay layout: image as full background, content overlaid */
.modal-strength-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
}

.modal-strength-wrapper .modal-strength-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.modal-strength-wrapper .modal-strength-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-strength-wrapper .modal-strength-content {
    position: relative;
    z-index: 2;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-family: 'Toppan Bunkyu Mincho', serif;
    /* semi-transparent overlay for readability */
    height: 100%;
    display: flex;
    align-items: center;
}

.modal-strength-wrapper h3 {
    margin-bottom: 50px !important;
}

.modal-strength-wrapper .strength-number {
    position: relative;
    top: auto;
    left: auto;
}

/* 製作事例セクション */
.products-section {
    padding: 80px 0;
    background-color: white;
}

/* マップセクション */
.map-section {
    padding: 80px 0 0;
    background-color: #f8f9fa;
}

iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

/* トップページ レスポンシブデザイン */
@media (max-width: 1200px) {

    .hero-content {
        padding: 180px 0 80px 0;
    }

    .hero-bottom-content {
        flex-direction: column;
        gap: 30px;
        align-items: stretch;
    }

    .hero-text {
        padding: 0 50px;
    }

    .section-title {
        padding-left: 50px;
    }

    .strengths-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {

    .hero-content {
        padding: 70px 0 40px 0;
    }

    .hero-title {
        font-size: 36px;
    }

    .news-section {
        min-width: auto;
    }

    .news-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .hero-text {
        padding: 0 20px;
    }

    .section-title {
        padding-left: 20px;
        font-size: 24px;
    }

    .modal-strength-wrapper {
        height: 380px;
    }

    .modal-strength-wrapper .modal-strength-content {
        padding: 20px;
        min-height: 380px;
    }

    .strengths-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }

    .modal-strength-wrapper .strength-number {
        top: 16px;
    }

    .strengths-section {
        padding: 60px 0;
    }

    .strengths-swiper {
        padding: 0 40px 40px;
    }

    .strengths-swiper .swiper-button-next,
    .strengths-swiper .swiper-button-prev {
        width: 30px;
        height: 30px;
    }

    .strengths-swiper .swiper-button-next::after,
    .strengths-swiper .swiper-button-prev::after {
        font-size: 18px;
    }

    .strength-text h3 {
        font-size: 14px;
    }

    .strength-number {
        font-size: 26px;
        left: 15px;
    }

    .strength-text {
        left: 60px;
        right: 15px;
    }

    .map-section {
        padding: 60px 0 0;
    }

    iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {

    .hero-content {
        padding: 60px 0 30px 0;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .hero-bottom-content {
        gap: 20px;
    }

    .hero-description {
        font-size: 14px;
    }

    iframe {
        height: 250px;
    }

    .strengths-grid {
        grid-template-columns: 1fr;
    }

    .strength-text h3 {
        font-size: 16px;
    }
}