/* assets/css/style.css */

:root {
    /* Premium GeekWire-style Palette */
    --primary-color: #0F172A;
    /* Slate 900 (Dark Header) */
    --accent-color: #2563EB;
    /* Bright Blue (Links/Buttons) */
    --highlight-color: #D946EF;
    /* Fuschia (Badges/Accents) */

    --bg-body: #F8FAFC;
    /* Slate 50 */
    --bg-card: #FFFFFF;

    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */

    --border-color: #E2E8F0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --container-max: 1280px;
    --header-height: 80px;
}

/* Marquee Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    display: flex;
    width: max-content;
    /* Force container to be as wide as content */
    white-space: nowrap;
    animation: scroll 20s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header & Navigation --- */
header {
    background: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-social a {
    color: #CBD5E1;
    margin-left: 1rem;
    font-size: 0.8rem;
}

.top-social a:hover {
    color: var(--white);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary-color);
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo span {
    color: var(--primary-color);
}

/* Desktop Nav */
.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 50px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-form input {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    outline: none;
    width: 150px;
    color: var(--text-color);
}

.search-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1e293b 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: var(--white);
}

/* --- Featured Section --- */
.featured-section {
    margin-bottom: 3rem;
}

.featured-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 450px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.featured-main:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-main:hover img {
    transform: scale(1.03);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 50%, transparent);
    color: var(--white);
    z-index: 10;
}

.cat-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: inline-block;
    letter-spacing: 0.5px;
}

.featured-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.meta-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Sections Common --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.65rem;
    /* half of border-bottom width approx */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* --- Trending Grid --- */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.trending-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.trending-thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-card:hover .trending-thumb img {
    transform: scale(1.05);
}

.trending-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.trending-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--secondary-color);
}

.trending-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--light-text);
}

/* --- Content Layout (Latest + Sidebar) --- */
.content-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Post List Item */
.post-card {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease;
    align-items: center;
    /* Center vertically if image is small, or flex-start */
    align-items: flex-start;
}

.post-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.post-thumb {
    width: 260px;
    height: 170px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.5rem 0 0.5rem 0;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

}

/* Sidebar */
.sidebar .widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* Popular Items */
.popular-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.popular-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: #CBD5E1;
    line-height: 1;
}

.popular-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

/* Newsletter Widget */
.newsletter-widget input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.newsletter-widget button {
    width: 100%;
    padding: 0.75rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-widget button:hover {
    background: var(--primary-color);
}

/* About Section */
.about-section {
    background: var(--white);
    padding: 3rem 0;
    margin-bottom: 3rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-content p {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: #94a3b8;
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-links li {
    list-style: none;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* --- Responsive Media Queries --- */

@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .featured-main {
        height: 350px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    /* Header & Nav */
    .top-bar {
        text-align: center;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -280px;
        /* Hide off-screen */
        width: 250px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem 1.5rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 999;
        gap: 1.5rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .search-form {
        display: none;
        /* Simplify header on mobile, maybe add search icon later */
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    /* Featured */
    .featured-main {
        height: 250px;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-content {
        padding: 1.5rem;
    }

    /* Post Cards */
    .post-card {
        flex-direction: column;
        align-items: stretch;
    }

    .post-thumb {
        width: 100%;
        height: 200px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}