/* News Elite - Main Stylesheet */

:root {
    --portal-primary: #1a237e;
    --portal-secondary: #c62828;
    --portal-accent: #ff6f00;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Top Bar */
.top-bar {
    font-size: 0.85rem;
}

/* Navbar */
.navbar.bg-primary {
    background-color: var(--portal-primary) !important;
}

/* Breaking News Ticker */
.breaking-news-ticker {
    overflow: hidden;
}

.ticker-content {
    flex: 1;
    position: relative;
}

.ticker-scroll {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Blink animation for live indicator */
.blink {
    animation: blink-animation 1s steps(2, start) infinite;
    font-size: 0.6rem;
    vertical-align: middle;
}

@keyframes blink-animation {
    to { visibility: hidden; }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    min-height: 450px;
}

.hero-section img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 3rem 2rem 2rem;
    color: white;
}

.hero-overlay h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

/* News Cards */
.news-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.news-card .card-title a {
    color: #212529;
    text-decoration: none;
}

.news-card .card-title a:hover {
    color: var(--portal-primary);
}

/* Category Badge */
.category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Headers */
.section-header {
    border-left: 4px solid var(--portal-secondary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Most Read Widget */
.most-read-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.most-read-item:last-child {
    border-bottom: none;
}

.most-read-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--portal-secondary);
    min-width: 35px;
    line-height: 1;
}

.most-read-item a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.most-read-item a:hover {
    color: var(--portal-primary);
}

/* Article Detail */
.article-header .lead {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.6;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-body p {
    margin-bottom: 1.5rem;
}

/* Author Card */
.author-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.author-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* Tags */
.tag-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
    margin: 0.2rem;
}

.tag-badge:hover {
    background-color: var(--portal-primary);
    color: white;
}

/* Share Buttons */
.share-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.8;
    color: white;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.whatsapp { background-color: #25d366; }
.share-btn.email { background-color: #6c757d; }

/* Video Cards */
.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--portal-secondary);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Live Stream */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Pagination */
.pagination .page-link {
    color: var(--portal-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--portal-primary);
    border-color: var(--portal-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
    }

    .hero-section img {
        height: 300px;
    }

    .hero-overlay h1 {
        font-size: 1.4rem;
    }

    .news-card .card-img-top {
        height: 150px;
    }
}

/* Utility */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* Hero Carousel */
#heroCarousel .carousel-item {
    min-height: 420px;
}

#heroCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background-color: transparent;
    opacity: 0.7;
    transition: all 0.3s;
}

#heroCarousel .carousel-indicators button.active {
    background-color: white;
    opacity: 1;
    transform: scale(1.2);
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 50px;
    opacity: 0;
    transition: opacity 0.3s;
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
    opacity: 1;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 20px;
    background-size: 50%;
}

/* Gallery Carousel (Article Detail) */
#galeriaCarousel .carousel-item img {
    width: 100%;
}

#galeriaCarousel .carousel-caption {
    bottom: 10px;
    left: 0;
    right: 0;
    padding: 0 1rem;
}

#galeriaCarousel .carousel-control-prev-icon,
#galeriaCarousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 18px;
    background-size: 50%;
}

.galeria-thumb {
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.galeria-thumb:hover img {
    opacity: 1 !important;
    border-color: var(--portal-primary) !important;
}

.galeria-thumb.active img {
    opacity: 1 !important;
    border-color: var(--portal-primary) !important;
}
