/**
 * News365 - Professional Enterprise Stylesheet
 * Modern, clean and professional newspaper design
 */

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
    --border-color: #e2e8f0;
    --font-serif: 'Merriweather', 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: #ffffff;
    color: #374151;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-light);
}

/* Top Bar - Premium Look */
.top-bar {
    font-size: 0.813rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.top-bar a:hover {
    color: #ffffff;
}

/* Header & Navigation - Enterprise Grade */
.navbar-brand {
    font-family: var(--font-serif);
    letter-spacing: -0.5px;
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar {
    border-bottom: 3px solid var(--primary-color);
    background: #ffffff !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-nav {
    gap: 0.25rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.813rem;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.5px;
    color: #4b5563;
    position: relative;
}

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

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(30, 58, 138, 0.05);
}

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

.navbar-nav .nav-link .badge {
    font-size: 0.625rem;
    padding: 0.2rem 0.4rem;
}

/* Dropdown Menu - Modern Style */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 250px;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: rgba(30, 58, 138, 0.08);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Breaking News Ticker - Enhanced */
.breaking-news {
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: var(--shadow);
}

.news-ticker {
    display: flex;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
    padding: 0.25rem 0;
}

.news-ticker:hover {
    animation-play-state: paused;
}

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

.breaking-news .badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow);
}

/* Featured Section - Premium Design */
.featured-main {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-main:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl) !important;
}

.featured-main .card-img-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    padding: 2rem;
}

.featured-main h2 {
    font-size: 2rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* News Cards - Enterprise Quality */
.news-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-light);
}

.news-card .card-img-top {
    transition: transform 0.3s ease;
}

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

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .card-title {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.news-card .card-title a {
    color: inherit;
    transition: color 0.2s;
}

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

.news-card .card-text {
    font-size: 0.938rem;
    line-height: 1.6;
    color: #6b7280;
}

/* Section Titles - Professional */
.section-title {
    font-family: var(--font-serif);
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

/* Category Badges - Modern & Clean */
.badge {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.688rem;
    padding: 0.375rem 0.75rem;
    letter-spacing: 0.5px;
    border-radius: 0.375rem;
}

/* Article Page - Premium Typography */
.article-full {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
}

.article-meta {
    font-size: 0.875rem;
    color: #6b7280;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.article-meta a {
    color: var(--primary-color);
    font-weight: 600;
}

.article-summary {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #4b5563;
    font-style: italic;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.article-content,
.article-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.9;
    color: #1f2937;
}

.article-content p,
.article-text {
    margin-bottom: 1.5rem;
}

.article-content strong {
    font-weight: 700;
    color: #111827;
}

.article-content em {
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.article-image img {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.article-source {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: none;
    border-left: 4px solid var(--info-color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.article-source a {
    font-weight: 600;
    color: var(--primary-color);
}

/* Sidebar Widgets - Professional Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.card-body {
    padding: 1.25rem;
}

/* Popular Widget - Enhanced */
.number-badge .badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

/* Footer - Professional */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    font-size: 0.875rem;
    margin-top: 4rem;
}

footer h5 {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.938rem;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

footer a:hover {
    color: #ffffff;
    padding-left: 4px;
}

footer ul li {
    margin-bottom: 0.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Pagination - Modern */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    color: var(--primary-color);
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Breadcrumb - Clean */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.25rem;
    color: #9ca3af;
}

/* Category Header - Premium */
.category-header {
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, transparent 100%);
}

.category-header h1,
.category-header p {
    position: relative;
    z-index: 1;
}

/* Search Form - Modern */
.input-group .form-control {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem 0 0 0.5rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s;
}

.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    outline: none;
}

.input-group .btn {
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
}

/* Buttons - Professional */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Archive/Hemeroteca - Timeline Style */
.archive-timeline {
    position: relative;
    padding-left: 40px;
}

.archive-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

.archive-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.archive-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Share Buttons - Modern */
.article-share .btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.article-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Related Articles */
.related-articles .card {
    transition: all 0.3s;
    border-radius: 0.5rem;
}

.related-articles .card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.75rem;
    }

    .featured-main img {
        height: 350px !important;
    }

    .article-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .featured-main img {
        height: 300px !important;
    }

    .featured-main h2 {
        font-size: 1.5rem;
    }

    .news-card .card-title {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .news-ticker {
        animation-duration: 25s;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-content {
        font-size: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .top-bar {
        text-align: center;
    }

    .top-bar .col-md-6:last-child {
        margin-top: 10px;
    }

    .featured-main img {
        height: 200px !important;
    }

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

    .article-full {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .navbar,
    .breaking-news,
    footer,
    .sidebar,
    .pagination,
    .article-share,
    .btn {
        display: none !important;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }

    body {
        background: white;
        color: black;
    }

    .article-full {
        box-shadow: none;
        padding: 0;
    }
}

/* Accessibility Improvements */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

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

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-smooth {
    box-shadow: var(--shadow);
}

.shadow-smooth-lg {
    box-shadow: var(--shadow-lg);
}

/* Navbar dropdown on hover (desktop) */
@media (min-width: 992px) {
    .navbar .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block !important;
        margin-top: 0;
    }
}
