/* This is the main CSS file for the MARIA Wellness & Spa website.
   It includes styles for the header, footer, hero section, features section,
   contact form, and other components. The design is responsive and uses CSS Grid
   and Flexbox for layout */


/* This section defines the root CSS variables for colors and fonts used throughout the site. */
:root {
  --highlighted-color: #fff;
  --primary-color: #1a1a1a;
  --font-primary: "Raleway", sans-serif;
  --font-titles: "Cormorant Garamond", serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* This section styles the body and main header of the site. It sets the background image, font family, and header styles. */
body {
  font-family: var(--font-primary);
  background: url("../images/Background.jpg") center center/cover no-repeat fixed;
  line-height: 1.6;
  min-height: 100vh;
}

.site-header {
  background: transparent;
  padding: 10px 40px;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: relative;
}

/* This section styles the logo and navigation links in the header. It includes styles for the logo image and the navigation links. */
.nav-links {
  order: 1;
  display: flex;
  list-style: none;
  flex-direction: row;
  flex-grow: 1;
}

.nav-links ul {
  display: flex;
  flex-direction: row;
  gap: 30px;
  list-style: none;
  padding: 10px 20px;
}

.nav-links ul li a,
.button-cta {
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  border-radius: 0;
  padding: 10px 20px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.nav-links ul li a:hover,
.button-cta:hover {
  background: var(--primary-color);
  color: #fff;
}

.button-cta {
  order: 2;
  display: inline-block;
  text-transform: none;
  padding: 10px 30px;
  font-weight: 600;
  background-color: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 2px;
  flex-grow: 0;
  text-align: right;
}

.button-cta:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* I needed extra help to create a responsive menu toggle for mobile devices. */
.menu-toggle {
  display: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

#menu-toggle-checkbox {
  display: none;
}

.hero-section {
  padding: 100px 60px;
  text-align: center;
  height: 30vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

.main-message {
  background: none;
  border-radius: 10px;
  text-align: center;
  padding: 20px;
}

.main-message h1 {
  font-family: var(--font-titles);
  font-weight: 300;
  font-style: italic;
  font-size: 72px;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.main-message p {
  font-family: var(--font-titles);
  font-size: 38px;
  color: var(--primary-color);
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
  margin: 20px auto 0 auto;
  max-width: 600px;
  font-style: italic;
  line-height: 1.6;
  transform: translateY(10px);
}

.main-message .hidden {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--primary-color);
}

.features-section,
.container,
.footer-grid,
footer {
  background: transparent !important;
}

.features-section {
  padding: 60px 0;
}

.features-section h2 {
  display: none;
}

.spa-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  align-items: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(60px);
}

.feature-item i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-item p {
  font-size: 16px;
  font-weight: 300;
  color: black;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  background: transparent;
  transition: all 0.3s ease;
}

.feature-item p:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

footer {
  padding: 80px 0 40px 0;
  background: transparent !important;
  color: var(--primary-color);
  text-align: center;
  position: relative; /* Ensures the footer remains properly positioned within the layout - feeback from the tutor Kah*/
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.footer-social ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
}

.footer-social a {
  color: var(--primary-color);
  font-size: 20px;
  transition: color 0.3s ease;
  padding: 8px;
  z-index: 10;
  position: relative;
}

.footer-social a:hover {
  color: var(--highlighted-color);
}

.footer-adress a {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: normal;
}

.footer-adress a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-style {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* This section styles the contact page background and wrapper. It sets a background image and styles the contact form and section. */
body.contact-page-background {
  background: url("../images/Body.jpg") center center/cover no-repeat fixed;
  background-attachment: scroll;
}

.contact-page-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.contact-container {
  max-width: 90%;
  margin: 0 auto;
  padding: 20px;
}

.contact-form {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.contact-section {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 10px;
  border-radius: 10px;
  transform: translateY(-80px);
  max-height: 90vh;
}

.contact-section h2,
.contact-section p {
  text-align: center;
  margin-bottom: 20px;
}

main {
  margin-top: 120px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
}

.form-group textarea {
  height: 100px;
}

/* This is the button style for the contact form. It includes padding, font size, background color, and hover effects. */
.form-button {
  order: 2;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transform: translateY(20px); /* I needed extra help on this */
}

.map-container {
  margin-top: 60px;
}

.google-maps,
.map-container iframe {
  height: 150px;
}

.map-container iframe {
  width: 100%;
  height: 350px;
  display: block;
}

/* This section styles the programs page background and main content wrapper. It sets a background image and styles the main content area. */
body.inner-page-background {
  background: url("../images/Body1.jpg") center center/cover no-repeat fixed;
  background-attachment: scroll;
}

.main-content-wrapper {
  background-color: #ffffff;
  max-width: 1200px;
  margin: 30px auto;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  min-height: 70vh;
  position: relative;
  z-index: 1;
}

.programs-intro-section {
  text-align: center;
  margin-bottom: 50px;
}

.page-title {
  font-family: var(--font-titles);
  font-size: 4.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-description {
  font-family: var(--font-primary);
  font-size: 1.2em;
  color: #666;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.programs-grid-section {
  padding-top: 30px;
}

.visually-hidden {
  display: none;
}

.programs-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.program-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* I needed extra help to create a hover effect for the program cards. */
.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.program-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.program-info {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.program-title {
  font-family: var(--font-titles);
  font-size: 1.8em;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.2;
}

.program-description {
  font-family: var(--font-primary);
  font-size: 0.95em;
  color: #777;
  line-height: 1.5;
  margin-bottom: 20px;
}

.read-more-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--highlighted-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--font-primary);
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.read-more-btn:hover {
  background-color: #333;
}

/* This was the most difficult part of the project. I needed extra help to create a responsive grid layout for the spa benefits section. */
/* MEDIA QUERIES */
/* This is the media queries for larger screens, specifically for devices with a minimum width of 992px. It adjusts the layout and styles for better readability and usability on larger screens. */
@media (max-width: 992px) {
  .spa-benefits {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  body.index-background,
  body.inner-page-background {
    background: url("../images/Background.jpg") center center / cover no-repeat scroll !important;
    background-attachment: scroll;
  }

  footer {
    padding: 40px 20px 0 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  main {
    margin-top: 80px;
  }

  .site-header {
    padding: 15px 20px;
  }

  #menu-toggle-checkbox {
    display: block;
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1001;
    opacity: 0;
    width: 30px;
    height: 30px;
    cursor: pointer;
  }
 /* The toggle-menu was very chanllenging to create. I needed extra help to create a responsive menu toggle for mobile devices. */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1002;
  }

  .menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* This part here was the most difficult part of the project. I needed extra help to create a responsive menu toggle for mobile devices. */
  /* I used online resources to understand how to create a responsive menu toggle for mobile devices. */
  #menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  #menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .site-header .logo,
  .site-header .button-cta {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: url("../images/Background.jpg") center center/cover no-repeat fixed;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.3s ease;
    z-index: 999;
  }

  #menu-toggle-checkbox:checked ~ .nav-links {
    left: 0;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 20px;
  }

  .nav-links ul li a {
    font-size: 1.8em;
    padding: 15px 0;
  }
}

/* This is the media queres for smaller screens, specifically for devices with a maximum width of 768px. It adjusts the layout and styles for better readability and usability on mobile devices. */
@media (max-width: 768px) {
  footer {
    padding: 20px 10px 0px !important;
  }

  .main-content-wrapper {
    margin: 20px 15px;
    padding: 25px;
  }

  .page-title {
    font-size: 2.5em;
  }

  .programs-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .spa-benefits {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-section h1 {
    font-size: 3em;
    line-height: 1.2em;
  }

  .hero-section p {
    font-size: 1.5em;
  }

  .hero-section,
  .features-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}
