/* ==========================================================================
   H2O 2Go — homepage styles (index.html)
   header (water ripple) · featured · map + trading times · benefits · contact
   ========================================================================== */

/* ---------- header: kept as the original (water ripple runs on .img) ---------- */
.img {
  width: 100%;
  height: 100vh;
  height: 100svh;
  background: url('../img/water.jpg') no-repeat center;
  background-size: cover;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: column;
}

.headImg {
  display: block;
  width: 90%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  animation: heroIn 1s var(--ease) both;
}

.headCta {
  display: block;
  width: 30vw;
  min-width: 160px;
  margin-top: 10vh;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--purple);
  text-align: center;
  padding: 0.55em 1em;
  border-radius: 10px;
  border: 1px solid var(--light);
  text-decoration: none;
  color: var(--light);
  font-weight: 500;
  box-shadow: 0 7px var(--purple);
  transition: translate 0.15s ease, box-shadow 0.1s ease;
  animation: heroIn 1s var(--ease) 0.35s both;
}

.headCta:active {
  box-shadow: none;
  translate: 0 7px;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .headImg { width: 40vw; }
}

/* ---------- featured products ---------- */
main {
  padding: 4.5rem 0 3.5rem;
}

.mainGroup {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
}

.mainWrapper {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  color: var(--light);
  background: linear-gradient(160deg, var(--blue), var(--blue-deep));
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.mainWrapper:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.mainWrapper h3 {
  font-size: 1.2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.imgFrame {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: aliceblue;
}

.mainWrapper img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.mainWrapper:hover img { transform: scale(1.05); }

.mainWrapper p {
  flex: 1;
  margin: 1rem 0 0;
  font-weight: 400;
  opacity: 0.92;
}

.mainWrapper a {
  display: block;
  margin-top: 1.25rem;
  padding: 0.7em 1em;
  border-radius: 999px;
  text-align: center;
  text-transform: capitalize;
  text-decoration: none;
  font-weight: 600;
  color: var(--light);
  background-color: var(--purple);
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.mainWrapper a:hover { background-color: var(--light); color: var(--blue); }
.mainWrapper a:active { transform: translateY(1px); background-color: black; color: white; }

@media (min-width: 640px) {
  .mainGroup { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .mainGroup { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- map + trading times ---------- */
.map {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0;
  color: var(--light);
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 149, 209, 0.5), transparent 45%),
    var(--blue);
}

.mapLayout {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
}

.mapCol {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mapWrapper {
  position: relative;
  width: 100%;
  height: min(60vh, 460px);
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 3px solid rgba(255, 255, 255, 0.3);
  background-color: var(--light);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.mapWrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mapBtn {
  margin-top: 1.25rem;
  padding: 0.7em 2.2em;
  border-radius: 999px;
  text-transform: capitalize;
  text-decoration: none;
  font-weight: 600;
  color: var(--light);
  background-color: var(--purple);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.6);
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.mapBtn:hover { background-color: var(--light); color: var(--blue); transform: translateY(-2px); }

.trading {
  align-self: start;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid rgba(240, 248, 255, 0.4);
  background-color: var(--purple);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.trading h2 {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.hours {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  color: aliceblue;
  transition: background-color 0.3s;
}

.hours li span:first-child { font-weight: 600; }

.hours li.is-today {
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 3px 0 0 var(--light);
}

.hours li.is-today span:last-child::after {
  content: " · today";
  font-size: 0.8em;
  opacity: 0.85;
}

@media (min-width: 900px) {
  .mapLayout { grid-template-columns: 2fr 1fr; align-items: start; }
}

/* ---------- benefits ---------- */
.info {
  padding: 4.5rem 0;
}

.infoGrid {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
  display: grid;
  gap: 1.25rem;
}

.infoWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  color: var(--light);
  background: linear-gradient(160deg, var(--purple), rgb(108, 32, 116));
  box-shadow: 0 14px 30px -16px rgba(137, 46, 145, 0.7);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.infoWrapper:hover { transform: translateY(-5px); }

.infoWrapper img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 14px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background-color: var(--light);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.15);
  transition: transform 0.5s var(--ease);
}

.infoWrapper:hover img { transform: rotate(-8deg) scale(1.06); }

.infoWrapper h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.infoWrapper p {
  margin: 0;
  opacity: 0.92;
}

@media (min-width: 640px) {
  .infoGrid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .infoGrid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- contact form ---------- */
#contact {
  padding: 1rem 0 4.5rem;
}

form {
  width: min(640px, 100% - 32px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--blue), var(--blue-deep));
  box-shadow: var(--shadow-lg);
}

form h2 {
  text-align: center;
  text-transform: capitalize;
  color: aliceblue;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  margin-bottom: 1rem;
}

form label {
  margin-top: 0.6rem;
  font-weight: 500;
  color: aliceblue;
}

form input:not([type="submit"]),
form textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background-color: var(--light);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

form textarea {
  min-height: 9rem;
  resize: vertical;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--lgBlue);
  box-shadow: 0 0 0 4px rgba(37, 149, 209, 0.35);
}

form [type="submit"] {
  margin-top: 1.5rem;
  cursor: pointer;
  width: 100%;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--light);
  background-color: var(--purple);
  border: 2px solid black;
  box-shadow: 0 5px black;
  transition: translate 0.15s ease, box-shadow 0.1s ease, background-color 0.2s;
}

form [type="submit"]:hover { background-color: rgb(155, 58, 164); }
form [type="submit"]:active { translate: 0 5px; box-shadow: none; }

form [type="submit"]:disabled { opacity: 0.75; cursor: progress; }

/* shared contact.js messages */
.form-success {
  display: none;
  margin-bottom: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--lgBlue);
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--light);
}

.form-success.show { display: block; animation: heroIn 0.5s var(--ease) both; }

.form-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--purple);
  border-radius: 8px;
  background-color: var(--light);
  color: var(--purple);
  font-size: 0.95rem;
}

.form-error[hidden] { display: none; }
