/* ============================================================
   MOBILE-FIRST STYLESHEET
   Base styles = mobile (small screens)
   @media (min-width: 768px) = tablet/desktop enhancements
   ============================================================ */

/* --- Reset & Base --- */
:root {
  --primary: #456882;
  --secondary: #D2C1B6;
  --text: #1B3C53;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Garamond, Georgia, sans-serif;
  font-size: 18px;
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
}

@media (min-width: 768px) {
  body { font-size: 24px; }
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  padding: 0;
  list-style: none;
}

.container {
  width: 75%;
  max-width: 1200px;
  margin:auto;
  text-align: left;
}

.centered_text {
  text-align: center;
}

span {
  font-variant: small-caps;
  display: block;
  position: relative;
}


/* --- Header --- */
header {
  background: #fff;
  padding: 1rem 2rem;
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  font-size: 1rem;

}

@media (min-width: 768px) {
  header { font-size: 1.5rem; }
}


/* --- Nav --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  padding: 0;
  margin: auto;
  width: 80%;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .logo { font-size: 2.25rem; }
}

/* Mobile: hide desktop nav, show hamburger menu */
.nav-links {
  display: none;
}

#hamburger {
  display: block;
  position: absolute;
  cursor: pointer;
  border: none;
  min-width: 50px;
  background-color: white;
  color: black;
  margin-top: 1em;
  top: 0;
  right: 0;
  padding: 0;
}

/* Desktop: show nav, hide hamburger menu */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 20px;
  }

  #hamburger {
    display: none;
  }
}


/* --- Sidebar (mobile slide-in menu) --- */
.sidebar {
  display: none; /* toggled by JS */
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  padding-left: 20px;
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 42%;
  z-index: 10;
  background-color: white;
}

.sidebar ul li a,
.sidebar li a {
  padding: 20px;
  text-decoration: none;
  color: black;
  display: block;
}


/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  background-image: url(images/graduate_hero.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 50px 0;
  text-align: center;
  justify-content: center;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 1em;
}

h2 {
  font-size: 1rem;
  margin-left: 2px;
  margin-top: -10px;
}

@media (min-width: 768px) {
  .hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
    margin-left: 1em;
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  /* .hero h2 {
    margin-left: 1em;
    grid-column: 1 / span 2;
    grid-row: 2;
  } */
}


/* --- Parents Section --- */
#parents {
  width: 80%;
  margin: auto;
  padding: 1em 0;
}

/*
  Mobile: each row stacks vertically (photo below text).
  Desktop: two-column side-by-side layout.
*/
.parents-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .parents-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  } 

  /* Alternate layout: photo on left, text on right */
  .parents-row--reverse {
    flex-direction: row-reverse;
  }

  .parents-text {
    flex: 2;
  }

  .parents-photo {
    flex: 1;
  }
}

.parents-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: auto;
}


/* --- About Section --- */
#about {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 80%;
  gap: 10px;
  padding: 1em;
  margin: auto;
  align-items: center;
}

.left-column  { grid-column: 1; }
.right-column { grid-column: 2; }

@media (min-width: 768px) {
  #about {
    /* grid-template-columns: 1fr 1fr 1fr; */
    width: 80%;
  }

  .left-column  { grid-column: 1; }
  .right-column { grid-column: 2 / span 2; }
}

.about_photo {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 12px;
  place-self: center;
}

#headshot {
  float: left;
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 50%;
  border: 3px solid var(--text);
  margin: 0 40px 20px 0;
}


/* --- Parents / Students grid sections --- */
/* #parents-grid,
#students {
  display: grid;
  grid-template-columns: 1fr;
  width: 80%;
  padding: 1em;
  margin: auto auto 0;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  justify-items: stretch;
} */

@media (min-width: 768px) {
  #parents-grid {
    grid-template-columns: repeat(3, 1fr);
    font-size: 1.5rem;
    width: 80%;
  }

  #students {
    grid-template-columns: repeat(3, 1fr);
    font-size: 1.5rem;
    width: 80%;
  }

  .students-text {
    grid-column: 1 / span 2;
  }
}


/* --- Services Section --- */
#services {
  display: grid;
  width: 80%;
  gap: 10px;
  margin: auto auto 0;
  padding: 1em;
  align-items: center;
  justify-content: center;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  justify-content: center;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}

.card {
  background: var(--secondary);
  padding: 30px;
  border-radius: 25px;
}


/* --- Photo Grid --- */
.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}

.photo_left,
.photo_center,
.photo_right {
  grid-column: 1;
  place-self: center;
}

@media (min-width: 768px) {
  .photo_left   { grid-column: 1; }
  .photo_center { grid-column: 2; }
  .photo_right  { grid-column: 3; }
}


/* --- Contact Form --- */
#contact {
  flex: 1;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  width: 80%;
  gap: 40px;
  padding: 1em;
  margin: auto;
}

.contact-details { grid-column: 1; }
.contact-message { grid-column: 1; }

.submitbutton { margin-bottom: 40px; }

@media (min-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .contact-details { grid-column: 1; }
  .contact-message { grid-column: 2; }
}

input[type=text],
input[type=email],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--text);
  border-radius: 12px;
  box-sizing: border-box;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=submit] {
  background-color: var(--text);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #234C6A;
}

.contact_button {
  background-color: var(--text);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
}


/* --- Footer --- */
footer {
  padding: 1em;
  color: var(--secondary);
  background-color: black;
}

footer a {
  color: var(--secondary);
}