/* Basic Styles */
body {
  font-family: sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: #333;
}

ul {
  list-style: none;
  padding: 0;
}

/* Header */
header {
  background: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

header h1 a {
  font-size: 1.5rem;
}

header nav ul {
  display: flex;
}

header nav ul li {
  margin-left: 20px;
}

/* Main Content */
main {
  max-width: 1200px;
  /* コンテンツの最大幅を拡大 */
  margin: 2rem auto;
  padding: 0 20px;
}

section {
  background: #fff;
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 8px;
}

/* Hero Section */
#hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 15px 0 10px 0;
  min-height: 12vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero h2 {
  font-size: 1.6em;
  margin-bottom: 5px;
}

#hero .hero-subtitle {
  font-size: 1.0em;
  margin-bottom: 6px;
}

#hero .hero-description {
  font-size: 0.85em;
  margin-bottom: 12px;
  line-height: 1.3;
}

#hero .hero-buttons {
  margin-top: 8px;
}

#hero .hero-buttons .btn {
  padding: 8px 16px;
  margin: 0 5px;
  font-size: 0.85em;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}

#hero .hero-buttons .btn-primary {
  background-color: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

#hero .hero-buttons .btn-secondary {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}

/* Works Section */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.work-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.work-item img {
  width: 150px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem; /* 説明文との間に余白を追加 */
}

.work-description p {
  margin: 0;
}

/* App List Section */
.app-list {
  display: grid;
  grid-template-columns: 1fr;
  /* 1段に変更 */
  gap: 2rem;
}

.app-item {
  display: flex;
  flex-direction: row;
  /* 画像を左、説明文を右に配置 */
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Individual App Image Styles */
.app-item img {
  width: 150px;
  /* 画像の横幅を調整 */
  height: auto;
  /* アスペクト比を維持 */
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem; /* 画像と説明文の間に余白を追加 */
}

.app-description h3 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.app-description {
  flex-grow: 1;
}

.app-description p {
  margin: 0;
  font-size: 0.9rem;
}

/* Contact Form */
form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

form button {
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  background: #333;
  color: #fff;
}

.social-links {
  margin-bottom: 1rem;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

.social-links a {
  margin: 0 10px;
  text-decoration: none;
}

.social-links svg {
  fill: #fff;
  width: 24px;
  height: 24px;
  transition: fill 0.3s;
}

.social-links a:hover svg {
  fill: #00aced;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  margin: 5px 0;
  transition: 0.4s;
}

/* Responsive */
@media (max-width: 768px) {
  header nav.global-nav {
    display: none;
  }

  .hamburger-menu {
    display: block;
  }

  header.active nav.global-nav {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
  }

  header.active .hamburger-menu span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  header.active .hamburger-menu span:nth-child(2) {
    opacity: 0;
  }

  header.active .hamburger-menu span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  header {
    flex-direction: row;
    justify-content: space-between;
  }

  header nav ul {
    margin-top: 1rem;
    flex-direction: column;
    align-items: center;
  }

  header nav ul li {
    margin: 10px 0;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}

/* App Page Specific Styles */
.download-links {
  margin-top: 20px;
}

.download-links a {
  display: inline-block;
  margin-right: 10px;
}

.download-links img {
  height: 60px;
}

/* New download buttons styling */
.download-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.download-btn img {
  height: 60px;
  width: auto;
}

/* Individual App Page Layout */
.app-detail-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.app-image {
  max-width: 400px;
  height: auto;
  flex-shrink: 0;
}

.app-video {
  flex: 1;
  min-width: 320px;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Topics Section Styles */
#topics {
  background-color: #f8f9fa;
  padding: 15px 0 25px 0;
}

#topics .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

#topics h3 {
  text-align: center;
  margin-bottom: 5px;
  color: #5a6c7d;
  font-size: 1.4em;
  font-weight: 500;
}

#topics .section-description {
  text-align: center;
  color: #8a9aa5;
  margin-bottom: 15px;
  font-size: 0.9em;
}

.topic-content {
  background: white;
  border-radius: 12px;
  padding: 15px 20px 20px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: relative;
  max-width: 750px;
  margin: 0 auto;
}

.topic-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 20px;
  position: absolute;
  top: -10px;
  left: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-top: 10px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.video-description {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  margin: 10px 0 0 0;
  font-size: 0.95em;
}
