/* /portal/css/home.css */

/* --- Stories Row (Modernized) --- */
.stories-carousel {
    padding: 20px 0 30px 0; /* Breathing room */
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 10px;
    align-items: center;
}
.stories-carousel::-webkit-scrollbar { display: none; }

.story-item {
    flex: 0 0 110px; /* Wider, cleaner shape */
    height: 190px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 3px solid transparent; /* Reserve space for ring */
    background-clip: padding-box; /* Needed for gradient border trick */
}

/* Gradient Ring for Unseen Stories */
.story-item.unseen {
    background: linear-gradient(#fff, #fff) padding-box,
                var(--gradient-primary) border-box;
    /* This creates the gradient border effect */
}

.story-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.story-item .story-bg {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
    transition: transform 0.5s ease;
}
.story-item:hover .story-bg { transform: scale(1.1); }

/* Avatar Badge */
.story-item .story-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 3px solid var(--primary-accent);
    position: absolute;
    top: 10px; left: 10px;
    z-index: 3;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Name Label */
.story-item span {
    position: absolute;
    bottom: 12px; left: 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.2;
}

/* Dark Gradient Overlay for text legibility */
.story-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    z-index: 2;
}

/* --- "Create Story" Special Card --- */
.story-item.create-story {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Align content to bottom like others */
    border: none;
    box-shadow: var(--box-shadow);
}

.story-item.create-story .story-bg {
    height: 70%; /* Image only takes top part */
    top: 0;
    object-position: center;
    filter: brightness(0.9);
}

.create-story-btn-overlay {
    position: absolute;
    bottom: 35px; /* Sits on the seam */
    width: 36px; height: 36px;
    background: var(--primary-color);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    z-index: 4;
    transition: transform 0.2s ease;
}
.story-item.create-story:hover .create-story-btn-overlay {
    transform: scale(1.1) rotate(90deg);
}

.story-item.create-story span {
    position: relative;
    bottom: auto; left: auto;
    color: var(--text-primary);
    text-shadow: none;
    margin-bottom: 12px;
    font-size: 13px;
}
.story-item.create-story::after { display: none; }


/* --- Create Post (Minimalist) --- */
.create-post-card {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 50px; /* Pill shape */
    box-shadow: var(--shadow-primary); /* Slight glow */
    background: white;
    margin-bottom: 25px;
}
.create-post-card .profile-avatar {
    width: 40px; height: 40px;
    flex-shrink: 0; border-radius: 50%;
}
.create-post-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: var(--text-primary);
    cursor: text;
}
.create-post-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.create-post-btn:hover { transform: rotate(90deg); }


/* --- NEW: Community News Card (The Redesign) --- */
.feed-post-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.7);
}

/* 1. Hero Image (Top) */
.post-hero-image {
    width: 100%;
    height: 240px; /* Taller for impact */
    object-fit: cover;
    display: block;
    cursor: default;
}

/* 2. Content Body */
.post-body {
    padding: 20px 25px 10px 25px;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.post-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-accent);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
}
.post-timestamp {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.post-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

/* 3. Footer (Author & Actions) */
.post-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}

.post-author-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}
.post-author-compact img {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.post-author-compact span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.post-actions-compact {
    display: flex;
    gap: 20px;
}
.icon-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px; /* Slightly larger icons */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.icon-action-btn span { font-size: 14px; font-weight: 600; }
.icon-action-btn:hover { color: var(--primary-accent); transform: translateY(-2px); }
.icon-action-btn.active { color: var(--pop-rose); }
.icon-action-btn.active i { animation: popHeart 0.3s ease; }

@keyframes popHeart {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}


/* --- Widget Cards (Side Column) --- */
.widget-card .card-header {
    padding: 20px;
    background: white; /* Clean white header */
    border-bottom: 1px solid var(--border-light);
}
.widget-card .card-content {
    padding: 20px;
}

/* Event Specifics */
.event-highlight {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 15px;
    border-left: 5px solid var(--pop-blue);
    transition: transform 0.2s;
}
.event-highlight:hover { transform: translateX(5px); }

.event-time { color: var(--pop-blue); font-weight: 700; font-size: 12px; margin-bottom: 6px; display:block;}
.event-title { font-size: 17px; margin: 0 0 8px 0; font-weight: 700; }
.event-location { font-size: 13px; display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }

/* Wallet Specifics */
.wallet-highlight {
    text-align: center;
    padding: 15px 0;
}
.wallet-balance {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    background: -webkit-linear-gradient(45deg, var(--pop-amber), var(--pop-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 5px 0;
    display: block;
}
.wallet-currency { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }