/* Custom Stories Section CSS */
.stories-carousel .item {
    padding: 15px;
}

.story-card-new {
    position: relative;
    border-radius: 15px;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-bottom: 40px;
    /* Space for the overlapping profile image */
}

.story-card-new:hover {
    transform: translateY(-5px);
}

.story-img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    height: 250px;
    /* Fixed height for consistency */
    width: 100%;
}

.story-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    /* Darken the image slightly to make text/fire pop if needed, though reference looks natural */
    filter: brightness(0.9);
}

.story-profile-wrapper {
    position: absolute;
    bottom: -35px;
    /* Half of the 70px height */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;
    /* White border effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    border: 2px solid #fd7e14;
    /* Orange border matching theme */
}

.story-profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.story-name-new {
    text-align: center;
    margin-top: 45px;
    /* Push down below the overlapping image */
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: 'Inter', sans-serif;
}

/* Nav Arrows */
.stories-carousel .owl-nav button.owl-prev,
.stories-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8) !important;
    color: #333 !important;
    font-size: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.stories-carousel .owl-nav button.owl-prev:hover,
.stories-carousel .owl-nav button.owl-next:hover {
    background: #fff !important;
    color: #fd7e14 !important;
}

.stories-carousel .owl-nav button.owl-prev {
    left: -25px;
}

.stories-carousel .owl-nav button.owl-next {
    right: -25px;
}

/* Modal styling tweak if needed */
.modal-title {
    font-weight: 600;
    font-size: 18px;
}

/* Stylish Story Modal */
#storyModal .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
}

#storyModal .modal-content {
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    height: 85vh;
    /* Tall vertical format */
    position: relative;
}

#storyModal .modal-header {
    border-bottom: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 15px;
    align-items: center;
}

#storyModal .modal-title {
    color: #fff;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#storyModal button.close {
    color: #fff;
    opacity: 1;
    text-shadow: none;
    font-size: 28px;
    font-weight: 300;
    padding: 0;
    margin: -5px -5px 0 0;
}

#storyModal .modal-body {
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Carousel */
#storyModal .carousel,
#storyModal .carousel-inner,
#storyModal .carousel-item {
    height: 100%;
    width: 100%;
}

#storyModal .carousel-item {
    display: flex !important;
    /* Override default bootstrap block */
    align-items: center;
    justify-content: center;
    background: #000;
}

#storyModal .carousel-item img,
#storyModal .carousel-item video {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Indicators as Progress Bars */
#storyModal .carousel-indicators {
    top: 55px;
    /* Below the header/profile info? Or usually at very top. Let's put at very top. */
    top: 10px;
    bottom: auto;
    margin: 0 10px;
    justify-content: space-between;
    left: 0;
    right: 0;
    width: auto;
}

#storyModal .carousel-indicators li {
    flex: 1;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
    border: none;
    border-radius: 2px;
    opacity: 1;
}

#storyModal .carousel-indicators li.active {
    background-color: #fff;
}

/* Controls - Full height overlap */
#storyModal .carousel-control-prev,
#storyModal .carousel-control-next {
    width: 30%;
    /* wide tap areas */
    opacity: 0;
    /* invisible but clickable */
    margin-top: 0 !important;
    /* Remove inline style override if exists */
    height: 100%;
    top: 0;
}

#storyModal .carousel-control-prev:hover,
#storyModal .carousel-control-next:hover {
    opacity: 0.1;
}

/* Text Story */
#storyModal .carousel-item div.text-center {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    /* Colorful bg for text */
}

/* Move Header specific elements for correct layering */
#storyModal .modal-header img {
    border: 2px solid #fff;
    object-fit: cover;
}