/* Matemnews Website - Main Stylesheet */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #222;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1em;
}

a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background-color: #000;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 2px solid #d4af37;
}

.header-top ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-top a {
    color: #d4af37;
    font-size: 0.85rem;
}

.header-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d4af37;
}

.logo a {
    color: #d4af37;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    width: 200px;
}

.search-box button {
    padding: 0.5rem 1rem;
    background-color: #d4af37;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
}

.search-box button:hover {
    background-color: #ffd700;
}

/* Navigation */
nav {
    background-color: #1a1a1a;
    border-bottom: 3px solid #d4af37;
}

nav ul {
    list-style: none;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

nav li {
    flex: 1;
    min-width: 150px;
}

nav a {
    display: block;
    padding: 1rem;
    color: white;
    text-align: center;
    font-weight: 500;
    border-right: 1px solid #333;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #d4af37;
    color: #000;
    text-decoration: none;
}

nav li:last-child a {
    border-right: none;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    padding: 3rem 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
    color: #000;
}

.hero h1 {
    color: #000;
    margin-bottom: 1rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.article-card-content {
    padding: 1.5rem;
}

.article-card h3 {
    margin-bottom: 0.5rem;
}

.article-card .meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.article-card .category {
    display: inline-block;
    background-color: #d4af37;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Article Page */
.article-full {
    background: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header {
    border-bottom: 2px solid #d4af37;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

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

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background-color: #d4af37;
    color: #000;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.share-buttons a:hover {
    background-color: #ffd700;
    text-decoration: none;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 3px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #d4af37;
}

.breadcrumb span {
    color: #666;
    margin: 0 0.5rem;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar h3 {
    border-bottom: 2px solid #d4af37;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.sidebar a {
    color: #d4af37;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #ffd700;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 3px solid #d4af37;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #d4af37;
    margin-bottom: 1rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d4af37;
}

.footer-section a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .header-main {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        flex: 1;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        min-width: auto;
    }

    nav a {
        border-right: none;
        border-bottom: 1px solid #333;
    }

    nav li:last-child a {
        border-bottom: none;
    }

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

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

    .article-full {
        padding: 1rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-buttons a {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }
}

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

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    .header-top ul {
        gap: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .search-box input {
        width: 100%;
    }

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

    .container {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none;
}

.nofollow {
    /* This is a semantic marker, actual rel attribute is in HTML */
}
