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

body {
    font-family: Arial, sans-serif;
    background: rgba(255, 231, 177, 0.8);
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #ff8a00;
    padding: 10px 20px;
    color: white;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 15px;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.nav-list li a:hover {
    color: #8f0000;
}

.rightNav {
    display: flex;
    gap: 10px;
    align-items: center;
}

#search {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    border: 2px solid white;
}

.btn {
    background-color: #ffd700;
    color: #000;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn:hover {
    background-color: #000;
    color: #ffd700;
}

.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 160px;
    background-color: white;
    padding-top: 20px;
    height: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.sidenav a {
    padding: 10px;
    font-size: 20px;
    color: #ff6700;
    text-decoration: none;
}

.sidenav a:hover {
    color: #c90404;
}

#Sanctifize {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background-image: linear-gradient(#ff8a00, #c90404);
    color: white;
    padding: 20px;
    border-radius: 25px;
    margin-left: 160px;
    margin-top: 10px;
}

#Sanctifize img {
    width: 150px;
    height: 150px;
    border-radius: 25px;
    margin-right: 20px;
}

.title-text {
    text-align: center;
}

.title-text h1 {
    font-size: 3em;
    text-decoration: underline;
}

.title-text p {
    font-size: 1.5em;
}

.title-text .verse {
    font-size: 1.2em;
    text-align: right;
}

.main {
    margin-left: 170px;
    padding: 20px;
}

#story {
    background: rgba(254, 240, 240, 0.8);
    border: 2px solid #ff8a00;
    border-radius: 25px;
    padding: 20px;
}

@media screen and (max-width: 768px) {
    .sidenav {
        position: static;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main {
        margin-left: 0;
    }

    #Sanctifize {
        margin-left: 0;
        flex-direction: column;
        text-align: center;
    }

    #Sanctifize img {
        margin: 10px auto;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .rightNav {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }

    .nav-list li {
        margin-bottom: 10px;
    }
}





/* Final and confirmed working image controls */
.story-img {
    max-width: 300px;
    height: auto;
    border-radius: 15px;
}

.story-img.left {
    float: left;
    margin: 10px 20px 10px 0;
}

.story-img.right {
    float: right;
    margin: 10px 0 10px 20px;
}

@media screen and (max-width: 768px) {
    .story-img.left,
    .story-img.right {
        float: none;
        display: block;
        width: 90%;
        max-width: 90%;
        margin: 10px auto;
    }
}


.card img {
  width: 80%;
  height: auto;
  max-height: 100px;
  border-radius: 8px;
  object-fit: contain;
  margin: 0 auto;
}


.card-section {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 20px;
  flex-wrap: wrap;
  background-color: #fff2e0;
}

.card {
  background-color: white;
  border: 2px solid gold;
  border-radius: 12px;
  width: 240px;
  padding: 12px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover .card {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


@media screen and (max-width: 768px) {
  .sidenav {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    background-color: white;
    border-top: 2px solid #ff8a00;
    border-bottom: 2px solid #ff8a00;
    padding: 10px 0;
    z-index: 1;
  }

  .sidenav a {
    flex: 1 0 100px;
    text-align: center;
    padding: 10px;
    font-size: 0.95em;
  }
}


/* Consistent paragraph spacing */
.article-body p {
    margin-bottom: 1em;
}

/* Add space above section headers */
.article-body h2,
.article-body h3 {
    margin-top: 2em;
    margin-bottom: 1em;
}


/* Consistent paragraph spacing for all main content */
#story p,
.article-body p {
    margin-bottom: 1.2em;
}

/* Add space above section headers */
#story h2,
#story h3,
.article-body h2,
.article-body h3 {
    margin-top: 2em;
    margin-bottom: 1em;
}

/* Improved blockquote styling */
#story blockquote {
    margin: 1.5em 0;
    padding-left: 1em;
    border-left: 3px solid #ccc;
    font-style: italic;
    color: #333;
}

/* Slightly increased line height for readability */
#story {
    line-height: 1.7;
}

/* Broader Mobile-Friendly Enhancements */

/* General mobile scaling for cards */
@media screen and (max-width: 768px) {
  .card {
    width: 90%;
    max-width: 320px;
    margin: 10px auto;
  }

  .card img {
    width: 100%;
    max-height: 150px;
  }

  .card-section {
    flex-direction: column;
    align-items: center;
  }

  #Sanctifize {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-top: 10px;
    padding: 10px;
    text-align: center;
  }

  .title-text {
    text-align: center;
  }

  .main {
    margin-left: 0;
    padding: 10px;
  }

  .story-img.left,
  .story-img.right {
    float: none;
    display: block;
    width: 90%;
    max-width: 90%;
    margin: 10px auto;
  }
}

/* Enhance layout for large screens */
@media screen and (min-width: 1025px) {
  .card-section {
    justify-content: space-evenly;
    padding: 40px;
  }

  .card {
    width: 240px;
    margin: 15px;
  }

  .card img {
    max-height: 120px;
  }

  .main {
    padding: 40px;
  }
}

/* Smooth hover effects */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}