/* Global Styles */
html, body {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #145a32;
  background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop stop-color="%23f5f5dc" offset="0%"/><stop stop-color="%23145a32" offset="100%"/></linearGradient></defs><path d="M0,100 Q200,200 400,100 T800,100 V600 H0 Z" fill="url(%23g)"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: #145a32;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.4em; }

p, a, span, li, label, input, button, .section-text {
  font-family: 'Roboto', 'Montserrat', Arial, sans-serif;
  font-size: 1.15em;
  color: #145a32;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* Header */
.nsf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20,90,50,0.97);
  color: #f5f5dc;
  padding: 1.2em 2em;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 24px rgba(20,90,50,0.12);
  flex-wrap: wrap;
}

.nsf-logo {
  height: 56px;
  width: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(20,90,50,0.10);
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  background: #333;
  padding: 0.7em 1em;
  border-radius: 12px;
}

nav a {
  color: #f5f5dc;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: #4CAF50;
  color: #fff;
}

#navToggle {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: #f5f5dc;
  cursor: pointer;
}

/* Page Sections */
main {
  padding: 0;
  scroll-snap-type: y mandatory;
}

.page-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  box-sizing: border-box;
  padding: 0;
  transition: background 0.6s;
  scroll-snap-align: start;
}

.section-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 90vw;
  max-width: 1200px;
  gap: 2.5em;
  box-sizing: border-box;
}

.left-text .section-text { order: 1; }
.left-text .section-image { order: 2; }
.right-text .section-image { order: 1; }
.right-text .section-text { order: 2; }

.section-text {
  flex: 1 1 50%;
  padding: 2.5em 2em;
  background: rgba(245,245,220,0.82);
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(20,90,50,0.08);
  font-weight: 500;
  min-width: 260px;
}

.section-text h2 {
  margin-top: 0;
  font-size: 2em;
  color: #145a32;
  font-weight: 700;
  letter-spacing: 1px;
}

.section-image {
  flex: 1 1 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 2em 0;
}

.section-image img {
  width: 90%;
  max-width: 600px;
  min-width: 260px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: 0 8px 40px rgba(20,90,50,0.22), 0 2px 16px rgba(245,245,220,0.18);
  border: 6px solid #fffbe6;
  background: #fff;
  transition: transform 0.25s cubic-bezier(.4,2,.3,1), box-shadow 0.25s;
  cursor: pointer;
}

.section-image img:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 16px 64px rgba(20,90,50,0.28), 0 4px 24px rgba(245,245,220,0.22);
  border-color: #43a047;
}

/* Mesh Backgrounds */
.mesh1 {
  background: linear-gradient(135deg, #f5f5dc 60%, #145a32 100%);
}
.mesh2 {
  background: linear-gradient(120deg, #145a32 60%, #43a047 100%);
}
.mesh3 {
  background: linear-gradient(135deg, #f5f5dc 60%, #43a047 100%);
}
.mesh4 {
  background: linear-gradient(120deg, #000000 60%, #145a32 100%);
}
.mesh5 {
  background: linear-gradient(135deg, #f5f5dc 60%, #145a32 100%);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 40px;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  background: #fff;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 2.5em;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
}
.close:hover {
  color: #4CAF50;
}

/* Footer */
footer {
  background: #145a32;
  color: #f5f5dc;
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
  font-size: 1.08em;
  font-family: 'Roboto', 'Montserrat', Arial, sans-serif;
  letter-spacing: 1px;
  border-radius: 24px 24px 0 0;
  margin-top: 2em;
  box-shadow: 0 -2px 16px rgba(20,90,50,0.10);
}
footer a {
  color: #f5f5dc;
  text-decoration: underline;
  margin: 0 0.3em;
  transition: color 0.2s;
}
footer a:hover {
  color: #4CAF50;
}

/* Responsive Layout */
@media (max-width: 1100px) {
  .section-content {
    max-width: 98vw;
    gap: 1.2em;
  }
  .section-image img {
    max-width: 320px;
  }
}

@media (max-width: 900px) {
  .section-content {
    flex-direction: column;
    gap: 1.2em;
  }
  .section-text, .section-image {
    width: 100%;
    max-width: 100%;
    padding: 1em;
  }
  .section-image img {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .modal-content {
    max-width: 98vw;
    max-height: 60vh;
  }
  .nsf-header {
    flex-direction: column;
    gap: 0.5em;
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .nsf-logo {
    height: 40px;
    width: 40px;
  }
  .nsf-header h1 {
    font-size: 1.1em;
  }
  nav {
    flex-direction: row;
    align-items: center;
  }
  #navToggle {
    display: block;
  }
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  nav.show {
    display: flex;
  }
}

@media (max-width: 480px) {
  .section-text {
    font-size: 1em;
    padding: 1em 0.5em;
  }
  .nsf-header h1 {
    font-size: 1em;
  }
}
