/* Blog Styles for Cousins Collective Services */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/blog/blog-hero.jpg');
  background-size: cover;
  background-position: center;
  padding: 8rem 0;
  color: #fff;
  text-align: center;
  margin-bottom: 3rem;
}

.blog-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.blog-hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.blog-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.blog-category-btn {
  background-color: #f8f8f8;
  color: #333;
  border: 1px solid #ddd;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.blog-category-btn:hover, .blog-category-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.blog-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-text {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blog-category {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-date {
  color: #777;
  font-size: 0.9rem;
}

.blog-card h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  line-height: 1.4;
}

.blog-card p {
  margin-bottom: 1.5rem;
  color: #555;
  flex-grow: 1;
}

.read-more {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  margin-top: auto;
}

.read-more:hover {
  color: var(--secondary-color);
}

.read-more:after {
  content: '→';
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.read-more:hover:after {
  transform: translateX(5px);
}

.read-more.disabled {
  color: #999;
  pointer-events: none;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #ddd;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-item:hover, .pagination-item.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.coming-soon .blog-text {
  opacity: 0.7;
}

span.btn-secondary.disabled,
span.read-more.disabled {
  background-color: #ccc;
  color: #777;
  cursor: not-allowed;
  pointer-events: none;
}

.coming-soon-category span {
  color: #888;
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  cursor: default;
}

.coming-soon-post div {
  display: flex;
  opacity: 0.6;
  cursor: default;
}

.tag.disabled {
  background: #f0f0f0;
  color: #999;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.85rem;
  margin: 0 10px 10px 0;
  cursor: default;
}

.pagination-item.disabled {
  color: #999;
  border-color: #ddd;
  cursor: default;
  pointer-events: none;
}

/* Blog Post Page */
.blog-post-container {
  margin: 2rem 0 4rem;
}

.blog-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #777;
}

.blog-breadcrumbs a {
  color: #555;
  transition: color 0.3s ease;
}

.blog-breadcrumbs a:hover {
  color: var(--primary-color);
}

.blog-post {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 3rem;
}

.post-header {
  padding: 2rem 2rem 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-category {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
}

.post-date, .post-author {
  color: #777;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-date i, .post-author i {
  color: var(--primary-color);
}

.reading-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #777;
  font-size: 0.9rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.post-featured-image {
  margin: 0 -2rem 2rem;
  overflow: hidden;
  max-height: 500px;
}

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

.post-content {
  padding: 0 2rem 2rem;
  line-height: 1.7;
}

.post-content h2 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1.5rem;
  color: #333;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: #444;
}

.post-content p {
  margin-bottom: 1.5rem;
  color: #555;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #555;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.3s ease;
}

.post-content a:hover {
  text-decoration-color: var(--primary-color);
}

.image-with-caption {
  margin: 2rem 0;
  text-align: center;
}

.image-with-caption img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.caption {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
}

.post-callout {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.post-cta {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 3rem;
  text-align: center;
}

.post-cta h3 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.post-cta p {
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.post-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.post-tags span {
  font-weight: 600;
  color: #555;
}

.post-tags a {
  background-color: #f0f0f0;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.85rem;
  color: #555;
  transition: all 0.3s ease;
}

.post-tags a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.share-post {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.share-post span {
  font-weight: 600;
  color: #555;
}

.share-post a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.share-post a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.table-of-contents {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.table-of-contents h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.table-of-contents ul {
  list-style-type: none;
  padding-left: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: #555;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
  border-left: 3px solid transparent;
  padding-left: 1rem;
  transition: all 0.3s ease;
}

.table-of-contents a:hover, .table-of-contents a.active {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.03);
}

.related-posts {
  margin-bottom: 3rem;
}

.related-posts h3 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog-card.small .blog-image {
  height: 180px;
}

.blog-card.small h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.blog-card.small .blog-text {
  padding: 1rem;
}

.blog-card.small .blog-meta {
  margin-bottom: 0.5rem;
}

.comments-section {
  margin-top: 50px;
  position: relative !important;
  z-index: 50 !important;
}

.comments-section h3 {
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 10px;
  display: inline-block;
}

.comments-container {
  margin-bottom: 30px;
}

.no-comments {
  font-style: italic;
  color: #777;
  margin: 20px 0;
}

.comment {
  border-bottom: 1px solid #eee;
  padding: 1.5rem 0;
}

.comment:last-child {
  border-bottom: none;
}

.comment-author {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.author-name {
  font-weight: 600;
  color: #333;
}

.comment-date {
  color: #777;
  font-size: 0.9rem;
}

.comment-content p {
  color: #555;
}

.comment-form {
  background-color: #f9f9f9 !important;
  padding: 30px !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
  margin-bottom: 40px !important;
  position: relative !important;
  z-index: 100 !important;
  display: block !important;
}

.comment-form h4 {
  font-size: 20px !important;
  margin-bottom: 20px !important;
  color: #333 !important;
  font-weight: 600 !important;
  display: block !important;
}

.comment-form .form-group {
  margin-bottom: 20px !important;
  position: relative !important;
  z-index: 200 !important;
  display: block !important;
  width: 100% !important;
}

.comment-form label {
  display: block !important;
  margin-bottom: 8px !important;
  font-weight: 500 !important;
  color: #444 !important;
}

.comment-form input,
.comment-form textarea {
  width: 100% !important;
  padding: 12px 15px !important;
  border: 2px solid #ddd !important;
  border-radius: 5px !important;
  font-size: 16px !important;
  transition: all 0.3s ease !important;
  display: block !important;
  position: relative !important;
  z-index: 300 !important;
  background-color: #fff !important;
  color: #333 !important;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #4CAF50 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2) !important;
}

.comment-form textarea {
  min-height: 150px !important;
  resize: vertical !important;
}

.comment-form .form-note {
  font-size: 0.85rem !important;
  color: #777 !important;
  margin-top: 5px !important;
}

.comment-form .comment-submit {
  background-color: #4CAF50 !important;
  color: white !important;
  padding: 12px 25px !important;
  border: none !important;
  border-radius: 30px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
  position: relative !important;
  z-index: 400 !important;
}

.comment-form .comment-submit:hover {
  background-color: #3d8b40 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

/* Debug Helper */
.debug-box {
  border: 3px solid red !important;
  position: relative !important;
  z-index: 9999 !important;
}

/* Force Visibility */
input[type="text"], 
input[type="email"], 
textarea {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  position: relative !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.subscribe {
  background-color: #f8f9fa;
  padding: 5rem 0;
}

.subscribe-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.subscribe h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

.subscribe p {
  margin-bottom: 2rem;
  color: #555;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.subscribe-form input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px !important;
  border: 2px solid #4CAF50 !important;
  border-radius: 30px;
  font-size: 16px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.subscribe-form input:focus {
  border-color: #2E7D32 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3) !important;
}

.subscribe-confirmation {
  display: none;
  text-align: center;
}

.subscribe-confirmation i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .blog-hero {
    padding: 6rem 0;
  }
  
  .blog-hero h1 {
    font-size: 2.5rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .post-header, .post-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .post-featured-image {
    margin: 0 -1.5rem 1.5rem;
  }
  
  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .comments-section {
    padding: 1.5rem;
  }
  
  .comment-form {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .blog-hero {
    padding: 4rem 0;
  }
  
  .blog-hero h1 {
    font-size: 2rem;
  }
  
  .blog-categories {
    gap: 0.5rem;
  }
  
  .blog-category-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
  
  .post-title {
    font-size: 1.7rem;
  }
  
  .post-header, .post-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .post-featured-image {
    margin: 0 -1rem 1rem;
  }
  
  .post-meta {
    gap: 1rem;
  }
  
  .post-callout {
    padding: 1rem;
  }
  
  .post-cta {
    padding: 1.5rem;
  }
  
  .subscribe {
    padding: 3rem 0;
  }
  
  .subscribe-form {
    flex-direction: column;
  }
  
  .subscribe-form input {
    width: 100%;
  }
  
  .comment-form {
    padding: 1rem;
  }
}

/* Custom Scrollbar for Blog */
.blog-post::-webkit-scrollbar, 
.table-of-contents::-webkit-scrollbar {
  width: 10px;
}

.blog-post::-webkit-scrollbar-track, 
.table-of-contents::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.blog-post::-webkit-scrollbar-thumb, 
.table-of-contents::-webkit-scrollbar-thumb {
  background: #4CAF50;
  border-radius: 5px;
}

.blog-post::-webkit-scrollbar-thumb:hover, 
.table-of-contents::-webkit-scrollbar-thumb:hover {
  background: #2E7D32;
}

/* Fix for any potential overlapping elements */
.comments-section * {
  position: relative;
}

.comments-section::before {
  display: none !important;
}

.comments-section::after {
  display: none !important;
}

/* Comment Form Autofill Prevention */
.comment-form input:-webkit-autofill,
.comment-form input:-webkit-autofill:hover,
.comment-form input:-webkit-autofill:focus,
.comment-form textarea:-webkit-autofill,
.comment-form textarea:-webkit-autofill:hover,
.comment-form textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  box-shadow: 0 0 0px 1000px #ffffff inset !important;
  -webkit-text-fill-color: #333 !important;
  border: 2px solid #4CAF50 !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Ensure comment form fields are always visible and properly styled */
#blogCommentForm input, 
#blogCommentForm textarea {
  background-color: #ffffff !important;
  border: 2px solid #4CAF50 !important;
  color: #333 !important;
  z-index: 1000 !important;
  position: relative !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

#blogCommentForm input:focus,
#blogCommentForm textarea:focus {
  outline: none !important;
  border-color: #2E7D32 !important;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2) !important;
}

/* Prevent any datalist or autocomplete dropdown from interfering */
input::-webkit-calendar-picker-indicator,
input::-webkit-list-button,
input::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
}

/* Force override any browser-injected UI elements */
input:-internal-autofill-selected {
  background-color: #ffffff !important;
  background-image: none !important;
}

/* Aggressive Autocomplete Prevention Styles */
form[id^="article_feedback_form"] input:-webkit-autofill,
form[id^="article_feedback_form"] input:-webkit-autofill:hover,
form[id^="article_feedback_form"] input:-webkit-autofill:focus,
form[id^="article_feedback_form"] textarea:-webkit-autofill,
form[id^="article_feedback_form"] textarea:-webkit-autofill:hover,
form[id^="article_feedback_form"] textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #333 !important;
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  box-shadow: 0 0 0px 1000px white inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  background-color: white !important;
  caret-color: #333 !important;
  border: 2px solid #4CAF50 !important;
}

/* Disable browser autofill styling */
input:-internal-autofill-selected,
input:-webkit-autofill {
  appearance: none !important;
  background-image: none !important;
  background-color: white !important;
  color: #333 !important;
}

/* Hide autofill icons */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button,
input::-webkit-credit-card-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  position: absolute !important;
}

/* Disable dropdown appearance */
input::-webkit-calendar-picker-indicator,
input::-webkit-inner-spin-button,
input::-webkit-clear-button,
input::-webkit-list-button {
  display: none !important;
  visibility: hidden !important;
}

/* Specific styles for the honeypot form */
#honeypot_form {
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
  opacity: 0 !important;
  left: -9999px !important;
  top: -9999px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  z-index: -9999 !important;
}

/* Extra form security - prevent browser styling options */
form[id^="article_feedback_form"] input[type="text"],
form[id^="article_feedback_form"] input[type="email"],
form[id^="article_feedback_form"] textarea {
  background-color: white !important;
  color: #333 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  border: 2px solid #4CAF50 !important;
}

/* Prevent autofill suggestions dropdown */
input:-webkit-autofill-strong-password {
  -webkit-text-security: disc !important;
}

/* Delay autocomplete suggestion dropdown */
@keyframes delayedFade {
  0%, 99% { opacity: 0; }
  100% { opacity: 1; }
}

form[id^="article_feedback_form"] input {
  animation: delayedFade 9999s ease-in-out !important;
} 