/* styles-sections.css - Shared styles for blog sections and section pages */


/* tighten the gap between the page header and the section grid */
.page-blog .page-header {
  margin-bottom: 1rem !important;
}

/* Main layout with sidebar */
.blogs-layout,
.section-layout {
  display: grid;
  grid-template-columns: 1fr 20%;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
  margin-top: 0rem;
}


/* restore this to aid in sizing and positioning */
/* sl-carousel * {
  border: 1px solid red !important;
}  */

.page-section .section-layout .main-content,
.page-resources .section-layout .main-content {
  background: lightgrey;
}


.resources-carousel {
  margin-bottom: 2rem;  
  background: lightgrey;
}

.resources-carousel .carousel-link {
  display: block;
  position: relative;
  height: 100%;
  text-decoration: none;
  color: inherit;
  
}

.resources-carousel sl-carousel-item {
  position: relative;
  height: 400px;
}

.resources-carousel sl-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
}

.carousel-caption h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.carousel-caption p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.section-icon {
  width: 1.75em;
  height: 1.25em;
  vertical-align: middle;
  margin-right: 0.5em;
}

/* Section intro box */
.section-intro {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #e8e8e8;
  border-left: 4px solid var(--sl-color-secondary-600);
  border-radius: 0.5rem;
}

.section-intro p {
  margin: 0;
  line-height: 1.6;
  color: var(--sl-color-neutral-700);
}

/* Section rows (for sections list on resources.html) */
.section-row {
  display: flex;
  background: #e8e8e8;
  flex-direction: column;
  padding: 1.5rem;
  margin-left: 10px;
  margin-bottom: 0;
  border-radius: 0.4rem;
  border-bottom: 1.5rem solid lightgrey;
}

.section-row:last-child {
  border-bottom: none;
}

.section-row h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: var(--accent-main);
  font-weight: 600;
}

/* .section-row-content {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: start;
} */

.section-row-content {
  display: block; /* Removes the grid structure */
  width: 100%;
}

.section-row .section-text {
  max-width: 800px; 
}

.section-row .section-image {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 80px;
  height: 60px;
}

.section-row .section-image img {
  width: auto !important;
  height: 60px !important;
  max-width: 80px !important;  
  object-fit: contain !important;
  padding: 0 !important;
}

.section-row .section-text p {
  margin: 0 0 1rem 0;
  color: var(--sl-color-neutral-700);
  line-height: 1.6;
}

.section-row .section-text sl-button {
  float: right;
  margin-right: 20px;
  clear: both;
}

.section-text p {
  margin: 0 0 1rem 0;
  color: var(--sl-color-neutral-700);
  line-height: 1.6;
}

.section-image {
  cursor: pointer;
}




/* Blog rows (for individual blogs on section pages) */
.blog-row {
  display: flex;
  background: #e8e8e8;
  flex-direction: column;
  padding: 1.5rem;
  margin-bottom: 0;
  border-radius: 0.4rem;
  border-bottom: 1.5rem solid lightgrey;
}
.blog-row:last-child {
  border-bottom: none;
}

.blog-row h2 {
  margin: 0 0 1rem 0;
  font-size: 1.75rem;
  color: var(--sl-color-neutral-900);
  font-weight: 600;
}

.blog-row h2 a {
  color: var(--sl-color-neutral-900);
  text-decoration: none;
}

.blog-row h2 a:hover {
  color: var(--sl-color-primary-600);
}


.blog-row-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

.blog-image {
  cursor: pointer;
}

.blog-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-text {
  display: flex;
  flex-direction: column;
}

.blog-text sl-button {
  align-self: flex-end;
  margin-right: 20px;
}

.blog-text p {
  margin: 0 0 1.5rem 0;
  color: var(--sl-color-neutral-700);
  line-height: 1.6;
}

/* Sidebar - no top margin to prevent gap */
.blog-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  margin-top: 23px;
  border-radius: 0.2rem !important;
  padding-top: 0 !important;
}

.blog-sidebar li {
  margin-bottom: 0rem;
}

.blog-sidebar li a {
  display: block;
  padding: 8px 0;  /* Changed from 8px 8px - no horizontal padding */
  line-height: 1.4;  
}

.blog-sidebar li a:hover {
  background-color: #dedede;
  color: var(--sl-color-primary-600);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.blog-sidebar .current-section {  
  background-color: lightgrey;
  font-weight: 600;
  color: var(--sl-color-neutral-900);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding: 8px 1.5rem 8px 1.5rem;  /* top right bottom left */
}

.blog-sidebar ul li.current-section {
  background-color: lightgrey; 
  font-weight: 400;  
  color: var(--sl-color-neutral-900);
  font-size: 0.9rem;
}

.blog-sidebar a {
  color: var(--sl-color-neutral-700);
  text-decoration: none;
  font-size: 0.9rem;  
}


.sidebar-section {
  background: #e8e8e8; 
  border-radius: 0.3rem !important;
  padding: 1.5rem;  
  margin: 0;
}


.sidebar-section + .sidebar-section {
  margin-top: 1.5rem;
  border-radius: 0.4rem;
}

.sidebar-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--accent-main);
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-section li {
  margin-bottom: 0rem;
}

.sidebar-section a {
  color: var(--sl-color-neutral-700);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.sidebar-section a:hover {
  color: var(--sl-color-primary-600);
}

/* Responsive */
@media (max-width: 1024px) {
  .blogs-layout,
  .section-layout {
    grid-template-columns: 1fr;
  }
  
  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .section-row-content,
  .blog-row-content {
    grid-template-columns: 1fr;
  }
  
  .resources-carousel sl-carousel-item {
    height: 300px;
  }
}



/* Small phones - carousel and sidebar fixes */
@media (max-width: 450px) {
  .resources-carousel {
    margin-bottom: 2rem;
  }
  
  .resources-carousel sl-carousel {
    max-height: none !important;
    height: auto !important;
    min-height: 250px;
  }
  
  .resources-carousel sl-carousel-item {
    min-height: 250px;
    height: auto !important;
  }
  

  
  .carousel-caption {
    padding: 1.5rem 1rem 1rem;
  }
  
  .carousel-caption h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  
  .carousel-caption p {
    font-size: 0.85rem;
  }
  
  .sidebar-section {
    max-width: 100%;
    overflow-x: hidden;
  }
}