/*----------------------------------------*/
/*  Blog Styling
/*----------------------------------------*/
/* Blog Layout 1 Specific Styles */
.blog-layout-1 .blog-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-layout-1 .blog-section {
    padding: 60px 0;
}

.blog-layout-1 .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-layout-1 .section-subtitle {
    display: block;
    font-size: 16px;
    color: var(--color-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-layout-1 .section-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.blog-layout-1 .articles-grid {
    display: grid;
    gap: 30px;
}

.blog-layout-1 .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
}

.blog-layout-1 .grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

.blog-layout-1 .grid-4-col {
    grid-template-columns: repeat(4, 1fr);
}

.blog-layout-1 .grid-5-col {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
    .blog-layout-1 .grid-5-col {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .blog-layout-1 .grid-4-col,
    .blog-layout-1 .grid-5-col {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-layout-1 .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .blog-layout-1 .articles-grid {
        grid-template-columns: 1fr;
    }
}

.blog-layout-1 .equal-height .blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-layout-1 .equal-height .blog-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-layout-1 .equal-height .read-more-link {
    margin-top: auto;
}

.blog-layout-1 .blog-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.blog-layout-1 .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-layout-1 .blog-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

/* Category Label */
.blog-layout-1 .category-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.blog-layout-1 .blog-content {
    padding: 25px;
}

.blog-layout-1 .blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.blog-layout-1 .meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.blog-layout-1 .meta-icon {
    margin-right: 5px;
    color: var(--color-primary);
}

.blog-layout-1 .meta-icon svg {
    width: 16px;
    height: 16px;
}

.blog-layout-1 .blog-title {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-layout-1 .blog-title a:hover {
    color: var(--color-primary);
}

.blog-layout-1 .blog-excerpt {
    color: var(--color-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link with Hover Effect */
.blog-layout-1 .read-more-link {
    display: inline-flex;
    overflow: hidden;
    margin-top: auto;
    padding-top: 15px;
}

.blog-layout-1 .read-more-link a {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: 500;
    position: relative;
    padding-right: 20px;
}

.blog-layout-1 .arrow-icon {
    position: absolute;
    right: 0;
    -webkit-transition: all 0.3s ease-out 0s;
    -moz-transition: all 0.3s ease-out 0s;
    -ms-transition: all 0.3s ease-out 0s;
    -o-transition: all 0.3s ease-out 0s;
    transition: all 0.3s ease-out 0s;
}

.blog-layout-1 .read-more-text {
    opacity: 0;
    width: 0;
    -webkit-transition: all 0.3s ease-out 0s;
    -moz-transition: all 0.3s ease-out 0s;
    -ms-transition: all 0.3s ease-out 0s;
    -o-transition: all 0.3s ease-out 0s;
    transition: all 0.3s ease-out 0s;
    display: inline-block;
    white-space: nowrap;
}

.blog-layout-1 .read-more-link:hover .read-more-text {
    opacity: 1;
    width: auto;
    margin-right: 8px;
    -webkit-transition: all 0.3s ease-out 0s;
    -moz-transition: all 0.3s ease-out 0s;
    -ms-transition: all 0.3s ease-out 0s;
    -o-transition: all 0.3s ease-out 0s;
    transition: all 0.3s ease-out 0s;
}

.blog-layout-1 .read-more-link:hover .arrow-icon {
    right: 0;
}

.blog-layout-1 .at-section-btn {
    text-align: center;
    margin-top: 30px;
}

.blog-layout-1 .at-section-readmore {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.blog-layout-1 .at-section-readmore:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-layout-1 .section-title {
        font-size: 28px;
    }
    
    .blog-layout-1 .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-layout-1 .blog-section {
        padding: 40px 0;
    }
    
    .blog-layout-1 .section-title {
        font-size: 24px;
    }
    
    .blog-layout-1 .blog-content {
        padding: 20px;
    }
}

/* ========== Book Shelf Styles ========== */
.bookshelf-wrapper {
    display: flex;
    align-items: center;
    min-height: 250px;
    height: 50vh;
    justify-content: center;
    position: relative;
    padding: 50px;
    box-sizing: border-box;
    pointer-events: none;
    pointer-events: none;
    z-index: 999;
}

.bookshelf {
  max-width: 100%;
  width: 80%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  z-index: -1;
  position: relative;
  height: 0px;
  box-sizing: border-box;
  border-bottom: 16px solid var(--color-border-primary);
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  pointer-events: all;
}

.bookshelf::before {
  content: "";
  position: absolute;
  top: 16px;
  background: linear-gradient(90deg, var(--color-white-gray) 0%, var(--color-white) 100%);
  height: 26px;
  width: calc(100% + 40px);
  box-shadow: 0px -1px 6px rgba(0, 0, 0, 0.05),
    0px 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.bookshelf::after {
  content: "";
  height: 80px;
  width: calc(100% + 40px);
  position: absolute;
  top: 42px;
  display: block;
  background: linear-gradient(
    180deg,
    var(--color-background) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  clip-path: polygon(0% 0%, 100% 0%, 97% 100%, 3% 100%);
  z-index: -1;
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 2rem;
  width: 80%;
  margin: auto;
  transform: translateY(-100%);
  padding: 0 0 2px;
  z-index: -1;
  position: relative;
  top: 10px;
}

.book {
  width: 100%;
  border-radius: 3px 0.5px 0.5px 3px;
  aspect-ratio: 115 / 180;
  position: relative;
}

.book::before,
.book::after {
  position: absolute;
  width: 100%;
  display: block;
  content: " ";
  transition: all 300ms ease-out;
  background: var(--bg-image) center center/cover no-repeat, var(--color-background);
}

.book::before {
  height: 100%;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25),
    inset 2px 0px 2px 1px rgba(29, 27, 27, 0.2);
}

.book::after {
  height: 102%;
  filter: blur(10px);
  z-index: -1;
  opacity: 1;
}

.book:hover::before,
.book:hover::after {
  transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book:hover::before {
  transform: translate(0, -45%) skew(3deg, -3deg) scale(1.35);
}

.book:hover::after {
  transform: translate(0, -45%) skew(3deg, -3deg) scale(1.275);
}

.book:nth-of-type(even):hover::before {
  transform: translate(0, -45%) skew(-3deg, 3deg) scale(1.35);
}

.book:nth-of-type(even):hover::after {
  transform: translate(0, -45%) skew(-3deg, 3deg) scale(1.275);
}

.book-actions {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 5;
}

.book-actions a {
  display: inline-flex;
  background: rgba(0,0,0,0.5);
  color: var(--color-white);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
  align-items: center;
}

.book-actions a svg {
    width: 18px;
    height: 18px;
    fill: var(--color-white);
}

.book-actions a svg {
    width: 18px;
    height: 18px;
    fill: var(--color-white);
}

.book-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  background: crimson;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  border-bottom-right-radius: 4px;
}

@media screen and (max-width: 1199px) {
  .books {
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

@media screen and (max-width: 992px) {
  .books {
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .bookshelf-wrapper {
    padding: 20px;
  }
  .books {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  }
  .book-actions a {
    font-size: 12px;
    padding: 3px 5px;
  }
  .book-ribbon {
    font-size: 10px;
    padding: 2px 6px;
  }
}