/* 拡張CSS */

/* ----- レスポンシブナビゲーション ----- */
@media screen and (max-width: 1024px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 45%;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 20px 0;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .header-inner {
    justify-content: space-between;
  }
  
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
  }
  
  .menu-toggle span {
    height: 2px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ----- ヒーロー領域レスポンシブ ----- */
@media screen and (max-width: 768px) {
  .hero {
    padding: 170px 0 40px;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }
  
  .target-select {
    flex-direction: column;
    gap: 15px;
  }
  
  .target-option {
    width: 100%;
    max-width: none;
  }
}

/* ----- 選ばれる理由レスポンシブ ----- */
@media screen and (max-width: 768px) {
  .reasons-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .reason-card {
    padding: 20px;
  }
}

/* ----- サービス紹介レスポンシブ ----- */
@media screen and (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .service-card {
    padding: 20px;
  }
  
  .service-features {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----- 導入事例レスポンシブ ----- */
@media screen and (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .case-card {
    padding: 20px;
  }
  
  .case-results {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .result-item {
    width: 100%;
  }
  
  .case-filter .filter-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .filter-button {
    font-size: 0.9rem;
    padding: 5px 10px;
  }
}

/* ----- ブログレスポンシブ ----- */
@media screen and (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .post-card {
    flex-direction: column;
  }
  
  .featured-post-card {
    flex-direction: column;
  }
  
  .featured-post-image {
    width: 100%;
    height: 200px;
  }
  
  .featured-post-content {
    width: 100%;
    padding: 20px;
  }
  
  .category-tabs {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .category-tab {
    font-size: 0.9rem;
    padding: 5px 10px;
  }
}

/* ----- FAQレスポンシブ ----- */
@media screen and (max-width: 768px) {
  .faq-search input {
    flex: 1;
    min-width: 0;
  }
  
  .faq-item {
    padding: 15px;
  }
  
  .faq-question h3 {
    font-size: 1rem;
    padding-right: 30px;
  }
}

/* ----- お問い合わせフォームレスポンシブ ----- */
@media screen and (max-width: 768px) {
  .contact-form {
    padding: 20px;
  }
  
  .form-group.col-2 {
    flex-direction: column;
  }
  
  .form-group.col-2 > * {
    width: 100%;
  }
  
  .contact-wrapper {
    flex-direction: column;
  }
  
  .contact-form,
  .contact-info {
    width: 100%;
  }
}

/* ----- フッターレスポンシブ ----- */
@media screen and (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }
  
  .footer-links {
    flex-direction: column;
    width: 100%;
  }
  
  .footer-links-group {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }
}

/* ----- ヘッダーとパンくずのレスポンシブ対応 ----- */
@media screen and (max-width: 768px) {
  #header {
    padding: 15px 0;
  }
  
  .breadcrumbs {
    padding: 10px 0;
    font-size: 0.8rem;
  }
  
  .page-hero h1 {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
}

/* タブレット向け調整 */
@media screen and (min-width: 481px) and (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .target-select {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .target-option {
    width: calc(50% - 15px);
    max-width: calc(50% - 15px);
  }
  
  .service-features {
    flex-wrap: wrap;
  }
  
  .service-feature {
    width: calc(50% - 10px);
  }
}

/* モバイル用微調整 */
@media screen and (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .contact-banner h2 {
    font-size: 1.5rem;
  }
  
  .pagination {
    gap: 5px;
  }
  
  .pagination a {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
}

/* 印刷用スタイル */
@media print {
  header, 
  footer,
  .contact-banner,
  .newsletter,
  .faq-search,
  .faq-categories {
    display: none;
  }
  
  body {
    color: black;
    background: white;
    font-size: 12pt;
  }
  
  a {
    color: black;
    text-decoration: none;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  
  .faq-item,
  .case-card,
  .post-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 20px;
  }
  
  .faq-item.active .faq-answer,
  .case-card.expanded .case-detail-content {
    display: block !important;
    max-height: none !important;
  }
}

/* ----- ロゴサイズのレスポンシブ対応 ----- */

/* タブレット (768px-1023px) */
@media screen and (max-width: 1023px) {
  .logo img {
    width: 80px; /* デフォルト160pxから縮小 */
  }
}

/* スマートフォン (767px以下) */
@media screen and (max-width: 767px) {
  .logo img {
    width: 80px; /* さらに縮小 */
  }
}

/* 小さなスマートフォン (480px以下) */
@media screen and (max-width: 480px) {
  .logo img {
    width: 80px; /* 最小サイズ */
  }
}