* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('images/BG NSCC Stella Maris 1.png') no-repeat center center / cover;
  background-attachment: fixed;
  color: #ffffff;
}

.overlay {
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 5.5rem;
  text-shadow: 0 4px 7px rgb(0, 0, 0);
}

p.subtitle {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-shadow: 0 1px 3px rgb(0, 0, 0);
}

.branches {
  display: flex;
  width: 100%;
  gap: 2rem;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

/* === Branch Card === */
.branch-card {
  flex: 1 1 0;
  max-width: 360px;
  min-width: 0;
  cursor: pointer;
  transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
  border-radius: 12px;
  text-align: center;
}

.branch-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.branch-description {
  text-align: center;
  line-height: 1.5;
  padding: 0.4rem 0.5rem;
  width: 100%;
}

.branch-description p {
  margin: 0;
  padding: 0;
}

/* Hover: z-index boost (scale and glow are managed per-branch from admin) */
.branch-card:hover {
  z-index: 10;
}

.contact {
  margin-top: 2rem;
}

.contact p {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.contact a {
  color: #000747;
  font-size: 1.3rem;
  font-weight: bold;
  border: 3px solid #02007e;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}

/* Phones */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  p.subtitle {
    font-size: 1rem;
  }
  .branches {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .branch-card {
    flex: 0 0 80%;
    max-width: 300px;
  }
  .branch-card img {
    max-height: 150px;
    object-fit: contain;
  }
  .overlay {
    padding: 1rem;
  }
  .branch-description {
    font-size: 0.8rem !important;
  }
}

/* Tablets */
@media (min-width: 601px) and (max-width: 1024px) {
  h1 {
    font-size: 2.2rem;
  }
  p.subtitle {
    font-size: 1.1rem;
  }
  .branches {
    gap: 1.5rem;
  }
}

/* Large Desktops and 4K */
@media (min-width: 1440px) {
  .overlay {
    max-width: 1400px;
    margin: 0 auto;
  }
  h1 {
    font-size: 3rem;
  }
  p.subtitle {
    font-size: 1.3rem;
  }
  .branch-card {
    max-width: 320px;
  }
}
