/* Custom styles for Borrowed Blessings */

/* Navbar customization */
/* Custom styles for Borrowed Blessings */

/* Navbar customization */
.navbar {
  width: 100%;
  margin: 0;
  padding: 0.75rem 0;
}
 body {
   font-family: 'Instrument Sans', 'Open Sans', 'Roboto', 'Tenor Sans', 'Zalando Sans', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
   font-optical-sizing: auto;
   font-weight: 400;
   font-style: normal;
 }

/* Headings use Tenor Sans for a refined display style */
 h1, h2, h3, h4, h5, h6 {
   font-family: 'Tenor Sans', 'Instrument Sans', 'Open Sans', serif;
   font-weight: 400;
   letter-spacing: 0.5px;
 }

/* Navigation keeps Instrument Sans semi-bold for clarity */
 .navbar-brand, .nav-link, .dropdown-item {
   font-family: 'Instrument Sans', 'Open Sans', 'Roboto', sans-serif;
 }

.navbar-brand { 
  font-weight: 600; 
}

/* Navbar brand logo image */
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.nav-link.active { 
  font-weight: 600; 
}

.navbar-toggler {
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  border: 1px solid rgba(0,0,0,.1);
}

/* Blog card enhancements */
.blog-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.blog-card .card-img-top {
  transition: transform 0.3s ease-in-out;
}

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

/* Blog detail page */
.blog-banner {
  overflow: hidden;
  border-radius: 0.5rem;
}

.blog-banner img {
  transition: transform 0.3s ease-in-out;
}

.blog-banner:hover img {
  transform: scale(1.02);
}

/* Form improvements */
.form-section-title {
  color: #6c757d;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Blog list improvements */
.blog-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Hero banner styles */
.hero-banner {
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.hero-image {
  height: 360px;
  object-fit: cover;
  display: block;
  width: 100%;
}

/* Contrast overlay */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Center-focused radial fade for readability while keeping edges vivid */
  background: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.32) 26%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.02) 78%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

/* Centered overlay that stays within banner bounds */
.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: min(88%, 780px);
  max-height: 85%; /* reduced to add vertical breathing space */
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none; /* decorative */
  /* Subtle drop shadow to separate from busy backgrounds */
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  padding: 8px 0; /* gentle top/bottom padding */
}

/* Responsive improvements */
@media (max-width: 768px) {
  .blog-card {
    margin-bottom: 1.5rem;
  }
  
  /* Ensure navbar and banner go to full width */
  .navbar .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .hero-image {
    height: 240px;
  }
  .hero-overlay {
    max-width: min(88%, 620px);
    max-height: 82%;
    padding: 6px 0;
  }
}

/* Extra small screens */
@media (max-width: 576px) {
  .hero-image {
    height: 180px;
  }
  .hero-overlay {
    max-width: min(90%, 460px);
    max-height: 80%;
    padding: 4px 0;
  }
}

/* CKEditor custom styles */
.django-ckeditor-widget {
  border-radius: 0.375rem;
  overflow: hidden;
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Blog list page styles (moved from template) */
.post-thumb-link {
  flex-shrink: 0;
  text-decoration: none;
}

.post-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Wrapper to position video badge */
.thumb-wrapper { width: 120px; height: 80px; }
.thumb-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.video-badge {
  width: 42px;
  height: 42px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  backdrop-filter: blur(2px);
  font-size: 1.25rem;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  transition: background .2s;
}
.thumb-wrapper:hover .video-badge { background: rgba(0,0,0,0.7); }

.post-title a:hover { color: #0d6efd !important; }

.post-excerpt {
  line-height: 1.5;
  font-size: 0.95rem;
}

.post-row:last-child { border-bottom: none !important; }

.post-row:hover {
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 0 -15px;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Staff-only draft section */
.staff-section {
  background: #fff9f0;
  border: 1px solid #ffc107;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.draft-thumb {
  border: 2px solid #ffc107;
  opacity: 0.9;
}

.draft-title { font-size: 1.1rem; }

.draft-actions .btn { font-size: 0.875rem; }

@media (max-width: 768px) {
  .staff-section {
    padding: 1rem;
    margin: 1rem -15px 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Powered by badge (footer) */
.powered-by-badge {
  display: inline-block;
  padding: 2px 10px 3px;
  margin-left: 4px;
  font-size: 0.625rem; /* compact */
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg,#fafafa,#ececec);
  border: 1px solid #d0d0d0;
  border-radius: 14px;
  color: #555;
  text-decoration: none;
  line-height: 1.1;
  transition: all .18s ease-in-out;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.powered-by-badge:hover {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #0d47a1;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.powered-by-badge:active {
  background: #bbdefb;
  border-color: #64b5f6;
  color: #0d47a1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18) inset;
}