/* =======================================
   Global Variables & Base Styles
======================================= */
:root {
  --navy: #002834;
  --teal: #7BDCCC;
  --cream: #F2EDE1;
  --light-grey: #A6A699;
  --black: #000000;
  --font-main: 'Open Sans', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =======================================
   Navigation
======================================= */
nav {
  background-color: var(--navy);
  color: white;
  text-align: center;
  padding: 10px;
  width: 100vw;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  display: inline-block;
  transition: background-color 0.3s ease;
}


p {
  font-size: 1.2rem;
}
main {
  flex: 1;
}
nav a:hover,
nav a:focus {
  background-color: var(--teal);
  outline: none;
}

/* =======================================
   General Layout & Typography
======================================= */
h1, h2 {
  font-family: var(--font-heading);
  color: var(--navy);
  text-align: center;
  font-size: 2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;

}

.container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-grow: 1;
}

.content {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content p {
  text-align: left;
  color: var(--light-grey);
  font-size: 16px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  max-height: 500px;
}

.image {
  padding: 20px;
}

/* =======================================
   Two-Column Layout
======================================= */
.two-column-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.two-column-layout.equal-height {
  display: flex;
  align-items: stretch;   /* both columns same height */
  gap: 20px;
}

.left-column {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  max-width: 50%;
}

.column-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.left-column,
.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;

}

#home-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

#info-container {
  width: 1500px;
}

#info-img {
  box-shadow: 0 0 0 4px white;
  border-radius: 8px;
}

#grades-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 50%;
  height: auto;
}

.column-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.responsive-pdf {
  width: 100%;
  height: 600px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#home-two-col {
  max-width: 900px;
}
#home-text {
  text-align: left;
  text-indent: 1rem;
}



/* =======================================
   Resource Cards
======================================= */
.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 10px;
}

.resource {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 250px;
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
}

.resource:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.resource img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}

.resource h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: var(--navy);
}

.resource p {
  font-size: 14px;
  color: var(--light-grey);
}

/* =======================================
   Project Cards
======================================= */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 10px;
}

.project-card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 250px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}

.project-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

/* =======================================
   Concept Cards
======================================= */
.concept-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 10px;
}

.concept-card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 250px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
}

.concept-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.concept-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 15px;
}

.concept-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

/* =======================================
   Credit Cards
======================================= */
.credit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 10px;
}

.credit-card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 20px;
  width: 220px !important;
  text-align: center;
  flex-shrink: 0;
}

.credit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.credit-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 15px;
}

.credit-card h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: var(--navy);
}

.credit-card p {
  font-size: 14px;
  color: var(--light-grey);
}

/* =======================================
   Modal
======================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  max-height: 80vh; 
  width: 90%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  white-space: pre-wrap;
  overflow-y: auto;
}

.modal-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  margin-top: 0;
  margin-bottom: 0;
}

.modal-content p {
  margin-top: 0;
  margin-bottom: 0;

}

.close-btn {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
}

/* =======================================
   Footer
======================================= */
footer {
  background-color: var(--black);
  color: white;
  padding: 2rem;
  text-align: center;
  width: 100vw;
  min-width: 100vw;
  box-sizing: border-box;
  position: relative;
  left: 50%;
  right: 0;
  transform: translateX(-50%);
}

footer p {
    font-size: 16px;
}

footer a {
  color: #7BDCCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover,
footer a:focus {
  color: #ffffff; /* brighten link on hover */
  text-decoration: underline;
}


/* =======================================
   Responsive Styles
======================================= */

.project-card,
.concept-card,
.resource {
  flex: 1 1 calc(25% - 20px); /* 4 per row with gap */
  max-width: calc(25% - 20px);
}

@media (max-width: 1024px) {
  .project-card,
  .concept-card,
  .resource,
  .credit-card {
    flex: 1 1 calc(50% - 20px); /* 2 per row on tablets */
    max-width: calc(50% - 20px);
  }
  #info-container {
    width: 800px;
  }

}

@media (max-width: 600px) {
  .project-card,
  .concept-card,
  .resource,
  .credit-card {
    flex: 1 1 100%; /* full width on mobile */
    max-width: 100%;
  }
  #info-container {
    width: 400px;
  }

}


/*TABLETS & MOBILE*/
@media (max-width: 768px) {
  nav a {
    display: block;
    padding: 20px;

  }
  nav{
    width: 100%;
    padding: 0px;
  }
  p{
    font-size: 16px;
  }
  .container {
    padding: 10px;
  }
  .image,
  .content {
    padding: 10px;
  }
  .content p {
    font-size: 15px;
  }

  .two-column-layout {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .left-column,
  .right-column {
    max-width: 100%;
  }

  #home-text {
    text-align: center;
    text-indent: 0;
  }

  footer {
    padding: 2rem;
    box-sizing: border-box;
  }

  footer p {
    font-size: 14px;
  }

  header h1 {
    padding: 2rem;
    box-sizing: border-box;
  }
  .modal-content {
    max-height: 90vh; /* give more vertical room on small screens */
    padding: 20px;
  }

  .credit-card {
    margin-left: 2rem;
    margin-right: 2rem;
  }

  #grades-left {
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .left-column {
    align-items: center !important;
  }

}

/* Hamburger button */
.hamburger {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1999;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: var(--navy);
  cursor: pointer;
}

/* Overlay nav */
.mobile-nav-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--navy, #002834);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-overlay nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mobile-nav-overlay a {
  color: white;
  font-size: 2rem;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-nav-overlay a:hover,
.mobile-nav-overlay a:focus {
  color: var(--teal, #7BDCCC);
}

#close-mobile-nav {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
}

/* Show hamburger only on mobile */
@media (max-width: 900px) {
  .hamburger {
    display: block;
  }
  nav[role="navigation"] {
    display: none;
  }
}

@media (max-width: 700px) {
  .responsive-pdf {
    display: none !important;
  }
  .pdf-download-mobile {
    display: block !important;
    text-align: center;
    margin: 1rem 0;
  }

}


