/* Custom CSS for MediaInfo */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --purple-color: #6f42c1;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Top Bar */
.top-bar a {
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Navigation */
.navbar {
    transition: all 0.3s;
}

.navbar-brand {
    transition: transform 0.3s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

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

/* Featured Card */
.featured-card {
    height: 500px;
    position: relative;
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-card .card-img-top {
    height: 100%;
    object-fit: cover;
}

.featured-card .card-img-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.featured-card .overlay-content {
    padding: 20px;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
}

/* Category Cards */
.category-card {
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-10px);
}

.category-card:hover i {
    color: white !important;
}

.category-card:hover .text-muted {
    color: white !important;
}

/* Video Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.8;
}

.card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Trending Items */
.trending-item {
    cursor: pointer;
    transition: all 0.3s;
    padding: 10px;
    border-radius: 8px;
}

.trending-item:hover {
    background-color: #f8f9fa;
    padding-left: 15px;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    letter-spacing: 0.5px;
}

.bg-purple {
    background-color: var(--purple-color) !important;
}

.text-purple {
    color: var(--purple-color) !important;
}

/* Footer */
.footer {
    margin-top: 50px;
}

.footer a {
    transition: all 0.3s;
}

.footer a:hover {
    color: white !important;
    transform: translateX(5px);
}

/* Back to Top Button */
#backToTop {
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Newsletter Form */
.newsletter-form input:focus {
    box-shadow: none;
    border-color: white;
}

/* Responsive Images */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

.featured-card .card-img-top {
    height: 100%;
}

/* Tweet Styles */
.tweet {
    transition: background-color 0.3s;
    padding: 10px;
    border-radius: 8px;
}

.tweet:hover {
    background-color: #f8f9fa;
}

/* Ad Placeholder */
.ad-placeholder {
    border-radius: 8px;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .featured-card {
        height: 350px;
    }
    
    .featured-card .card-title {
        font-size: 1.2rem;
    }
    
    .top-bar .col-md-6:last-child {
        text-align: start !important;
        margin-top: 10px;
    }
    
    .nav-pills {
        font-size: 0.85rem;
    }
    
    .category-card h5 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .featured-card {
        height: 300px;
    }
    
    .featured-card .card-title {
        font-size: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .breaking-news,
    .footer,
    #backToTop,
    .ad-placeholder {
        display: none;
    }
}

/* Accessibility */
.card:focus,
.btn:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Text Selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Link Styles */
a {
    text-decoration: none;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Badge Animations */
.badge {
    animation: fadeIn 0.5s ease-out;
}

/* Image Lazy Loading Effect */
img {
    transition: opacity 0.3s;
}

img:not([src]) {
    opacity: 0;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Modal Styles (if added later) */
.modal-content {
    border-radius: 15px;
    border: none;
}

/* Spinner/Loader (if needed) */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

/* Social Media Icons */
.social-links a {
    transition: all 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
}
