/**
 * Live Category Styles
 * 
 * @package MashaalDigital
 * @version 1.0.0
 */

/* ================================
   LIVE BANNER - HOMEPAGE
   ================================ */
.live-banner-section {
    width: 100%;
    max-width: 100%;
    margin: 0 0 30px 0;
    position: relative;
}

.live-banner-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.live-banner-container {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 500px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-banner-image {
    position: relative;
    width: 100%;
    height: auto;
}

.live-banner-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.live-banner-link:hover .live-banner-image img {
    transform: scale(1.02);
}

.live-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(0,0,0,0.5) 75%,
        rgba(0,0,0,0.85) 100%
    );
    pointer-events: none;
}

.live-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    z-index: 2;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 15px;
    animation: pulse-badge 2s infinite;
}

.live-badge i {
    font-size: 0.7rem;
    animation: blink 1.5s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.live-banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.live-banner-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
}

.live-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ================================
   LIVE CATEGORY HEADER
   ================================ */
.live-category-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 4px solid #bd2130;
}

.live-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.live-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.live-badge-large i {
    font-size: 0.8rem;
}

.pulse-animation {
    animation: blink 1.5s infinite;
}

.live-category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.live-category-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin: 0 0 20px 0;
}

.live-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.live-refresh-indicator i {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#refresh-countdown {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* ================================
   LIVE POSTS TIMELINE
   ================================ */
.live-page-container {
    background: #f8f9fa;
}

.live-posts-timeline {
    position: relative;
    padding: 20px 0;
}

.live-post-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.live-post-item:not(:last-child):after {
    content: '';
    position: absolute;
    left: 60px;
    top: 80px;
    bottom: -40px;
    width: 2px;
    background: linear-gradient(to bottom, #dc3545, #e0e0e0);
}

/* ================================
   TIMESTAMP
   ================================ */
.live-post-timestamp {
    text-align: center;
    position: relative;
    z-index: 2;
}

.live-time-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.live-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ================================
   POST CARD
   ================================ */
.live-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-right: 4px solid #dc3545;
}

.live-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.live-post-thumbnail {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.live-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.live-post-card:hover .live-post-thumbnail img {
    transform: scale(1.1);
}

.live-post-details {
    padding: 25px;
}

.live-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 15px 0;
}

.live-post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.live-post-title a:hover {
    color: #dc3545;
}

.live-post-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.live-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.live-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.live-meta-item i {
    color: #dc3545;
}

.live-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.live-read-more:hover {
    background: #c82333;
    transform: translateX(-5px);
}

/* ================================
   NO POSTS MESSAGE
   ================================ */
.no-live-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.no-live-posts h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-live-posts p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    .live-banner-container {
        max-height: 350px;
    }
    
    .live-banner-image img {
        max-height: 350px;
    }
    
    .live-banner-content {
        padding: 25px;
    }
    
    .live-banner-title {
        font-size: 1.8rem;
    }
    
    .live-category-title {
        font-size: 2rem;
    }
    
    .live-post-item {
        grid-template-columns: 100px 1fr;
        gap: 20px;
    }
    
    .live-post-item:not(:last-child):after {
        left: 50px;
    }
    
    .live-time-badge {
        font-size: 1rem;
        padding: 8px 12px;
    }
    
    .live-post-title {
        font-size: 1.3rem;
    }
    
    .live-post-thumbnail {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .live-banner-container {
        max-height: 280px;
    }
    
    .live-banner-image img {
        max-height: 280px;
    }
    
    .live-banner-content {
        padding: 20px;
    }
    
    .live-banner-title {
        font-size: 1.5rem;
    }
    
    .live-badge {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .live-category-title {
        font-size: 1.6rem;
    }
    
    .live-post-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .live-post-item:not(:last-child):after {
        display: none;
    }
    
    .live-post-timestamp {
        text-align: right;
    }
    
    .live-time-badge {
        display: inline-flex;
    }
    
    .live-post-details {
        padding: 20px;
    }
    
    .live-post-title {
        font-size: 1.2rem;
    }
}

/* ================================
   NEW POST NOTIFICATION
   ================================ */
.new-post-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.new-post-notification i {
    animation: ring 1s infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
}

.new-post-notification .refresh-now {
    color: white;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}

.new-post-notification .refresh-now:hover {
    text-decoration: none;
}

/* ================================
   SCROLL TO TOP BUTTON
   ================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    background: #c82333;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .new-post-notification {
        left: 10px;
        right: 10px;
        transform: none;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
