body {
  font-family: "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
  text-align: center;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

header {
  background: linear-gradient(120deg, #0099D9, #60C3FF);
  color: white;
  padding: 2rem 1rem;
}

main {
  margin: 2rem auto;
  max-width: 800px;
}

.mockup {
  width: 100%;
  height: auto;
  max-width: 700px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

footer {
  padding: 1rem;
  font-size: 0.85rem;
  color: #777;
}

/* Make images scale down on small screens */
img {
  max-width: 100%;
  height: auto;
}


/* Homepage layout styles */
.navbar {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.navbar .logo {
  font-size: 1.5rem;
  color: #0099D9;
  font-weight: bold;
  text-decoration: none;
}

.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.navbar nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* current page marker */
.navbar nav a.active {
  color: #0099D9;
}

.hero {
  background: #ffffff;
  padding: 4rem 2rem;
}

.hero-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 60px 20px;
  flex-wrap: wrap;
}

.hero-content .text {
  flex: 1;
  min-width: 300px;
}

.hero-content .image {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 300px;
}

.hero-content .image img {
  max-width: 100%;
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hero .text {
  max-width: 480px;
  text-align: left;
}

.hero .btn-primary {
  display: inline-block;
  margin-top: 1rem;
  background: #0099D9;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}


.features {
  background: #f4faff;
  padding: 3rem 2rem;
}

.features .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features .container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.feature {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  flex: 1;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature h3 {
  color: #0099D9;
  margin-bottom: 1rem;
}

.policy-page {
  max-width: 720px;
  margin: 4rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  line-height: 1.8;
  text-align: left;
}

.policy-page h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.policy-page p,
.policy-page li {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.policy-page ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.hero-description {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
  max-width: 600px;
  line-height: 1.8;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  /* Avoid overly aggressive breaks that split single characters */
  overflow-wrap: break-word;
}

.contact-page {
  padding: 60px 20px;
  background-color: #f9f9f9;
  min-height: 80vh;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.contact-form button {
  background-color: #0099D9;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

/* ========== Small-screen tweaks (iPhone etc.) ========== */
@media (max-width: 600px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  .navbar .container {
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
  }
  .navbar .logo {
    display: none; /* Hide text logo on small screens to save space */
  }
  .navbar nav {
    width: auto;
    margin-left: auto;
  }
  .navbar nav ul {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.75rem;
    font-size: 0.95rem;
  }
  /* Inline size overrides for the header logo image */
  .navbar img[alt="TraveLog ロゴ"] {
    width: 40px !important;
    height: 40px !important;
  }

  .hero {
    padding: 2.5rem 1rem;
  }
  /* Stack hero columns and override inline flex-basis/max-width */
  .hero .container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 20px !important;
    text-align: left;
  }
  .hero .container > div {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
  /* Shrink App Store badge on small screens */
  .hero img[src*="marketingtools.apple.com"] {
    width: 180px !important;
    height: auto !important;
  }
  .hero h1 {
    font-size: 1.7rem !important;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  .hero-description {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  .features {
    padding: 2rem 1rem;
  }
  .policy-page {
    margin: 2rem 1rem;
    padding: 1.25rem;
  }
  .contact-page {
    padding: 40px 16px;
  }
  .contact-form {
    padding: 20px;
    gap: 16px;
  }
  .submit-button {
    width: 100%;
  }
}

.contact-page {
  padding: 80px 20px;
  background-color: #f9f9f9;
  min-height: 80vh;
  flex-direction: column;
  align-items: center;
}

.contact-page h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-page p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 600px;
  width: 100%;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
}

.submit-button {
  padding: 12px 24px;
  background-color: #0099d9;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  box-sizing: border-box; /* prevent 100% width + padding overflow */
  max-width: 100%;
}

.submit-button:hover {
  background-color: #007bb5;
}

.feature-page {
  padding: 60px 20px;
  text-align: center;
}

.feature-page h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.feature-description {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.feature-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 30px 20px;
  width: 280px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #333;
}

.feature-card p {
  font-size: 1rem;
  color: #666;
}

/* ========== Gallery Page ========== */
.gallery-page {
  padding: 80px 20px;
  text-align: center;
  background: #f9f9f9;
  min-height: 80vh;
}

.gallery-description {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 40px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.gallery-item {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.gallery-item figcaption {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #333;
}


/* ========== Lightbox dialog ========== */
#lightboxDialog {
  padding: 0;
  border: none;
  max-width: 90vw;
  max-height: 90vh;
  background: rgba(0,0,0,0.9);
  text-align: center;
}

#lightboxDialog::backdrop {
  background: rgba(0,0,0,0.6);
}

#lightboxImg {
  max-width: 100%;
  max-height: 80vh;
  margin: 40px auto 16px;
  display: block;
}

#lightboxCaption {
  color: #fff;
  margin-bottom: 16px;
}

#lightboxClose {
  margin-bottom: 32px;
  padding: 8px 24px;
  background: #0099d9;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
