/* --- Global Styles --- */
:root {
    --ign-red: #ff2e35;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Layout & Sections --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Hero Components --- */
.hero-main {
    display: block;
    grid-column: span 1;
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-card);
    color: inherit;
}

@media (min-width: 1024px) {
    .hero-main {
        grid-column: span 2;
    }
}

.hero-sub-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    height: 190px;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card);
    color: inherit;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: #ffffff;
}

.hero-overlay h2, .hero-overlay h3 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-overlay p {
    color: #e5e7eb !important;
}

.category-tag {
    color: var(--ign-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    background-color: #fee2e2;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.hero-overlay .category-tag {
    background-color: var(--ign-red);
    color: #ffffff;
}

/* --- Article Cards --- */
.article-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 46, 53, 0.2);
}

.article-image-wrapper {
    width: 100%;
    height: 12rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: var(--border-color);
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-image-wrapper img {
    transform: scale(1.05);
}

.article-card h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.article-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* --- Base Additions & Interactions --- */
.article-link {
    cursor: pointer;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.article-link:active {
    opacity: 0.75;
    transform: scale(0.99);
}

/* --- Navigation Links --- */
.nav-link {
    cursor: pointer;
    position: relative;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--ign-red);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Article Details Typography Optimization --- */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.prose {
    color: var(--text-primary);
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.75rem;
    line-height: 1.8;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: #232933;
}

/* --- Logo Interaction --- */
.logo-text {
    cursor: pointer;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo-text:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.logo-accent {
    background-color: var(--ign-red);
    color: #ffffff;
    padding: 0 0.5rem;
    margin-right: 0.25rem;
}

/* --- Site Navigation --- */
.site-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.site-nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.nav-toggle:hover {
    background-color: var(--bg-main);
}

.nav-toggle-bar {
    display: block;
    width: 1.125rem;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.site-nav.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 9999px;
    background-color: var(--bg-main);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-icon-btn:hover {
    color: var(--text-primary);
    background-color: #ffffff;
}

.nav-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (max-width: 767px) {
    .site-nav-inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding-bottom: 0.75rem;
        border-top: 1px solid var(--border-color);
        margin-top: -0.25rem;
        padding-top: 0.5rem;
    }

    .site-nav.is-open .site-nav-menu {
        display: flex;
    }

    .site-nav-menu .nav-link {
        padding: 0.75rem 0;
        font-size: 1rem;
    }

    .site-nav-menu .nav-link::after {
        bottom: 0.5rem;
    }
}

@media (min-width: 768px) {
    .site-nav-actions {
        margin-left: 0;
        order: 3;
    }

    .site-nav-menu {
        margin-left: auto;
        order: 2;
    }

    .site-nav-inner > .logo-text {
        order: 1;
    }
}

/* --- Site Footer --- */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 1rem;
}

.site-footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--ign-red);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* --- Legal Pages --- */
.legal-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.legal-page h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-primary);
}

.legal-page p,
.legal-page li {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.legal-page ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page a {
    color: var(--ign-red);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-lead {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.contact-email {
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.cookie-banner-inner {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-banner-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--ign-red);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn-accept {
    background-color: var(--ign-red);
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background-color: #e0262c;
}

.cookie-btn-reject {
    background-color: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.cookie-btn-reject:hover {
    background-color: var(--bg-main);
}

/* --- AdSense Ad Containers --- */
.ad-container {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 1.5rem 0;
    text-align: center;
    overflow: hidden;
}

.ad-container ins.adsbygoogle {
    display: block;
    margin: 0 auto;
}

.ad-container--loaded {
    min-height: 90px;
}

.ad-container--debug {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
}

.ad-container-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-grid > .ad-container {
    grid-column: 1 / -1;
}

.ad-container-legal {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Layout Utilities --- */
.main-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .main-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

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

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* --- Hero Typography --- */
.hero-sub-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.hero-excerpt {
    color: #e5e7eb;
    font-size: 0.875rem;
}

.hero-sub-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.hero-main img,
.hero-sub-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main img {
    min-height: 400px;
}

/* --- Section Header --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- Article Card Extended --- */
.article-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.article-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 0.25rem;
}

.category-label {
    color: var(--ign-red);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.article-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex: 1;
}

.article-card-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* --- Article Detail Page --- */
.article-detail {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1rem 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--text-primary);
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 3rem;
    }
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.article-hero-image {
    width: 100%;
    height: 300px;
    border-radius: 0.75rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .article-hero-image {
        height: 450px;
    }
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-lead {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--ign-red);
    line-height: 1.6;
    font-style: italic;
    background: linear-gradient(to right, rgba(248, 249, 250, 0.8), transparent);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-right: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

@media (min-width: 768px) {
    .article-lead {
        font-size: 1.5rem;
    }
}

.article-paragraph {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.empty-state h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-link {
    color: var(--ign-red);
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.btn-link:hover {
    opacity: 0.8;
}

/* --- Article Editorial Notice --- */
.editorial-notice {
    font-size: 0.8125rem;
    color: var(--text-muted);
    border-left: 3px solid var(--border-color);
    padding-left: 0.75rem;
    margin-top: 2rem;
}