@charset "UTF-8";

/**
 * =====================================================
 * style-home.css
 * Home Page Styles for IYOPLAN ADS
 * =====================================================
 */

:root {
  --hero-height: 800px;
  --hero-max-width: 1500px;
  --hero-bg-white: #ffffff;
}

/* ==================================================
 P-TOP-HERO (Home Hero Section)
================================================== */
.c-hero.p-top-hero {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  max-height: calc(100vh - 60px);
  /*background-color: #0d1117;*/
  overflow: hidden;
}

/* 中央1500px基準のインナー領域 */
.p-top-hero__inner {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   Right Side: Swiper Image Slider (1500px以上の場合は右外側へ拡大)
   ========================================================================== */
.p-top-hero__slider-wrapper {
  width: max(100%, 50% + 750px);
  height: 100%;
  margin-left: max(0px, 50vw - 750px);
}

.p-top-hero__swiper {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.p-top-hero__swiper {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1 !important;
}

.p-top-hero__slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.p-top-hero__slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /*transition: transform 7s ease;*/
}

/* アクティブスライド画像の微かなズーム効果 
.swiper-slide-active .p-top-hero__slide-img {
  transform: scale(1.08);
}*/

/* 画像上のグラデーション（モバイル時の可読性向上） */
.p-top-hero__slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 60%);
  z-index: 2;
}

/* ==========================================================================
   Left Side: White Content Box with Diagonal Edge (clip-path)
   1500px以上の場合は左側背景も画面外枠まで引き伸ばす
   ========================================================================== */
.p-top-hero__content-box {
  position: absolute;
  top: 0;
  width: calc(100% + (100vw - var(--hero-max-width)) / 2);
  height: 100%;
  background-color: var(--hero-bg-white);
  z-index: 10 !important;;
  
  display: flex;
  align-items: center;
  pointer-events: none; /* 下層のスワイプ操作を阻害しない */
}


/* 通常時（1500px未満） */
.p-top-hero__content-box {
  /*clip-path: polygon(
    0 0,
    calc(max(650px, 50vw - var(--hero-max-width) * 0.07)) 0,
    calc(max(170px, 50vw - var(--hero-max-width) * 0.38)) 100%,
    0 100%
  );*/
  width: calc(50vw - var(--hero-max-width) * 0.07);

  /* 2. 最小幅（これ以上は小さくしない限界値）を設定したい場合 */
  min-width: 670px; /* 必要に応じて設定（画面からはみ出たら右側が削れます） */

  /* 3. clip-path は「要素の右下」を起点に斜めにする */
  clip-path: polygon(
    0 0,
    100% 0,                               /* 右上：常に要素の右端 */
    calc(100% - var(--hero-max-width) * 0.31) 100%, /* 右下：右上から一定距離だけ左へ */
    0 100%
  );
}


/* ==========================================================================
   Text Content & Fade Synchronization
   ========================================================================== */
.p-top-hero__text-container {
  pointer-events: auto;
  /*padding-left: max(40px, calc((100vw - 1670px) / 2 + 40px));*/
  padding-left: 120px;
  padding-right: 2rem;
  width: max(400px, calc((100vw - 1500px) / 2 + 25rem));
}

/* 各スライドに対応するテキストブロック */
.p-top-hero__text-item {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.p-top-hero__text-item.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.p-top-hero__subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: #0284c7;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.p-top-hero__title {
  font-size: var(--fz-4xl);
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.p-top-hero__desc {
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 2rem;
  margin-bottom: 0;
  max-width: 500px;
  margin-right: 45px;
}

.p-top-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 500;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}

.p-top-hero__btn:hover {
  background-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   Swiper Navigation Controls
   ========================================================================== */
.p-top-hero__controls {
  position: absolute;
  bottom: 2.5rem;
  right: calc((100vw - var(--hero-max-width)) / 2 + 3rem);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
}

@media (max-width: 1500px) {
  .p-top-hero__controls {
    right: 3rem;
  }
}

.p-top-hero__nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.p-top-hero__nav-btn:hover {
  background: #ffffff;
  color: #0f172a;
}

/* カスタムPagination */
.swiper-pagination-bullets.p-top-hero__pagination {
  position: static !important;
  width: auto !important;
  display: flex;
  gap: 0.5rem;
}

.p-top-hero__pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #ffffff;
  opacity: 0.4;
  border-radius: 9999px;
  transition: all 0.3s ease;
  margin: 0 !important;
}

.p-top-hero__pagination .swiper-pagination-bullet-active {
  width: 24px;
  opacity: 1;
  background: #38bdf8;
}

/* ==========================================================================
   Responsive Styles (< 1024px, < 768px)
   ========================================================================== */
@media (max-width: 1500px) {
  .p-top-hero__title {
    font-size: 1.85rem;
  }
}

@media (max-width: 1300px) {
  :root {
    --hero-height: 500px;
  }

  .p-top-hero__title {
    font-size: 1.7rem;
  }
  .p-top-hero__desc {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-right: 20px;
  }

}

@media (max-width: 768px) {
  :root {
    --hero-height: auto;
  }

  .c-hero.p-top-hero {
    display: flex;
    flex-direction: column-reverse;
    min-height: 600px;
  }

  .p-top-hero__slider-wrapper {
    position: relative;
    height: 380px;
    left: 0;
    max-width: 100vw;
  }

  .p-top-hero__content-box {
    position: relative;
    width: 100%;
    min-width: 100vw;
    height: auto;
    padding: 3rem 1.5rem 2.5rem;
    clip-path: none !important; /* モバイルでは斜めカットを解除して全幅カード化 */
    left: 0;
  }

  .p-top-hero__text-container {
    padding: 0;
    width: 100%;
  }

  .p-top-hero__title {
    font-size: 1.85rem;
  }

  .p-top-hero__controls {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
  }
}


/* ==================================================
   ABOUT US Section
   ================================================== */
.p-home-aboutus {
  position: relative;
  display: grid;
  gap: 48px;
  overflow: hidden;
  padding-block: var(--space-5xl);
}

.p-title-aboutus h2{
  --x: 51%;
  --y: 78%;
  --size-x: 35%;
}

.p-title-iyotetsumedia h2{
  --x: 70%;
  --y: 60%;
  --size-x: 40%;
}

.p-home-aboutus .l-container {
  display: grid;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.c-bg-stripe {
  position: absolute;
}

/* 横幅とはみ出しをコントロール */
.p-home-aboutus-container {
  width: 100%;
  max-width: 100%;
}

.p-home-aboutus__content {
  margin-left: 0;
  line-height: 1.8;
  margin-left: 200px;
  max-width: 1000px;
}

.p-home-aboutus-container .c-section__btn {
  width: 17rem;
  margin-inline: auto;
  margin-top: 20px;
  padding-inline: var(--layout-container-padding);
}

@media (max-width: 1300px) {
  .p-home-aboutus__content {
    margin-left: 140px;
    line-height: 1.4;
    max-width: 860px;
  }
}
@media (max-width: 768px) {
  .p-home-aboutus__content {
    margin-left: 0px;
  }
}

@media (min-width: 1025px) {
  .p-home-aboutus {
    gap: 100px;
  }
  .p-home-aboutus .l-container {
    gap: 100px;
  }
  .p-home-aboutus-container .c-section__btn {
    margin-inline: auto 0;
  }
}

/* ==================================================
   SERVICE Section
   ================================================== */
.p-home-service {
  background-color: var(--color-accent-light);
  padding-block-end: 0;
}

.p-home-service__head {
  margin-bottom: var(--space-2xl);
}

.p-home-service__head h2{
  --x: 26%;
  --y: 80%;
  --size-x: 40%;
}

.p-home-service__grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.p-home-service__card {
  position: relative;
  overflow: hidden;
  /*min-height: 400px;*/
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  aspect-ratio: 1/1;
}

@media (min-width: 768px) {
  .p-home-service__card {
    min-height: 600px; /* PCサイズで本来のスケールに */
    aspect-ratio: auto;
  }
}

.p-home-service__card:nth-of-type(1) {
  background-image: url("../images/home/service-traffic.jpg");
}

.p-home-service__card:nth-of-type(2) {
  background-image: url("../images/home/service-creative.jpg");
}

.p-home-service__overlay {
  position: absolute;
  inset: 0;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.1));
  color: var(--color-white);
  opacity: 1;
  transition: var(--motion-base);
}

@media (min-width: 768px) {
  .p-home-service__overlay {
    opacity: 0;
    transform: translateY(10px);
  }
}

.p-home-service__overlay h3 {
  font-size: var(--fz-2xl);
  color: var(--color-white);
  margin-bottom: 6px;
}

.p-home-service__overlay p {
  font-size: var(--fz-lg);
  margin: 0;
}

/* Hover / Focus アニメーション連動 */
@media (hover: hover) and (pointer: fine) {
  .p-home-service__card:hover .p-home-service__overlay {
    opacity: 1;
    transform: translateY(0);
  }
  .p-home-service__card:hover img,
  .p-home-service__card:focus-within img {
    transform: scale(1.05);
  }
}

.p-home-service__card:focus-within .p-home-service__overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ==================================================
   PICK UP Section
   ================================================== */
.p-home-pickup {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  background-color: var(--color-accent);
}

.p-home-pickup__head {
  margin-bottom: var(--space-2xl);
}

.p-home-pickup__head,
.p-home-pickup__head h2 {
  color: var(--color-text-white);
  background-image: none;
  -webkit-text-fill-color: unset;
}
.p-home-pickup__head span {
  color: var(--color-text-white);
}

/* Swiperナビゲーション矢印装飾 */
.p-home-pickup__nav {
  display: flex;
  gap: 12px;
  position: absolute;
  right: 0;
  top: calc(-1 * var(--space-2xl));
}

.p-home-pickup__nav .swiper-button-prev,
.p-home-pickup__nav .swiper-button-next {
  position: relative;
  inset: auto;
  width: 150px;
  height: auto;
  aspect-ratio: 6 / 1;
  margin: 0;
}

.p-home-pickup__nav .swiper-button-prev::after,
.p-home-pickup__nav .swiper-button-next::after {
  content: "";
  height: 50%;
  width: calc(100% - 14px);
  background: transparent;
  border-bottom: 2px solid var(--color-white);
  border-right: 2px solid var(--color-white);
  transform-origin: center;
  position: absolute;
}

.p-home-pickup__nav .swiper-button-prev::after {
  transform: rotate(180deg) skewX(45deg);
  bottom: 1px;
}


.p-home-pickup__nav .swiper-button-next::after {
  transform: rotate(0) skewX(45deg);
  top: 1px;
}

.p-home-pickup__nav .swiper-button-prev:hover::after,
.p-home-pickup__nav .swiper-button-next:hover::after {
  border-color: var(--color-main);
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
  opacity: 0;
  cursor: auto;
  pointer-events: none;
}

.p-home-pickup__nav .swiper-button-prev:hover { transform: translateX(-2px); }
.p-home-pickup__nav .swiper-button-next:hover { transform: translateX(2px); }

/* Swiper構造 */
.p-home-pickup__swiper,
.p-home-pickup__swiper .swiper {
  overflow: visible;
  position: relative;
}

.p-home-pickup__swiper .swiper-wrapper {
  align-items: stretch;
}

.p-home-pickup__swiper .swiper-slide {
  width: 280px;
  height: auto;
}

@media screen and (min-width: 768px) {
  .p-home-pickup__swiper .swiper-slide {
    width: 500px;
  }
}

/* カード構造 */
.p-home-pickup__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.p-home-pickup__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #ddd;
}

.p-home-pickup__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.22,.61,.36,1), opacity .4s ease;
}

.p-home-pickup__card:hover .p-home-pickup__media img {
  transform: scale(1.06);
}

.p-home-pickup__content {
  padding: var(--space-md);
  background-color: var(--color-white);
}

.p-home-pickup__title {
  font-size: 18px;
  text-align: center;
  line-height: 1.7;
  letter-spacing: .03em;
  transition: opacity .3s ease;
}

.p-home-pickup__card:hover .p-home-pickup__title {
  opacity: .7;
}

.p-home-pickup__text {
  margin: 0;
  font-size: var(--fz-sm);
}

/* 767px以下のスマートフォン対応 */
@media screen and (max-width: 767px) {
  .p-home-pickup { padding: 56px 0; }
  .p-home-pickup__head { margin-bottom: 32px; }
  .p-home-pickup__nav .swiper-button-prev,
  .p-home-pickup__nav .swiper-button-next {
    width: 60px;
    height: 20px;
  }
  .p-home-pickup__title { font-size: 16px; }
  .p-home-pickup__text { font-size: 13px; }
}

/* ==================================================
   NEWS Section
   ================================================== */
.p-home-news {
  position: relative;
  overflow: hidden;
}

.p-home-news .c-section-head h2{
  --x: 57%;
  --y: 93%;
  --size-x: 40%;
}

@media (min-width: 768px) {
  .p-home-news .l-container {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 50px 0;
    justify-items: center;
    position: relative;
    z-index: 1;
  }
}

.news-list {
  width: 100%;
  margin-bottom: 50px;
}

.news-item {
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm);
}

.news-item a {
  font-size: var(--fz-md);
}

@media (min-width: 768px) {
  .news-list {
    margin-top: 50px;
  }

  .news-item {
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-3xl);
  }
}
.p-home-news .c-section__btn {
  grid-column: 1 / 3;
  width: 14rem;
  margin: auto;
}


/* ==================================================
   WORKS Section
   ================================================== */
.p-home-works .l-container {
  background-color: var(--color-accent-light);
  padding-block: var(--space-4xl);
}

.p-home-works .c-section-head {
  text-align: center;
  background-color: unset;
  border-bottom: 2px solid var(--color-border-dark);
  display: block;
  min-height: auto;
}
.p-home-works .c-section-head h2{
  --x: 37%;
  --y: 90%;
  --size-x: 47%;
}

/* 1. スライドの高さを揃える設定 */
.swiper-slide {
  height: auto; /* Swiper内のスライドの高さを同幅に揃える */
  display: flex;
}

.p-home-works__card {
  width: 100%;
  display: flex; /* 内部の a タグを100%伸ばすため追加 */
  background: var(--color-white);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

/* 2. aタグをカード全体に引き伸ばす */
.p-home-works__card a {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.p-home-works__img {
  width: 100%;
  aspect-ratio: 2 / 1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.p-home-works__img img,
.p-home-works__noimage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* NO IMAGEの場合の見た目調整（必要に応じて） */
.p-home-works__noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  color: #888;
  font-size: var(--fz-xs);
}

/* 3. body部分をFlexboxに変更して、縦方向の余白を最下部まで伸ばす */
.p-home-works__body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1; /* 余った高さを全て占有してカードの高さを揃える */
}

.p-home-works__header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.p-home-works__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.p-home-works__tag {
  font-size: var(--fz-xs);
  padding: 2px 8px;
  background: var(--color-accent-light);
  border-radius: 4px;
  white-space: nowrap;
}

.p-home-works__line {
  height: 1px;
  background: var(--color-border-dark);
}

.p-home-works__date {
}

.p-home-works__swiper-wrap {
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
}

.c-carousel__prev {
  left: 0;
}
.c-carousel__next {
  right: 0;
}

@media (max-width: 768px) {
  .p-home-works__body {
    padding: var(--space-xs);
  }
}

.p-home-works .c-section__btn {
  width: 14rem;
  margin: auto;
}