/*
Theme Name: AH-Refs Pro
Theme URI: https://ah-refs.top
Author: AH-Refs Team
Author URI: https://ah-refs.top
Description: A modern, SEO-optimized WordPress theme for digital marketing, SEO tutorials, and tech reviews. Features a clean blue and gray design, mobile-friendly layout, and optimized for performance.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ah-refs-pro
Tags: blog, news, seo, marketing, responsive, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. CSS RESET & BASE STYLES
   ========================================================================== */

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

:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --light-blue: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --max-width: 1200px;
    --header-height: 70px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. LAYOUT & CONTAINERS
   ========================================================================== */

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

.site-logo:hover {
    color: var(--dark-blue);
}

.main-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.content-area {
    min-width: 0;
}

.site-footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px 20px;
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    display: block;
    position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary-blue);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-700);
    padding: 8px;
}

/* ==========================================================================
   4. POSTS & ARTICLES
   ========================================================================== */

.post-grid {
    display: grid;
    gap: 30px;
}

.post-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background-color: var(--gray-200);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrapper {
    padding: 24px;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.post-category {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.post-title a {
    color: inherit;
}

.post-title a:hover {
    color: var(--primary-blue);
}

.post-excerpt {
    color: var(--gray-600);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    gap: 10px;
}

/* Single Post Styles */
.single-post .post-header {
    margin-bottom: 30px;
}

.single-post .post-title {
    font-size: 36px;
    margin-bottom: 16px;
}

.single-post .post-meta {
    font-size: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.single-post .post-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.single-post .post-content h2 {
    font-size: 28px;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.single-post .post-content h3 {
    font-size: 22px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--gray-800);
}

.single-post .post-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

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

.single-post .post-content strong {
    font-weight: 700;
    color: var(--gray-900);
}

.single-post .post-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--gray-700);
}

/* ==========================================================================
   5. SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
}

.widget {
    background-color: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-blue);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-700);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--primary-blue);
    padding-left: 4px;
}

.post-count {
    background-color: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ==========================================================================
   6. HOMEPAGE SPECIFIC
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 60px 20px;
    margin-bottom: 40px;
    border-radius: 16px;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 24px;
    opacity: 0.95;
}

.hero-cta {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: var(--dark-blue);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.category-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-blue);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.category-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.category-description {
    font-size: 14px;
    color: var(--gray-600);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gray-900);
    padding-left: 16px;
    border-left: 4px solid var(--primary-blue);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray-700);
}

.footer-widget h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: var(--gray-300);
    font-size: 14px;
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}

.footer-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.affiliate-disclosure {
    background-color: var(--gray-800);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray-400);
}

/* ==========================================================================
   8. FORMS & BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--dark-blue);
    color: var(--white);
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* ==========================================================================
   9. PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background-color: var(--white);
    border-radius: 6px;
    color: var(--gray-700);
    font-weight: 500;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* ==========================================================================
   10. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-navigation ul {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .main-navigation.active ul {
        display: flex;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--gray-200);
    }
    
    .main-navigation a {
        padding: 16px 20px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .single-post .post-title {
        font-size: 28px;
    }
    
    .single-post .post-content {
        padding: 24px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   11. UTILITY CLASSES
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}
