/* =========================================================
   Global reset and defaults
   ========================================================= */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  color: #222;

  background:
    linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)),
    url("./Objects/BayWaterWaves.jpg");

  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* =========================================================
   Header / footer
   ========================================================= */
header, footer {
  background: transparent;
  text-align: center;
  padding: 1rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

/* =========================================================
   Main layout container
   ========================================================= */
main.app {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;

  display: flex;
  gap: 1.5rem;
  align-items: flex-start;

  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* =========================================================
   Left / Right panels
   ========================================================= */
.panel {
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  padding: 1rem;
}

/* LEFT: image panel */
.panel.left {
  flex: 0 0 40%;
  max-width: 40%;
}

/* RIGHT: text panel */
.panel.right {
  flex: 1 1 0;
}

/* =========================================================
   Gallery image handling  (CRITICAL FIX)
   ========================================================= */
.gallery {
  width: 100%;
}

.gallery img {
  width: 100%;
  height: auto;          /* allow natural scaling */
  max-height: 70vh;      /* prevents viewport overflow */
  object-fit: contain;  /* NEVER crop */
  display: block;
  border-radius: 8px;
}

/* =========================================================
   Text content box
   ========================================================= */
.content-box {
  background: rgba(255,255,255,0.9);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

p {
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* =========================================================
   Accessibility helper
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =========================================================
   Responsive behavior
   ========================================================= */
@media (max-width: 640px) {
  main.app {
    flex-direction: column;
    padding: 1rem;
  }

  .panel.left,
  .panel.right {
    max-width: 100%;
    flex: 1 1 100%;
  }
}


/* Fix layout for image-text-row so it aligns horizontally */
.image-text-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Left box: image */
.left-box {
  flex: 0 0 40%;
  max-width: 40%;
}

.left-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Right box: text */
.right-box {
  flex: 1 1 0;
}

/* =========For Debug ============================ */
body {
  outline: 6px solid green !important;
}

