/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme for Astra with custom blog header
Author: Common Heritage Foundation
Template: astra
Version: 1.0.0
*/

/* ===========================
   BLOG HEADER SECTION
   =========================== */

/* Custom blog header */
.custom-blog-header {
  width: 100%;
  background-color: #e8e8e8;
  padding: 20px 20px;
  text-align: center;
  /* height: 50px; */
}

.custom-blog-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.ecosystem-button {
  display: inline-block;
  background-color: #ffd700;
  color: #003366;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  transition: all 0.3s ease;
}

.ecosystem-button:hover {
  background-color: #ffc700;
  transform: translateY(-2px);
  color: #003366;
}

/* ===========================
   LAYOUT SETTINGS
   =========================== */

/* DO NOT TOUCH SITE HEADER (logo and menu) - it stays as is */

/* Stretched layout - full width for content area only */
.blog-archive-page #primary {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Full width for custom header and posts wrapper */
.blog-archive-page .custom-blog-header {
  width: 100%;
}

/* Boxed content for posts only */
.blog-archive-page .content-area {
  width: 100%;
  max-width: 100%;
  padding: 70px 0 !important;
  margin: 0 auto;
  background-color: #f5f5f5;
}

/* Container - boxed at 1200px */
.blog-archive-page .container.responsive {
  /* max-width: 1200px; */
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  /* box-sizing: border-box; */
}

/* Main content area */
.blog-archive-page #main {
  width: 100%;
}

/* Posts list section */
.blog-archive-page .posts-list {
  width: 100%;
  /* display: block; */
}

/* Individual post articles */
.blog-archive-page article.post-wrap {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
  box-sizing: border-box;
}

/* Pagination */
.blog-archive-page .navigation.pagination {
  width: 100%;
  margin-top: 40px;
}

/* Ensure site header container is NOT affected */
.blog-archive-page .site-header .ast-container {
  max-width: var(--ast-container-default-xlg-width, 1200px) !important;
}

/* Full width background wrapper */
.blog-archive-page .site-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

/* Add padding to inner content only */
.blog-archive-page .site-content #primary {
  padding: 0 50px;
}

/* Ensure full background extends */
.blog-archive-page .site {
  background-color: #f5f5f5;
}

/* ===========================
   POST TITLE TRUNCATION
   =========================== */

/* Limit blog post titles to 2 lines with ellipsis */
.blog-archive-page .entry-title,
.blog-archive-page .entry-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: calc(1.4em * 2); /* 2 lines based on line-height */
}

body.archive .ast-archive-description {
  display: none;
}

/* ===========================
   META SLIDER - REVOLUTION SLIDER STYLE
   =========================== */

/* Section wrapper - matches Elementor section styling */
.metaslider-section,
.elementor-section.metaslider-wrapper {
  position: relative;
  padding: 0;
  transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
}

/* Main slider container - Full width */
.metaslider {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 600px;
  margin: 0;
  background: #3f5426;
  overflow: hidden;
  box-sizing: border-box;
}

/* Apply box-sizing to all slider elements */
.metaslider *,
.metaslider *::before,
.metaslider *::after {
  box-sizing: border-box;
}

/* Slides container */
.metaslider .slides,
.metaslider .slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Slide images */
.metaslider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image overlay - matches Revolution Slider Layer 42 exactly */
.metaslider .slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 350px;
  width: 900px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 5;
  transition: all 0.3s ease;
  animation: fadeIn 1.5s ease-in-out;
}

/* Hide image overlay on tablet and mobile - matches Revolution Slider visibility */
@media screen and (max-width: 1023px) {
  .metaslider .slide::before {
    display: none;
  }
}

/* Caption positioning */
.metaslider .caption-wrap,
.metaslider .flex-caption {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none;
  z-index: 8;
}

/* Slider content wrapper */
.chf-slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* Decorative angled shape - Left (Light Green) - Layer 43 */
.chf-slider-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -400px;
  margin-left: -100px;
  width: 300px;
  height: 800px;
  background-color: #789461;
  transform: rotate(15deg);
  z-index: 6;
  pointer-events: none;
  opacity: 1;
  animation: fadeIn 0.8s ease-in-out;
  transition: all 0.3s ease;
}

/* Decorative angled shape - Right (Dark Green) - Layer 44 */
.chf-slider-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -400px;
  margin-left: 850px;
  width: 300px;
  height: 800px;
  background-color: #3f5426;
  transform: rotate(15deg);
  z-index: 7;
  pointer-events: none;
  opacity: 1;
  animation: fadeIn 0.8s ease-in-out;
  transition: all 0.3s ease;
}

/* Content container - matches Revolution Slider Row 35 + Column 36 structure */
.chf-slider-content {
  position: relative;
  z-index: 9;
  width: 100%;
  max-width: calc(100% - 100px);
  margin-left: 100px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

/* Slide title - matches Revolution Slider Layer 1 exactly */
.slider-title {
  font-family: "Open Sans Condensed", sans-serif;
  font-size: 55px;
  font-weight: 700;
  color: #ffffff;
  line-height: 55px;
  text-transform: uppercase;
  margin: 0 0 20px 50px;
  width: 550px;
  max-width: 550px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation-duration: 1.25s;
  transition: all 0.3s ease;
  z-index: 10;
  position: relative;
}

/* Yellow divider line - matches Revolution Slider Layer 33 exactly */
.slider-line {
  width: 500px;
  height: 6px;
  background-color: #ffb536;
  margin: 0 0 20px 50px;
  animation-duration: 1.25s;
  transition: all 0.3s ease;
  z-index: 11;
  position: relative;
}

/* Slide subtitle - matches Revolution Slider Layer 9 exactly */
.slider-subtitle {
  font-family: "Open Sans", sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
  line-height: 30px;
  margin: 0 0 20px 50px;
  padding: 17px 0 0 0;
  width: 500px;
  max-width: 500px;
  animation-duration: 1.25s;
  transition: all 0.3s ease;
  z-index: 13;
  position: relative;
}

/* Animation classes for slide content */
.metaslider .animated {
  animation-duration: 1.25s;
  animation-fill-mode: both;
}

/* Staggered animation delays - matches Revolution Slider timing */
.metaslider .slider-title {
  animation-delay: 1s;
}

.metaslider .slider-line {
  animation-delay: 1s;
}

.metaslider .slider-subtitle {
  animation-delay: 1s;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.metaslider .fadeIn {
  animation-name: fadeIn;
}

/* Slide up animation for title */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.metaslider .slideInUp {
  animation-name: slideInUp;
}

/* Slide in from left animation for divider */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.metaslider .slideInLeft {
  animation-name: slideInLeft;
}

/* Slide down animation for subtitle */
@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.metaslider .slideInDown {
  animation-name: slideInDown;
}

/* Smooth slide transitions */
.metaslider .slide {
  transition: opacity 0.3s ease-in-out;
}

/* Active slide */
.metaslider .slide.flex-active-slide {
  z-index: 2;
}

/* Ensure smooth image loading */
.metaslider .slide img {
  transition: opacity 0.3s ease;
}

/* Navigation arrows - Revolution Slider Hephaistos style */
.metaslider .flex-direction-nav a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  opacity: 1;
  transition: all 0.3s ease;
  z-index: 20;
}

.metaslider .flex-direction-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.metaslider .flex-direction-nav .flex-prev {
  left: 0;
}

.metaslider .flex-direction-nav .flex-next {
  right: 0;
}

/* Progress bar - Revolution Slider style */
.metaslider .flex-control-nav {
  bottom: auto;
  top: 0;
  width: 100%;
  height: 5px;
  background-color: transparent;
  z-index: 21;
}

/* Responsive adjustments - Matches Revolution Slider breakpoints exactly */

/* Notebook: 1024px - 1239px */
@media screen and (min-width: 1024px) and (max-width: 1239px) {
  .slider-title {
    font-size: 80px;
    line-height: 80px;
    width: 550px;
    max-width: 550px;
  }

  .slider-line {
    width: 500px;
  }

  .slider-subtitle {
    width: 500px;
    max-width: 500px;
  }
}

/* Tablet: 778px - 1023px */
@media screen and (min-width: 778px) and (max-width: 1023px) {
  .slider-title {
    font-size: 80px;
    line-height: 80px;
    width: 500px;
    max-width: 500px;
  }

  .slider-line {
    width: 500px;
  }

  .slider-subtitle {
    width: 500px;
    max-width: 500px;
  }

  .chf-slider-content {
    margin-left: 100px;
    max-width: calc(100% - 100px);
  }

  /* Hide decorative shapes on tablet */
  .chf-slider-wrapper::before,
  .chf-slider-wrapper::after {
    display: none;
  }
}

/* Mobile: < 778px */
@media screen and (max-width: 777px) {
  .metaslider {
    height: 600px;
  }

  .slider-title {
    font-size: 70px;
    line-height: 60px;
    width: 364px;
    max-width: 364px;
    font-weight: 300;
    margin: 0 0 20px 40px;
  }

  .slider-line {
    width: 364px;
    margin: 0 0 20px 40px;
  }

  .slider-subtitle {
    font-size: 17px;
    line-height: 30px;
    width: 364px;
    max-width: 364px;
    margin: 0 0 20px 40px;
  }

  .chf-slider-content {
    margin-left: 40px;
    max-width: calc(100% - 40px);
    padding: 0;
  }

  /* Hide decorative shapes on mobile */
  .chf-slider-wrapper::before,
  .chf-slider-wrapper::after {
    display: none;
  }
}
