/*
Theme Name: TekSolvr
Description: A modern WordPress blog theme designed for technology solutions articles. Perfect for sharing insights on hardware, networking, OS, applications, servers, cloud, cybersecurity, coding, and AI solutions.
Author: TekSolvr Team
Version: 1.1
Text Domain: teksolvr
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-text: #333;
    --color-bg: #f8f9fa;
    --color-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Image Optimization (CLS & Responsiveness) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Accessibility */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px; /* CLS Prevention */
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

/* Navigation Styles */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-navigation a {
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem; /* Improved tap target */
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.main-navigation a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Main Content Layout */
.site-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    flex: 1; /* Sticky Footer */
}

.content-area {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

/* Article Styles */
.article-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Softer shadow */
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1e40af;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.9rem;
    align-items: center;
}

.article-category {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-category:hover {
    color: white;
    opacity: 0.9;
}

.article-excerpt {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem; /* Larger tap target */
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background: var(--color-primary-hover);
    color: white;
}

/* Breadcrumb Styles (Global) */
.article-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.article-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar Styles */
.sidebar {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    height: fit-content;
}

.widget {
    margin-bottom: 2.5rem;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1e40af;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.solution-categories {
    list-style: none;
}

.solution-categories li {
    margin-bottom: 0.5rem;
}

.solution-categories a {
    display: block;
    padding: 0.75rem 0.5rem; /* Touch friendly */
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    color: #4b5563;
}

.solution-categories a:hover {
    background-color: #f3f4f6;
    color: var(--color-primary);
}

/* Footer Styles */
.site-footer {
    background: #1f2937;
    color: #e5e7eb;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: #60a5fa;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: #d1d5db;
    padding: 0.25rem 0;
}

.footer-widget a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 250px;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1.25rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: white;
    border-color: #e5e7eb;
    box-shadow: var(--shadow-sm);
}

/* 
   RESPONSIVE DESIGN 
   Mobile-first consideration overrides
*/

@media (max-width: 1024px) {
    .site-content {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Base Mobile Adjustments */
    body {
        font-size: 16px; /* Optimized reading size */
    }

    /* Header Mobile */
    .header-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .main-navigation a {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    /* Content Layout Mobile */
    .site-content {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin: 1.5rem auto;
        gap: 2rem;
    }

    .content-area, .sidebar {
        padding: 1.5rem;
    }

    /* Typography Mobile */
    .site-title {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .site-description {
        text-align: center;
    }

    .article-title {
        font-size: 1.4rem;
    }

    /* Interactive Elements (Tap Targets) */
    .read-more {
        display: block;
        text-align: center;
        width: 100%;
        padding: 0.8rem;
    }

    .sidebar {
        order: 2; /* Content first */
    }
    
    /* Footer Mobile */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-widget h3 {
        justify-content: center;
        display: flex;
    }

    /* Helper utility to preventing horizontal scroll */
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }

    .main-navigation a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .content-area {
        padding: 1rem;
    }

    .article-card {
        padding: 1.25rem;
    }

    .article-title {
        font-size: 1.25rem;
    }
    
    .article-meta {
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
}

