:root {
    --primary-color: #333333;
    --accent-color: #c4a36d;
    --background-color: #fff;
    --text-color: #333;
}

html {
    scroll-padding-top: 100px; /* ヘッダーの高さ + 余白 */
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Shippori Mincho', serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    position: fixed;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 50px; /* ロゴの高さを調整 */
}

.logo-image {
    height: 100%;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo {
        height: 40px; /* モバイルでのロゴの高さを調整 */
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin: 0;  /* マージンを0に設定 */
    padding: 0; /* パディングも0に設定 */
}

.hero-slider {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/pexels-thisisengineering-3861969.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: zoomAndPan 20s ease-in-out infinite;  /* ゆっくりとしたズームとパン効果 */
}

.slide-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    opacity: 0;
    animation: fadeInText 2s ease-out forwards;
}

.slide-text p {
    font-size: 2.5rem;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* オーバーレイ効果 */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.4)
    );
    z-index: 1;
    animation: gradientShift 10s ease-in-out infinite;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .slide-text p {
        font-size: 1.8rem;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .slide-text p {
        font-size: 1.5rem;
        padding: 0 10px;
    }
}

/* アニメーションのキーフレーム */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 背景画像のフェードイン */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .slide h1 {
        font-size: 1.6rem;
    }
    
    .slide p {
        font-size: 1rem;
    }
}

.news-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 0 1rem;
    transition: opacity 0.3s ease;
}

.news-card {
    background: white;
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.42, 0, 0.58, 1);
    will-change: opacity, transform;
}

.news-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 各行のディレイをより長く設定 */
.news-card:nth-child(1) { transition-delay: 0.1s; }
.news-card:nth-child(2) { transition-delay: 0.2s; }
.news-card:nth-child(3) { transition-delay: 0.3s; }
.news-card:nth-child(4) { transition-delay: 0.4s; }
.news-card:nth-child(5) { transition-delay: 0.5s; }
.news-card:nth-child(6) { transition-delay: 0.6s; }
.news-card:nth-child(7) { transition-delay: 0.7s; }
.news-card:nth-child(8) { transition-delay: 0.8s; }

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.news-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2のアスペクト比 */
    overflow: hidden;
    background-color: #f8f9fa;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像全体を表示 */
    object-position: center; /* 中央に配置 */
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem;
}

.news-content time {
    order: 1;
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.news-content .news-tag {
    order: 2;
}

.news-content h3 {
    order: 3;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.read-more {
    display: none;
}

.news-content .read-more {
    order: 4;
    margin-top: auto; /* 下部に配置 */
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .news-image {
        padding-top: 66.67%; /* モバイルでは3:2のアスペクト比 */
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

section {
    padding: 6rem 0;
}

h2 {
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
}

/* タグのスタイリングを追加 */
.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.8rem;
    border-radius: 2px;
    margin: 0.5rem 0;
}

/* news-content内の要素の配置を調整 */
.news-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-content time {
    order: 1;
}

.news-content .news-tag {
    order: 2;
}

.news-content h3 {
    order: 3;
    margin: 0; /* 既存のマージンをリセット */
}

.news-content .read-more {
    order: 4;
    margin-top: auto; /* 下部に配置 */
}

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

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: var(--background-color);
    margin: 40px auto;
    padding: 4rem;
    width: 92%;
    max-width: 800px;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* モーダルアニメーションの削除 */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-button {
    position: absolute;
    right: 2rem;
    top: 2rem;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:hover {
    color: var(--text-color);
    background-color: #f5f5f5;
}

.modal-date {
    display: inline-block;
    color: var(--accent-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.modal-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.85rem;
    margin: 0.5rem 0 2rem;
    letter-spacing: 1px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 3rem;
    line-height: 1.6;
    letter-spacing: 1px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1.5rem;
    margin-left: -4rem;
    margin-right: -4rem;
    padding-left: 4rem;
    padding-right: 4rem;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 4rem;
    right: 4rem;
    height: 1px;
    background-color: var(--accent-color);
    width: auto;
}

.modal-body {
    line-height: 2;
    color: #555;
    font-size: 0.95rem;
}

/* リッチテキストのスタイル改善 */
.modal-body h1, 
.modal-body h2, 
.modal-body h3 {
    font-weight: 400;
    line-height: 1.6;
    margin: 2.5rem 0 1rem;
    color: var(--text-color);
}

.modal-body h1 { font-size: 1.6rem; }
.modal-body h2 { font-size: 1.4rem; }
.modal-body h3 { font-size: 1.2rem; }

.modal-body p {
    margin-bottom: 1.5rem;
    line-height: 2;
}

.modal-body ul,
.modal-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.8rem;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 2px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .modal-content {
        padding: 3rem 1.5rem;
        margin: 20px auto;
    }

    .close-button {
        right: 1.5rem;
        top: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .modal-body {
        font-size: 0.9rem;
    }
}

/* ページネーションのスタイル */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    background: none;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif JP', serif;
}

.pagination button:hover {
    background-color: var(--accent-color);
    color: white;
}

.pagination button.active {
    background-color: var(--accent-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        opacity: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }
}

/* メインビジュアルのスマホ調整 */
@media (max-width: 768px) {
    .hero {
        height: 80vh;
        min-height: 400px;
    }

    .slide-text {
        width: 85%;
        max-width: 400px;
    }

    .slide-text p {
        font-size: 4vw; /* サイズをさらに小さく */
        line-height: 1.4;
        letter-spacing: 0.05em;
    }

    /* brタグの前後の余白を詰める */
    .slide-text p br {
        display: block;
        content: "";
        margin: -0.3em 0;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 70vh;
        min-height: 350px;
    }

    .slide-text p {
        font-size: 4.5vw; /* より小さい画面でも適度なサイズを維持 */
        line-height: 1.3;
    }
}

/* セクションのスペーシング調整 */
@media (max-width: 768px) {
    section {
        padding: 5rem 1.5rem 3rem; /* モバイルでの余白を調整 */
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .news-grid {
        gap: 1.2rem;
    }

    .news-card {
        margin-bottom: 0.5rem;
    }

    .news-image {
        height: 140px;
    }

    .news-content {
        padding: 1rem;
    }

    .pagination {
        margin-top: 2rem;
        padding: 0 1rem;
    }
}

/* アニメーション */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* フッターのスタイル */
footer {
    background: linear-gradient(180deg, 
        #574080 0%,
        #432e63 50%,
        #2d1f43 100%
    );
    padding: 3rem 2rem 1rem;
    margin-top: 0;
    color: #fff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text-color);
}

.footer-address {
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #666;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0;
    margin: 0 auto;
}

.footer-nav-column {
    text-align: center;
}

.footer-nav-column h3 {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: normal;
}

.footer-nav-column ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.footer-nav-column ul li {
    position: relative;
    margin: 0;
}

/* スラッシュの区切り */
.footer-nav-column ul li:not(:last-child)::after {
    content: '/';
    position: absolute;
    right: -0.8rem;
    color: #ccc;
}

.footer-nav-column ul li a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav-column ul li a:hover {
    color: #fff;
}

/* フッターのモバイル調整 */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .footer-nav-column {
        width: 100%;
        text-align: center;
    }

    .footer-nav-column ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem 1.2rem;
    }

    .footer-nav-column ul li {
        position: relative;
    }

    .footer-nav-column ul li:not(:last-child)::after {
        content: '/';
        position: absolute;
        right: -0.7rem;
        color: #ccc;
    }

    .footer-nav-column ul li a {
        font-size: 0.75rem;
    }

    .copyright {
        font-size: 0.7rem;
        text-align: center;
        margin-top: 1rem;
        padding-top: 0;
    }
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    text-align: center;
    margin-top: 0;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

/* フッターのレスポンシブ対応 */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .footer-logo {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .footer-address {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    /* フッターナビゲーションを2列に */
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        text-align: left;
    }

    /* ソーシャルリンクを含むカラムの表示を維持 */
    .footer-nav-column:nth-child(2) {
        display: block; /* 非表示設定を削除 */
        margin-top: 1.5rem; /* 上部にマージンを追加 */
    }

    .footer-nav-column h3 {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .footer-nav-column ul li {
        margin-bottom: 0.6rem;
    }

    .footer-nav-column ul li a {
        font-size: 0.75rem;
    }

    /* ソーシャルリンクを調整 */
    .social-links {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding: 1rem 0 0;
    }

    .copyright {
        font-size: 0.75rem;
    }
}

/* さらに小さい画面サイズの調整（480px以下） */
@media (max-width: 480px) {
    footer {
        padding: 1.5rem 1rem 1rem;
    }

    .footer-main {
        gap: 1rem;
    }

    /* フッターナビゲーションをさらにコンパクトに */
    .footer-nav {
        gap: 0.8rem;
    }

    .footer-nav-column {
        padding: 0 0.3rem;
    }

    .footer-nav-column:nth-child(2) {
        margin-top: 1rem;
    }

    .footer-nav-column h3 {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .footer-nav-column ul li {
        margin-bottom: 0.5rem;
    }

    .footer-nav-column ul li a {
        font-size: 0.7rem;
    }

    /* ソーシャルリンクをさらに調整 */
    .social-links {
        gap: 1rem;
    }

    .social-links li:not(:last-child)::after {
        right: -0.6rem;
    }
}

/* プライバシーポリシーページのスタイル */
.privacy-policy-content {
    max-width: 800px;
    margin: 120px auto 60px;
    padding: 0 2rem;
}

.privacy-policy-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 3px;
}

.policy-section {
    margin-bottom: 4rem;
}

.policy-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-align: left;
}

.policy-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.policy-section ul {
    margin: 1rem 0 1rem 2rem;
}

.policy-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .privacy-policy-content {
        margin: 80px auto 40px;
        padding: 0 1.5rem;
    }

    .privacy-policy-content h1 {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .policy-section h2 {
        font-size: 1.3rem;
    }
}

/* サービスセクションのスタイル */
#services {
    background-color: #f8f9fa;
    padding: 6rem 2rem;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.service-icon {
    font-size: 2rem;
    font-weight: 200;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #services {
        padding: 4rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }
}

/* 代表メッセージのスタイル */
#message {
    background-color: #fff;
    padding: 5rem 2rem;
}

.message-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.message-content {
    display: block;
}

.message-text {
    max-width: 800px;
    margin: 0 auto;
}

.message-text p {
    margin-bottom: 1.8rem;
    line-height: 2;
    font-size: 1rem;
    text-align: left;
    padding: 0;
}

.ceo-info {
    margin-top: 3rem;
    text-align: right;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

.ceo-info p {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    color: #333;
}

.ceo-info p:last-child {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #666;
}

/* メッセージセクションのタブレット調整 */
@media (max-width: 768px) {
    .message-container {
        padding: 0 1.5rem;
    }

    .message-text p {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1.2rem;
        padding: 0;
    }
}

/* メッセージセクションのスマホ調整 */
@media (max-width: 480px) {
    .message-container {
        padding: 0 1rem;
    }

    .message-text p {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 1rem;
        padding: 0;
    }

    .ceo-info {
        margin-top: 2rem;
        padding: 0;
    }
}

/* クライアントセクションのスタイル調整 */
.clients-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: justify;
    color: #666;
    font-size: 0.95rem;
    line-height: 2;
}

/* カンマの後のスペースを調整 */
.clients-list {
    word-spacing: 0.5em;
}

@media (max-width: 768px) {
    .clients-list {
        font-size: 0.9rem;
        line-height: 1.8;
    }
}

/* モバイル対応も調整 */
@media (max-width: 768px) {
    .modal-title {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .modal-title::after {
        left: 1.5rem;
        right: 1.5rem;
    }
}

/* アニメーション用の基本クラス */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.33, 1, 0.68, 1);
}

.fade-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 遅延付きのアニメーション */
.service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.service-card:nth-child(3) {
    transition-delay: 0.4s;
}

.news-card:nth-child(2) {
    transition-delay: 0.2s;
}

.news-card:nth-child(3) {
    transition-delay: 0.4s;
}

/* ホバーエフェクトの改善 */
.service-card {
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.news-card {
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* モーダルアニメーションの改善 */
.modal-content {
    animation: modalIn 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ページ読み込み時のヒーローセクションアニメーション改善 */
.hero-slider {
    animation: fadeIn 2s cubic-bezier(0.33, 1, 0.68, 1);
}

.slide h1 {
    animation: fadeInUp 1.2s cubic-bezier(0.33, 1, 0.68, 1) 0.5s forwards;
}

.slide p {
    animation: fadeInUp 1.2s cubic-bezier(0.33, 1, 0.68, 1) 0.8s forwards;
}


/* グリッドの余白調整 */
.services-grid, .clients-grid, .news-grid {
    gap: 1.5rem;
    padding: 0 2rem;
}

/* 見出しの下マージン調整 */
h2 {
    margin-bottom: 2.5rem;
}

/* クライアント説明文の余白調整 */
.clients-description {
    margin: 0 auto 2.5rem;
}

/* メッセージセクションのグリッド間隔調整 */
.message-content {
    gap: 3rem;
}

/* ローディング関連のスタイル */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    position: relative;
    animation: loadingPulse 2s infinite;
}

@keyframes loadingPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px auto;
    position: relative;
    overflow: visible;
    --progress: 0;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: calc(var(--progress) * 1%);
    background: #fff;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    height: 10px;
    width: calc(var(--progress) * 1%);
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease-out;
    filter: blur(3px);
}

#progress {
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    color: #fff;
    letter-spacing: 0.2em;
    margin-top: 20px;
    opacity: 0.8;
    transition: all 0.3s;
    min-width: 4em;
    display: inline-block;
}

.loading-text {
    color: #fff;
    font-family: 'Noto Serif JP', serif;
    font-size: 24px;
    letter-spacing: 0.3em;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* メインビジュアル関連のスタイル */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-slider {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/pexels-thisisengineering-3861969.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: zoomAndPan 20s ease-in-out infinite;  /* ゆっくりとしたズームとパン効果 */
}

.slide-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    opacity: 0;
    animation: fadeInText 2s ease-out forwards;
}

.slide-text p {
    font-size: 2.5rem;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* オーバーレイ効果 */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.4)
    );
    z-index: 1;
    animation: gradientShift 10s ease-in-out infinite;
}

/* ズームとパンのアニメーション */
@keyframes zoomAndPan {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(-1%, -1%);  /* ゆっくりとズームインしながら少し移動 */
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* テキストのフェードインアニメーション */
@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* オーバーレイのグラデーションアニメーション */
@keyframes gradientShift {
    0% {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.4)
        );
    }
    50% {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.3),
            rgba(0, 0, 0, 0.5)
        );
    }
    100% {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.4)
        );
    }
}

/* ニュースセクションのモバイル調整 */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .news-card {
        margin-bottom: 0;
    }

    .news-image {
        height: 120px;
    }

    .news-content {
        padding: 0.8rem;
    }

    .news-content h3 {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .news-content time {
        font-size: 0.75rem;
    }

    .news-tag {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    .read-more {
        font-size: 0.75rem;
    }
}

/* 極小画面サイズでも2列を維持 */
@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .news-image {
        height: 100px;
    }

    .news-content {
        padding: 0.6rem;
    }
}

/* ページネーションのモバイル調整 */
@media (max-width: 768px) {
    .pagination {
        margin-top: 2rem;
        gap: 0.5rem;
    }

    .pagination button {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }
}

/* モーダルのモバイル調整 */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 2rem auto;
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.2rem;
        margin: 1rem 0;
    }

    .modal-body {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .close-button {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
    }
}

/* ローディング表示のモバイル調整 */
@media (max-width: 768px) {
    .loading-text {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
    }

    .progress-bar {
        width: 160px;
    }

    #progress {
        font-size: 0.9rem;
    }
}

/* サービスセクションのモバイル調整 */
@media (max-width: 768px) {
    .services-grid {
        gap: 1rem;
    }

    .service-card {
        padding: 1.2rem;
    }

    .service-icon {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .service-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* レスポンシブ対応のベース調整 */
@media (max-width: 768px) {
    section {
        padding: 5rem 1.5rem 3rem; /* モバイルでの余白を調整 */
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        letter-spacing: 0.1em;
    }

    /* ニュースセクション調整 */
    #news {
        padding: 2rem 1rem;
    }

    .news-grid {
        gap: 1rem;
    }

    .news-content {
        padding: 1rem;
    }

    .pagination {
        margin-top: 2rem;
    }

    /* サービスセクション調整 */
    #services {
        padding: 2rem 1rem;
    }

    .services-grid {
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .service-icon {
        margin-bottom: 1rem;
    }

    /* メッセージセクション調整 */
    #message {
        padding: 2rem 1rem;
    }

    .message-content {
        gap: 2rem;
    }

    .message-text h3 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .message-text p {
        margin-bottom: 1rem;
        line-height: 1.8;
    }

    .ceo-info {
        margin-top: 1.5rem;
    }

    /* フッター調整 */
    footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-main {
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-nav {
        gap: 1.5rem;
    }

    .footer-nav-column h3 {
        margin-bottom: 1rem;
    }

    .footer-nav-column ul li {
        margin-bottom: 0.8rem;
    }

    .footer-bottom {
        padding: 1rem;
    }
}

/* さらに小さい画面サイズの調整 */
@media (max-width: 481px) {
    .hero {
        padding-top: 100px;
        padding-bottom: 1.5rem;
    }

    .slide {
        padding: 0 1rem;
        padding-top: 75%;
    }

    .slide-text {
        padding: 0.5rem 0 0;
    }

    .slide h1 {
        display: none;
    }

    .slide p {
        font-size: 0.95rem;
    }
}

/* 通常のモバイルサイズ（481px以上768px以下）の調整 */
@media (min-width: 481px) and (max-width: 768px) {
    .slide-text {
        padding: 0.5rem 0 0;
    }

    .slide p {
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: center;
        letter-spacing: 0.05em;
    }
}

/* ヒーローセクションのレスポンシブ調整 */
@media (max-width: 768px) {
    .hero {
        height: 80vh;
        min-height: 400px;
    }

    .slide-text p {
        font-size: 2.5rem;
        line-height: 1.8;
        padding: 0 1.5rem;
    }
}

/* さらに小さい画面サイズの調整 */
@media (max-width: 481px) {
    .hero {
        padding-top: 100px;
        padding-bottom: 1.5rem;
    }

    .slide {
        padding: 0 1rem;
    }

    .slide-image {
        padding-top: 75%;
    }

    .slide-text {
        padding-top: 0.3rem;
    }

    .slide p {
        font-size: 1.6rem;
    }
}

/* Company Section */
#company {
    padding: 4rem 2rem;
    background-color: #fff;
}

.company-container {
    max-width: 800px;
    margin: 0 auto;
}

.company-info {
    padding: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.company-info dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 3rem;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.company-info dt {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    align-self: start;
}

.company-info dd {
    margin: 0;
    line-height: 1.6;
}

/* 代表取締役のスタイル */
.company-info .executive-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-info dd.role-title {
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    margin: 0;
}

.company-info dd.ceo-name {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.company-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.company-info a:hover {
    color: var(--accent-color);
}

.business-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.business-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.business-list li:last-child {
    margin-bottom: 0;
}

.business-list li::before {
    content: "・";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

@media (max-width: 768px) {
    #company {
        padding: 3rem 1.5rem;
    }

    .company-info {
        padding: 2rem;
    }

    .company-info dl {
        gap: 1.5rem 2rem;
        font-size: 0.95rem;
    }

    .business-list li {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
}

@media (max-width: 480px) {
    #company {
        padding: 2rem 1rem;
    }

    .company-info {
        padding: 1.5rem;
    }

    .company-info dl {
        gap: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .business-list li {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
}

/* Recruit Section */
#recruit {
    padding: 5rem 2rem;
    background-color: #f8f9fa;
}

.recruit-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}

.job-list {
    flex: 0 0 300px;
}

.job-card {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.job-card.active {
    border-color: var(--accent-color);
    background-color: rgba(196, 163, 109, 0.1);
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.job-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.job-details {
    flex: 1;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.job-details-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.job-details-body {
    padding: 2rem;
    line-height: 1.8;
}

.job-details-body h1,
.job-details-body h2,
.job-details-body h3,
.job-details-body h4,
.job-details-body h5,
.job-details-body h6 {
    margin: 1.5em 0 1em;
    font-weight: 600;
    line-height: 1.4;
}

.job-details-body h1 { font-size: 1.6rem; }
.job-details-body h2 { font-size: 1.4rem; }
.job-details-body h3 { font-size: 1.2rem; }

.job-details-body p {
    margin-bottom: 1.2em;
    line-height: 1.8;
}

.job-details-body ul,
.job-details-body ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

.job-details-body li {
    margin-bottom: 0.5em;
}

.job-details-body img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.job-details-body a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-details-body a:hover {
    color: #004999;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .recruit-container {
        flex-direction: column;
    }

    .job-list {
        flex: none;
        width: 100%;
        margin-bottom: 2rem;
    }

    .job-card {
        padding: 1rem;
    }

    .job-details {
        padding: 1.5rem;
    }

    .job-details-title {
        font-size: 1.5rem;
    }
}

.recruit-message {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    text-align: center;
}

.recruit-message h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
}

.recruit-message p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: center;
}

@media (max-width: 768px) {
    .recruit-message {
        margin-bottom: 2rem;
        padding: 0 1rem 1.5rem;
    }

    .recruit-message h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .recruit-message p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* 全セクション共通のコンテナスタイル */
.services-grid,
.message-container,
.news-grid,
.company-container,
.recruit-container,
.recruit-message {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* セクション共通のパディング */
section {
    padding: 6rem 0;
}

/* 背景色のあるセクション */
#services {
    background-color: #f8f9fa;
}

#message {
    background-color: #fff;
}

#news {
    background-color: #f8f9fa;
}

#company {
    background-color: #fff;
}

#recruit {
    background-color: #f8f9fa;
}

/* メディアクエリの調整 */
@media (max-width: 768px) {
    .services-grid,
    .message-container,
    .news-grid,
    .company-container,
    .recruit-container,
    .recruit-message {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .services-grid,
    .message-container,
    .news-grid,
    .company-container,
    .recruit-container,
    .recruit-message {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }
}

/* Consultation Options */
.consultation-options {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin: 4rem auto;
    max-width: 1200px;
    padding: 0 2rem;
}

.consultation-card {
    flex: 1;
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.consultation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: transform 0.3s ease;
}

.consultation-card.casual::before {
    background-image: url('./images/form_contact.jpg');
}

.consultation-card.line::before {
    background-image: url('./images/line_contact.jpg');
}

.consultation-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.consultation-card:hover::before {
    transform: scale(1.05);
}

.consultation-card h3,
.consultation-card p,
.consultation-card .consultation-button {
    position: relative;
    z-index: 3;
}

.consultation-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.consultation-card p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.consultation-button {
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    border: none;
    outline: none;
}

.consultation-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .consultation-options {
        flex-direction: column;
        padding: 0 1.5rem;
        gap: 1.5rem;
    }

    .consultation-card {
        min-height: 300px;
        padding: 2rem;
    }

    .consultation-card h3 {
        font-size: 1.4rem;
    }

    .consultation-card p {
        font-size: 0.9rem;
    }

    .consultation-button {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .consultation-card {
        min-height: 250px;
        padding: 2rem 1rem;
    }

    .consultation-card h3 {
        font-size: 1.6rem;
    }

    .consultation-card p {
        font-size: 0.9rem;
    }

    .consultation-button {
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
    }
}

.line-modal-content {
    max-width: 500px;
    text-align: center;
    padding: 3rem;
}

.line-modal-content h2 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.line-modal-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.qr-code-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.qr-code {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .line-modal-content {
        padding: 2rem;
    }

    .line-modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .line-modal-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .qr-code-container {
        padding: 1.5rem;
    }

    .qr-code {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .line-modal-content {
        padding: 1.5rem;
    }

    .qr-code {
        max-width: 180px;
    }
}
