/* ==================== company.css（Swiperカルーセル用） ==================== */


.container, .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Swiper カルーセル */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    overflow: visible; /* ナビボタンを表示するため */
}

.index-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.index-swiper .swiper-slide .company-card {
    width: 100%;
    max-width: 360px; /* カード幅調整 */
    box-sizing: border-box;
}

/* ナビボタン */
.index-swiper .swiper-button-prev,
.index-swiper .swiper-button-next {
    display: flex;
    z-index: 20;
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #fff;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* 左右位置 */
.index-swiper .swiper-button-prev {
    left: -100px; /* 左に100px */
}
.index-swiper .swiper-button-next {
    right: -100px; /* 右に100px */
}

/* 矢印文字表示 */
.index-swiper .swiper-button-prev::after {
    content: '‹';
    font-size: 24px;
    color: #fff;
}
.index-swiper .swiper-button-next::after {
    content: '›';
    font-size: 24px;
    color: #fff;
}

/* ==================== 企業カード（company.html用） ==================== */
.company-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
}

.company-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
    box-sizing: border-box;
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.company-name {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    flex-grow: 1;
    color: #333;
}


.company-details p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #555;
}

.company-links {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.link-button {
    background-color: #007bff;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8em;
    transition: background-color 0.2s;
}

.link-button:hover {
    background-color: #0056b3;
}
/* ==================== Swiper ナビボタン固定表示 ==================== */
.index-page .swiper-button-prev,
.index-page .swiper-button-next {
    display: flex !important;       /* ボタンを確実に表示 */
    z-index: 20;                    /* 他の要素より前面に表示 */
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #fff;
    justify-content: center;
    align-items: center;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    position: absolute;
}

/* 左右位置を調整 */
.index-page .swiper-button-prev {
    left: 10px;    /* 左端から少し内側 */
}

.index-page .swiper-button-next {
    right: 10px;   /* 右端から少し内側 */
}

/* 矢印文字を確実に表示 */
.index-page .swiper-button-prev::after {
    content: '‹';
    font-size: 24px;
    color: #fff;
}

.index-page .swiper-button-next::after {
    content: '›';
    font-size: 24px;
    color: #fff;
}
/* company.html 用：3カラムグリッドに戻す */
.company-page #company-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =========================================
   companyページ：PCは3カラム、SPは1カラム（indexと共通の挙動）
   ========================================= */
@media screen and (max-width: 768px) {
  /* 親コンテナを確実にターゲット */
  #company-container.company-grid,
  .company-grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* SPは1カラム */
    gap: 16px !important;
    width: 100% !important;
  }

  /* カードが横幅いっぱいになるように */
  .company-card,
  .company-card-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
}