/* style.css for version5 */
:root {
    --primary-color: #0f172a;
    /* Deep slate background for header */
    --secondary-color: #334155;
    /* Text secondary */
    --accent-color: #2b6cb0;
    /* Modern tech blue */
    --accent-hover: #1e4e8c;
    --bg-color: #f4f5f7;
    /* Slightly cool very light gray */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1a202c;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 12px;
    /* Softer edges */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.site-header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary-color);
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

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

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

/* Featured Article */
.featured-article {
    grid-column: span 12;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    height: 550px;
    display: block;
}

.featured-article::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.featured-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-article:hover img {
    transform: scale(1.03);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    color: white;
    z-index: 2;
}

.category-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: inline-block;
}

.featured-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

/* Standard Article Cards */
.article-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: transparent;
}

.article-card.cols-4 {
    grid-column: span 4;
}

.article-card.cols-6 {
    grid-column: span 6;
}

.article-card.cols-8 {
    grid-column: span 8;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 ratio */
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0.75rem 0;
    line-height: 1.4;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.card-excerpt {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.card-meta {
    font-size: 0.8rem;
    color: #718096;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-weight: 500;
}

/* Single Article Layout */
.single-article-layout {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 3.5rem;
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-header h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 1rem 0;
    letter-spacing: -1px;
    color: var(--primary-color);
}

.article-meta-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.article-featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.75rem;
}

.article-body h2 {
    font-size: 2rem;
    margin: 3rem 0 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* --- AdSense Style Gadget Store Ads --- */
.ad-slot {
    background-color: #fff;
    border: 1px solid #e1e4e8;
    position: relative;
    border-radius: 2px;
    /* AdSense tends to use sharper edges */
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 0;
    right: 0;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 0.65rem;
    padding: 3px 6px;
    border-bottom-left-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Gadget Store specific Ad styling */
.gadget-ad-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
}

.ad-slot.horizontal {
    grid-column: span 12;
    margin: 2rem 0;
    min-height: 120px;
}

.ad-slot.sidebar {
    width: 100%;
    min-height: 600px;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.gadget-ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.ad-img-placeholder {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #adb5bd;
}

.horizontal .ad-img-placeholder {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.sidebar .ad-img-placeholder {
    width: 100%;
    height: 250px;
}

.ad-text-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-url {
    font-size: 0.75rem;
    color: #202124;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.ad-title {
    font-size: 1.25rem;
    color: #1a0dab;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-decoration: underline transparent;
    transition: text-decoration 0.2s;
}

.ad-slot:hover .ad-title {
    text-decoration: underline #1a0dab;
}

.ad-desc {
    font-size: 0.9rem;
    color: #4d5156;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.ad-btn {
    align-self: flex-start;
    background-color: #fff;
    color: #1a73e8;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ad-btn:hover {
    background-color: #f8f9fa;
}


/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 5rem 2rem 3rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    margin-bottom: 2.5rem;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #94a3b8;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-nav a:hover {
    color: white;
}

.copy {
    color: #64748b;
    font-size: 0.95rem;
    border-top: 1px solid #334155;
    padding-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .single-article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ad-slot.sidebar {
        position: static;
        min-height: 250px;
    }

    .gadget-ad-sidebar {
        flex-direction: row;
        align-items: center;
    }

    .sidebar .ad-img-placeholder {
        width: 150px;
        height: 150px;
    }
}

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

    .article-card.cols-4,
    .article-card.cols-6,
    .article-card.cols-8,
    .featured-article {
        grid-column: span 1;
    }

    .header-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .featured-title {
        font-size: 2rem;
    }

    .featured-content {
        padding: 2rem;
    }

    .gadget-ad-content {
        flex-direction: column;
        text-align: center;
    }

    .ad-btn {
        align-self: center;
    }
}