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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #5F161D;
    overflow-x: hidden;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#header {
    background: #e6002f;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 60px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100; /* ヘッダーの優先度を上げる */
}

#header .wrapper {
    width: 100%;
}

/* Logo Section - ヘッダーとの隙間を完全に解消 */
#logo {
    background: #fff;
    padding: 15px;
    position: relative;
    overflow: hidden;
    margin-top: -50px; /* 既存の設定を維持 */
    /* 大元のCSSのpadding-topを強制的に打ち消す */
    padding-top: 15px !important;
    /* WordPressテーマの影響を完全に排除 */
    top: 0 !important;
}

/* サイト大元のpadding-top:130pxを打ち消すための追加スタイル */
body #logo,
.logo-section,
#logo-section,
section#logo,
#logo.section,
.section#logo {
    padding-top: 15px !important;
    margin-top: -50px !important;
    top: 0 !important;
}

/* WordPressの一般的なクラスも対象に */
.site-content #logo,
.main-content #logo,
.content #logo,
article #logo,
.entry-content #logo {
    padding-top: 15px !important;
    margin-top: -50px !important;
    top: 0 !important;
}

#logo img {
    max-width: 380px;
    width: 100%;
    height: auto;
}

/* Main Visual */
#mv {
    background: #FFE44E;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

#mv .content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

#mv h2 {
    font-size: 42px;
    font-weight: bold;
    line-height: 1.4;
    flex: 1;
    padding-left: 30px;
}

#mv .main-visual {
    flex: 1;
    text-align: center;
}

#mv .main-visual img {
    max-width: 100%;
    height: auto;
}

/* Teaser Section */
#teaser {
    background-color: #f8f9fa;
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#teaser .wrapper {
    width: 100%;
}

#teaser .content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

/* 動画エリアのスタイル */
.mvarea {
    max-width: 540px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    outline: 4px solid #696969;
}

.mvarea video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

#teaser img {
    max-width: 540px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#teaser h2 {
    font-size: 42px;
    font-weight: bold;
    line-height: 1.4;
}

/* Merit Section */
#merit {
    background: #E9F2F5;
    padding: 100px 0;
    position: relative;
}

#merit .section-title {
    text-align: center;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 80px;
    position: relative;
}

/* person2-illustrationの位置指定を強化（Safari対応） */
.person2-illustration {
    position: absolute !important;
    top: 10px !important;
    right: 20px !important;
    width: 200px !important;
    height: auto !important;
    z-index: 10 !important;
    display: block !important;
    /* Safari対応の追加設定 */
    -webkit-transform: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* WordPressテーマの影響を排除 */
    float: none !important;
    clear: none !important;
    left: auto !important;
    bottom: auto !important;
    /* Safari用の追加プロパティ */
    max-width: 200px !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Merit項目の親要素に相対位置を明確に指定（Safari対応） */
#merit {
    position: relative !important;
    /* Safari用の追加設定 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* さらに強力な指定（Safari対応） */
section#merit {
    position: relative !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 全パターンのセレクタにSafari対応を追加 */
section#merit .person2-illustration,
#merit .person2-illustration,
.person2-illustration {
    position: absolute !important;
    top: 10px !important;
    right: 20px !important;
    width: 200px !important;
    height: auto !important;
    z-index: 10 !important;
    display: block !important;
    -webkit-transform: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    left: auto !important;
    bottom: auto !important;
    max-width: 200px !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.merit-item {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.merit-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.merit-text {
    flex: 1;
}

.merit-text h3 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.merit-number {
    color: #e53e3e;
    font-size: 54px;
}

.merit-text p {
    font-size: 26px;
    line-height: 1.8;
}

.merit-image {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-align: center;
    position: relative;
    background: white;
    padding: 20px 40px;
    border-radius: 25px;
    outline: 4px solid #696969;
    max-width: 500px;
    min-width: 450px;
}

.merit-image:hover {
    background: #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}

.merit-icon {
    width: 200px;
    height: 200px;
    background: #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    font-weight: bold;
    flex-shrink: 0;
}

.merit-icon img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.merit-image p {
    background: white;
    padding: 5px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    text-align: left;
}

/* CTA Section */
#cta {
    background: white;
    padding: 100px 30px 0px 30px;
    text-align: center;
    position: relative;
}

.contact-area {
    background: #FFE44E;
    position: relative;
    /* Safari対応の追加設定 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.contact-area .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

.cta-text {
    text-align: center;
    margin-bottom: 60px;
    background: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 40px 0;
}

#cta .cta-text h2 {
    font-size: 36px;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 40px;
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 30px;
}

.highlight {
    font-size: 54px !important;
    color: #e53e3e !important;
}

.contact {
    display: flex;
    background: #00B5F2;
    padding: 50px 150px;
    border-radius: 50px;
    color: white;
    max-width: 1000px;
    margin: 0 auto;
    outline: 1px solid #696969;
    align-items: center;
    justify-content: space-between;
}

.contact-text {
    flex: 1;
    text-align: left;
}

.contact h3 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

.contact-text p {
    font-size: 18px;
    margin-bottom: 30px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    background: #ffe241;
    color: #333;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    margin-left: 30px;
}

.contact-btn::before {
    content: "✉️";
    background: #00B5F2;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 32px;
}

.contact-btn:hover {
    background: #F4E511;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}

/* person-illustrationの位置指定を強化（Safari対応） */
.person-illustration {
    position: absolute !important;
    bottom: 250px !important;
    left: 20px !important;
    width: 250px !important;
    height: auto !important;
    z-index: 10 !important;
    display: block !important;
    /* Safari対応の追加設定 */
    -webkit-transform: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* WordPressテーマの影響を排除 */
    float: none !important;
    clear: none !important;
    right: auto !important;
    top: auto !important;
    /* Safari用の追加プロパティ */
    max-width: 250px !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    /* Safari特有の問題対策 */
    inset: auto auto 250px 20px !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* CTA セクションの親要素に相対位置を明確に指定（Safari対応） */
#cta {
    position: relative !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.contact-area {
    position: relative !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* さらに強力な指定（Safari対応） */
section#cta,
section.contact-area,
.contact-area {
    position: relative !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 全パターンのセレクタにSafari対応を追加 */
section#cta .person-illustration,
section .person-illustration,
.contact-area .person-illustration,
#cta .person-illustration,
.person-illustration {
    position: absolute !important;
    bottom: 250px !important;
    left: 20px !important;
    width: 250px !important;
    height: auto !important;
    z-index: 10 !important;
    display: block !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    right: auto !important;
    top: auto !important;
    max-width: 250px !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    /* Safari特有の問題対策 */
    inset: auto auto 250px 20px !important;
    /* WordPressやテーマの影響を強制的に排除 */
    vertical-align: baseline !important;
    line-height: normal !important;
}

/* Footer */
#footer {
    background: #e6002f;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 60px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#footer .wrapper {
    width: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.merit-item {
    animation: fadeInUp 0.6s ease-out;
}

.merit-item:nth-child(2) { animation-delay: 0.1s; }
.merit-item:nth-child(3) { animation-delay: 0.2s; }
.merit-item:nth-child(4) { animation-delay: 0.3s; }
.merit-item:nth-child(5) { animation-delay: 0.4s; }

/* Responsive Design */

/* Tablet (769px to 1024px) - 2列表示維持 */
@media (min-width: 769px) and (max-width: 1024px) {
    .wrapper {
        padding: 0 30px;
    }

    /* Logo */
    #logo {
        padding: 10px 20px;
        padding-top: 10px !important; /* タブレットでも隙間解消 */
    }

    /* サイト大元のpadding-topを打ち消すための追加スタイル（タブレット） */
    body #logo,
    .logo-section,
    #logo-section,
    section#logo,
    #logo.section,
    .section#logo,
    .site-content #logo,
    .main-content #logo,
    .content #logo,
    article #logo,
    .entry-content #logo {
        padding-top: 10px !important;
        margin-top: -50px !important;
        top: 0 !important;
    }

    #logo img {
        max-width: 320px;
    }

    /* Main Visual */
    #mv h2 {
        font-size: 32px;
        padding-left: 20px;
    }

    /* Teaser */
    #teaser h2 {
        font-size: 32px;
    }

    .mvarea {
        max-width: 450px;
    }

    #teaser img {
        max-width: 450px;
    }

    /* Merit Section - 2列表示維持 */
    .person2-illustration {
        width: 180px !important;
        max-width: 180px !important;
        top: 15px !important;
        right: 15px !important;
    }

    .merit-item {
        gap: 40px;
        padding: 0 30px;
    }

    .merit-text h3 {
        font-size: 32px;
    }

    .merit-number {
        font-size: 44px;
    }

    .merit-text p {
        font-size: 20px;
    }

    .merit-image {
        max-width: 420px;
        min-width: 350px;
        padding: 25px 30px;
    }

    .merit-icon {
        width: 140px;
        height: 140px;
        font-size: 60px;
    }

    .merit-icon img {
        width: 100px;
        height: 100px;
    }

    .merit-image p {
        font-size: 18px;
    }

    /* CTA Section */
    .contact {
        padding: 40px 80px;
    }

    .contact h3 {
        font-size: 30px;
    }

    .person-illustration {
        width: 200px !important;
        max-width: 200px !important;
        bottom: 200px !important;
        left: 15px !important;
        /* Safari用の追加対策 */
        inset: auto auto 200px 15px !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
}

/* Mobile (768px and down) - 1列表示 */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 20px;
    }

    /* Header */
    #header {
        height: 50px;
        font-size: 1rem;
    }

    /* Logo */
    #logo {
        padding: 10px 15px;
        text-align: center;
        padding-top: 10px !important; /* モバイルでも隙間解消 */
    }

    /* サイト大元のpadding-topを打ち消すための追加スタイル（モバイル） */
    body #logo,
    .logo-section,
    #logo-section,
    section#logo,
    #logo.section,
    .section#logo,
    .site-content #logo,
    .main-content #logo,
    .content #logo,
    article #logo,
    .entry-content #logo {
        padding-top: 10px !important;
        margin-top: -40px !important; /* モバイルではmargin-topも調整 */
        top: 0 !important;
    }

    #logo img {
        max-width: 280px;
    }

    /* Main Visual */
    #mv {
        padding: 30px 0;
    }

    #mv .content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    #mv h2 {
        font-size: 24px;
        padding: 0 15px;
        line-height: 1.3;
        order: 2;
    }

    #mv .main-visual {
        order: 1;
    }

    /* Teaser */
    #teaser {
        padding: 60px 0;
    }

    #teaser .content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    #teaser h2 {
        font-size: 22px;
        line-height: 1.4;
        order: 2;
    }

    .mvarea {
        order: 1;
        max-width: 320px;
    }

    #teaser img {
        order: 1;
        max-width: 320px;
    }

    /* Merit Section - 1列表示 */
    #merit {
        padding: 40px 0;
    }

    #merit .section-title {
        font-size: 24px;
        margin-bottom: 40px;
        line-height: 1.3;
        padding: 0 15px;
    }

    /* person2-illustrationをSafariでも確実に非表示 */
    .person2-illustration {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* 全パターンのセレクタで非表示（Safari対応） */
    section#merit .person2-illustration,
    #merit .person2-illustration,
    body .person2-illustration,
    html .person2-illustration {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        -webkit-transform: scale(0) !important;
        transform: scale(0) !important;
    }

    .merit-item {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 40px;
        padding: 0 15px;
    }

    .merit-text {
        text-align: center;
    }

    .merit-text h3 {
        font-size: 20px;
        justify-content: center;
        flex-direction: column;
        gap: 8px;
        line-height: 1.2;
    }

    .merit-number {
        font-size: 32px;
    }

    .merit-text p {
        font-size: 14px;
        line-height: 1.6;
    }

    .merit-image {
        max-width: 100%;
        min-width: auto;
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .merit-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .merit-icon img {
        width: 60px;
        height: 60px;
    }

    .merit-image p {
        font-size: 13px;
        text-align: center;
        padding: 10px;
    }

    /* CTA Section */
    #cta {
        padding: 40px 15px 0;
    }

    #cta .cta-text h2 {
        font-size: 20px;
        text-align: center;
        line-height: 1.4;
        padding: 0 20px;
    }

    .highlight {
        font-size: 28px !important;
    }

    .contact-area {
        padding: 40px 0 60px 0;
    }

    .contact {
        flex-direction: column;
        padding: 25px 15px;
        max-width: 95%;
        text-align: center;
        gap: 20px;
    }

    .contact h3 {
        font-size: 22px;
    }

    .contact-text p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .contact-btn {
        width: 100%;
        padding: 15px;
        margin-left: 0;
        justify-content: center;
        font-size: 16px;
    }

    .contact-btn::before {
        width: 40px;
        height: 40px;
        font-size: 24px;
        margin-right: 15px;
    }

    /* person-illustrationをSafariでも確実に非表示 */
    .person-illustration {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* 全パターンのセレクタで非表示（Safari対応） */
    section#cta .person-illustration,
    section .person-illustration,
    .contact-area .person-illustration,
    #cta .person-illustration,
    body .person-illustration,
    html .person-illustration {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        -webkit-transform: scale(0) !important;
        transform: scale(0) !important;
    }

    /* Footer */
    #footer {
        height: 50px;
        font-size: 1rem;
    }
}

/* 小さなモバイル画面用の追加調整 */
@media (max-width: 480px) {
    .wrapper {
        padding: 0 15px;
    }

    #mv h2 {
        font-size: 22px;
    }

    #teaser h2 {
        font-size: 20px;
    }

    #merit .section-title {
        font-size: 22px;
    }

    .merit-text h3 {
        font-size: 18px;
    }

    .merit-text p {
        font-size: 13px;
    }

    .mvarea {
        max-width: 280px;
    }

    #teaser img {
        max-width: 280px;
    }

    /* Logo section の小画面調整 */
    #logo {
        padding-top: 10px !important;
        margin-top: -40px !important;
    }

    body #logo,
    .logo-section,
    #logo-section,
    section#logo,
    #logo.section,
    .section#logo,
    .site-content #logo,
    .main-content #logo,
    .content #logo,
    article #logo,
    .entry-content #logo {
        padding-top: 10px !important;
        margin-top: -40px !important;
        top: 0 !important;
    }

    /* 小画面でもイラストを確実に非表示（Safari対応） */
    .person-illustration,
    .person2-illustration {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        -webkit-transform: scale(0) !important;
        transform: scale(0) !important;
    }
}