/*
 Theme Name:   Astra Child
 Theme URI:    https://digestablenews.com
 Description:  Custom child theme for Digestable News
 Author:       Your Name or Digestable News
 Author URI:   https://digestablenews.com
 Template:     astra
 Version:      1.0.0
*/
:root {
  --ast-global-color-0: #DC391F; /* your new primary color */
}

/*==========================
  STICKY HEADER & LAYOUT
==========================*/

/*==========================
  STICKY HEADER
==========================*/

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
}


.digest-nav-container {
  position: sticky;
  top: 80px; /* Adjust to match height of .site-header */
  z-index: 9999;
  background-color: var(--ast-global-color-0);
}

/*==========================
  DIGEST NAV WRAPPER
==========================*/



.digest-nav-wrapper {
  /*position: sticky;*/
  top: 80px;
  z-index: 9999;
  background-color: var(--ast-global-color-0);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;         /* Firefox */
  -ms-overflow-style: none;      /* IE 10+ */
}

.digest-nav-wrapper::-webkit-scrollbar {
  display: none;                 /* Chrome, Safari */
}

/*==========================
  DIGEST NAV BAR
==========================*/

.digest-nav {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding: 0 8px;
  margin: 0;
  height: 46px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: max-content;
}

/*==========================
  NAV LINKS
==========================*/

.digest-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  height: 46px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.digest-nav a:first-child {
  border-left: none;
}

.digest-nav a:hover {
  background-color: #d53c21;
}

.digest-nav a.active {
  border: 2px solid white;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.15);
}

/*==========================
  RESPONSIVE LINK ADJUSTMENTS
==========================*/

@media (max-width: 768px) {
  .digest-nav a {
    font-size: 0.9rem;
    padding: 0 10px;
    justify-content: flex-start;
  }
}

/*==========================
  SCROLL INDICATOR
==========================*/


.digest-scroll-indicator {
  display: none;
}


@media (max-width: 768px) {
	.digest-nav {
    padding-right: 40px; /* Add extra space to account for the scroll indicator */
  }
  .digest-scroll-indicator {
    position: absolute;
    right: 0;
    top: 0;
    height: 46px;
    width: 30px;
    background-color: var(--ast-global-color-0);
    color: white;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10000;
  }

	.digest-scroll-indicator span {
  animation: pulseArrow 2.2s infinite;
}
	
  @keyframes pulseArrow {
  0%   { transform: translateX(0); opacity: 0.6; }
  50%  { transform: translateX(4px); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.6; }
}
}





/*==========================
  POST TAG STYLING
==========================*/

.post-tags {
    font-size: 0.85rem;
    margin-top: 2em;
    color: #444;
}

.post-tags a {
    color: var(--ast-global-color-0);
    text-decoration: none;
    margin-right: 8px;
}

.post-tags a:hover {
    text-decoration: underline;
}

/*==========================
  CUSTOM FOOTER STYLING
==========================*/

.site-footer {
    background-color: #111;
    color: #fff;
    padding: 2em 1em;
    text-align: center;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 0.5em;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-nav a {
    color: #fff;
    margin: 0 12px;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-nav a:hover {
    text-decoration: underline;
}


/* Hide Astra hamburger menu button */
.ast-header-break-point .main-header-bar .ast-button-wrap {
    display: none !important;
}

/* Hide Astra's mobile dropdown nav */
.ast-header-break-point .main-header-bar .main-header-bar-navigation {
    display: none !important;
}


#page,
.site,
.site-content,
#content {
  overflow: visible !important;
  position: static !important;
}

/* Post Carousel Manipulation */
.slick-prev,
.slick-next {
  background: white !important;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 10;
}

/* Make the arrows themselves red and larger */
.slick-prev::before,
.slick-next::before {
  color: var(--ast-global-color-0) !important;
  font-size: 28px;
}

/* Optional: adjust position if arrows are misaligned 
.slick-prev {
  left: -20px !important;
}
.slick-next {
  right: -20px !important;
}
*/

.uagb-post__inner-wrap {
	padding-right: 0 !important;
  padding-left: 0 !important;  
    box-shadow: 0px 2px 5px -1px #00000070;
}
.slick-slide {
  margin: 0 12px;
}
.slick-list {
  margin: 0 -12px; /* counterbalances the outer margin */
}

/*Header Link Styling Below*/
.section-header a,
.section-header a:visited {
  color: black !important;
  text-decoration: none !important;
}
.section-header a:hover {
  text-decoration: underline !important;
  color: black !important;
}
.section-header {
	 padding: 1rem 0;
  border-bottom: 2px solid #ddd;
  margin-bottom: 0.5rem;
}

/*Section Styling*/
.carousel-section {
  /*border-top: black;
	border: solid;
	border-bottom: black;
	border-width: 1px;*/
	/*background: linear-gradient(to bottom, #ffffff, #FFF4F1);*/
	background: white;
}

/* Styling Category Pages */
.digest-tile {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Image wrapper to force fixed width */
.digest-tile-image {
  flex-shrink: 0;
  width: 150px;
}

.digest-tile-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  float: none !important;
  border-radius: 6px;
}

/* Content beside the image */
.digest-tile-content {
  flex: 1;
  padding-right: 1rem;
}

/* Title styling */
.digest-tile-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

/* Excerpt styling */
.digest-tile-excerpt {
  color: #444 !important;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .digest-tile {
    flex-direction: column;
  }

  .digest-tile-image {
    width: 100%;
  }

  .digest-tile-image img {
    width: 100%;
  }
}

.digest-tile-meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.5rem;
}

.digest-tile-meta .post-date,
.digest-tile-meta .post-author {
  display: inline-block;
  margin-right: 1rem;
	font-weight:700;
}

.digest-tile-meta {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.digest-tile-meta img.avatar {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  object-fit: cover;
}




.category-header {
  padding: 1rem 0;
  border-bottom: 2px solid #ddd;
  margin-bottom: 0.5rem;
}

.category-header h1 {
  font-size: 36px;
  font-weight: 600;
    line-height: 1.3em;
}

/*This is the top page heading in category (archive)*/
body.archive .content-area {
  margin-top: 0 !important;
  padding-top: 0 !important;

}
body.archive .site-content {
  padding-left: 20px;
  padding-right: 20px;
}

/*styling for the "top story" class*/
/* Fix top padding on Top Story block */
.uagb-block-cd826a02.is-grid .uagb-post__inner-wrap {
  padding-top: 0px !important;
}


/* load more button styling */
#load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

#load-more {
  width: 100%;
  max-width: 600px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: var(--ast-global-color-0) !important;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#load-more:hover {
  background-color: #006fd6;
}

/* Titles (linked h2s) */
.category .digest-tile .digest-tile-title a {
  color: #1f1f1f !important;
  text-decoration: none;

}

.category .digest-tile .digest-tile-title a:hover {
  text-decoration: underline;
}

/* Meta section: date and author */
.category .digest-tile .digest-tile-meta {
  color: var(--ast-global-color-0);
  font-size: 0.8125rem;
	font-weight: 600;
}

/* Author link inside meta */
.category .digest-tile .digest-tile-meta a {
  color: var(--ast-global-color-0);
	font-weight: 600;
	font-size: 0.8125rem;
  text-decoration: none;
}

.category .digest-tile .digest-tile-meta a:hover {
  text-decoration: underline;
	font-weight: 600;
	font-size: 0.8125rem;
}

.category .digest-tile .digest-tile-meta .post-date,
.category .digest-tile .digest-tile-meta .post-author {
  font-weight: 600 !important;
  font-size: 0.8125rem;
  color: var(--ast-global-color-0);
}

/* Author Page Layout */
.author-header-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem 20px;
  border-bottom: 2px solid #ddd;
  margin-bottom: 2rem;
  background: #fff;
}

.author-avatar img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.author-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 1rem;
  color: #333;
}

.author-bio p {
  font-size: 0.95rem;
  color: #444;
  margin: 0;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.author-info {
  flex: 1;
}

/* Fix for author page: title links */
.author .digest-tile .digest-tile-title a {
  color: #1f1f1f !important;
  text-decoration: none;
	font-weight: 600 !important;
	font-size: 0.8125rem;
}

.author .digest-tile .digest-tile-title a:hover {
  text-decoration: underline;
	font-weight: 600 !important;
	font-size: 0.8125rem;
}

/* Fix for author page: meta (date and author name) */
.author .digest-tile .digest-tile-meta,
.author .digest-tile .digest-tile-meta a {
  color: var(--ast-global-color-0);
  font-size: 0.8125rem;
  font-weight: 600 !important;
  text-decoration: none;
}

.author .digest-tile .digest-tile-meta a:hover {
  text-decoration: underline;
}

/* Fix overly bold author/date in meta */
.author .digest-tile .post-date,
.author .digest-tile .post-author {
  font-weight: 600 !important;
  color: var(--ast-global-color-0) !important;
  font-size: 0.8125rem !important;
}

/* my-account author page styling */

.author-account-wrapper {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: sans-serif;
}

.author-account-wrapper h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.submit-article-form-wrapper {
  background-color: #f6f8fa;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group input[type="file"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  margin-top: 0.3rem;
  border-radius: 4px;
}

input[type="submit"] {
  background-color: var(--ast-global-color-0);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
	margin-top: 1rem;
}

input[type="submit"]:hover {
  background-color: #c03c1f;
}

.info-icon {
  font-size: 0.9rem;
  margin-left: 5px;
  cursor: help;
  color: #888;
}

/*Styling for sign-in page form*/

.login form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #ddd;
  background: #f9f9f9;
  border-radius: 8px;
}

.page h1.entry-title {
  padding-left: 1rem;
}

/*padding on small viewport on submit-article, manage-account, and sign-in*/

/* Shared form wrapper padding for all custom pages */
/* General padding and layout fixes for your forms */
.submit-article-form-wrapper,
.author-account-wrapper,
.entry-content.boxed-form {
  padding: 2rem !important;
  margin: 2rem auto !important;
  background: #f8f8f8; /* light neutral background */
  border-radius: 8px;
  max-width: 700px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .submit-article-form-wrapper,
  .author-account-wrapper,
  .entry-content.boxed-form {
    box-sizing: border-box;
    width: 90%;
    max-width: 90%;
    padding: 1rem 1.25rem !important;
    margin: 0 auto;
  }
}



/*styling for login fail*/

.login-error {
  color: var(--ast-global-color-0);
  background: #f6f6f6;
  border-left: 4px solid #EA492B;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/*Author My Account Button on Author Page Styling*/
.edit-profile-button-wrapper {
  margin: 1rem 0;
}

.edit-profile-button {
  display: inline-block;
  background-color: var(--ast-global-color-0);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.edit-profile-button:hover {
  background-color: #c63d24;
}

/* Tooltip styling */
.info-tooltip {
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  font-weight: bold;
  color: #EA492B;
}

/* Form field spacing */
.submit-article-form-wrapper label {
  display: block;
  margin-top: 1.25rem;
  font-weight: 600;
  color: #1f1f1f;
}

.submit-article-form-wrapper input[type="text"],
.submit-article-form-wrapper input[type="file"],
.submit-article-form-wrapper textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.submit-article-form-wrapper button {
  margin-top: 2rem;
  /*background-color: #EA492B;*/
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.submission-success-box {
  border: 2px solid var(--ast-global-color-0);
  background-color: #fff8f6;
  padding: 1.5rem;
  margin-top: 2rem;
  border-radius: 0.5rem;
  color: #1f1f1f;
}

.submission-success-box h2 {
  margin-top: 0;
  color: var(--ast-global-color-0);
}

/*Styling the author Articles Posted section*/

.author-posts-wrapper {
  background-color: #f8f8f8; 
  border-radius: 8px;
padding: 2rem;
  margin: 2rem auto;
  max-width: 700px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
	border: 1px solid #ddd;
}
	@media (max-width: 768px) {
  .author-posts-wrapper {
    box-sizing: border-box;
    width: 90%;
    max-width: 90%;
    padding: 1rem 1.25rem !important;
    margin: 0 auto; 
  }
	}

.author-posts-table-wrapper {
  width: 100%;
  overflow-x: auto;
	  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: none; /* Firefox */
}

.author-posts-table-wrapper::-webkit-scrollbar {
  display: none;  /*Chrome, Safari */
}
.author-article-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensures horizontal scroll on smaller viewports */
}

.author-article-table th,
.author-article-table td {
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ccc;
}

/*Style Return buttons for authors*/
.author-nav-button {
  background-color: #1e8cff;
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  transition: background 0.3s ease;
}
.author-nav-button:hover {
  background-color: #106fd1;
}


/*404 page style*/

.custom-404 {
  text-align: center;
  padding: 40px 20px;
}

.custom-404 .btn-home {
  display: inline-block;
  margin: 20px 0;
  padding: 10px 20px;
  background: var(--ast-global-color-0);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.search-wrapper {
  margin: 20px 0;
}

.latest-article {
  margin-top: 40px;
}

.article-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-preview h3 {
  margin: 10px 0 5px;
  font-size: 1.2em;
}

.article-preview p {
  color: #666;
  font-size: 0.95em;
}

.custom-search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  max-width: 500px;
  margin: 0 auto 30px;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 6px 0 0 6px;
  outline: none;
}

.search-button {
  padding: 10px 16px;
  font-size: 1rem;
  background-color: #eee;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/*Screen reader*/
.screen-reader-text {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

