/* ========================================
   Hero Section with Background Image
   写真を活かしたヘッダーデザイン
   ======================================== */

/* ベーススタイル - PC用 */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
    display: flex;
    align-items: center;
}

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

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;
    filter: brightness(1.18) saturate(0.67);
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.90) 35%,
        rgba(255, 255, 255, 0.25) 65%,
        rgba(255, 255, 255, 0.05) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
}

.hero-text-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    padding: 75px 65px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
}

.hero-title {
    font-size: 54px;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 48px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    color: #E1306C;
    background: linear-gradient(135deg, #E1306C, #833AB4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
}

/* グラデーションをサポートしないブラウザ用のフォールバック */
@supports not (-webkit-background-clip: text) {
    .hero-title {
        color: #E1306C;
        background: none;
    }
}

.hero-title-emphasis {
    font-weight: 700;
    font-size: 1.0em;
    display: inline-block;
}

.nowrap {
    white-space: nowrap;
    display: inline-block;
    word-break: keep-all;
}

.hero-subtitle {
    font-size: 16px;
    letter-spacing: 2.5px;
    line-height: 2.2;
    color: #888888;
    font-weight: 400;
    margin-top: 8px;
    margin-bottom: 52px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* タブレット幅（768〜1024px）最適化 - キャッチコピー2行維持 */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        min-height: 90vh;
    }

    .hero-bg-image {
        object-position: 68% center;
    }

    .hero-content {
        padding: 50px 30px;
    }

    .hero-text-wrapper {
        max-width: 680px;
        padding: 60px 48px;
    }

    .hero-title {
        font-size: 46px;
        line-height: 1.7;
        margin-bottom: 42px;
        word-break: keep-all;
        overflow-wrap: normal;
        line-break: strict;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 2.2;
        letter-spacing: 2.2px;
        margin-bottom: 46px;
    }
}

/* タブレット小型（769〜900px）さらに調整 */
@media (min-width: 769px) and (max-width: 900px) {
    .hero-title {
        font-size: 42px;
        line-height: 1.7;
    }

    .hero-text-wrapper {
        max-width: 600px;
        padding: 55px 42px;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* スマホ幅（〜768px）最適化 - 写真を上、テキストを下に配置 */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: 70px;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero-background {
        position: relative;
        width: 100%;
        min-height: 60vh;
    }

    .hero-bg-image {
        object-position: center;
        filter: brightness(1.22) saturate(0.65);
    }

    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 40%,
            rgba(255, 255, 255, 0.8) 80%,
            rgba(255, 255, 255, 0.95) 100%
        );
    }

    .hero-content {
        position: relative !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 40px 0 35px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .hero-text-wrapper {
        width: 92vw !important;
        max-width: 600px !important;
        margin: 0 auto !important;
        padding: 38px 24px 32px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
    }

    .hero-title {
        font-size: 24px;
        line-height: 1.85;
        margin-bottom: 32px;
        word-break: keep-all;
        overflow-wrap: normal;
        line-break: strict;
    }

    .hero-subtitle {
        font-size: 13px;
        line-height: 2.4;
        letter-spacing: 1.5px;
        margin-bottom: 36px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 100%;
    }
}

/* スマホ小型（〜480px）最適化 */
@media (max-width: 480px) {
    .hero-content {
        max-width: none !important;
        margin: 0 !important;
        padding: 32px 0 30px !important;
    }

    .hero-text-wrapper {
        width: 90vw !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 32px 20px 26px !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
    }

    .hero-title {
        font-size: 21px;
        line-height: 1.9;
        margin-bottom: 28px;
        word-break: keep-all;
        overflow-wrap: normal;
        line-break: strict;
    }

    .hero-subtitle {
        font-size: 12px;
        line-height: 2.4;
        letter-spacing: 1.2px;
        margin-bottom: 32px;
    }
}

/* スマホ極小（〜375px）最適化 - iPhone SE等 */
@media (max-width: 375px) {
    .hero-content {
        max-width: none !important;
        margin: 0 !important;
        padding: 30px 0 28px !important;
    }

    .hero-text-wrapper {
        width: 88vw !important;
        max-width: 340px !important;
        margin: 0 auto !important;
        padding: 28px 16px 22px !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
    }

    .hero-title {
        font-size: 19px;
        line-height: 1.95;
    }

    .hero-title-emphasis {
        font-size: 1.0em;
    }
}

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