/* About Ship Section */
.about-ship-section {
  position: relative;
  /* allow the section to be at least the height of the viewport but grow if content needs more space */
  min-height: 80vh;
  height: auto;
  width: 100%;
  /* keep overflow hidden for visual background effects on normal viewports */
  overflow: hidden;
}

.about-ship-background {
  position: absolute;
  inset: 0;
  background-image: url("../imgs/aboutimg.jpeg");
  background-size: cover;
  background-position: bottom;
}

.about-ship-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.7),
    rgba(0, 0, 0, 0.5),
    transparent
  );
}

.about-ship-section .container {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-ship-content {
  max-width: 42rem;
  /* Mobile spacing: add vertical padding so text isn't too close to edges */
  padding: 2rem 0;
}

/* Extra spacing for very small screens */
@media (max-width: 420px) {
  .about-ship-content {
    padding: 3rem 0;
  }
}

@media (min-width: 768px) {
  /* On larger screens we center content without extra vertical padding */
  .about-ship-content {
    padding: 5rem;
  }
}

.about-ship-badge {
  display: inline-block;
  background-color: var(--confeitudo-red);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .about-ship-badge {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    margin-bottom: 2rem;
  }
}

.about-ship-title {
  font-size: 1.875rem;
  font-family: "Playfair Display", serif;
  color: white;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .about-ship-title {
    font-size: 3rem;
    margin-bottom: 2rem;
  }
}

.about-ship-text {
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  line-height: 1.625;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .about-ship-text {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .about-ship-text {
    font-size: 1rem;
    gap: 1rem;
  }
}

/* Ensure content is accessible on very short viewports (mobile with keyboard open, small screens) */
@media (max-height: 560px) {
  .about-ship-section {
    /* allow the section to shrink visually and let content decide height */
    min-height: 40vh;
    overflow: visible; /* allow the page to scroll rather than internal scroll */
  }

  .about-ship-section .container {
    height: auto;
    display: flex; /* keep flex layout but align to top so content isn't pushed out */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .about-ship-content {
    /* avoid internal scrolling: reduce spacing and sizes so content fits in viewport */
    max-height: none;
    overflow: visible;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .about-ship-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .about-ship-text {
    font-size: 0.85rem;
    line-height: 1.35;
    gap: 0.5rem;
  }
}

/* Extra guard for extremely short viewports */
@media (max-height: 420px) {
  .about-ship-section {
    min-height: 30vh;
  }
  .about-ship-title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }
  .about-ship-content {
    max-height: none;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
  .about-ship-text {
    font-size: 0.8rem;
    line-height: 1.3;
    gap: 0.4rem;
  }
}
