:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
}

.blog-card img {
    margin-bottom: 6%;
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* .hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s infinite linear;
} */

@keyframes pulse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-btn {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

/* Blog Cards */
.blog-card {
    height: 400px;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    margin-bottom: 30px;
    background: white;
    opacity: 0;
    transform: translateY(20px);
}

.blog-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
}

.card-title {
    font-weight: 700;
    /* margin-bottom: 15px; */
    color: var(--dark-color);
}

.card-text {
  display: -webkit-box;
  display: box; /* Optional: for future non-prefixed support */
  
  -webkit-line-clamp: 2;
  line-clamp: 2; /* ✅ optional future support (currently ignored by most browsers) */
  
  -webkit-box-orient: vertical;
  box-orient: vertical; /* optional */

  overflow: hidden;
  text-overflow: ellipsis;

  line-height: 1.6em;
  max-height: 3.2em;

  color: #666;
}



.card-text {
    color: #666;
    /* margin-bottom: 20px; */
}

.card-title,
.card-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.category-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more:hover i {
    transform: translateX(5px);
}



/* Ebook card */



/* Cover Section */
.ebook-cover {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ebook-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1600x900/?abstract') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
}

.cover-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.ebook-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease;
}

.ebook-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.author-name {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    animation: fadeIn 1s ease 0.6s forwards;
    opacity: 0;
}

.author-name::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    bottom: -10px;
    left: 25%;
    background-color: #ff7b54;
}

.download-btn {
    animation: fadeInUp 1s ease 0.9s forwards;
    opacity: 0;
    font-size: 1.1rem;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Book Preview */
.book-preview {
    padding: 5rem 0;
    /* background-color: white; */
        background-image: url(images/aapslider-bg.png);
}


.book-previewwwwww {
    padding: 3rem 0;
    background-color: white;
}

.preview-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.preview-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff7b54;
}

.preview-card {
    background: white;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
}

.preview-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.preview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.preview-card .card-img-top {
    height: 200px;
    object-fit: contain;
}

.preview-card .card-body {
    padding: 2rem;
}

.chapter-number {
    font-size: 0.9rem;
    color: #ff7b54;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-card .card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
    /* Adjust based on your image height */
}

.chapter-number {
    font-size: 0.9rem;
    color: #ff7b54;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-card .card-title {
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.preview-card .card-text {
    /* margin-bottom: 1.5rem; */
    flex-grow: 2;
}

.preview-card .card-footer {
    background: transparent;
    border-top: none;
    /* padding: 1rem 0 0; */
    margin-top: auto;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4e54c8;
    margin-bottom: 1rem;
}

.price-tag .original-price {
    font-size: 1rem;
    text-decoration: line-through;
    color: #999;
    margin-right: 0.5rem;
}

.preview-card .btn-details {
    background-color: #4e54c8;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.preview-card .btn-details:hover {
    background-color: #2b2d42;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Page flip effect */
.page-flip {
    perspective: 1500px;
}

.page-flip .preview-card {
    transform-style: preserve-3d;
    transform: rotateY(15deg);
    transition: all 0.5s ease;
}

.page-flip .preview-card:hover {
    transform: rotateY(0deg);
}

/* Single blog */

/* Blog Header */
.blog-header {
    position: relative;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1600x900/?ui,design') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.blog-title {
    overflow-wrap: break-word;
    /* ✅ Fixes long words breaking */
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease;
}

.blog-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Content */
.blog-content {
    position: relative;
    z-index: 2;
    background-color: white;
    border-radius: 20px 20px 0 0;
    margin-top: -50px;
    padding: 4rem 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.article-container {
    /* max-width: 800px; */
    margin: 0 auto;
}

.article-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.article-image:hover {
    transform: perspective(1000px) rotateY(10deg) rotateX(5deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.article-paragraph {
    margin-bottom: 2rem;
    /* line-height: 1.8; */
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.article-paragraph.animate {
    opacity: 1;
    transform: translateY(0);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.highlight-box:hover {
    transform: perspective(1000px) rotateY(-5deg) translateZ(20px);
    box-shadow: 5px 10px 30px rgba(0, 0, 0, 0.1);
}

.quote-box {
    position: relative;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--dark-color);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.quote-box::before,
.quote-box::after {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.3;
    position: absolute;
}

.quote-box::before {
    top: 0;
    left: 10px;
}

.quote-box::after {
    bottom: -30px;
    right: 10px;
}

.quote-box-inner {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: rotateY(-10deg);
    transition: all 0.5s ease;
}

.quote-box:hover .quote-box-inner {
    transform: rotateY(0deg);
}

/* Author Section */
.author-section {
    background-color: white;
    padding: 3rem;
    border-radius: 15px;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 2rem;
    align-items: center;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.author-section:hover {
    transform: perspective(1000px) rotateY(-5deg) translateZ(10px);
}

.author-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--light-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.author-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.author-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Related Articles */
.related-articles {
    padding: 3rem 0;
}

.related-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.related-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
}

 .div#navbarSupportedContent {
        margin-left: 14%;
    }

.related-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    margin-bottom: 30px;
    background: white;
    transform-style: preserve-3d;
}

.related-card:hover {
    transform: perspective(1000px) rotateY(10deg) translateZ(20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.related-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover img {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2.5rem;
    }

    .blog-header {
        height: 60vh;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
    }

    .article-image {
        height: 250px;
    }
}