@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=UnifrakturMaguntia&display=swap');

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

:root {
    --clr-bg: #0f1116;
    --clr-surface: #161a21;
    --clr-surface-2: #1c212b;
    --clr-text: #e8e9ee;
    --clr-muted: #a3a8b4;
    --clr-accent: #d32f2f;
    --clr-accent-dark: #b71c1c;
    --clr-border: #262c36;
    --clr-shadow: rgba(0, 0, 0, 0.45);
}

body.light-mode {
    --clr-bg: #f5f5f5;
    --clr-surface: #ffffff;
    --clr-surface-2: #f0f0f0;
    --clr-text: #333333;
    --clr-muted: #666666;
    --clr-accent: #d32f2f;
    --clr-accent-dark: #b71c1c;
    --clr-border: #e0e0e0;
    --clr-shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--clr-text);
    background: radial-gradient(circle at top, #151822 0%, var(--clr-bg) 55%);
    scroll-behavior: smooth;
}

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

/* Header Styles */
header {
    background-color: var(--clr-surface);
    box-shadow: 0 2px 10px var(--clr-shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    background-color: var(--clr-accent);
    color: white;
    padding: 20px 0;
}

body.light-mode .header-top {
    background-color: var(--clr-accent);
    color: white;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mobile-date {
    display: none;
    font-size: 0.9em;
    margin-top: 5px;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 2.6em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Cinzel Decorative', 'UnifrakturMaguntia', serif;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.6), 0 0 18px rgba(211, 47, 47, 0.45);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0b0d12;
    border: 1px solid var(--clr-border);
    color: #fff;
    font-size: 0.9em;
    box-shadow: 0 0 12px rgba(211, 47, 47, 0.55);
}

.logo-highlight {
    color: var(--clr-accent);
    text-shadow: 0 0 12px rgba(211, 47, 47, 0.65);
}

.logo .tagline {
    font-size: 1.2em;
    font-weight: 600;
    font-style: normal;
    opacity: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
}

.header-date {
    font-size: 0.9em;
}

.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Navigation */
.main-nav {
    background: linear-gradient(135deg, var(--clr-surface-2) 0%, var(--clr-surface) 100%);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: 0 2px 8px var(--clr-shadow);
}

.main-nav ul {
    list-style: none;
    display: flex;
    padding: 15px 0;
}

.main-nav li {
    margin-right: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--clr-text);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--clr-accent);
    border-bottom-color: var(--clr-accent);
    transform: translateY(-2px);
}

/* Main Content */
main {
    padding-top: 120px;
    margin-bottom: 30px;
}

/* Featured Article */
.featured {
    margin-bottom: 40px;
}

.main-article {
    background: var(--clr-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--clr-shadow);
    border: 1px solid var(--clr-border);
}

.main-article img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.main-article h2 {
    font-size: 2em;
    margin: 20px 20px 10px;
    color: var(--clr-text);
}

.article-meta {
    margin: 0 20px 15px;
    color: var(--clr-muted);
    font-size: 0.9em;
}

.article-excerpt {
    margin: 0 20px 20px;
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--clr-text);
}

.read-more {
    display: inline-block;
    margin: 0 20px 20px;
    padding: 10px 20px;
    background-color: var(--clr-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: var(--clr-accent-dark);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--clr-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--clr-shadow);
    border: 1px solid var(--clr-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 26px var(--clr-shadow);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.category {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--clr-accent);
    color: white;
    font-size: 0.85em;
    font-weight: bold;
    border-radius: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.news-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--clr-text);
}

.news-card p {
    color: var(--clr-muted);
    margin-bottom: 15px;
}

.news-card .read-more {
    margin: 0;
}

/* Footer */
footer {
    background-color: var(--clr-surface);
    color: var(--clr-text);
    padding: 40px 0 20px;
    border-top: 1px solid var(--clr-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--clr-accent);
}

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

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

.footer-section a {
    color: var(--clr-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-section {
    text-align: center;
}

.footer-logo {
    max-width: 120px;
    height: auto;
    margin: 15px auto 0;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    filter: invert(1);
}

body.light-mode .footer-logo {
    filter: none;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    padding: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--clr-border);
    color: var(--clr-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        position: relative;
    }

    main {
        padding-top: 0;
    }

    .header-date {
        display: none;
    }

    .mobile-date {
        display: block;
    }

    .header-top .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo h1 {
        font-size: 2em;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--clr-surface);
        border-bottom: 1px solid var(--clr-border);
        padding: 10px 0;
    }

    .main-nav ul.open {
        display: flex;
    }

    .main-nav li {
        margin: 5px 15px;
    }

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

    .main-article h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5em;
    }

    .main-article img {
        height: 250px;
    }

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--clr-accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--clr-shadow);
    z-index: 1001;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--clr-accent-dark);
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--clr-surface);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--clr-border);
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--clr-shadow);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.close-modal {
    color: var(--clr-text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--clr-accent);
}

.modal-body {
    padding: 20px;
    color: var(--clr-text);
}

.modal-body img {
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.modal-body .category {
    color: var(--clr-accent);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    background-color: var(--clr-surface-2);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.modal-body h3 {
    margin: 10px 0 20px 0;
    font-size: 1.8em;
    line-height: 1.3;
}

.modal-body p {
    line-height: 1.6;
    margin-bottom: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-body h3 {
        font-size: 1.5em;
    }
}