/*
* Base Template
* Combines HTML5 Boilerplate & Bootstrap. Includes some basic templating.
* Authored by Stephen Shaw (shshaw@gmail.com)
*/

/* @group Basics */

*,
*:before,
*:after {
  box-sizing: border-box;
}

html,
body {
  color: #333333;
  font-weight: 400;
  font-size: 15px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 20px;
  margin: 0;
  padding: 0;
  text-align: center;
  background: linear-gradient(91deg, #000000, #e7e7e7);
  background-size: 600% 600%;
  animation: gradientAnimation 30s ease infinite;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

article {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 6em 2em;
  background: transparent;
  background: inherit;
  box-sizing: border-box; /* Ensure padding doesn't affect width */
}

a {
  color: #da0d25;
  text-decoration: none;
}
a:hover,
a:focus {
  color: #f22840;
  text-decoration: none;
}
p {
  margin: 0 0 20px;
}

h1,
h2 {
  margin: 10px 0;
  font-weight: 500;
  line-height: 40px;
  color: inherit;
  text-align: center;
}
h1 small,
h2 small {
  font-weight: 400;
  line-height: 1;
  color: #8d8d8d;
}
h1 {
  font-size: 28px;
}
h2 {
  font-size: 22px;
}

.main-header {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20%;
  background: #eee;
  padding: 1em;
  overflow-y: auto; /* Enable vertical scroll if needed */
}

.main-header__nav {
  border-top: solid 1px #ccc;
  margin: 1em -1em;
}

.main-header__nav a {
  display: block;
  padding: 0.5em 1em;
  border-bottom: solid 1px #ddd;
}

.main-header__nav a:hover,
.main-header__nav a:focus {
  color: #eee;
  background: #da0d25;
}

@media (max-width: 800px) {
  .main-header {
    position: relative;
    width: 100%;
    height: auto;
  }

  .main-header__nav a {
    display: inline-block;
    border: none;
  }
}

.intro {
  padding: 4em 2em;
}

.demo h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 1em;
}

.demo .flipster {
  margin: 0 auto;
  width: 100%; /* Ensure it takes full width */
  max-width: 1000px;
  overflow: hidden; /* Prevent overflow */
}

.code {
  display: block;
  background: #eee;
  padding: 1em;
  border-radius: 1em;
  margin: 2em auto;
  max-width: 30em;
  font-size: 0.8em;
  width: fit-content;
  white-space: pre-wrap;
}

.button {
  display: inline-block;
  padding: 5px 10px;
  margin: 0;
  background-color: #da0d25;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
  text-shadow: none;
  vertical-align: middle;
  cursor: pointer;
  border: 0;
  transition: all 300ms ease;
}

.button:hover,
.button:focus {
  color: #7a0715;
  background: #f22840;
}

.copyright-box {
  text-align: center;
}

.copyright {
  margin: 0;
}

.list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.item {
  flex: 1 1 200px;
  margin: 10px;
  overflow: hidden;
  max-width: 300px;
}

.item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Mobile View Styles */
@media only screen and (max-width: 768px) {
  html, body {
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  article {
    padding: 2em;
    width: 100%; /* Ensure it takes full width */
    box-sizing: border-box;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  p {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .main-header {
    position: relative;
    width: 100%;
    background: #eee;
    padding: 1em 0;
    text-align: center;
  }

  .main-header__nav {
    border-top: none;
    margin: 1em 0;
  }

  .main-header__nav a {
    display: block;
    padding: 0.5em 0;
    border-bottom: solid 1px #ddd;
  }

  .button {
    padding: 10px 20px;
    font-size: 16px;
  }

  .copyright-box {
    padding: 1em 0;
  }

  .item {
    flex: 1 1 100%;
    margin: 10px 0;
  }

  .demo .flipster {
    width: 100%; /* Ensure it takes full width */
    padding: 0 1em; /* Adjust padding as needed */
    overflow: visible; /* Ensure content is visible */
  }

  .flip-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible; /* Allow overflow if necessary */
  }

  .flip-items li {
    flex: 0 0 calc(33.33% - 20px); /* Adjust width based on desired layout */
    max-width: 300px;
    margin: 10px;
  }


 .flip-items img {
  width: 100%; /* Ensure the image takes the full width of its container */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Ensure images behave as blocks */
  max-width: 100%; /* Limit maximum width to prevent overflow */
}
}
