

.teachings {
    overflow-y: auto; 
    height: auto;
    min-height: calc(100vh - 55px);
    padding: 100px 20px 180px; /* Increased bottom padding for footer */
}

.teachings h1 {
    color:blue;
} 

.teachings h1::after {
    display: none;
}

.teachings h1 {
	text-align: justify;
	padding-top: 0; /* Remove top padding */
	margin-top: 0; /* Remove top margin */
}

/* Remove space between title and author/date */
.teachings .title-details p {
	margin-bottom: 0; /* No space below author/date - should be right below title */
	margin-top: 0;
}

.teachings .title-details h1 {
	margin-top: 0; /* Ensure no top margin */
	margin-bottom: 0; /* No space below title */
	padding-top: 0; /* Ensure no top padding */
	padding-bottom: 0; /* No space below title */
}

/* Container styles */
.post-container {
  display: flex;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.most-recent, .out, .motivation {
  position: relative;
  overflow: hidden;
  /*border: 2px solid #ddd;*/
  border-radius: 10px;
  background-color: #fff;
}

.out, .soon {
	/*width: 30%;*/
	height: 24vw;
	/*border: 1px solid #ccc;*/
}

/* Motivation wrapper - same height as .out */
.motivation-wrapper {
    display: flex;
    flex-direction: column;
    height: 24vw;
    position: relative;
}

/* Medium screens (laptops) - between 769px and 1200px */
@media (min-width: 769px) and (max-width: 1200px) {
  .motivation-slide.mot1-word,
  .motivation-slide.mot2-word {
    font-size: clamp(0.7em, 1.8vw, 1.8em) !important; /* More conservative sizing for smaller laptops */
    line-height: 1.15 !important;
    padding: 8px !important;
  }
  
  .motivation-slide-element {
    padding: 15px !important;
    padding-top: 0 !important; /* Remove top padding for better centering */
  }
}

/* Make heights consistent on large screens */
@media (min-width: 769px) {
    .most-recent {
        height: 24vw;
    }
    
    .out {
        height: 24vw;
    }
    
    .motivation-wrapper {
        height: 24vw;
    }
    
    .motivation {
        flex: 0 0 80%;
        height: auto;
        min-height: 0;
        position: relative;
        width: 100%;
        display: block !important;
        visibility: visible !important;
        margin-bottom: 0;
        padding-bottom: 0;
        overflow: hidden; /* Prevent content overflow */
    }
    
    .motivation .slideshow {
        height: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Prevent content overflow */
        position: relative;
    }
    
    .past-weeks-motivation {
        flex: 0 0 20%;
        width: 100%;
        padding: 0 15px;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
        margin-top: 0;
        margin-bottom: 0;
        overflow: visible;
        visibility: visible !important;
        gap: 10px;
    }
}
.slideshow {
  position: relative;
  width: 100%;
  height: 100%; 
}

.slideshow img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slideshow img.active {
  opacity: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
	padding-top:0;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
}

/* Motivation slideshow styles */
.motivation .slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
}

/* Ensure h1 and h2 tags inside motivation slides have no default margins */
.motivation-slide-element h1,
.motivation-slide-element h2 {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Past Weeks Motivation Words form */
.past-weeks-motivation {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  visibility: visible;
  gap: 10px;
}


/* Calendar Icon Button Styling */
.calendar-icon-btn {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: auto !important;
    z-index: 25 !important;
    user-select: none !important;
    cursor: pointer !important;
    background: #dc3545 !important; /* Red background to match border */
    border: 1px solid #dc3545 !important;
    border-radius: 4px !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    outline: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.calendar-icon-btn:hover {
    background: #c82333 !important; /* Darker red on hover */
    transform: translateY(-50%) scale(1.05) !important;
}

.calendar-icon-btn:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.calendar-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
    color: white !important;
    stroke: white !important;
    fill: white !important;
}

/* Small screens - make calendar icon more visible */
@media (max-width: 768px) {
    .calendar-icon-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 8px !important;
        background: #dc3545 !important;
    }
    
    .calendar-icon-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Past Week Calendar Styles */
#pastWeekCalendarContainer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

#pastWeekCalendarContainer .week-number-cell {
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  cursor: pointer;
  background-color: #f9f9f9;
  font-weight: bold;
}

#pastWeekCalendarContainer .week-number-cell.past:hover {
  background-color: #e0e0e0;
}

#pastWeekCalendarContainer .week-number-cell.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: #f5f5f5;
}

#pastWeekCalendarContainer .week-number-cell.selected {
  background-color: #007bff;
  color: white;
}

#pastWeekCalendarContainer .date-cell {
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
}

#pastWeekCalendarContainer .date-cell.other-month {
  color: #ccc;
}

#pastWeekCalendarContainer .date-cell.current-date {
  background-color: #ffffcc;
  font-weight: bold;
}

.motivation-slide-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  /*align-items: center !important;
  justify-content: center !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;*/
  flex-direction: column !important;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  padding: 40px 20px !important; 
  /*padding-top: 40px !important;
  padding-bottom: 0 !important;*/
  margin: 0 !important;
}

.motivation-slide {
  text-align: center;
  font-weight: bold;
  padding: 0; /* No padding - let specific classes handle it */
  width: 100%;
  box-sizing: border-box;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0; /* Remove default margins */
}

.motivation-slide.mot1-word,
.motivation-slide.mot2-word {
  font-size: clamp(0.7em, 1.8vw, 1.8em); /* Reduced font size for better fit */
  font-style: italic;
  font-weight: bold;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  line-height: 1.2;
  margin: 0 !important;    /* Remove all default h1/h2 margins */
  /*margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important; 
  padding-left: 10px !important;
  padding-right: 10px !important;*/
  /*padding-top: calc((100% - 1em) / 2); /* Distribute space evenly above text */
  /*padding-bottom: calc((100% - 1em) / 2); /* Distribute space evenly below text */
  display: block;
  overflow: hidden;
  width: 100%;
}

.motivation-slide.mot-and {
  font-size: 1.2em !important; /* Reduced from 1.5em */
  font-weight: bold;
  font-style: normal;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0 !important;     /* Remove all default h1/h2 margins */
  /*margin-top: 60px !important;
  margin-bottom: 0 !important;
  padding: 0 !important; 
  padding-left: 10px !important;
  padding-right: 10px !important;*/
  /*padding-top: calc((100% - 1em) / 2); /* Distribute space evenly above text */
  /*padding-bottom: calc((100% - 1em) / 2); /* Distribute space evenly below text */
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.motivation-slide.mot-med {
  font-size: 1.2em !important; /* Reduced from 1.5em */
  font-weight: bold;
  font-style: normal;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0 !important;     /* Remove all default h1/h2 margins */
  /*margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important; 
  padding-left: 10px !important;
  padding-right: 10px !important;*/
  /*padding-top: calc((100% - 1em) / 2); /* Distribute space evenly above text */
  /*padding-bottom: calc((100% - 1em) / 2); /* Distribute space evenly below text */
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Posts container - Grid layout that holds all posts*/
.posts-container, .search-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 10px;
    padding: 5px;
}

/* Main post div container - Each individual post card */
.post {
    display: flex;
    border: 1px solid #e0e0e0; 
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Post hover effect */
.post:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Post image (left side) */
.post img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Post details container (right side - title, author, date, views) */
/*.post-details {
    padding: 8px 12px;
    padding-top: 6px;
    padding-bottom: 6px;
    flex: 1;
    min-width: 0;
    width: calc(100% - 200px);
    max-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
    overflow: hidden;
}  */
.post-details {
    padding: 8px 0px 10px 6px;
    flex: 1;
    min-width: 0;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* Post title */
/*.post-details h3.pTitle {
    color: blue;
    width: 80%;
    max-width: 80%;
    margin: 0;
    padding: 0;
    margin-bottom: 4px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    box-sizing: border-box;
    white-space: normal;
    display: block;
}*/
.post-details h3.pTitle {
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}


/* Post paragraphs (author, date, views) */
.post-details p {
    color: black; 
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.2;
}

.post-details p.author {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.author, .date, .views {
	font-size:100%;
}

.pTitle {
	font-size:110%;
}

a {
    text-decoration: none; 
}

/* Sort container */
.sort-container {
    display: flex;
    justify-content: flex-end; 
    width: 200px;
    /*padding: 5px;*/
	margin-left: auto;
	margin-right: 0;
}

.sort-container #label {
	width:120px;
	font-weight: bold;
	padding-right: 5px;
}

/* Search container */
.search-container {
    display: flex;
    justify-content: flex-end; 
    padding-bottom: 5px;
}

.search-container input[type="text"] {
    padding: 5px;
    transition: width 0.4s ease-in-out; 
    width: 200px; 
}

.search-container input[type="text"]:focus {
    width: 40%; 
}

.search-container .search-icon {
    margin-left: 10px;
    cursor: pointer;
}

/* Most recent container */
.most-recent {
    position: relative;
    border: 1px solid #ccc; 
    width: 40%; 
    overflow: hidden;
	float: left;
}

.most-recent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.most-recent h3 {
    position: absolute;
    bottom: 10%;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
	right: 1px;
    margin: 0;
    padding: 10px;
}

.most-recent .prev-slide, .most-recent .next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

.most-recent .next-slide {
    right: 10px;
}

.most-recent .indicators {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.most-recent .indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.most-recent .indicator.active {
    background: blue;
}

.teachings .out, .teachings .motivation {
	/*width:25%;*/
	/*margin-left: 5%;*/
	float: left;
}

.teachings .out img, .teachings .motivation img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teachings h2 {
	padding-top: 2%;
	color: green;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.pagination button {
    margin: 0 5px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.pagination button.active {
    background-color: #4CAF50;
    color: white;
}

.pagination button:hover {
    background-color: #ddd;
}

.on-post {
	padding-right:2%;
}

/* Post Image Wrapper - Allows text to wrap around image group */
.teachings .post-image-wrapper {
    margin-bottom: 20px;
    overflow: visible; /* Don't clip content */
}

/* Image group (image + stats) floated left for text wrapping */
.teachings .post-image-group {
    float: left;
    width: 30vw;
    max-width: 30vw;
    margin-right: 20px; /* Space between image group and content on the right */
    margin-bottom: 10px; /* Space below the image group */
    box-sizing: border-box;
}

/* Image within the group */
.teachings .post-image,
.teachings .motivation-image {
    width: 100%;
    height: auto;
    margin-bottom: 0 !important; /* Completely remove space between image and stats */
    margin-right: 0; /* Remove margin-right since it didn't work */
    padding-bottom: 0 !important;
}

.teachings .post-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Ensure motivation text is white */
.teachings .motivation-image h1,
.teachings .motivation-image h2 {
    color: white !important;
}

/* Stats positioned directly below the image within the group */
.teachings .post-stats {
    padding-top: 0 !important; /* Completely remove space between image and stats */
    margin-top: 0 !important; /* No space between image and stats */
    width: 100%;
    height: auto;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Content wrapper that flows around the image group */

.teachings .post-content-wrapper {
    /* Content will naturally wrap around the floated image group */
    padding-left: 0; /* Space is provided by margin-right on image-group */
    overflow: visible;
	/*overflow: hidden; */
}
.teachings .motiv-content-wrapper {
    /* Content will naturally wrap around the floated image group */
    padding-left: 0; /* Space is provided by margin-right on image-group */
    /*overflow: visible; */
	overflow: hidden;
}

/* Motivation meditation section (mot_med) - larger than mot_end below */
.teachings .mot_med .mot_med_title {
    font-size: 140% !important;
    font-weight: bold;
    margin-bottom: 8px;
}
.teachings .mot_med .mot_med_q {
    font-size: 120% !important;
    line-height: 1.6 !important;
    margin-bottom: 6px;
}

/* Ensure dashed line separator appears below the entire image group and stats */
.teachings .post-image-wrapper + div[style*="clear"] {
    clear: both;
}

/* Dashed line separator styling */
.teachings .motivation-separator {
    border-top: 2px dashed green;
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
    clear: both;
}

/* Post content separator - two dashed lines */
/*.post-content-separator {
    width: 100%;
    margin: 30px 0;
    clear: both;
}
*/
.post-content-separator, .motiv-content-separator {
    margin: 20px 0;
    clear: none;
}


.motiv-content-separator .dashed-line {
    border: none;
    border-top: 2px dashed #666;
    margin: 8px 0;
    width: 100%;
}

/* On motivation pages, keep separator within the right column until wrap occurs */
/*.teachings .post-content-wrapper .post-content-separator {
    clear: none !important;
    float: none;
    width: auto;
}
.teachings .post-content-wrapper {
    overflow: visible;
}*/

.teachings .post-content, .teachings .motiv-content {
    overflow: visible;
}


@media (max-width: 768px) {
    .teachings .post-content-wrapper .post-content-separator, 
	.teachings .motiv-content-wrapper .motiv-content-separator {
        clear: both !important;
        float: none !important;
        width: 100% !important;
    }
}
/* Share symbol styling - pointer cursor and tooltip */
.post_end .share,
.vote .share,
.mot_end .share {
    cursor: pointer;
    display: inline-block;
    font-size: 1.2em;
    transition: transform 0.2s ease;
    position: relative;
}

.post_end .share:hover,
.vote .share:hover,
.mot_end .share:hover {
    transform: scale(1.2);
}

/* Vote buttons styling - pointer cursor and tooltip */
.vote button,
.post_end .vote button,
.mot_end .vote button {
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 1.2em;
    padding: 5px 8px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.vote button:hover,
.post_end .vote button:hover,
.mot_end .vote button:hover {
    transform: scale(1.2);
}

.vote button:disabled,
.post_end .vote button:disabled,
.mot_end .vote button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Content that displays and wraps around the image */
.teachings .post-content-wrapper .post-content, 
.teachings .motiv-content-wrapper .motiv-content {
    /* Flows on the right side of the floated image group, then wraps below */
    text-align: justify;
    font-size: 130% !important; /* Ensure consistent font-size across all posts */
    line-height: 1.6 !important; /* Consistent line-height */
    padding-left: 0;
    margin-left: 0;
    width: auto; /* Let it take available space on the right, then wrap below */
    clear: none; /* Don't clear - allow it to wrap around the image */
}

/* Ensure all paragraphs and text elements inside .teachings .post-content-wrapper .post-content inherit the same font-size */
.teachings .post-content-wrapper .post-content p,
.teachings .post-content-wrapper .post-content span,
.teachings .post-content-wrapper .post-content div,
.teachings .post-content-wrapper .post-content * {
	font-size: inherit !important; /* Inherit 130% from parent */
	line-height: inherit !important;
}
.teachings .motiv-content-wrapper .motiv-content p,
.teachings .motiv-content-wrapper .motiv-content span,
.teachings .motiv-content-wrapper .motiv-content div,
.teachings .motiv-content-wrapper .motiv-content * {
	font-size: inherit !important; /* Inherit 130% from parent */
	line-height: inherit !important;
}

/* Legacy post-details class for backward compatibility *//*
.post-details {
    width: 30vw;
	height: auto;
    float: left;
	overflow: visible; /* Allow image to display fully without being cut off *//*
	/*border: 2px dashed green;*//*
}                           */

.teachings #backToBlog {
	justify-content: center;
	text-align: center;
	padding-top: 20px;
}
	
.post-content, .motiv-content {
	height: auto;
    text-align: justify;
	font-size: 130% !important; /* Ensure consistent font-size across all posts */
	line-height: 1.6 !important; /* Consistent line-height */
}

/* Ensure all paragraphs and text elements inside .post-content inherit the same font-size */
.post-content p,
.post-content span,
.post-content div,
.post-content * {
	font-size: inherit !important; /* Inherit 130% from parent .post-content */
	line-height: inherit !important;
}
.motiv-content p,
.motiv-content span,
.motiv-content div,
.motiv-content * {
	font-size: inherit !important; /* Inherit 130% from parent .post-content */
	line-height: inherit !important;
}

/* Ensure dd elements inside posts match paragraph font size exactly */
.teachings .post-content dl dd, .teachings .motiv-content dl dd,
.teachings p dl dd,
.teachings dl dd,
.post-content dl dd,
p dl dd,
.teachings p dl,
.teachings .post-content dl, .teachings .motiv-content dl,
.post-content dl,
p dl {
	font-size: 85% !important; /* Match paragraph font size exactly */
	line-height: 1.5 !important; /* Match paragraph line-height */
	/*margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;*/
}

/* Reduce spacing around dl elements to match normal paragraph spacing */
.teachings p dl,
.teachings .post-content dl, .teachings .motiv-content dl,
.post-content dl,
p dl {
	margin-top: -20px !important;
	margin-bottom: -30px !important;
	padding-top: -20px !important;
	padding-bottom: -30px !important;
}

/* Ensure dd elements have normal spacing */
.teachings .post-content dl dd, .teachings .motiv-content dl dd,
.teachings p dl dd,
.teachings dl dd,
.post-content dl dd, .motiv-content dl dd,
p dl dd {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	justify-content: left;
}

/* Legacy classes removed - now using single post-content class */

.vote {
    width: 80%;
    height: auto;
	padding-top: 20px;
	border-top: 0;
	border-bottom: 0;
	border-left: 0;
	border-right: 0;
}

/* Post Details Styles - Individual Post Page */
.teachings .post-details {
    overflow: visible !important; /* Ensure image is not truncated */
}

.teachings .post-image {
    width: 30vw;
    height: auto;
    display: block;
    overflow: visible !important; /* Ensure image container doesn't clip content */
    max-height: none !important;
}

.teachings .post-image img {
    width: 100% !important;
    height: auto !important; /* Let image maintain its aspect ratio */
    object-fit: contain !important; /* Show full image without cropping */
    display: block;
    max-height: none !important; /* Remove any max-height constraints */
    max-width: 100% !important;
}

/* General post image styles (for blog listing) */
.post-image {
    width: 30vw;
    height: auto;
    display: block;
    overflow: visible; /* Ensure image container doesn't clip content */
}

.post-image img {
    width: 100%;
    height: auto; /* Let image maintain its aspect ratio */
    object-fit: contain; /* Show full image without cropping */
    display: block;
    max-height: none; /* Remove any max-height constraints */
}

/* General post-stats rule - overridden by .teachings .post-stats */
.post-stats {
    position: relative;
}

/* Payment/donate styles (.pay-about, .payment-form, .donate-about, .donate-form, .bank-details) are in payment.css */
.on-post {
	width:80%;
	height: auto;
	padding-top:10px;
	box-sizing: border-box;
    float: left;
    overflow: visible; /* Ensure content is not clipped */
}


/* Small screens view (max-width: 768px) */
@media (max-width: 768px) {
	
    .teachings p {
        text-align: left;
    }

    .teachings .post-container .on-post .post-content .right .bibleQuote,
    .teachings .post-container .on-post .post-content .below .bibleQuote,
    .teachings .post-container .on-post .post-content .right .repSpeech1,
    .teachings .post-container .on-post .post-content .below .repSpeech1 {
        text-align: center;
    }

    .bibleQuote, .bibleQuote1, .repSpeech, .repSpeech1 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .post-content, .advertise, .on-post, .pay-bout, .title-details, .post-details, .post-image, .post-details .post-stats {
        width: 100%;
    }

    .homePg .title-details {
        margin-top: 0;
    }

    .content-section {
        padding-top: 80px;
    }

    .posts-container, .search-results-container {
        flex-direction: column;
        gap: 10px;
        padding: 5px;
    }

    .post {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .post img {
        width: 40vw;
        height: 24vw;
    }
    
    .post-details {
        width: auto;
        max-width: none;
        flex: 1;
    }

    .most-recent, .out, .motivation {
        width: 100%;
        height: 48vw;
        margin: 20px auto;
    }

    .teachings h2 {
        padding-top: 0;
    }

    .teachings .post-details {
        font-size: 100%;
        line-height: 1.2;
        padding-top: 0;
        overflow: visible !important; /* Ensure image is not truncated on mobile */
    }
    
    .teachings .post-image {
        overflow: visible !important;
        max-height: none !important;
    }
    
    .teachings .post-image img {
        max-height: none !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .post-details .pTitle {
        padding-bottom: 0;
        margin-bottom: 3px;
        margin-top: 0;
    }

    .post-details .author {
        padding-top: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        line-height: 1.1;
    }

    .post-details .date, .post-details .views {
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        margin-bottom: 0;
        line-height: 1.1;
    }

    .teachings .on-post {
        width: 100%;
    }

    /* Mobile: Image group should be full width, not floated */
    .teachings .post-image-group {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        margin-bottom: 15px;
    }
    
    .teachings .post-image {
        width: 100% !important;
        margin-bottom: 1.5em; /* Consistent spacing on mobile */
    }
    
    .teachings .post-image-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .teachings .post-content-wrapper, .teachings .motiv-content-wrapper {
        width: 100% !important;
        padding-left: 0 !important; /* No left padding on mobile */
    }
    
    .teachings .post-content-wrapper .post-content, .teachings .motiv-content-wrapper .motiv-content {
        width: 100% !important;
        padding-left: 0 !important;
        clear: both !important; /* On mobile, clear float so content goes below image group */
        font-size: 130% !important; /* Ensure consistent font-size on mobile */
    }
    
    .teachings .post-stats {
        width: 100% !important;
        padding-top: 10px;
    }

    .title-details, .post-details, .post-content, .motiv-content {
        width: 100%;
    }
    
    /* Ensure ALL .post-content instances have consistent font-size on mobile */
    .post-content, .motiv-content {
        font-size: 130% !important; /* Match .teachings .post-content-wrapper .post-content */
        line-height: 1.6 !important; /* Consistent line-height */
    }
    
    /* Ensure all paragraphs and text elements inside .post-content inherit the same font-size on mobile */
    .post-content p,
    .post-content span,
    .post-content div,
    .post-content * {
        font-size: inherit !important; /* Inherit 130% from parent .post-content */
        line-height: inherit !important;
    }
	.motiv-content p,
    .motiv-content span,
    .motiv-content div,
    .motiv-content * {
        font-size: inherit !important; /* Inherit 130% from parent .post-content */
        line-height: inherit !important;
    }
    
    /* Also ensure .teachings .post-content-wrapper .post-content children inherit correctly */
    .teachings .post-content-wrapper .post-content p,
    .teachings .post-content-wrapper .post-content span,
    .teachings .post-content-wrapper .post-content div,
    .teachings .post-content-wrapper .post-content * {
        font-size: inherit !important; /* Inherit 130% from parent */
        line-height: inherit !important;
    }
    .teachings .motiv-content-wrapper .motiv-content p,
    .teachings .motiv-content-wrapper .motiv-content span,
    .teachings .motiv-content-wrapper .motiv-content div,
    .teachings .motiv-content-wrapper .motiv-content * {
        font-size: inherit !important; /* Inherit 130% from parent */
        line-height: inherit !important;
    }

    .post-details {
        font-size: 100%;
    }
    
    /* Match post_end font size to post_content on mobile - EXACT match */
    /* Use same font-size as .post-content (130%) */
    .post_end {
        font-size: 130% !important; /* Match .post-content font-size: 130% exactly */
        line-height: 1.6 !important; /* Match line-height for consistency */
    }
    
    /* CRITICAL: Override larger font sizes on share and vote buttons */
    /* Make them same size as regular text, not 1.2em larger */
    .post_end .share {
        font-size: 1em !important; /* Same as text, override 1.2em */
    }
    
    .post_end .vote button {
        font-size: 1em !important; /* Same as text, override 1.2em */
    }
    
    /* Ensure all text elements in post_end inherit the 130% font-size */
    .post_end p,
    .post_end span:not(.share):not(.vote),
    .post_end div:not(.vote) {
        font-size: inherit !important; /* Inherit 130% from parent .post_end */
        line-height: inherit !important;
    }
    
    /* Ensure vote container doesn't override */
    .post_end .vote {
        font-size: inherit !important;
    }
	
    .show {
        display: flex;
    }
	
	.most-recent,
	.out,
	.motivation-wrapper,
	.motivation,
	.slideshow,
	.all-posts,
	.sort-container,
	.posts-container,
	.pagination{
	  margin: 0;
	  padding: 0;
	}

	h2.all-posts {
	  margin: 10px 0;
	}

}


/* .out and .motivation-wrapper are now independent, no wrapper needed */


/* Width distribution: most-recent (40%), out (30%), motivation-wrapper (30%) */
.most-recent {
    width: 40%;
    float: left;
    box-sizing: border-box;
}

.out {
    width: 30%;
    float: left;
    box-sizing: border-box;
}

.motivation-wrapper {
    width: 30%;
    float: left;
    box-sizing: border-box;
}

/* Clear floats after .out and .motivation-wrapper */
h2.all-posts {
    clear: both;
}

/* .posts-container grid definition moved to main rule above */

@media (min-width: 768px) {

    .all-posts {
        margin-top: 0px; /* Ensure consistent spacing on small screens */
    }
}


@media (max-width: 768px) {
    /* No wrapper needed - .out and .motivation-wrapper are independent */

    .most-recent, .out, .motivation-wrapper {
        flex: 0 0 100%;
        margin-bottom: 20px; /* Add some space between the divs */
    }
    
    .motivation-wrapper {
        height: auto;
        display: flex;
        flex-direction: column;
    }
    
    .motivation {
        height: 48vw;
        flex: 0 0 auto;
    }
    
    .past-weeks-motivation {
        margin-top: 0;
        margin-bottom: 0;
        flex: 0 0 auto;
    }
	
    .posts-container {
        grid-template-columns: 1fr;
    }

    .all-posts {
        margin-top: 0px; /* Ensure consistent spacing on small screens */
    }
}



.teachings .post-stats {
    position: relative;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.teachings .post-stats p {
    margin: 0;
    padding: 0;
}

/* === 📌 Comments Section === */

#comments-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#comments-section h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.reply-form {
    margin-top: 10px;
}

.reply-form textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.reply-form button {
    margin-top: 5px;
    padding: 6px 12px;
    font-size: 0.9em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.reply-form button:hover {
    background-color: #0056b3;
}

#comment-form-container {
    margin-top: 20px;
}

#comment-form-container textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

/* Comment form textarea styling */
.comment-form, .opinion-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#comment-text, #opinion-text {
    width: 100%;
    min-width: 200px;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

#submit-comment, #submit-opinion {
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

#submit-comment:hover, #submit-opinion:hover {
    background-color: #218838;
}

#comment-text, #opinion-text {
    width: 100%;
    min-width: 200px;
    height: 100px;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #comment-text, #opinion-text {
        width: 60%;
    }
}

/* Comment and Opinion display styling - YouTube style */
.comment, .opinion {
    margin-bottom: 16px;
    padding: 8px 0;
}

.opinion-reply {
    margin-left: 18px;
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.comment-header, .opinion-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.comment-body {
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.comment-actions .likes-count,
.comment-actions .dislikes-count {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.comment-actions .likes-count:hover,
.comment-actions .dislikes-count:hover {
    opacity: 0.7;
}

.comment-actions .reply-btn,
.comment-actions .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    font-size: 0.9em;
}

.comment-actions .reply-btn {
    color: #065fd4;
}

.comment-actions .reply-btn:hover {
    text-decoration: underline;
}

.comment-actions .delete-btn {
    color: #b00;
    margin-left: 16px;
}

.comment-actions .delete-btn:hover {
    text-decoration: underline;
}

.comment-body .read-more-btn {
    background: none;
    border: none;
    color: #065fd4;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    margin-left: 4px;
}

.comment-body .read-more-btn:hover {
    text-decoration: underline;
}

/* Opinion styling (same as comments) */
.opinion-text {
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
    color: #0d0d0d;
}

.opinion-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.opinion-actions .likes-count,
.opinion-actions .dislikes-count {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.opinion-actions .likes-count:hover,
.opinion-actions .dislikes-count:hover {
    opacity: 0.7;
}

.opinion-actions .reply-btn,
.opinion-actions .delete-opinion-btn,
.opinion-actions .hide-opinion-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    font-size: 0.9em;
}

.opinion-actions .reply-btn {
    color: #065fd4;
}

.opinion-actions .reply-btn:hover {
    text-decoration: underline;
}

.opinion-actions .delete-opinion-btn,
.opinion-actions .hide-opinion-btn {
    color: #b00;
    margin-left: 16px;
}

.opinion-actions .delete-opinion-btn:hover,
.opinion-actions .hide-opinion-btn:hover {
    text-decoration: underline;
}

.opinion-replies {
    margin-left: 18px;
    margin-top: 8px;
}

.toggle-replies-btn {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    font-weight: bold;
    padding: 8px 0;
    margin-top: 4px;
}

.toggle-replies-btn .reply-count-text {
    color: #000;
    font-weight: bold;
}

.toggle-replies-btn .toggle-arrow {
    margin-left: 4px;
}

.toggle-replies-btn:hover {
    opacity: 0.7;
}

.show-more-replies-btn {
    background: none;
    border: none;
    color: #065fd4;
    cursor: pointer;
    font-weight: 500;
    padding: 8px 0;
    margin-top: 4px;
}

.show-more-replies-btn:hover {
    text-decoration: underline;
}

#submit-comment {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 1em;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#submit-comment:hover {
    background-color: #218838;
}

.read-more {
    color: #007bff;
    cursor: pointer;
    font-size: 0.9em;
}

.read-more:hover {
    text-decoration: underline;
}

#username-display {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.post-record {
  flex: 1 1 calc(25% - 20px); /* Adjust based on desired number per row */
  max-width: 300px;
}

.post-img-link {
  width: 60%;
  height: 100%;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-info {
  width: 40%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-title {
  font-weight: bold;
  text-decoration: none;
  color: #333;
  margin-bottom: 5px;
}

.post-author,
.post-date,
.post-views {
  font-size: 0.9em;
  margin: 2px 0;
}

.post-title {
  margin: 0;
  padding: 0;
  display: block;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.post-title h3 {
  margin: 0;
  padding: 0;
}

.post-record {
  margin: 5px; /* or even margin: 0; */
}

.modal {
  display: none;
}

/* Mobile styles merged from blog_mobile_styles.css */

@media (max-width: 768px) {
  main.teachings > * {
    width: 100%;
    box-sizing: border-box;
  }

  .search-container {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
  }

  .out, .motivation-wrapper {
    width: 100% !important;
    float: none !important;
    min-height: 200px;
  }
  
  /* Ensure motivation slideshow is visible on mobile */
  .motivation {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    height: 48vw !important;
  }
  
  .motivation .slideshow {
    display: flex !important;
    min-height: 200px;
    position: relative !important;
  }
  
  /* Set font sizes for motivation slides on mobile - same as mot-and */
  .motivation-slide.mot1-word,
  .motivation-slide.mot2-word {
    font-size: 1.5em !important; /* Same size as mot-and */
    line-height: 1.2 !important;
    max-height: 100%;
    overflow: hidden;
    padding: 5px 10px !important;
    /*padding-top: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;*/
  }
  
  /* Center and adjust mot_and positioning on mobile - reduce top padding/margin */
  .motivation-slide.mot1-word, .motivation-slide.mot2-word, .motivation-slide.mot-and {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /*padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;*/
  }
  
  /* Reduce padding on motivation-slide-element container for better vertical centering on mobile */
  .motivation-slide-element {
    padding: 5px 10px !important;
    /*padding-top: 0 !important; /* Remove top padding to reduce empty space above text *//*
    margin-top: 0 !important;*/
  }
  
  /* Specifically target containers with mot1-word or mot2-word to reduce top spacing 
  .motivation-slide-element:has(.motivation-slide.mot1-word),
  .motivation-slide-element:has(.motivation-slide.mot2-word) {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }*/
  
  /* Past Weeks Motivation Words form on mobile */
  .past-weeks-motivation {
    position: relative !important;
    width: 100% !important;
    padding: 5px;
    margin-top: 10px;
    box-sizing: border-box;
    background-color: transparent !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
  }

  h2.all-posts {
    text-align: left;
    padding-left: 10px;
  }

  .sort-container {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
  }

  .posts-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .posts-container .post-record {
    width: 100%;
  }

  .pagination {
    text-align: center;
    padding: 10px;
  }
}
