/* ==========================================================================
   Hero Section Styles (PC & Mobile)
   ========================================================================== */

/* --------------------------------------------------
   Common Styles & Keyframes
   -------------------------------------------------- */
@keyframes neon-pulse {
    from {
        filter: drop-shadow(0 0 0.5px rgba(229, 122, 97, 1)) drop-shadow(0 0 1.2px rgba(229, 122, 97, 0.8));
    }
    to {
        filter: drop-shadow(0 0 0.8px rgba(229, 122, 97, 1)) drop-shadow(0 0 2px rgba(229, 122, 97, 1)) drop-shadow(0 0 3px rgba(229, 122, 97, 0.8));
    }
}

/* --------------------------------------------------
   PC Styles (Min-width: 769px)
   -------------------------------------------------- */
@media (min-width: 769px) {
    /* Top Page Hero */
    .hero-section {
        background-color: var(--color-navy);
        min-height: clamp(36rem, 84vh, 51rem);
        padding-top: 3rem;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .hero-section .content-container {
        display: flex;
        justify-content: center;
        position: relative;
    }

    .home-page .hero-section .content-container {
        display: unset;
        position: relative;
        padding: 0 clamp(9rem, 3vw, 0rem);
    }

    .home-page .hero-section .content-container dotlottie-player {
        position: absolute;
        width: 600px;
    }

    .home-hero-title-area {
        color: var(--color-white);
        display: flex;
        flex-direction: column;
        align-content: flex-start;
        justify-content: center;
    }

    .home-hero-title-area h1 {
        font-family: var(--font-jost);
        font-size: clamp(2.5rem, 5.5vw, 4rem);
        letter-spacing: 0.05rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        white-space: nowrap;
    }

    .home-hero-title-area h2 {
        font-family: var(--font-japanese);
        font-size: 1.3rem;
    }

    .lottie-container {
        width: 600px;
        height: 350px;
        padding-top: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 40px;
        right: 10px;
    }

    .lottie-container dotlottie-player {
        position: absolute;
        width: 300px;
        height: 300px;
        transform: scale(5);
        transform-origin: center center;
        filter: drop-shadow(0 0 0.5px rgba(229, 122, 97, 1)) drop-shadow(0 0 1.2px rgba(229, 122, 97, 0.8));
        animation: neon-pulse 2s infinite alternate;
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        width: 985px;
        transform: translateY(-5vh);
    }

    /* Sub Page Hero (Common) */
    .subpage .hero-section {
        padding: 3rem 0 2rem 0;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        min-height: auto; /* Reset min-height for subpages if needed */
    }

    .subpage .header-content {
        gap: 0;
        transform: none; /* Reset transform */
    }

    .subpage .header-content .service-info,
    .subpage .header-content .lottie-container {
        width: 492px;
    }

    .subpage .header-content .lottie-container {
        position: relative;
        top: auto;
        right: auto;
        padding-top: 10rem; /* Adjusted based on style.css legacy */
    }

    .subpage .header-content .service-info {
        max-width: none;
        flex: none;
        padding-left: 5%;
    }

    .subpage .header-content .service-info .service-header {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .subpage .header-content .service-info .service-title {
        display: inline;
        margin-bottom: 0;
    }

    .subpage .header-content .service-info .service-subtitle {
        display: inline;
        font-size: 0.7rem;
        font-family: var(--font-japanese);
        letter-spacing: 0;
        font-weight: 400;
        opacity: 1;
    }
}

/* --------------------------------------------------
   SP Styles (Max-width: 768px)
   -------------------------------------------------- */
@media (max-width: 768px) {
    /* 
       Hero Section (ヒーローセクション)
       !important なし修正版
    */
    .home-page .hero-section {
        min-height: 95dvh;
        height: auto;
        padding: 0;
        display: block;
        background-color: var(--color-navy);
        position: relative;
        overflow: hidden;
    }

    .home-page .hero-section .container {
        display: block;
        height: 100%;
        width: 100%;
        padding: 0 20px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
    }

    /* コンテンツエリアを画面中央に配置（少し左にずらす） */
    .home-page .header-content {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-55%, -50%); /* -50% → -55%（少し左にずらす） */
        width: 100%;
        max-width: 360px;
        height: auto;
        display: block;
        z-index: 10;
    }

    /* テキストエリア */
    .home-page .left-info {
        width: 100%;
        display: block;
        position: relative;
        z-index: 5;
    }

    .home-page .content-container {
        padding: 0;
        display: block;
    }

    .home-page .home-hero-title-area {
        text-align: left;
        width: 100%;
        padding-left: 20px;
        color: var(--color-white);
    }

    /* フォント定義（スマホ用） */
    .home-page .home-hero-title-area h1 {
        font-family: "Jost", sans-serif;
        font-weight: 700;
        font-size: 36px;
        line-height: 1.2;
        letter-spacing: 0.02em;
        margin-bottom: 20px;
        color: #ffffff;
        text-align: left;
        white-space: normal;
        text-decoration: none;
        border: none;
    }

    .home-page .home-hero-title-area h1 span,
    .home-page .home-hero-title-area h1 a {
        text-decoration: none;
        border: none;
    }

    .home-page .home-hero-title-area h2 {
        font-size: 9.5px;
        color: #ffffff;
        font-weight: 500;
        letter-spacing: 0.05em;
        text-align: left;
        opacity: 0.9;
        position: relative;
        z-index: 10;
        margin-top: -10px;
        margin-left: 5px;
    }

    /* Lottie Animation (筆記体ロゴ) */
    .home-page .lottie-container {
        position: absolute;
        top: -50px; /* 下に戻す */
        right: -120px; /* -90px → -120px（右に30px移動） */
        transform: rotate(-5deg);
        width: 380px;
        height: 380px;
        margin: 0;
        padding: 0;
        z-index: 1;
        overflow: visible;
        display: block;
    }

    .home-page .lottie-container dotlottie-player {
        width: 100%;
        height: 100%;
        transform: scale(1.6) rotate(-5deg);
        position: relative; 
        top: auto;
        left: auto;
        filter: drop-shadow(0 0 0.5px rgba(229, 122, 97, 1)) drop-shadow(0 0 1.2px rgba(229, 122, 97, 0.8));
        animation: neon-pulse 2s infinite alternate;
    }

    /* Sub Page Hero (Common SP) */
    .subpage .header-content {
        text-align: center;
        /* Reset absolute positioning from home page if inherited */
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: none;
    }

    .subpage .hero-section {
        position: relative;
        padding: 2rem 1rem;
        display: flex; /* or block depending on needs */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: auto;
    }

    .subpage .header-content .service-info {
        padding-left: 0;
        width: 100%;
    }

    .subpage .header-content .service-info,
    .subpage .header-content .lottie-container {
        width: 100%;
    }

    .subpage .header-content .service-info .service-header {
        margin-bottom: 4rem;
        margin-left: 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .subpage .btn-primary,
    .subpage .btn-secondary {
        width: 160px;
    }

    /* lottie-container - 非home-pageページ用 (SP) */
    body:not(.home-page) .lottie-container {
        width: 200px;
        height: 220px;
        position: absolute;
        top: 45%;
        right: 0;
        transform: translateY(-45%);
        z-index: 1;
        padding-top: 0rem;
    }

    body:not(.home-page) .lottie-container dotlottie-player {
        width: 50%;
        height: 100%;
        transform: scale(3.5);
        top: -4%;
        left: 50%;
    }
}

