/* common.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Zen Kaku Gothic New','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.02em;
    font-feature-settings: "pwid" on, "calt" on, "kern" on;
    font-weight: 400;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7f6 0%, #c9e4df 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-open {
  padding-right: 0 !important;
}

.navbar-logo a{
    color: #4a6f69;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    overflow-wrap: break-word;
}

.resource-item p {
    margin: 1.5vh 0 0.5vh;
}

.spaced {
  margin-bottom: 1rem;
}

.parkinsans-regular {
  font-family: "Parkinsans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.05em;
  margin: 2rem 0 1rem;
  color: #333;
  font-weight: bold;
}

.reveal-section h3{
  font-size: 16px;
}

.moirai-one-regular {
  font-family: "Moirai One", system-ui;
  font-weight: 400;
  font-style: normal;
}

.moirai-one-regular a{
      font-size: 50px;
}

nav{
      height: fit-content;
}

nav .navbar-logo{
    margin-left: 5px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: rgb(33, 44, 41);
    animation: fadeInUp 1s ease-out;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.container-fluid{
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h3{
    font-size: 1.5em;
    margin-top: 20px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
}

h3::before {
    content: "｛";
    display: block;
    font-size: 2em;
    padding-right: 5px;
}

h3::after {
    content: "｝";
    display: block;
    font-size: 2em;
    padding-left: 5px;
}

h3{
    padding: 0 0.05em;
}

#skills-heading{
    margin-top: 50px;
}

.works-section{
    margin-top: 50px;
}

.works-section h3{
    font-size: 16px;
    margin-top: 0;
    align-items: center;
}

.works-section article{
    margin-bottom: 80px;
}

.navbar-logo ul{
    padding-left: 0;
    height: 74px;
}

.item{
  float: left;
  list-style: none;
  opacity: 0;
}

/* モーダル関連のスタイル */
.modal-body {
  padding: 1.5rem;
}

.modal-body .modal-image-container {
  width: 100%;
  text-align: center;
}

.modal-body .modal-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-body h6{
    margin-top: 20px;
}

/* モーダルを常に縦積みレイアウトに */
.modal-body .d-flex {
  flex-direction: column !important;
}

.modal-content-container {
  width: 100%;
  padding-top: 1rem;
}

/* アニメーション */
.item:nth-child(1) {
  animation: example 0.5s ease 0.1s 1 forwards;
}
.item:nth-child(2) {
  animation: example 0.5s ease 0.2s 1 forwards;
}
.item:nth-child(3) {
  animation: example 0.5s ease 0.3s 1 forwards;
}
.item:nth-child(4) {
  animation: example 0.5s ease 0.4s 1 forwards;
}
.item:nth-child(5) {
  animation: example 0.5s ease 0.5s 1 forwards;
}
.item:nth-child(6) {
  animation: example 0.5s ease 0.6s 1 forwards;
}
.item:nth-child(7) {
  animation: example 0.5s ease 0.7s 1 forwards;
}
.item:nth-child(8) {
  animation: example 0.5s ease 0.8s 1 forwards;
}
.item:nth-child(9) {
  animation: example 0.5s ease 0.9s 1 forwards;
}

.reveal-section .btn-primary {
    background: #4a6f69;
    color: #fff;
    border: none;
}

.btn-primary:hover, .btn-primary:focus,
.btn-primary:active, .btn-primary:active:focus, .btn-primary:active:hover, .btn-primary:active.focus,
.btn-primary.active, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary.active.focus,
.open > .dropdown-toggle.btn-primary,
.open > .dropdown-toggle.btn-primary:hover,
.open > .dropdown-toggle.btn-primary:focus,
.open > .dropdown-toggle.btn-primary.focus,
.btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus {
    background: #4a6f69;
    color: #fff;
}

.btn-primary.outline {
	border: 3px solid #4a6f69;
	color: #fff;
  border: none;
}

.bi-arrow-up-square-fill::before{
  vertical-align: 0;
}

@keyframes example {
  100% {
    opacity: 1;
  }
}

footer{
    color: #4a6f69;
}

/* プログレッシブ表示 */
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
  margin: 2rem 0;
}

.reveal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 最初から表示するセクション */
#portfolio {
  opacity: 1;
  transform: translateY(0);
  margin: 2rem 0;
  overflow: hidden;
}

/* カスタムツールチップ */
.info-tooltip {
  position: relative;
  display: inline;
  color: #4a6f69;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: fit-content;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  max-width: 250px;
  white-space: normal;
  pointer-events: none;
}

.info-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  border: 5px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.info-tooltip:hover::after,
.info-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* 読了進捗インジケーター */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #e9ecef;
  z-index: 1050;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a6f69, #64907c);
  width: 0%;
  transition: width 0.3s ease;
}

/* 次のセクション予告 */
.next-section-hint {
  text-align: center;
  opacity: 0.6;
  font-style: italic;
  color: #6c757d;
  margin: 2rem 0;
  font-size: 0.9rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 作品アイテムのホバー効果 */
.work-item {
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを無効 */
}

.work-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 8px;
}

.work-item:hover::after {
  opacity: 1;
}

/* タッチデバイスでのホバー効果を改善 */
@media (hover: none) {
  .work-item:active::after {
    opacity: 1;
  }
}

.work-detail-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.work-item:hover .work-detail-icon {
  opacity: 1;
}

/* タッチデバイスでのアイコン表示 */
@media (hover: none) {
  .work-item:active .work-detail-icon {
    opacity: 1;
  }
}

#modalDescription {
  white-space: pre-line;
}

/* スライド用のスタイル */
.infinite-slider {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  margin: 20px 0;
  width: 100%;
  cursor: grab;
  padding: 20px 0;
}

.infinite-slider:active {
  cursor: grabbing;
}

.slide-track {
  display: flex;
  transition: transform 0.3s ease;
}

.slide-track.dragging {
  transition: none;
}

.slide-item {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  margin: 0 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  user-select: none;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* スライド制御ボタン */
.slide-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
}

.infinite-slider:hover .slide-controls {
  opacity: 1;
}

.slide-controls:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.slide-controls.prev {
  left: 10px;
}

.slide-controls.next {
  right: 10px;
}

.slide-controls .bi{
  width: auto;
  height: auto;
}

/* アコーディオンスタイル */
.accordion-button:not(.collapsed){
  border-top-left-radius: unset;
  border-top-right-radius: unset;
}

.accordion-item button,
.accordion-item:first-of-type .accordion-button{
  background-color: rgb(255 255 255 / 46%);
  border: none;
  padding-left: 0;
}

.accordion-button:not(.collapsed) {
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 rgb(196 212 207 / 53%);
}

.accordion-item h3,
.accordion-button::after,
.accordion-button:not(.collapsed)::after {
  color: #000!important;
}

.accordion-item{
  background-color:unset!important;
  border: none;
}

.accordion-button:focus{
  border-color: unset;
  outline: none;
  box-shadow: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .ms-auto{
    text-align: right;
  }

  .slide-item {
    width: 250px;
    height: 250px;
  }
  
  .slide-controls {
    width: 35px;
    height: 35px;
    opacity: 0.7;
  }
  
  /* モバイルでのツールチップ調整 */
  .info-tooltip::after {
    left: 50%;
    width: fit-content;
    transform: translateX(0);
  }
  
  .info-tooltip:hover::after,
  .info-tooltip:hover::before {
    transform: translateX(0) translateY(-5px);
  }
  
  /* モーダルの調整 */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
}

@media (min-width: 768px) {
  .col-md-8, .col-md-4 {
    width: 100%;
  }
  .ms-auto{
    text-align: right;
  }
}
