html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: 'Arial';
}
#section1{
  font-family: 'Times New Roman', Times, serif;
}
.section {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  scroll-snap-align: start;
  position: relative;
  box-sizing: border-box;
}
.container {
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
h1 {
  font-size: 2.8rem;
  letter-spacing: 1px;
  margin: 0;
    font-family: 'Times New Roman', Times, serif;
}
p {
  font-size: 1rem;
  color: #36454f;
  max-width: 600px;
}
.names {
  font-size: 3.8rem;
  color: #36454f;
  margin-top: 1rem;
  letter-spacing: 2px;
  font-weight: bold;
  display: block;
  justify-content: center;
  gap: 2rem;
}
.name {
  min-width: 120px;
  transition: color 0.6s;
}
/* Section 2 (Near miss) styles */
#section2 {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
padding: 0;
margin: 0;
}
#map {
position: absolute;
inset: 0;            /* top:0; right:0; bottom:0; left:0 */
z-index: 0;          /* behind everything */
}
#section2 .timeline,
#section2 .text-block,
#section2 .image-left,
#section2 .image-right {
position: absolute;
z-index: 1;
}

#section2 .text-block {
position: absolute;
top: 2rem;
left: 2rem;
text-align: left;
max-width: 40%;
padding: 1.5rem 2rem;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
box-sizing: border-box;
color: #36454f;
}

#section2 .text-block h1 {
margin: 0;
color: #36454f;
}

#section2 .text-block p {
color: #36454f;
margin-top: 0.5rem;
margin-bottom:0.5rem;
}

#section2 .image-left,
#section2 .image-right {
position: absolute;
width: 45%;
max-width: 450px;
border: 5px solid #fff;    /* Light grey frames */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#section2 .image-left {
left: 6%;
top: 30%;
transform: rotate(-12deg);
}

#section2 .image-right {
right: 6%;
top: 30%;
transform: rotate(12deg);
}

#section2 .timeline {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
width: 2px;
background: #ccc;             /* Slate-grey line */
}

#section2 .timeline::before {
content: '';
position: absolute;
top: 2rem;
left: -6px;
width: 14px;
height: 14px;
background: #ccc;             /* Slate-grey dot */
border-radius: 50%;
}

@media (max-width: 700px) {
.section { transform: translateY(-30px); }

}
@media (max-width: 700px) {
#section2 {
position: relative;
height: 100vh;
overflow: hidden;
padding: 0;
display: block;  /* revert to block so we can absolute-position children */
}

/* hide the timeline line/dot on mobile */
#section2 .timeline {
display: none;
}

/* TEXT: top third, centered */
#section2 .text-block {
max-height: 33.33%;
padding: 1rem 1.5rem;
text-align: center;
z-index: 2;
max-width: 95%;
margin: 0.5rem auto;
left: calc((100vw - 95%)/2);
text-wrap: pretty;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
color: #36454f;
}

/* FIRST PHOTO as a skewed "Polaroid" in the middle third */
#section2 .image-left {
position: absolute;
top: 33.33%;
left: -5%;
width: auto;
max-height: 30%;
object-fit: cover;
transform: rotate(-12deg);
border: 4px solid #fff;
box-shadow: 0 3px 6px rgba(0,0,0,0.1);
z-index: 1;
}

/* SECOND PHOTO as a skewed "Polaroid" in the bottom third */
#section2 .image-right {
position: absolute;
top: 60%;
right: -5%;
width: auto;
max-height: 30%;
object-fit: cover;
transform: rotate(12deg);
border: 4px solid #fff;
box-shadow: 0 3px 6px rgba(0,0,0,0.1);
z-index: 1;
}
}
/* Section 3: Chat window & title */
#section3 {
background-color: #111419;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
position: relative;
background: url(imgs/chatbg.jpg);
}
#section3 .text-block {
position: absolute;
top: 2rem;
left: 2rem;
text-align: left;
max-width: 40%;
}
#section2 h1, #section3 h1, #section4 h1, #section5 h1, #section6 h1 {
color: #fff;
font-size: 2rem;
margin: 0 0 0.2em 0;
}
#section2 p, #section3 p, #section4 p, #section5 p, #section6 p {
font-size: 1rem;
margin-top: 0.5rem;
}
#section3 p{
color: #fff;
}
#section3 .chat-window {
width: 100%;
max-width: 750px;
height: 75%;
display: flex;
flex-direction: column;
justify-content: center; /* Vertically center messages */
box-sizing: border-box;
margin: 0 auto;
}
#section3 .messages {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
justify-content: center; /* Center message block vertically */
padding-bottom: 1rem;
}
.bubble {
display: inline-block;
padding: 0.5rem 0.5rem;
border-radius: 20px;
margin: 0.4rem 0;
line-height: 1.4;
font-size: 1rem;
max-width: 70%;
word-wrap: break-word;
}
.bubble-left {
background-color: #e0e0e0;
align-self: flex-start;
border-top-left-radius: 0;
color: #000000;
}
.bubble-right {
background-color: #007aff;
align-self: flex-end;
border-top-right-radius: 0;
color: #ffffff;
}

#section3 {
position: relative; /* ensure children absolute to this */
padding-bottom: 4rem; /* give space so last messages aren't hidden entirely */
}

#section3 .chat-input-container {
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: center;
padding: 0.5rem 0;
background: rgba(255,255,255,0.85); /* slight white overlay */
z-index: 10;
}

#section3 .chat-input {
display: flex;
align-items: center;
width: 100%;
max-width: 750px;    /* match your chat-window max-width */
background: #f0f0f0; /* light grey WhatsApp style */
border-radius: 20px;
padding: 0.3rem 0.6rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#section3 .chat-input input {
flex: 1;
border: none;
background: transparent;
padding: 0.5rem;
font-size: 1rem;
outline: none;
}

#section3 .chat-input .send-btn {
border: none;
background: none;
font-size: 1.2rem;
color: #075E54;       /* WhatsApp green accent */
cursor: pointer;
padding: 0 0.5rem;
}

/* On hover, darken the send arrow */
#section3 .chat-input .send-btn:hover {
color: #054c43;
}
@media (max-width: 700px) {
#section3 {
align-items: center;
padding: 1rem;
}
#section3 .text-block {
position: relative;
top: auto;
left: auto;
text-align: center;
max-width: 100%;
margin: 1rem auto;
}
#section3 .chat-window {
width: 100%;
height: 75%;
}
#section3 .messages { justify-content: flex-start; }
.bubble { font-size: 0.9rem; }
#section4 .overlay-content{width:95%;}
}
/* Section 4 */
#section4 { background: #faf3e7; }
/* Section 5 - Statistics */
#section5 { 
  background: #ffffff; 
}

#section5 h1 {
  color: #36454f;
  font-size: 2.8rem;
  letter-spacing: 1px;
  margin: 0;
  font-family: 'Times New Roman', Times, serif;
}

#section5 p {
  color: #36454f;
  font-size: 1rem;
  max-width: 600px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem 2rem;
  max-width: 1000px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.stat-item {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
.stat-item:nth-child(5) { animation-delay: 0.5s; }
.stat-item:nth-child(6) { animation-delay: 0.6s; }
.stat-item:nth-child(7) { animation-delay: 0.7s; }
.stat-item:nth-child(8) { animation-delay: 0.8s; }

.stat-number {
  font-size: 3.5rem;
  font-weight: bold;
  color: #36454f;
  margin-bottom: 0.5rem;
  font-family: 'Times New Roman', Times, serif;
  letter-spacing: 1px;
}

.stat-label {
  font-size:smaller;
  color: #36454f;
  font-weight: 400;
  line-height: 1.4;
  font-style: italic;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
    padding: 0 1rem;
  }
  
  .stat-number {
    font-size: 2.8rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
}

/* Section 6 */
#section6 { background: #ffffff; }
/* Enable scroll snap */
html { scroll-snap-type: y mandatory; overflow-y: scroll; }

#section4 .photo-grid {
width: 100%;
overflow: hidden;
}
/* === Section 4: Always-covered 7×3 square grid === */
#section4 {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden; /* clip any bleed */
margin: 0;
padding: 0;
}

#section4 .photo-grid {
/* fill vertically, but center horizontally */
position: absolute;
top: 0;
bottom: 0;
left: 50%;
transform: translateX(-50%);

/* tile-size = max(viewport-width/7, viewport-height/3) */
--tile-size: max(100vw / 7, 100vh / 3);

/* make the grid exactly 7 cols  tile-size */
width: calc(var(--tile-size) * 7);
display: grid;
gap: 0;
grid-template-columns: repeat(7, var(--tile-size));
grid-template-rows:    repeat(3, var(--tile-size));
}


#section4 .card {
width: 100%;
height: 100%;
perspective: 1000px;
overflow: hidden;
position: relative;
}

#section4 .card-inner {
width: 100%;
height: 100%;
transition: transform 0.6s ease;
transform-style: preserve-3d;
position: relative;
}

#section4 .card.flipped .card-inner {
transform: rotateY(180deg);
}

#section4 .card-front,
#section4 .card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
background-size: cover;
background-position: center;
}
#section4 .card-back p{
color:#fff;
}

#section4 .card-front {
transition: transform 0.3s ease;
}
#section4 .card:hover .card-front {
transform: scale(1.05);
}

#section4 .card-back {
background-color: rgba(54, 69, 79, 0.95);
color: #fff;
transform: rotateY(180deg);
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
text-align: center;
box-sizing:border-box;
}
#section4 .overlay-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
z-index: 10;            /* sits above the photo grid */
pointer-events: none;   /* allows clicks through to the cards */
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(15px);
padding: 2rem 2.5rem;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
box-sizing: border-box;
}

#section4 .overlay-content h1 {
color: #36454f;
font-size: 2rem;
margin: 0;
}

#section4 .overlay-content p {
color: #36454f;
font-size: 1rem;
margin-top: 0.5rem;
margin-bottom:0.5rem;
}
