/* ===== Import Roboto Font ===== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* ===== Gumroad-Inspired Clean & Minimal Design ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Clean Gumroad-style colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header - Clean & Simple ===== */
.header {
    padding: 32px 0;
    margin-bottom: 48px;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.search-box {
    position: relative;
}

.search-input {
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    width: 240px;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
}

/* ===== Hero Section - Split Layout with Slider ===== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 64px 0 80px;
    margin-bottom: 32px;
}

.hero-left {
    max-width: 540px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Article Slider ===== */
.hero-right {
    position: relative;
}

.article-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--bg-secondary);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-card {
    min-width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.slider-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

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

.slider-content {
    padding: 24px;
    background: white;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-title {
    margin-bottom: 12px;
}

.slider-title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 50px;
    transition: color 0.2s;
}

.slider-title a:hover {
    color: var(--accent-primary);
}

.slider-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 42px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: all;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--accent-primary);
}

@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-left {
        max-width: 100%;
    }
}

/* ===== Tabs - Clean & Simple ===== */
.content-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 48px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tab-btn:hover {
    background: var(--bg-secondary);
}

/* ===== Articles Grid - Gumroad Product Grid Style ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
}

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

.news-card.featured {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .news-card.featured {
        grid-column: span 1;
    }
}

.card-header {
    padding: 16px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.date {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-image {
    margin: 16px;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
}

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

.card-content {
    padding: 0 20px 20px;
}

.card-title {
    margin-bottom: 12px;
}

.card-title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--accent-primary);
}

.card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-card {
    padding: 6px 16px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-card:hover {
    background: var(--bg-secondary);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 0;
}

.btn-nav {
    padding: 10px 20px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-nav:not(.disabled) {
    cursor: pointer;
}

.btn-nav:hover:not(.disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--bg-secondary);
}

.btn-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-info {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 8px;
}

/* ===== Search Results ===== */
.search-results {
    margin-bottom: 48px;
    text-align: center;
}

.search-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.search-count {
    font-size: 16px;
    color: var(--text-secondary);
}

.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
}

.no-results a {
    color: var(--accent-primary);
    text-decoration: none;
}

.no-results a:hover {
    text-decoration: underline;
}

/* ===== Article Page ===== */
.article-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 0;
}

.article-header {
    margin-bottom: 48px;
}

.article-meta-top {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.article-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.article-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.article-featured-image {
    margin-bottom: 48px;
    border-radius: 12px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: auto;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 24px;
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

/* ===== Social Share ===== */
.social-share {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.social-share h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.copy-link-button,
.btn-share {
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-link-button:hover,
.btn-share:hover {
    background: var(--bg-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .article-title {
        font-size: 32px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .search-input {
        width: 180px;
    }
}

/* ===== Clean scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
