
/* Homepage enhancements only */

.home-gallery {
  padding: 90px 0;
  background: #ffffff;
}

.home-gallery h2,
.home-message-section h2 {
  color: #092452;
}

.home-gallery-intro {
  max-width: 690px;
  color: #56677c;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 36px;
}

.home-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.home-gallery-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 18px;
  background: #edf4fa;
  box-shadow: 0 12px 36px rgba(6,25,54,.09);
}

.home-gallery-photo img {
  display: block;
  width: 100%;
  height: 290px;
  object-fit: cover;
  transition: transform .45s ease;
}

.home-gallery-photo:hover img {
  transform: scale(1.05);
}

.home-gallery-photo figcaption {
  padding: 17px 22px;
  color: #092452;
  font-weight: 700;
  border-top: 3px solid #57c9f3;
}

/* Animated speech bubbles */

.home-message-section {
  padding: 90px 0;
  background: #f4f8fc;
  text-align: center;
}

.home-message-bubbles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 42px;
}

.home-message-bubble {
  position: relative;
  padding: 20px 26px;
  border-radius: 18px;
  background: #092452;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(9,36,82,.15);
  animation: bubble-appear .8s ease both,
             bubble-float 4s ease-in-out infinite;
}

.home-message-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 28px;
  border-width: 11px 11px 0 0;
  border-style: solid;
  border-color: #092452 transparent transparent transparent;
}

.home-message-bubble:nth-child(2) {
  animation-delay: .3s, 1.1s;
}

.home-message-bubble:nth-child(3) {
  animation-delay: .6s, 1.4s;
}

.home-message-bubble:nth-child(4) {
  animation-delay: .9s, 1.7s;
}

@keyframes bubble-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bubble-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@media (max-width: 700px) {
  .home-gallery,
  .home-message-section {
    padding: 65px 0;
  }

  .home-gallery-grid {
    grid-template-columns: 1fr;
  }

  .home-gallery-photo img {
    height: 240px;
  }

  .home-message-bubbles {
    gap: 20px;
  }

  .home-message-bubble {
    width: min(100%, 340px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery-photo img {
    transition: none;
  }

  .home-gallery-photo:hover img {
    transform: none;
  }

  .home-message-bubble {
    animation: none;
  }
}


/* ==========================================
   HOMEPAGE HERO - MANAGEMENT DESIGN
   ========================================== */

.home-hero {
  display: block;
  min-height: 720px;
  padding: 70px 35px 85px;
  background: linear-gradient(140deg, #f2f9ff, #ffffff 70%);
  text-align: left;
}

.home-hero-layout {
  width: min(100%, 1120px);
  margin: 0 auto;
}

/* Logo stays centred at the top */
.home-hero-logo {
  text-align: center;
  margin-bottom: 30px;
}

.home-hero-logo .hero-logo {
  width: min(420px, 90%);
  max-height: 210px;
  margin: 15px auto 0;
}

/* Slogan on left, speech bubble on right */
.home-hero-statement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  margin: 35px 0 45px;
}

.home-hero-copy h1 {
  color: #092452;
  font-size: clamp(34px, 3.7vw, 58px);
  line-height: 1.16;
  letter-spacing: -.04em;
  margin: 0;
}

/* Speech bubble */
.home-hero-bubble {
  position: relative;
  background: #092452;
  color: #ffffff;
  border: 2px solid #57c9f3;
  border-radius: 32px;
  padding: clamp(24px, 3vw, 38px);
  box-shadow: 0 20px 50px rgba(9,36,82,.17);
  transform-origin: bottom left;
  animation: home-bubble-enter .9s ease-out .25s both;
  
}

/* Speech bubble tail pointing towards slogan */
/* Proper speech bubble tail */
.home-hero-bubble::before {
  content: "";
  position: absolute;
  left: -37px;
  bottom: 23px;
  width: 65px;
  height: 56px;
  background: #092452;
  border-left: 2px solid #57c9f3;
  border-bottom: 2px solid #57c9f3;
  clip-path: polygon(100% 0, 0 100%, 100% 78%);
  z-index: 1;
}


.home-bubble-label {
  display: block;
  color: #57c9f3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 15px;
}

.home-hero-bubble p {
  color: #e1eaf5;
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
}

/* Existing description and CTA */
.home-hero-bottom {
  text-align: center;
}

.home-hero-bottom .hero-description {
  margin: 0 auto 28px;
}

/* Entrance animation */
@keyframes home-bubble-enter {
  from {
    opacity: 0;
    transform: translate(25px, 15px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

/* Tablet and mobile */
@media (max-width: 950px) {
  .home-hero {
    padding: 60px 24px 75px;
  }

  .home-hero-statement {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .home-hero-copy {
    text-align: center;
  }

  .home-hero-copy h1 {
    font-size: clamp(34px, 6vw, 54px);
  }

  .home-hero-bubble {
    max-width: 650px;
    margin: 0 auto;
  }

  /* Tail points upwards on smaller screens */
  
    @media (max-width: 950px) {
        .home-hero-bubble {
            translate: 0 0;
        }

        .home-hero-bubble::before {
            left: 50%;
            top: -18px;
            bottom: auto;
            width: 30px;
            height: 30px;
            background: #092452;
            border-top: 2px solid #57c9f3;
            border-left: 2px solid #57c9f3;
            border-bottom: 0;
            clip-path: none;
            transform: translateX(-50%) rotate(45deg);
            z-index: -1;
        }
    }

}

@media (max-width: 600px) {
  .home-hero {
    padding: 55px 18px 65px;
  }

  .home-hero-logo .hero-logo {
    width: min(330px, 100%);
  }

  .home-hero-bubble {
    padding: 24px 22px;
    border-radius: 22px;
  }

  .home-hero-bubble p {
    font-size: 14px;
  }
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .home-hero-bubble {
    animation: none;
  }
}


/* ==========================================
   HERO - FINAL POSITION AND SIZE ADJUSTMENT
   ========================================== */

@media (min-width: 951px) {

  /* Give the slogan more space than the bubble */
  .home-hero-statement {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    align-items: start;
    gap: 45px;
    margin-top: 25px;
  }

  /* Keep the slogan visually dominant */
  .home-hero-copy h1 {
    font-size: clamp(42px, 4vw, 62px);
    line-height: 1.15;
  }

  /* Smaller bubble, positioned within its own section */
  .home-hero-bubble {
    position: relative;
    top: -18px;
    width: 100%;
    max-width: 410px;
    justify-self: end;
    padding: 20px 24px;
    border-radius: 24px;
  }

  /* Smaller label */
  .home-bubble-label {
    font-size: 10px;
    margin-bottom: 10px;
  }

  /* More compact explanation */
  .home-hero-bubble p {
    font-size: 13px;
    line-height: 1.6;
  }
}

/* Bring the speech bubble closer to the slogan */
@media (min-width: 951px) {
  .home-hero-statement {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 15px;
  }

  .home-hero-bubble {
    justify-self: start;
    max-width: 410px;
    top: -18px;
    left: -65px;
  }
}

/* Allow homepage hero to fit its actual content */
.home-hero {
  min-height: 0;
  padding-bottom: 45px;
}

@media (max-width: 900px) {
  .home-hero {
    min-height: 0;
    padding-bottom: 45px;
  }
}

/* Tighten spacing between hero and introduction */
.home-hero + .intro {
  padding-top: 60px;
}

/* Move the homepage slogan towards the centre */
@media (min-width: 951px) {
  .home-hero-copy {
    position: relative;
    left: 85px;
  }
}