/**
 * Main Stylesheet for Mitch Davis website
 */

/* Base Styles */
body {
  color: #FFF;
  font-size: 10pt;
  letter-spacing: 1.2px;
  background-color: #171e26;
  margin: 0;
  padding: 0;
  font-family: 'Exo', sans-serif;
}

a {
  color: #cc992c;
  text-decoration: none;
  position: relative;
}

a:hover {
  color: #706e77;
}

/* Header Styles */
.topbox {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  height: 130px;
  width: 100%;
}

.header {
  margin: 10px auto;
  width: 100%;
  max-width: 600px;
  text-align: center;
  letter-spacing: 12px;
  font-family: 'Vollkorn', serif;
  font-size: 40px;
  font-weight: bold;
  color: #cc992c;
  border-bottom: 2px solid #cc992c;
  padding: 0px;
}

/* Navigation Styles */
.nav {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

/* Remove margins and padding from the list, and add a background color */
ul.topnav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #12171d;
  display: inline-block;
}

/* Float the list items side by side */
ul.topnav li {
  float: left;
}

/* Style the links inside the list items */
ul.topnav li a {
  display: inline-block;
  text-align: center;
  color: #cc992c;
  padding: 12px 14px;
  text-decoration: none;
  transition: 0.3s;
  font-size: 15px;
}

/* Change background color of links on hover */
ul.topnav li a:hover {
  background-color: black;
}

/* Active link state */
ul.topnav li a.active {
  background-color: rgba(0, 0, 0, 0.3);
  font-weight: bold;
}

/* Hide the list item that contains the link that should open and close the topnav on small screens */
ul.topnav li.icon {
  display: none;
}

/* Home Page Styles */
.main {
  margin: 10px auto;
  max-width: 1170px;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.homepage {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: flex-start;
  margin: 30px auto 0;
  width: 100%;
}

/* Blog Styles */
.blog {
  background-color: #F6f6f6;
  text-decoration: none;
  color: black;
  text-shadow: none;
  letter-spacing: 1px;
  width: 65%;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 5px;
}

.subject {
  font-size: 16pt;
  font-weight: bold;
  letter-spacing: 1.2px;
}

.blog .subject, 
.blog #blogsubject {
  font-size: 16pt;
  font-weight: bold;
  letter-spacing: 1.2px;
}

.blog .subject a, 
.blog #blogsubject a {
  color: black !important;
  text-decoration: none;
}

.blog .subject a:hover,
.blog #blogsubject a:hover {
  color: #666 !important;
}

.subtext {
  font-size: 10pt;
  color: #666;
}

.post {
  margin: 0 0 20px;
}

.storycontent {
  margin: 15px 0;
  text-align: justify;
  text-justify: inter-word;
}

.storycontent figure,
.storycontent iframe,
.storycontent img,
.storycontent video {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.storycontent figure {
  text-align: center;
}

blockquote {
  margin: 0;
  padding: 10px 15px;
  border-left: 3px solid #cc992c;
}

.feedback {
  margin: 10px 0;
  font-style: italic;
}

/* Widget Styles */
.widgetflex {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  width: 30%;
  padding: 0;
}

.widget-container {
  margin-bottom: 22px;
  width: 100%;
  max-width: 340px;
  background: #141e29;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(204, 153, 44, 0.3);
  transition: box-shadow 0.2s ease;
}

.widget-container:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.widget-title {
  color: #cc992c;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(204, 153, 44, 0.4);
  padding-bottom: 6px;
}

.widget-container p {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #c0c0c0;
}

.widget-container a {
  display: inline-block;
  background-color: rgba(204, 153, 44, 0.85);
  color: #111;
  padding: 6px 12px;
  border-radius: 3px;
  font-weight: bold;
  transition: background-color 0.2s;
  margin-top: 4px;
}

.widget-container a:hover {
  background-color: rgba(204, 153, 44, 1);
}

/* Read More Link */
.readmore {
  color: #f5f5f5;
  text-align: center;
  width: 100%;
  margin: 20px auto;
  padding: 10px;
}

/* About Page Styles */
.main-content {
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
  margin: 30px auto;
  max-width: 720px;
  background-color: #f6f6f6;
  color: black;
  text-shadow: none;
  letter-spacing: 1px;
  padding: 20px;
  border-radius: 5px;
  box-sizing: border-box;
  text-align: justify;
  text-justify: inter-word;
}

.main-content h3 {
  color: #333;
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

.main-content h4 {
  color: #333;
  text-align: center;
  width: 100%;
  margin-top: 30px;
  margin-bottom: 10px;
}

.main-content ol {
  align-self: flex-start;
  margin-left: 30px;
  padding-right: 20px;
}

.main-content li {
  margin-bottom: 10px;
}

.main-content p {
  margin-bottom: 20px;
  text-align: justify;
}

.profimg {
  margin: 20px auto;
  display: block;
  max-width: 50%;
  height: auto;
}

/* Writing Page Styles */
.content-container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 60px;
}

.left-column {
  flex: 3;
  position: relative;
}

.left-column::after {
  content: '';
  position: absolute;
  top: 0;
  right: -30px;
  height: 100%;
  width: 1px;
  background: linear-gradient(to bottom, rgba(204, 153, 44, 0), rgba(204, 153, 44, 0.5), rgba(204, 153, 44, 0));
}

.right-column {
  flex: 2;
}

.book-item {
  margin-bottom: 35px;
  padding: 20px;
  background-color: rgba(18, 23, 29, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(204, 153, 44, 0.1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.book-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #cc992c;
  font-size: 18px;
  letter-spacing: 2px;
  position: relative;
}

.book-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
}

.book-image {
  flex: 0 0 auto;
  transform: translateY(-25%);
}

.book-image img {
  max-width: 180px;
  border: 1px solid rgba(204, 153, 44, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.book-image img:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  filter: brightness(1.1);
}

.book-description {
  flex: 1;
}

.book-description p {
  margin-top: 0;
  text-align: justify;
  line-height: 1.7;
}

.book-links {
  margin-top: 15px;
  font-weight: 500;
  text-align: left !important;
}

.other-item {
  margin-bottom: 25px;
  text-align: center;
}

.other-item p {
  text-align: justify;
  margin-top: 12px;
}

.other-item img, .left-column img:not(.book-content img) {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 15px auto;
  border: 1px solid rgba(204, 153, 44, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  filter: brightness(0.95);
}

.other-item img:hover, .left-column img:not(.book-content img):hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
  filter: brightness(1.05);
}

.h3 {
  margin: 25px 0 20px 0;
  position: relative;
  text-align: center;
}

.h3 h3 {
  color: #cc992c;
  font-size: 20px;
  margin: 0;
  display: inline-block;
  position: relative;
}

.h3 h3::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -8px;
  left: 0;
  background: linear-gradient(to right, rgba(204, 153, 44, 0), rgba(204, 153, 44, 0.7), rgba(204, 153, 44, 0));
}

/* Footer Styles */
#footer {
  color: #424949;
  text-align: center;
  margin: auto;
  padding: 25px 0;
  font-size: 12px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .homepage {
    flex-direction: column;
  }

  .blog, .widgetflex {
    width: 100%;
    margin-bottom: 20px;
  }

  .header {
    font-size: 28px;
    letter-spacing: 8px;
  }

  .main-content {
    padding: 15px;
    width: 95%;
  }
  
  .content-container {
    flex-direction: column;
  }
  
  .left-column::after {
    display: none;
  }
  
  .left-column {
    margin-bottom: 30px;
    padding-bottom: 20px;
    position: relative;
  }
  
  .left-column::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, rgba(204, 153, 44, 0), rgba(204, 153, 44, 0.5), rgba(204, 153, 44, 0));
  }
  
  .right-column {
    padding-top: 10px;
  }

  .book-content {
    flex-direction: column;
    align-items: center;
  }
  
  .book-image {
    margin-bottom: 20px;
    transform: translateY(0); /* Reset the transform on mobile */
  }
  
  .book-description {
    text-align: center;
  }
  
  .book-description p, .other-item p {
    text-align: center !important;
  }
  
  .book-links {
    text-align: center !important;
  }

  ul.topnav li:not(:first-child):not(.icon) {
    display: none;
  }

  ul.topnav li.icon {
    float: right;
    display: inline-block;
  }

  ul.topnav.responsive {
    position: relative;
    display: block;
    width: 100%;
  }

  ul.topnav.responsive li.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  ul.topnav.responsive li,
  ul.topnav.responsive li:not(:first-child):not(.icon) {
    float: none;
    display: block;
    text-align: left;
  }

  ul.topnav.responsive li a {
    display: block;
    text-align: left;
  }
}
