/* Importing Google Font (Poppins) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* General Body Styles */
body {
    margin: 0;
    background-color: #000;
    color: #eee;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
}

a {
    text-decoration: none;
}

/* Header Styles */
header {
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

header a {
    color: #eee;
    margin-right: 40px;
}

/* Carousel Styles */
.carousel {
    height: 100vh;
    margin-top: -50px;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* Carousel Items */
.carousel .list .item {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}

.carousel .list .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Content */
.carousel .list .item .content {
    position: absolute;
    top: 20%;
    width: 1140px;
    max-width: 80%;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30%;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px #0004;
}

.carousel .list .item .author {
    font-weight: bold;
    letter-spacing: 10px;
}

.carousel .list .item .title,
.carousel .list .item .topic {
    font-size: 5em;
    font-weight: bold;
    line-height: 1.3em;
}

.carousel .list .item .topic {
    color: #f1683a;
}

/* Buttons inside Carousel */
.carousel .list .item .buttons {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Adjusts for a 50/50 width split */
    gap: 10px;
    margin-top: 20px;
}

.carousel .list .item .buttons button {
    border: none;
    background-color: #eee;
    letter-spacing: 3px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    padding: 12px;  /* Adds padding for better click area */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth transition for hover effect */
}

/* Style for the "START FREE" button - primary */
.carousel .list .item .buttons button:nth-child(1) {
    background-color: #FF5722; /* Orange background */
    color: white; /* White text for better contrast */
    border-radius: 5px; /* Rounded corners */
}

/* Hover effect for "START FREE" */
.carousel .list .item .buttons button:nth-child(1):hover {
    background-color: #e64a19; /* Darker orange on hover */
    transform: translateY(-3px); /* Slight lift on hover */
}

/* Style for the "TRY NOW" button - secondary */
.carousel .list .item .buttons button:nth-child(2) {
    background-color: transparent;
    border: 1px solid white; /* Border with the same orange color */
    color: white; /* Orange text */
    border-radius: 5px; /* Rounded corners */
}

/* Hover effect for "TRY NOW" */
.carousel .list .item .buttons button:nth-child(2):hover {
    background-color: transparent; /* Orange background on hover */
    color: white; /* White text on hover */
    transform: translateY(-3px); /* Slight lift on hover */
}


/* Thumbnail Styles */
.thumbnail {
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px;
    cursor: pointer; /* Indicate that the thumbnails are clickable */
}

.thumbnail .item {
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease; /* Add smooth hover transition */
}

.thumbnail .item:hover {
    transform: scale(1.05); /* Slightly scale up on hover to indicate interaction */
}

.thumbnail .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.thumbnail .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer; /* Make it clear that it's clickable */
}


.thumbnail .item .content {
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}


.thumbnail .item .content .title {
    font-weight: 500;
}

.thumbnail .item .content .description {
    font-weight: 300;
}

/* Arrows for Carousel Navigation */
.arrows {
    position: absolute;
    top: 80%;
    right: 52%;
    z-index: 100;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
}

.arrows button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    color: #fff;
    font-family: monospace;
    font-weight: bold;
    transition: 0.3s; /* Reduced from 0.5s */
}

.arrows button:hover {
    background-color: #fff;
    color: #000;
}

/* Animations for Carousel Content */
.carousel .list .item:nth-child(1) {
    z-index: 1;
}

/* Animation for text in the first carousel item */
.carousel .list .item:nth-child(1) .content .author,
.carousel .list .item:nth-child(1) .content .title,
.carousel .list .item:nth-child(1) .content .topic,
.carousel .list .item:nth-child(1) .content .des,
.carousel .list .item:nth-child(1) .content .buttons {
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.3s 1s linear 1 forwards; /* Reduced from 0.5s */
}

@keyframes showContent {
    to {
        transform: translateY(0px);
        filter: blur(0px);
        opacity: 1;
    }
}

/* Specific Animation Delays for Content */
.carousel .list .item:nth-child(1) .content .title {
    animation-delay: 1.2s !important;
}

.carousel .list .item:nth-child(1) .content .topic {
    animation-delay: 1.4s !important;
}

.carousel .list .item:nth-child(1) .content .des {
    animation-delay: 1.6s !important;
}

.carousel .list .item:nth-child(1) .content .buttons {
    animation-delay: 1.8s !important;
}

/* Animation when clicking Next */
.carousel.next .list .item:nth-child(1) img {
    width: 150px;
    height: 220px;
    position: absolute;
    bottom: 50px;
    left: 50%;
    border-radius: 30px;
    animation: showImage 0.3s linear 1 forwards; /* Reduced from 0.5s */
}

@keyframes showImage {
    to {
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.carousel.next .thumbnail .item:nth-last-child(1) {
    overflow: hidden;
    animation: showThumbnail 0.3s linear 1 forwards; /* Reduced from 0.5s */
}

@keyframes showThumbnail {
    from {
        width: 0;
        opacity: 0;
    }
}

/* Carousel Next Effects */
.carousel.next .thumbnail {
    animation: effectNext 0.3s linear 1 forwards; /* Reduced from 0.5s */
}

@keyframes effectNext {
    from {
        transform: translateX(150px);
    }
}

/* Running Time Indicator */
.carousel .time {
    position: absolute;
    z-index: 1000;
    width: 0%;
    height: 3px;
    background-color: #f1683a;
    left: 0;
    top: 0;
}

.carousel.next .time,
.carousel.prev .time {
    animation: runningTime 2s linear 1 forwards; /* Reduced from 3s */
}

@keyframes runningTime {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Previous Button Animation */
.carousel.prev .list .item:nth-child(2) {
    z-index: 2;
}

.carousel.prev .list .item:nth-child(2) img {
    animation: outFrame 0.3s linear 1 forwards; /* Reduced from 0.5s */
    position: absolute;
    bottom: 0;
    left: 0;
}

@keyframes outFrame {
    to {
        width: 150px;
        height: 220px;
        bottom: 50px;
        left: 50%;
        border-radius: 20px;
    }
}

.carousel.prev .thumbnail .item:nth-child(1) {
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail 0.3s linear 1 forwards; /* Reduced from 0.5s */
}

/* Disable Arrows on Animation */
.carousel.next .arrows button,
.carousel.prev .arrows button {
    pointer-events: none;
}

/* Content Animation for Prev Click */
.carousel.prev .list .item:nth-child(2) .content .author,
.carousel.prev .list .item:nth-child(2) .content .title,
.carousel.prev .list .item:nth-child(2) .content .topic,
.carousel.prev .list .item:nth-child(2) .content .des,
.carousel.prev .list .item:nth-child(2) .content .buttons {
    animation: contentOut 1s linear 1 forwards !important; /* Reduced from 1.5s */
}

@keyframes contentOut {
    to {
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

/* Media Queries for Smaller Screens */
@media screen and (max-width: 678px) {
    .carousel .list .item .content {
        padding-right: 0;
    }
    
    .carousel .list .item .content .title {
        font-size: 30px;
    }
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    width: 100%;
    min-height: 1vh;
    background: transparent;
    color: #525252;
}

/* Navbar Styles */
nav {
    background: transparent;
    width: 80%; /* Adjust the width as per your design */
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
    position: fixed; /* Fix the nav at the top */
    top: 0; /* Align to the top of the viewport */
    left: 50%; /* Center the nav horizontally */
    transform: translateX(-50%); /* Adjust the position to be perfectly centered */
    z-index: 1000; /* Ensure it appears above other content */
}

nav .logo {
    width: 100px;
    /* height: 90px; */
}

nav .user-pic { 
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 30px;
}

nav ul {
    width: 100%;
    text-align: right;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: medium;
    padding: 5px 10px; /* Add padding to create space inside the box */
    border-radius: 20px; /* Round corners */
    transition: transform 0.3s ease, color 0.3s ease; /* Smooth transition for both transform and color */
}

nav ul li a:hover {
    background-color: #f44336; /* Red background on hover */
    color: white; /* White text color on hover */
    transform: scale(0.9); /* Zoom-out effect on text */
}


/* Dropdown Menu for User Profile */
.sub-menu-wrap {
    position: absolute;
    top: 100%;
    left: 85%;
    width: 320px;
    overflow: hidden;
    transform: scaleY(0); /* Start with the dropdown hidden */
    transform-origin: top; /* Make sure it drops from the top */
    transition: transform 0.2s ease-in-out; /* Faster transition */
}

/* When the menu is open */
.sub-menu-wrap.open-menu {
    transform: scaleY(1); /* Expand to its original size */
}

/* Sub-menu styling */
.sub-menu {
    background: ivory;
    padding: 20px;
    margin: 10px;
}

/* User info in the dropdown */
.user-info {
    display: flex;
    align-items: center;
}

.user-info h3 {
    font-weight: 500;
}

.user-info img {
    width: 60px;
    border-radius: 50%;
    margin: 15px;
}

/* Separator between menu items */
.sub-menu hr {
    border: 0;
    height: 1px;
    width: 100%;
    background: #ccc;
    margin: 15px 0 10px;
}

/* Styling the menu links */
.sub-menu-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #525252;
    margin: 12px 0;
    transition: transform 0.2s ease-out, font-weight 0.2s ease-out; /* Faster hover transition */
}

/* Menu link image */
.sub-menu-link img {
    width: 40px;
    background: #e5e5e5;
    border-radius: 50%;
    padding: 8px;
    margin-right: 15px;
}

/* Menu link text */
.sub-menu-link p {
    width: 100%;
    transition: font-weight 0.2s ease-out; /* Faster text hover transition */
}

/* Menu icon */
.sub-menu-link span {
    font-size: 22px;
    transition: transform 0.2s ease-out; /* Faster icon hover transition */
}

/* Hover effect on the icon */
.sub-menu-link:hover span {
    transform: translateX(5px); /* Subtle icon shift */
}

/* Hover effect on the text */
.sub-menu-link:hover p {
    font-weight: 600;
}


/* Logout Button */
#logout-button {
    position: absolute;
    top: 32px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;  /* Ensure it's on top of other elements */
}

#logout-button:hover {
    background: #e53935;
}


/* Dropdown Menu */
/* Dropdown Container */
/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 150%; /* Position it below the Features link */
    left: 60%;
    transform: translateX(-50%); /* Centers the dropdown */
    background-color: transparent;
    width: 310px; /* Smaller width */
    /* box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2); */
    z-index: 1;
    list-style: none;
    padding: 0; /* Reduce padding for a smaller block */
    margin: 0;
    text-align: -webkit-auto; /* Center the text inside the dropdown */
    border-radius: 60px; /* Rounded edges */
}

/* Dropdown Items */
.dropdown-menu li {
    padding: 0; /* Smaller padding for each item */
}

.dropdown-menu li a {
    text-decoration: none;
    color: white;
    display: block;
    font-size: 18px; /* Smaller font size */
}

/* Show the dropdown */
.show-dropdown {
    display: block;
}
