/* ============================================
   薬局向けバージョン カスタムスタイル
   ============================================ */

/* ヒーローセクション - PC表示最適化 */
.hero {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    min-height: 650px;
    display: flex;
    flex-direction: column;
}

/* 薬局向け - 信頼感を伝える青系グラデーション背景 */
.hero__background {
    background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 25%, #c1def2 50%, #aed3ed 75%, #9bc8e8 100%);
    filter: none;
    top: 0;
    height: 100%;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 82, 165, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 51, 102, 0.08) 0%, transparent 40%);
    z-index: 0;
}

/* ヒーローラッパー - PC: 左半分の中央にテキスト */
.hero__wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    margin: 0;
    padding: 40px 20px;
    flex: 1;
}

/* テキストコンテンツ - 左半分の中央 */
.hero__content {
    flex: 0 0 auto;
    width: auto;
    max-width: 500px;
    padding: 0;
    z-index: 2;
}

/* タイトル */
.hero__title {
    color: #1a365d;
    text-shadow: none;
    white-space: nowrap;
    font-size: clamp(24px, 2.8vw, 36px);
    margin-bottom: 24px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.hero__title br {
    display: none;
}

/* 各行を統一 */
.hero__line {
    display: block;
    line-height: 1.6;
    color: #1a365d;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
}

.hero__line span {
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

.hero__title span:last-child {
    color: inherit;
}

/* メインタイトル（高額な紹介料に終止符を） */
.hero__title-main {
    font-size: clamp(32px, 4.5vw, 56px);
    display: block;
    font-weight: 900;
    line-height: 1.4;
    color: #e85d04;
    text-decoration: underline double;
    text-decoration-color: #e85d04;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    background-color: #ffffff;
    padding: 4px 12px;
    border-radius: 8px;
    width: fit-content;
    margin-bottom: 8px;
}

/* 「1万円でお試し採用」に下線 */
.hero__underline {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
    text-decoration-color: var(--color-primary);
}

.hero__label {
    background-color: #1976d2;
    color: #ffffff;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 16px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    align-self: flex-start;
    width: auto;
}

.hero__text {
    color: #2d3748;
    margin-bottom: 16px;
}

.hero__text p {
    color: #4a5568;
}

/* PC表示では改行を非表示 */
.sp-only {
    display: none;
}

/* 男性薬剤師画像 - 右半分の中央・下揃え */
.hero__image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}

.hero__image img {
    width: auto;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    object-position: bottom center;
}

/* 薬局登録ボタンのサイズ拡大 */
.hero__content .btn--round {
    font-size: clamp(18px, 1.9vw, 24px) !important;
    padding: 15px 45px !important;
    border-radius: 9999px;
    font-weight: 800;
}

/* ヒーローセクションのバナー画像 */
.hero__banner-wrapper {
    margin-top: 24px;
    max-width: 400px;
}

.hero__banner {
    width: 100%;
    height: auto;
    /* 影を削除して透過画像に馴染ませる */
    box-shadow: none; 
}

@media (max-width: 767px) {
    .hero__banner-wrapper {
        max-width: 100%;
        margin-top: 20px;
        z-index: 2;
        position: relative;
    }
}

/* ============================================
   大画面対応 (1400px以上)
   ============================================ */
@media (min-width: 1400px) {
    .hero {
        min-height: 700px;
    }
    
    .hero__image img {
        max-height: 680px;
    }
}

/* ============================================
   中画面対応 (1024px - 1399px)
   ============================================ */
@media (min-width: 1024px) and (max-width: 1399px) {
    .hero {
        min-height: 650px;
    }
    
    .hero__wrapper {
        padding: 30px 20px;
    }
    
    .hero__title {
        font-size: clamp(32px, 3.5vw, 46px);
    }
    
    .hero__image img {
        max-height: 580px;
    }
}

/* ============================================
   タブレット対応 (768px - 1023px)
   ============================================ */
@media (max-width: 1023px) {
    .hero {
        min-height: 550px;
    }
    
    .hero__wrapper {
        padding: 20px 15px;
    }

    .hero__content {
        max-width: 400px;
    }
    
    .hero__title {
        font-size: clamp(28px, 3.5vw, 38px);
    }
    
    .hero__label {
        font-size: clamp(18px, 3vw, 24px);
    }

    .hero__image img {
        max-height: 480px;
    }
}

/* ============================================
   スマホ対応 (767px以下)
   ============================================ */
@media (max-width: 767px) {
    .hero {
        min-height: 500px;
        padding-top: 20px;
        overflow: hidden;
    }

    /* スマホ: 文字を背景左端に完全に揃える */
    .hero__wrapper {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        width: 100%;
        padding: 20px 0;
        gap: 16px;
        min-height: 460px;
    }

    /* .innerクラスのパディングをオーバーライドして左端から2文字分右に */
    .hero__content.inner {
        width: 100%;
        max-width: 85%;
        text-align: left;
        z-index: 2;
        padding: 0 0 0 2em !important;
        margin-left: 0;
    }

    .hero__content {
        max-width: 85%;
        text-align: left;
        z-index: 2;
        padding-left: 0;
        margin-left: 0;
    }
    
    .hero__title {
        white-space: nowrap;
        font-size: clamp(20px, 5.5vw, 30px);
        text-shadow: none;
    }
    
    .hero__label {
        font-size: clamp(16px, 5vw, 20px);
    }

    /* スマホ用：テキスト改行表示・フォント調整 */
    .sp-only {
        display: inline;
    }

    .hero__text {
        font-size: clamp(12px, 3.5vw, 15px);
        line-height: 1.7;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9), -1px -1px 2px rgba(255, 255, 255, 0.9), 0 0 6px rgba(255, 255, 255, 0.8);
    }

    .hero__text p {
        margin-bottom: 12px;
    }
    
    .btn--round {
        width: 100%;
        white-space: normal;
        font-size: clamp(15px, 3.8vw, 18px) !important;
        padding: 12px 18px !important;
    }
    
    .hero__links {
        align-items: flex-start;
    }

    /* 画像: スマホでは右下に配置、背景右端に揃える */
    .hero__image {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 55%;
        justify-content: flex-end;
        z-index: 1;
        opacity: 0.85;
        overflow: hidden;
    }

    .hero__image img {
        max-height: none;
        height: auto;
        width: 100%;
        min-height: 400px;
        object-fit: cover;
        object-position: left bottom;
    }
}

/* ============================================
   小さいスマホ対応 (480px以下)
   ============================================ */
@media (max-width: 480px) {
    .hero {
        min-height: 450px;
    }
    
    .hero__wrapper {
        min-height: 410px;
    }
    
    .hero__content {
        max-width: 85%;
    }
    
    .hero__image {
        right: 0;
        width: 60%;
    }

    .hero__image img {
        min-height: 360px;
    }

    .hero__title {
        font-size: clamp(24px, 6.5vw, 32px);
    }
}

/* 活用事例セクションのレイアウト調整 */
.section.case-studies .inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.case-studies__blocks {
    width: 100%;
    margin-inline: auto;
    max-width: 1040px;
    justify-content: center;
}

.case-studies__block {
    margin-inline: auto;
    width: 100%;
}

/* PC表示でのグリッド調整 */
@media (min-width: 1024px) {
    .before-after__grid {
        justify-content: center;
    }
}

/* 活用事例セクションの位置調整 */
#case-studies .inner,
#case-studies .case-studies__blocks {
    margin-left: auto;
    margin-right: auto;
}

/* マンガセクション */
.manga-explanation {
    padding-top: 40px;
    padding-bottom: 60px;
    background-color: #f8fafc;
}

.manga-description {
    width: 90%;
    max-width: 720px;
    margin: 20px auto 0;
    text-align: center;
}

.manga-description p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.manga-container {
    width: 90%;
    max-width: 720px;
    margin: 30px auto 0;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    padding: 20px;
}

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

@media (max-width: 767px) {
    .manga-explanation {
        padding-top: 30px;
        padding-bottom: 40px;
    }
    
    .manga-container {
        margin-top: 20px;
        padding: 10px;
    }
}
