/*
Theme Name: Smart Home Advisor Hub
Theme URI: https://smarthomeadvisorhub.com
Author: Smart Home Advisor
Author URI: https://smarthomeadvisorhub.com
Description: Professional, SEO-optimized affiliate theme for smart home product reviews and recommendations
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smarthome-advisor
Domain Path: /languages
Requires at least: 5.9
Requires PHP: 7.4
*/

:root {
    --primary-color: #1F4788;
    --secondary-color: #FF9900;
    --accent-color: #00C853;
    --dark-text: #232F3E;
    --light-bg: #F5F7FA;
    --border-color: #E0E0E0;
    --success: #00C853;
    --warning: #FF9900;
    --danger: #D32F2F;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #FFFFFF;
    font-size: 1rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.site-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.site-tagline {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    font-weight: 600;
    color: var(--dark-text);
    position: relative;
    padding: 0.5rem 0;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--secondary-color);
}

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

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2E5FA3 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #E68A00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===== MAIN CONTENT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.main-content {
    flex: 1;
}

.sidebar {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--secondary-color);
}

.breadcrumbs span {
    margin: 0 0.5rem;
    color: #999;
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(255, 153, 0, 0.15);
    transform: translateY(-4px);
}

.category-header {
    background: linear-gradient(135deg, var(--primary-color), #2E5FA3);
    color: white;
    padding: 2rem;
    text-align: center;
}

.category-header h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

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

.category-description {
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.category-card .btn {
    align-self: flex-start;
}

/* ===== PRODUCT GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
    transform: translateY(-8px);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    min-height: 2.4em;
}

.product-rating {
    color: #FFC107;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.product-footer a {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-review {
    background-color: var(--light-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-review:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-amazon {
    background-color: var(--secondary-color);
    color: white;
}

.btn-amazon:hover {
    background-color: #E68A00;
}

/* ===== PRODUCT REVIEW PAGE ===== */
.review-header {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.review-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.review-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #FFC107;
    font-size: 1.1rem;
}

.review-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.pros, .cons {
    padding: 1.5rem;
    border-radius: 8px;
}

.pros {
    background-color: #E8F5E9;
    border-left: 4px solid var(--success);
}

.cons {
    background-color: #FFEBEE;
    border-left: 4px solid var(--danger);
}

.pros h4, .cons h4 {
    margin-bottom: 1rem;
}

.pros ul, .cons ul {
    list-style: none;
    padding: 0;
}

.pros li::before,
.cons li::before {
    font-weight: bold;
    margin-right: 0.5rem;
}

.pros li::before {
    content: '✓ ';
    color: var(--success);
}

.cons li::before {
    content: '✗ ';
    color: var(--danger);
}

.pros li, .cons li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    overflow-x: auto;
    display: block;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:hover {
    background-color: var(--light-bg);
}

.comparison-table .feature-name {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== AFFILIATE DISCLOSURE ===== */
.affiliate-disclosure {
    background-color: #FFF3CD;
    border: 1px solid #FFE69C;
    border-radius: 5px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: #856404;
}

.affiliate-disclosure strong {
    color: #721C24;
}

/* ===== EMAIL SIGNUP ===== */
.email-signup {
    background: linear-gradient(135deg, var(--primary-color), #2E5FA3);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.email-signup h3 {
    color: white;
    margin-bottom: 1rem;
}

.email-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.email-form input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.email-form input::placeholder {
    color: #CCC;
}

.email-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-form button:hover {
    background-color: #E68A00;
    transform: translateY(-2px);
}

/* ===== BLOG SECTION ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-post {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.blog-featured-image {
    width: 100%;
    height: 200px;
    background-color: var(--light-bg);
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .blog-featured-image img {
    transform: scale(1.05);
}

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

.blog-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.75rem;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    min-height: 2.4em;
}

.blog-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-read-more {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: var(--dark-text);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

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

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: #CCC;
}

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

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #CCC;
}

/* ===== SIDEBAR WIDGETS ===== */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.widget a {
    color: var(--dark-text);
    font-weight: 500;
}

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

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-navigation {
        flex-direction: column;
        width: 100%;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-navigation.active {
        max-height: 300px;
    }

    .menu-toggle {
        display: block;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .category-grid,
    .products-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .review-pros-cons {
        grid-template-columns: 1fr;
    }

    .email-form {
        flex-direction: column;
    }

    .email-form input,
    .email-form button {
        min-width: 100%;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header-container {
        padding: 0.75rem 1rem;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .product-card,
    .blog-post {
        height: auto;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

/* ===== LAZY LOADING ===== */
img[loading="lazy"] {
    background-color: var(--light-bg);
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

/* ===== PRINT ===== */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .btn-amazon {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--secondary-color);
}
