/* Custom Enhancements CSS */

/* Global Improvements */
* {
    transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: #2c3e50;
}

/* Background Gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Modern Topbar */
.topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

.topbar .container {
    max-width: 1200px;
}

.topbar-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.topbar-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.topbar-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.topbar-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:hover::before {
    opacity: 1;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.facebook { background: linear-gradient(135deg, #3b5998, #8b9dc3); }
.social-btn.twitter { background: linear-gradient(135deg, #1da1f2, #0d95e8); }
.social-btn.instagram { background: linear-gradient(135deg, #e4405f, #fccc63); }
.social-btn.linkedin { background: linear-gradient(135deg, #0077b5, #00a0dc); }
.social-btn.youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }
.social-btn.vimeo { background: linear-gradient(135deg, #1ab7ea, #1fc7ea); }

/* Header Improvements */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    padding: 10px 20px !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    transform: translateY(-2px);
}

.search-form {
    position: relative;
    margin-left: 20px;
}

.search-form .form-control {
    border-radius: 25px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 45px 10px 20px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    background: white;
    color: #2c3e50;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    width: 300px;
}

.search-form .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Cards and Components */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Sidebar Enhancements */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.7s;
}

.section-title:hover::before {
    left: 100%;
}

.list-group-item {
    border: none;
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px solid #f8f9fa !important;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding-left: 25px;
    border-left: 4px solid #667eea;
}

/* Animation Classes */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.transition-all {
    transition: all 0.3s ease;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Newsletter Form */
.newsletter-form {
    position: relative;
}

.newsletter-form .form-control {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 12px 120px 12px 20px;
    transition: all 0.3s ease;
}

.newsletter-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.newsletter-form .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
}

/* Tags */
.tag-item {
    display: inline-block;
    padding: 5px 15px;
    margin: 3px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.1;
}

.footer-content {
    position: relative;
    z-index: 1;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .topbar-card {
        margin: 10px 0;
    }
    
    .search-form .form-control {
        width: 200px;
    }
    
    .search-form .form-control:focus {
        width: 220px;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* Additional Modern Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-modern {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.shadow-hover:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Quote Styling */
.blockquote {
    position: relative;
    font-style: italic;
    padding: 20px;
    margin: 20px 0;
}

.blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #667eea;
    position: absolute;
    top: -10px;
    left: -10px;
    font-family: serif;
    opacity: 0.3;
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Breaking News Enhanced */
.breaking-news {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    overflow: hidden;
    position: relative;
}

.breaking-news::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: breaking-shine 3s infinite;
}

@keyframes breaking-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.breaking-news-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.breaking-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 20px;
    white-space: nowrap;
}

/* Enhanced Hover Effects */
.hover-lift:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hover-shadow:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Real-time Clock Animation */
#current-time {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Tag Item Enhanced */
.tag-item {
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    background: none !important;
    font-family: inherit;
    cursor: pointer;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.tag-item:hover::before {
    left: 100%;
}

.tag-search-form {
    margin: 2px !important;
    padding: 0 !important;
}

.tag-search-form .tag-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-search-form .tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tag-search-form .tag-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading state for tag buttons */
.tag-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tag-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid transparent;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Animation for Images */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* Improved Responsive Design */
@media (max-width: 768px) {
    .breaking-news-content {
        font-size: 0.9rem;
        animation-duration: 40s;
    }
    
    .breaking-badge {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .hover-lift:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Enhanced Button Styles */
.btn-rounded-pill {
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .breaking-news,
    .social-btn,
    .newsletter-form {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
}
