/********** Template CSS **********/
:root {
    --primary: #6244C5;
    --secondary: #FFC448;
    --light: #FAFAFB;
    --dark: #12141D;
}

/********** Certificate Card Styles **********/
.certificate-card {
    transition: all 0.5s ease;
    transform: translateY(0);
    box-shadow: 0 0.5rem 1rem rgba(128, 0, 255, 0.15);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #f8f6ff 100%);
    border: 1px solid rgba(128, 0, 255, 0.1);
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(128, 0, 255, 0.25);
    background: linear-gradient(135deg, #fff8dc 0%, #f5deb3 100%);
}

/* Certificate title animation */
.cert-title {
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.certificate-card:hover .cert-title {
    color: #8000ff;
    transform: scale(1.05);
}

/* Add a shine effect on hover */
.certificate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(128, 0, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    pointer-events: none;
}

.certificate-card:hover::before {
    left: 150%;
}

/* Purple glow effect on hover */
.certificate-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8000ff, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.certificate-card:hover::after {
    transform: scaleX(1);
}

/********** Blog Card Styles **********/
/* Blogs section styles */
#blogs {
    position: relative;
    z-index: 1; /* Same z-index as portfolio but contained */
    overflow: visible;
}

/* Blogs container styles */
.blogs-container {
    width: 100%;
    position: relative;
    max-height: 450px; /* Fixed height to prevent overflow */
    z-index: 1; /* Ensure proper stacking context */
}

.blogs-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    padding: 20px 0;
    position: relative; /* Ensure proper positioning */
    z-index: 1; /* Ensure proper stacking context */
}

.blog-card {
    flex: 0 0 auto;
    width: calc(33.33% - 20px);
    margin-right: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
    transform: translateY(0);
    box-shadow: 0 0.5rem 1rem rgba(128, 0, 255, 0.15);
    background: linear-gradient(135deg, #fff 0%, #f8f6ff 100%);
    border: 1px solid rgba(128, 0, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Responsive design for blog cards */
@media (max-width: 768px) {
    .blog-card {
        width: calc(100% - 20px);
    }
}

/* Single blog post styles */
.single-blog {
    flex: 1;
    width: 100%;
    margin: 0 auto;
    max-width: 100%;
    background: linear-gradient(135deg, #fff 0%, #f8f6ff 100%);
}

.single-blog-image {
    height: auto;
    max-height: 400px;
    width: 40%;
    float: right;
    margin: 0 0 20px 20px;
    object-fit: cover;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(128, 0, 255, 0.25);
    background: linear-gradient(135deg, #fff8dc 0%, #f5deb3 100%);
}

/* Add a shine effect on hover */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(128, 0, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    pointer-events: none;
}

.blog-card:hover::before {
    left: 150%;
}

/* Purple glow effect on hover */
.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8000ff, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.blog-card:hover::after {
    transform: scaleX(1);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #343a40;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.blog-card:hover .blog-title {
    color: #8000ff;
    transform: scale(1.05);
}

.blog-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #adb5bd;
}

.blog-date {
    display: flex;
    align-items: center;
}

.blog-date i {
    margin-right: 5px;
}

.blog-likes {
    display: flex;
    align-items: center;
}

.blog-likes i {
    margin-right: 5px;
    color: #dc3545;
}

.blog-read-more {
    display: inline-block;
    margin-top: 15px;
    color: #0d6efd;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: #0a58ca;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.py-6 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.fixed-top {
    display: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    padding: 20px 15px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        padding: 10px 0;
    }
}


/*** Header ***/
#home {
    margin-bottom: 6rem;
    background: url(/static/assets/images/bg-header.png) left top no-repeat;
}

.typed-cursor {
    font-size: 30px;
    color: var(--dark);
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** About ***/
#about .years .display-1 {
    font-size: 10rem;
    line-height: 9rem;
}

#about .years h5 {
    letter-spacing: 30px;
    margin-right: -30px;
}


/*** Skills ***/
#skill .progress {
    height: 5px;
    border-radius: 5px;
}

#skill .progress .progress-bar {
    width: 0px;
    border-radius: 5px;
    transition: 3s;
}

#skill .nav-pills .nav-link {
    color: var(--dark);
}

#skill .nav-pills .nav-link.active {
    color: #FFFFFF;
}

#skill .tab-content hr {
    width: 30px;
}


/*** Service ***/
/* Service section container */
#service {
    position: relative;
    z-index: 2; /* Higher z-index than blogs and projects */
    overflow: visible;
}

.service-item {
    position: relative;
    z-index: 2; /* Higher z-index than blogs and projects */
    margin-bottom: 30px; /* Add space between items */
}

.service-item .bg-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(/static/assets/images/bg-icon.png) center center no-repeat;
    background-size: cover;
}


/*** Project Portfolio ***/
/* Container for portfolio items */
.portfolio-container {
    position: relative;
    z-index: 1;
    overflow: visible;
    min-height: 450px; /* Ensure enough space for items */
}

#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-item {
    position: relative;
    z-index: 1;
    margin-bottom: 30px; /* Add space between items */
}

.portfolio-img {
    position: relative;
}

.portfolio-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(98, 68, 197, .9);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    padding-bottom: 100px !important;
    opacity: 0;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    padding-bottom: 30px !important;
}


/*** Team ***/
.team-item img {
    transition: .5s;
}

.team-item:hover img {
    opacity: .7;
}

.team-item .team-text {
    position: absolute;
    left: 0;
    right: 60px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text {
    right: 30px;
    opacity: 1;
}

.team-item .team-text div {
    transition: .5s;
}

.team-item:hover .team-text div {
    margin-left: 30px;
}


/*** Testimonial ***/
.testimonial-left,
.testimonial-right {
    position: relative;
}

.testimonial-left img,
.testimonial-right img {
    position: absolute;
    padding: 5px;
    border: 1px solid var(--secondary);
    border-radius: 70px;
}

.testimonial-left img:nth-child(1),
.testimonial-right img:nth-child(3) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-left img:nth-child(2),
.testimonial-right img:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.testimonial-left img:nth-child(3),
.testimonial-right img:nth-child(1) {
    width: 50px;
    height: 50px;
    bottom: 10%;
    right: 10%;
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

.testimonial-carousel .testimonial-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--secondary);
    border-radius: 60px;
}

.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 2px solid var(--secondary);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 5px;
    left: 5px;
    border-radius: 16px;
    background: var(--secondary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}
