/**
 * Editorial Homepage CSS v2
 * Refined layout based on improved design
 */

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.5;
}

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

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

/* ========== TYPOGRAPHY ========== */
.font-headline {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.font-sans {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== HEADER ========== */
.header {
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

@media (min-width: 768px) {
    .header-inner {
        padding: 1rem 1.5rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #666;
    font-size: 0.8125rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    transition: color 0.2s;
}

.search-btn:hover {
    color: #1a1a1a;
}

.search-text {
    display: none;
}

@media (min-width: 768px) {
    .search-text {
        display: inline;
    }
}

.site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #1a1a1a;
    text-transform: uppercase;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 768px) {
    .site-title {
        font-size: 1.5rem;
        letter-spacing: 0.02em;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.lang-switch {
    display: none;
    align-items: center;
    font-size: 0.8125rem;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .lang-switch {
        display: flex;
    }
}

.lang-switch a {
    padding: 0.25rem 0.5rem;
    color: #999;
    transition: color 0.2s;
}

.lang-switch a:hover {
    color: #1a1a1a;
}

.lang-switch a.active {
    color: #1a1a1a;
    font-weight: 600;
}

.lang-divider {
    color: #ddd;
}

/* ========== NAV ========== */
.nav {
    border-bottom: 1px solid #e5e5e5;
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: block;
    }
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.nav a {
    display: block;
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    color: #444;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav a:hover {
    color: #1a1a1a;
}

.nav a.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* ========== MAIN LAYOUT ========== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background-color: #ffffff;
}

@media (min-width: 1024px) {
    .main {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 3rem;
        padding: 2.5rem 1.5rem;
    }
}

.content {
    min-width: 0;
    background-color: #ffffff;
}

/* ========== FEATURED ARTICLE ========== */
.featured {
    margin-bottom: 1.5rem;
    background-color: #ffffff;
}

@media (min-width: 768px) {
    .featured {
        margin-bottom: 2.5rem;
    }
}

.featured-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 2/1;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .featured-image-link {
        aspect-ratio: 16/9;
        margin-bottom: 1.25rem;
    }
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
    transition: transform 0.3s ease;
}

.featured-image-link:hover .featured-image {
    transform: scale(1.02);
}

.featured-category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .featured-category {
        margin-bottom: 0.75rem;
    }
}

.featured-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.25;
    color: #1a1a1a;
    margin-bottom: 0.625rem;
}

.featured-title a {
    transition: color 0.2s;
}

.featured-title a:hover {
    color: #444;
}

@media (min-width: 768px) {
    .featured-title {
        font-size: 2.25rem;
        margin-bottom: 0.75rem;
    }
}

.featured-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #666;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .featured-subtitle {
        font-size: 1.125rem;
        color: #555;
        margin-bottom: 1rem;
    }
}

.featured-meta {
    font-size: 0.875rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-dot {
    width: 3px;
    height: 3px;
    background: #ccc;
    border-radius: 50%;
}

.tag-new {
    color: #2e7d32;
    font-weight: 600;
}

/* ========== ARTICLE LIST ========== */
.article-list {
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
    background-color: #ffffff;
}

.article-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e5e5e5;
    background-color: #ffffff;
}

.article-item:last-child {
    border-bottom: none;
}

.article-thumb-link {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    overflow: hidden;
}

.article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
    transition: transform 0.3s ease;
}

.article-thumb-link:hover .article-thumb {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .article-thumb-link {
        width: 140px;
        height: 95px;
    }
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.article-title a {
    transition: color 0.2s;
}

.article-title a:hover {
    color: #444;
}

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

.article-meta {
    font-size: 0.8125rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-category {
    color: #666;
}

/* ========== LOAD MORE ========== */
.load-more {
    margin-top: 2rem;
    text-align: center;
}

.load-more-btn {
    padding: 0.875rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.load-more-btn:hover {
    border-color: #999;
    color: #1a1a1a;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ========== SIDEBAR ========== */
.sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .sidebar {
        display: block;
        border-left: 1px solid #e5e5e5;
        padding-left: 2rem;
    }
}

.sidebar-section {
    margin-bottom: 2.5rem;
}

.sidebar-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #1a1a1a;
}

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

.sidebar-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
}

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

.sidebar-item-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    color: #1a1a1a;
    margin-bottom: 0.375rem;
    transition: color 0.2s;
}

.sidebar-item a:hover .sidebar-item-title {
    color: #444;
}

.sidebar-item-meta {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.sidebar-item-category {
    color: #666;
}

/* ========== MOBILE NAV ========== */
.mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
}

.mobile-nav-toggle span {
    width: 22px;
    height: 2px;
    background: #1a1a1a;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .mobile-nav-toggle {
        display: none;
    }
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 200;
    padding: 1.5rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #1a1a1a;
    line-height: 1;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-nav a {
    padding: 1rem 0;
    font-size: 1.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    border-bottom: 1px solid #e5e5e5;
    color: #1a1a1a;
}

/* ========== CONTACT SECTION ========== */
.contact-section {
    background: #fafafa;
    padding: 4rem 1.5rem;
    border-top: 1px solid #e5e5e5;
}

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

.contact-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

.contact-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 1rem;
}

.contact-bio,
.contact-info p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #111;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: opacity 0.2s;
}

.contact-link:hover {
    opacity: 0.7;
}

.contact-link svg {
    flex-shrink: 0;
}

.contact-form-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9375rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #111;
}

.submit-btn {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #111;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #333;
}

/* ========== FOOTER ========== */
.footer {
    border-top: 1px solid #e5e5e5;
    margin-top: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #ffffff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1a1a1a;
}

/* ========== UTILITIES ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
