body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    body.home .hero-container {
        margin-top: 40px;
    }
}

@media screen and (min-width: 900px) and (max-width: 1023px) {
    body.home .hero-container {
        margin-top: 52px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .hero-container {
        margin-top: 40px;
    }
}

@media screen and (min-width: 900px) and (max-width: 1023px) {
    .hero-container {
        margin-top: 52px;
    }
}

.hero {
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.hero-container {
    width: 100%;
    max-width: 1820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-top: 108px;
}

.header.show {
    transform: translateY(0);
    opacity: 1;
        position: relative;
        top: 0px;
         z-index: 2;

  }

.header.fixed.show {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.hero-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
}

/* Desktop用の調整 */
@media screen and (min-width: 768px) {
    .hero {
        padding: 0 40px;
    }

    .hero-container {
        padding-top: 108px;
    }

    .hero-video {
        border-radius: 15px;
    }
}

@media screen and (min-width: 1024px) {
    .hero {
        padding: 0 50px;
    }

    .hero-container {
        padding-top: 112px;
    }

    .hero-video {
        border-radius: 20px;
    }
}

@media screen and (min-width: 1440px) {
    .hero {
        padding: 0 60px;
    }

    .hero-container {
        padding-top: 112px;
    }
}

/* モバイル専用（最大幅767px）の設定：高さ固定・両端トリミング */
@media screen and (max-width: 767px) {
    .hero-container {
        position: relative;    /* 子要素の絶対配置の基準 */
        height: 370px;         /* 固定の高さ（必要に応じて調整） */
        padding-top: 0;        /* 従来の余白はリセット */
        overflow: hidden;      /* はみ出す部分を非表示に */
		border-radius: 25px;
		margin-top: 20px;
    }
    .hero-video {
        position: absolute;    /* コンテナ内で自由に配置 */
        top: 50%;              /* 垂直中央に */
        left: 50%;             /* 水平中央に */
        transform: translate(-50%, -50%);
        height: 100%;          /* コンテナの高さに合わせる */
        width: auto;           /* 高さに合わせて横幅を自動調整 */
        object-fit: cover;     /* トリミング表示 */
        border-radius: 10px;   /* 必要に応じて調整 */
        aspect-ratio: unset;   /* PC用の比率指定を解除 */
    }
}

/* タブレット専用（768px〜1023px）の設定：高さ固定・両端トリミング */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .hero-container {
        position: relative;
        height: 600px;         /* タブレット用の固定高さ（調整可能） */
        overflow: hidden;
    }
    .hero-video {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        height: 100%;
        width: auto;
        object-fit: cover;
        aspect-ratio: unset;
    }
}
