/* ==========================================
   InfoPortal77 - News Portal Stylesheet
   Primary: #dc2626 (Red/Crimson)
   ========================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fecaca;
    --dark: #111827;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-400: #9ca3af;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-700);
    background-color: var(--gray-100);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-size: 1.35rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.02em;
}

.nav-logo:hover {
    color: var(--dark);
}

.nav-logo .logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-logo strong {
    color: var(--primary);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--gray-700);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Breaking News Bar --- */
.breaking-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    overflow: hidden;
}

.breaking-bar .container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.breaking-label {
    background: var(--white);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.breaking-text {
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
}

.breaking-text span {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

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

/* --- Hero Section --- */
.hero-section {
    background: var(--white);
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--gray-200);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.hero-main {
    padding-right: 16px;
}

.category-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 14px;
}

.hero-main h1 {
    font-size: 2rem;
    line-height: 1.25;
    color: var(--dark);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-excerpt {
    font-size: 1.05rem;
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.btn-read {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
}

.btn-read:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.hero-sidebar {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
}

.sidebar-title {
    font-size: 1rem;
    color: var(--dark);
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: block;
    padding: 10px 0;
    color: var(--gray-700);
    font-size: 0.88rem;
    line-height: 1.45;
    transition: color 0.2s;
}

.sidebar-list a:hover {
    color: var(--primary);
}

.sidebar-time {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
    margin-right: 8px;
    min-width: 42px;
}

/* --- News Grid Section --- */
.news-section {
    padding: 48px 0;
}

.section-title {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-img-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 3px;
    z-index: 2;
}

.card-body {
    padding: 18px 20px 20px;
}

.card-body h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--dark);
}

.card-body h3 a {
    color: inherit;
}

.card-body h3 a:hover {
    color: var(--primary);
}

.card-body p {
    font-size: 0.87rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--gray-400);
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.card-meta a {
    font-weight: 600;
    font-size: 0.8rem;
}

/* --- Info Section --- */
.info-section {
    background: var(--white);
    padding: 48px 0;
    border-top: 1px solid var(--gray-200);
}

.info-content {
    max-width: 820px;
}

.info-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.info-content p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-600);
}

.info-content a {
    font-weight: 600;
}

/* --- Article Page Styles --- */
.article-header {
    background: var(--white);
    padding: 28px 0 32px;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--gray-400);
}

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

.article-header h1 {
    font-size: 2.1rem;
    color: var(--dark);
    line-height: 1.25;
    margin: 14px 0 18px;
    max-width: 780px;
    letter-spacing: -0.02em;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.84rem;
    color: var(--gray-400);
}

.article-meta strong {
    color: var(--gray-600);
}

/* --- Article Layout --- */
.article-section {
    padding: 40px 0 56px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.article-body {
    background: var(--white);
    padding: 36px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.article-body h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin: 32px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    line-height: 1.35;
}

.article-body p {
    margin-bottom: 18px;
    font-size: 0.98rem;
    line-height: 1.85;
    color: var(--gray-600);
}

.article-body ul {
    margin: 16px 0 24px 20px;
}

.article-body ul li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray-600);
}

.article-body ul li strong {
    color: var(--dark);
}

.article-tags {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.article-tags strong {
    color: var(--gray-600);
}

.article-tags a {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: background 0.2s, color 0.2s;
}

.article-tags a:hover {
    background: var(--primary);
    color: var(--white);
}

/* --- Article Sidebar --- */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.popular-list {
    padding-left: 20px;
}

.popular-list li {
    margin-bottom: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.popular-list a {
    color: var(--gray-700);
}

.popular-list a:hover {
    color: var(--primary);
}

.sidebar-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.sidebar-cta h3 {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,0.3);
}

.sidebar-cta p {
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.92;
    margin-bottom: 16px;
}

.btn-cta {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* --- Footer --- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    color: var(--primary);
}

.footer-col p {
    font-size: 0.87rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: var(--gray-400);
    font-size: 0.87rem;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding: 20px 0;
    text-align: center;
    font-size: 0.82rem;
}

.footer-bottom a {
    color: var(--primary-light);
    font-weight: 600;
}

.footer-bottom a:hover {
    color: var(--white);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 280px;
        gap: 24px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns: 1fr 260px;
        gap: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px 20px 20px;
        border-bottom: 3px solid var(--primary);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main {
        padding-right: 0;
    }

    .hero-main h1 {
        font-size: 1.55rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-body {
        padding: 24px 20px;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .breaking-text {
        font-size: 0.8rem;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .hero-main h1 {
        font-size: 1.3rem;
    }

    .article-header h1 {
        font-size: 1.25rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 4px;
    }

    .article-meta {
        flex-direction: column;
        gap: 6px;
    }

    .card-img-placeholder {
        height: 130px;
    }
}
