/* Basic styling for the post container */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

#postsContainer {
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.post {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    font-size: 14px;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 15px;
    justify-content: space-between;
}

    .post-header img {
        border-radius: 50%;
        height: 30px;
        margin-right: 10px;
    }

    .post-header .username {
        font-weight: bold;
        color: #262626;
    }

.post-img {
    width: 100%;
    height: auto;
}

.post-actions {
    display: flex;
    gap: 15px;
    padding: 10px 15px;
} 

    .post-actions .action-icon {
        cursor: pointer;
        font-size: 20px;
    }

.post-content {
    padding: 10px 15px;
}

.like-count {
    font-weight: bold;
}

#loadMoreBtn {
    width: 100%;
    padding: 10px;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

.button-container {
    display: flex;
    gap: 10px; /* Adds space between buttons */
    flex-wrap: wrap; /* Makes buttons wrap to the next line if needed */
}


.categories-container {
    background-color: white;
    border-bottom: 1px solid #dbdbdb;
    padding: 10px 0;
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide the scrollbar that might appear on container */
}

/* Horizontal Scrolling Wrapper */
.categories-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    white-space: nowrap;
    padding: 0 15px;
    gap: 8px;
}

    /* Hide scrollbar for Chrome/Safari */
    .categories-scroll::-webkit-scrollbar {
        display: none;
    }

/* Form styling */
.category-form {
    display: inline-block;
    margin: 0;
    padding: 0;
    flex: 0 0 auto; /* Prevent forms from shrinking/growing */
}

/* Category button styling */
.category {
    color:black;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background-color: #efefef;
    cursor: pointer;
    border: none;
    outline: none;
    margin: 0;

    transition: background-color 0.2s ease;
}

    /* Active category */
    .category.active {
        background-color: #262626;
        color: white;
    }

    /* Hover states */
    .category:hover {
        background-color: #e0e0e0;
    }

    .category.active:hover {
        background-color: #262626;
    }



.stories-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stories-container {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    width: max-content;
}

.story {
    width: 100px;
    height: 160px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #1877f2;
    position: absolute;
    bottom: 8px;
    left: 8px;
    object-fit: cover;
}

.story-username {
    position: absolute;
    bottom: 12px;
    left: 48px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Ads Section */
.ads-container {
    padding: 10px 0;
    border-bottom: 1px solid #dbdbdb;
    position: relative;
    overflow: hidden;
    height: 120px;
}

.ads-wrapper {
    display: flex;
    width: 300%;
    animation: swipe 15s infinite;
}

@keyframes swipe {
    0%, 30% {
        transform: translateX(0);
    }

    35%, 65% {
        transform: translateX(-33.33%);
    }

    70%, 100% {
        transform: translateX(-66.66%);
    }
}

.ad-slide {
    width: 33.33%;
    padding: 0 5px;
}

.ad-content {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

    .ad-content h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .ad-content p {
        font-size: 12px;
    }





.post {
    border: 1px solid #dbdbdb;
    width: 100%;
    background: white;
    border: 1px solid var(--ig-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-content {
    display: flex;
    padding: 16px;
    align-items: center;
}

.image-container {
    position: relative;
    margin-right: 16px;
}

.oval-image-bg {
    width: 80px;
    height: 80px;
    background-color: var(--black-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.post-image {
    object-fit: cover;
    height: 400px;
    width: 100%;
}

.post-header {
    flex: 1;
}

.username {
    font-weight: 600;
    font-size: 14px;
    color: var(--ig-text-dark);
    display: block;
    margin-bottom: 4px;
}

.user-tag {
    font-size: 12px;
    color: var(--food-tag);
    font-weight: 500;
}

.cta-section {
    text-decoration: none;
    color:black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-top: 1px solid var(--ig-border);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .cta-section:hover {
        background-color: rgba(0,0,0,0.02);
    }

.cta-text {
    font-weight: 600;
    font-size: 14px;
}

.earn-amount {
    color: var(--ig-blue);
}

.cta-arrow {
    color: var(--ig-blue);
    font-size: 14px;
}