/* Reset and General Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility - Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* Improved focus styles */
a:focus, button:focus {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

a {
  text-decoration: none;
  color: inherit;
}

/* ########## Image Styles */
img {
  max-width: 100%;
  height: auto;
}

/* Additional Styling for the Wrapper */
.wrapper {
  margin: 0 auto;
  padding: 2rem 1rem;
}

.greenBackground {
  background: linear-gradient(135deg, #4caf50, #90c435); /*69a32f 7a9c40 668235*/
}

.minimumHeight {
  height: 500px;
}

/* ########## Header Styles ########### */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;  /* Center the section within the wrapper */
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 1.8rem; /* Adjust height as needed */
  margin-right: 0.8rem; /* Space between image and text */
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
}


nav {
  display: flex;
}

nav a {
  margin-left: 1rem;
  transition: background-color 0.3s ease; /* Smooth transition for background color */
}

nav a:hover {
  color: #4caf50; /* Change text color on hover if needed */
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.nav-menu {
  display: flex;
}

/* ########## Hero Section Styles ########## */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;  /* Center the section within the wrapper */
  color: #fff;
}

.hero-text {
  max-width: 50%;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Social Proof Styling */
.social-proof {
  margin: 1rem 0;
}

.user-count {
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  opacity: 0.95;
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stars {
  display: flex;
  gap: 1px;
}

.star {
  font-size: 1rem;
  position: relative;
  display: inline-block;
  width: 1.2em;
  text-align: center;
}

.star.filled {
  color: #ffb400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.star.half {
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.star.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #ffb400;
}

.rating-text {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.free-app {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  margin: 0.5rem 0 2rem 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-links {
  margin: 2rem 0; /* Even spacing above and below */
  display: flex; /* Use flexbox to align buttons on the same line */
  gap: 1rem; /* Add gap between buttons */
  flex-wrap: wrap; /* Ensure wrapping on smaller screens */
}

.app-links a {
  display: inline-flex; /* Use inline-flex to keep buttons inline and flex children */
  align-items: center; /* Center items vertically */
  padding: 0.5rem 1rem;
  margin: 0; /* Remove right margin, use flex gap instead */
  background-color: transparent; /* Set background to transparent */
  color: #4caf50;
  border-radius: 5px;
  text-decoration: none; /* Remove underline from links */
}

.app-links .app-store img {
  height: auto;
  width: auto; /* Maintain aspect ratio */
  display: block; /* Ensures no extra space below the image */
  max-width: 100%; /* Ensure it doesn't overflow the container */
  /* Prevents SVG intrinsic dimensions from affecting the layout */
  flex-shrink: 0; 
  /* Explicitly set width to ensure consistency */
  width: 10rem;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2)); 
}

.app-links .google-play img {
  height: auto;
  width: auto; /* Maintain aspect ratio */
  display: block; /* Ensures no extra space below the image */
  max-width: 100%; /* Ensure it doesn't overflow the container */
  /* Prevents SVG intrinsic dimensions from affecting the layout */
  flex-shrink: 0; 
  /* Explicitly set width to ensure consistency */
  width: 11rem;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2)); 
}

.hero-images {
  position: relative;
  max-width: 45%;
  display: inline-flex; 
  align-items: right; /* Center items vertically */
  padding: 0rem 1rem;
}

.hero-images img {
  padding-top: 1rem;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4)); 
}

.hero-images .front {
  z-index: 1;
  max-width: 70%;
}

.hero-images .back {
  position: absolute;
  bottom: 5%;
  left: 40%;
  max-width: 65%;
}

/* ##### Hero image fade in effects */

.fade-in-image {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-image-reverse {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in-visible-reverse {
  opacity: 1;
  transform: translateY(0);
}


/* ##### Load weather image effect */

.scroll-image {
  transform: translateX(-50px);
  opacity: 0;
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
}

.slide-in-left-visible {
  transform: translateX(0);
  opacity: 1;
}

.scroll-image-reversed {
  transform: translateX(50px);
  opacity: 0;
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
}

.slide-in-right-visible {
  transform: translateX(0);
  opacity: 1;
}

/* ########## Features ########## */

/* ########## Features ########## */

.features {
  list-style: none;
  padding: 1.2rem;
  margin-top: -1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.features li {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.4;
}

.features li:last-child {
  margin-bottom: 0;
}

/* Feature Icons */
.feature-icon {
  width: 1em;
  height: 1em;
  margin-right: 12px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

/* ########## Weather ########## */

.weather-loading {
  display: flex;
  justify-content: space-between;
  flex-direction: row-reverse; 
  align-items: center; 
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;  
}

.weather-text {
  max-width: 50%;
}

.weather-image {
  max-width: 30%;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4)); 
}

/* ########## Exporting ########## */

.record-exporting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  color: #fff;
  max-width: 1000px;
  margin: 0 auto;  /* Center the section within the wrapper */
}

.export-text {
  max-width: 50%;
}

.export-image {
  max-width: 30%;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4)); 
}

/* ########## Brews ########## */

.chemical-brews {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto; 
  flex-direction: row-reverse; 
}

.brews-text {
  max-width: 50%;
}

.brews-image {
  max-width: 30%;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4)); 
}

/* ########## FAQ Section ########## */

.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #333;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #f8f9fa;
}

.faq-question:focus {
  outline: 2px solid #4caf50;
  outline-offset: -2px;
  background-color: #f8f9fa;
}

.faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4caf50;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #f8f9fa;
}

.faq-question[aria-expanded="true"] + .faq-answer {
  max-height: 200px;
  padding: 1.25rem;
}

.faq-answer p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* ########## Footer ########## */

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  /*background-color: #4caf50;
  color: #fff;*/
  max-width: 1000px;
  margin: 0 auto;  /* Center the section within the wrapper */
}

footer nav {
  display: flex;
}

footer nav a {
  margin-left: 1rem;
}

/* ########## Pages General ########## */

.text_section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
}

.text_section h1 {
  color: #333;
  margin-bottom: 1rem;
}

.text_section h2, .text_section h3 {
  color: #4caf50;
  margin-bottom: 1rem;
}

.text_section p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.text_section ul {
  margin-bottom: 1rem;
  list-style-type: disc;
  padding-left: 1.5rem;
}

.text_section ul li {
  margin-bottom: 0.5rem;
}





/* ########################################## */
/* ############ MOBILE STYLE ################ */
/* ########################################## */

/* Responsive Styles */
@media (max-width: 768px) {
  .hero,
  .weather-loading,
  .record-exporting,
  .chemical-brews {
    flex-direction: column;
    align-items: flex-start;
    padding: 0rem;
  }

  .wrapper {
    margin: 0 auto;
    padding: 1rem 1rem;
  }

  /* ########## NAV BAR ########### */
  
  header {
    align-items: flex-start;
  }

  .logo-container {
    width: 100%;
    justify-content: space-between;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-top: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
  }
  
  .nav-menu a {
    padding: 1rem;
    border-bottom: 1px solid #ccc;
  }

  .menu-toggle {
    display: block;
  }
  
  .nav-menu.show {
    display: flex;
  }

  /* ########## APP LINKS ########## */
  .app-links .app-store {
    padding: 0%;
    width: 44%;
  }

  .app-links .google-play { 
    padding: 0%;
    width: 48%;
  }

  /* ########## HERO ########## */

  .hero-text,
  .weather-text,
  .export-text,
  .brews-text {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .hero-text h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .hero-images {
    max-width: 90%;
  }

  .hero-images .front {
    max-width: 70%;
  }

  .hero-images .back {
    max-width: 61%;
    position: absolute;
    bottom: 10%;
    left: 40%;
  }

  .weather-image,
  .export-image,
  .brews-image {
    max-width: 100%;
  }

  /* ########## Footer ########## */
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  footer nav {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  footer nav a {
    margin: 0.5rem 0;
  }

  /* Hide "Download free -" text on mobile */
  .desktop-text {
    display: none;
  }
}
