/**
 * Main Stylesheet
 * 
 * AdSense & Affiliate Blog Theme
 * Modern, lightweight, SEO-optimized design
 */

/*------------------------------------*\
  RESET & BASE
\*------------------------------------*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #1d4ed8;
}

/*------------------------------------*\
  LAYOUT
\*------------------------------------*/

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-content .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    .site-content .container {
        grid-template-columns: 1fr 320px;
    }

    .sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

.site-main {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .site-main {
        grid-template-columns: 1fr 320px;
        grid-column: 1 / -1;
    }

    .content-area {
        grid-column: 1;
    }

    .widget-area {
        grid-column: 2;
    }
}

/*------------------------------------*\
  HEADER
\*------------------------------------*/

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #1f2937;
}

.site-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

.custom-logo-link {
    display: block;
    max-width: 200px;
}

/*------------------------------------*\
  NAVIGATION
\*------------------------------------*/

.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #4b5563;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #2563eb;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1rem;
        min-width: 200px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-menu.toggled {
        display: flex;
    }
}

/*------------------------------------*\
  BREADCRUMBS
\*------------------------------------*/

.breadcrumbs-wrapper {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb-separator {
    color: #9ca3af;
    margin: 0 0.5rem;
}

/*------------------------------------*\
  POSTS
\*------------------------------------*/

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

article {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

article:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

article:hover .post-thumbnail img {
    transform: scale(1.05);
}

.entry-header {
    padding: 1.5rem;
}

.entry-categories {
    margin-bottom: 0.75rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.entry-summary,
.entry-content {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
}

.entry-footer {
    padding: 0 1.5rem 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #ffffff;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.read-more:hover {
    background: #1d4ed8;
    color: #ffffff;
}

/*------------------------------------*\
  SINGLE POST
\*------------------------------------*/

.single article {
    border: none;
    padding: 0;
}

.single .entry-header {
    padding: 2rem 0 1.5rem;
}

.single .entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.single .post-thumbnail {
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.single .entry-content {
    padding: 0;
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: 720px;
}

.single .entry-content p {
    margin-bottom: 1.5rem;
}

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.single .entry-footer {
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tags-links a {
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 1rem;
    font-size: 0.875rem;
}

/*------------------------------------*\
  WIDGETS
\*------------------------------------*/

.widget {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #2563eb;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.widget li:last-child {
    border-bottom: none;
}

/*------------------------------------*\
  FOOTER
\*------------------------------------*/

.site-footer {
    background: #1f2937;
    color: #e5e7eb;
    margin-top: 3rem;
}

.footer-widgets {
    padding: 3rem 0;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-widget-column .widget {
    background: transparent;
    border: none;
    color: #e5e7eb;
}

.site-info {
    padding: 1.5rem 0;
    border-top: 1px solid #374151;
    font-size: 0.875rem;
    text-align: center;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-menu a {
    color: #9ca3af;
}

/*------------------------------------*\
  UTILITY
\*------------------------------------*/

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link:focus {
    background-color: #2563eb;
    color: #ffffff;
    clip: auto;
    height: auto;
    width: auto;
    display: block;
    padding: 1rem;
    text-align: center;
    z-index: 100000;
}