/*
Theme Name: TechReviews USA
Theme URI: https://techreviewsusa.com
Description: Modern affiliate marketing theme for IT and Surveillance product reviews
Version: 1.0
Author: TechReviews USA
Author URI: https://techreviewsusa.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techreviewsusa
Tags: affiliate, reviews, ecommerce, modern, responsive
*/

/* ===================================
   Color Palette Variables - LIGHT MODE
   =================================== */
:root {
    --color-primary: #DC143C;        /* Crimson Red */
    --color-secondary: #E63946;      /* Bright Red */
    --color-accent: #C41E3A;         /* Deep Red */
    --color-dark-gray: #2C3E50;      /* Dark Gray */
    --color-medium-gray: #34495E;    /* Medium Dark Gray */
    --color-light-gray: #95A5A6;     /* Light Gray */
    --color-bg-primary: #FFFFFF;     /* Pure White */
    --color-bg-secondary: #F8F9FA;   /* Off-White Background */
    --color-bg-tertiary: #ECF0F1;    /* Light Gray Background */
    --color-text: #2C3E50;           /* Dark Gray Text */
    --color-text-muted: #7F8C8D;     /* Muted Gray Text */
    --color-border: #DEE2E6;         /* Light Border */
    --color-shadow: rgba(0, 0, 0, 0.1); /* Subtle Shadow */
    
    /* Fonts */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Container */
    --container-width: 1200px;
    --container-padding: 2rem;
    
    /* Transitions */
    --transition-speed: 0.3s;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark-gray);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   Layout Container
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

.site-content {
    flex: 1;
}

/* ===================================
   Header
   =================================== */
.site-header {
    background-color: var(--color-bg-primary);
    border-bottom: 3px solid var(--color-primary);
    padding: var(--spacing-md) 0 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--color-shadow);
}

/* Top Row - 3 Column Layout */
.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}

.header-left {
    /* Reserved for future elements */
    justify-self: start;
}

.site-branding {
    justify-self: center;
}
.site-branding a img{
    width:360px;
}
.header-right {
    justify-self: end;
}

.site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

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

/* Bottom Row - Navigation */
.header-bottom {
    padding: 0;
}

/* ===================================
   Navigation
   =================================== */
.main-navigation {
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-xs);
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--color-dark-gray);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    transition: all var(--transition-speed);
    display: block;
}

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

/* Dropdown Styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    min-width: 220px;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: 0 4px 16px var(--color-shadow);
    padding: var(--spacing-xs) 0;
    flex-direction: column;
    gap: 0;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0;
}

.main-navigation ul ul a:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-primary);
}

/* Show dropdown on hover */
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: flex;
}

/* Dropdown indicator arrow */
.main-navigation .menu-item-has-children > a::after {
    content: " ▾";
    font-size: 0.8em;
    margin-left: 4px;
}

/* Sub-dropdown (third level) */
.main-navigation ul ul ul {
    top: 0;
    left: 100%;
    margin-left: -1px;
}

.main-navigation ul ul .menu-item-has-children > a::after {
    content: " ▸";
    float: right;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
    padding: var(--spacing-xxl) 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-dark-gray) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Content Area
   =================================== */
.content-area {
    padding: var(--spacing-xl) 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-xl);
}

.main-content {
    background-color: var(--color-bg-primary);
    padding: var(--spacing-lg);
    border-radius: 8px;
}

/* ===================================
   Product Cards
   =================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.product-card {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.15);
    border-color: var(--color-primary);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: var(--color-bg-secondary);
}

.product-content {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.product-title a {
    color: var(--color-dark-gray);
}

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

.product-excerpt {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.product-rating {
    color: #FFD700;
    font-size: 0.9rem;
}

.product-price {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.affiliate-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #FFFFFF;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2);
}

.affiliate-button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.3);
    color: #FFFFFF;
}

/* ===================================
   Sidebar
   =================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.widget {
    background-color: var(--color-bg-primary);
    padding: var(--spacing-lg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-dark-gray);
}

.widget ul {
    list-style: none;
}

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

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

.widget a {
    color: var(--color-text);
    display: block;
    transition: all var(--transition-speed);
}

.widget a:hover {
    color: var(--color-primary);
    padding-left: var(--spacing-xs);
}

/* ===================================
   Review Template Styles
   =================================== */
.review-header {
    margin-bottom: var(--spacing-xl);
}

.review-meta {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.pros-cons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.pros, .cons {
    background-color: var(--color-bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 8px;
    border: 2px solid;
}

.pros {
    border-color: #28a745;
}

.cons {
    border-color: var(--color-primary);
}

.pros h3, .cons h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-dark-gray);
}

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

.pros li, .cons li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-lg);
    position: relative;
}

.pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.cons li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.comparison-table {
    width: 100%;
    margin: var(--spacing-xl) 0;
    border-collapse: collapse;
    background-color: var(--color-bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow);
}

.comparison-table th {
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
}

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

.comparison-table tr:last-child td {
    border-bottom: none;
}

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

/* ===================================
   Footer
   =================================== */
.site-footer {
    background-color: var(--color-bg-secondary);
    border-top: 3px solid var(--color-primary);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-widget h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

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

.footer-widget li {
    margin-bottom: var(--spacing-xs);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.affiliate-disclosure {
    background-color: var(--color-bg-tertiary);
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-primary);
    margin: var(--spacing-lg) 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .pros-cons-container {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .header-top {
        grid-template-columns: 1fr auto;
        gap: var(--spacing-sm);
    }
    
    .header-left {
        display: none;
    }
    
    .site-branding {
        justify-self: start;
    }
    
    .header-bottom {
        padding: 0;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.is-active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-bg-primary);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 4px 12px var(--color-shadow);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .main-navigation.is-active ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation.is-active li {
        border-bottom: 1px solid var(--color-border);
        width: 100%;
    }
    
    .main-navigation.is-active a {
        padding: var(--spacing-md);
    }
    
    /* Mobile dropdowns - show as indented items */
    .main-navigation.is-active ul ul {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background-color: var(--color-bg-secondary);
    }
    
    .main-navigation.is-active ul ul a {
        padding-left: calc(var(--spacing-md) * 2);
        background-color: var(--color-bg-secondary);
    }
    
    .main-navigation.is-active ul ul ul a {
        padding-left: calc(var(--spacing-md) * 3);
    }
    
    /* Mobile dropdown toggle */
    .main-navigation.is-active .menu-item-has-children.is-open > ul {
        display: flex;
    }
    
    .main-navigation.is-active .menu-item-has-children > a::after {
        content: " +";
        float: right;
        font-size: 1.2em;
    }
    
    .main-navigation.is-active .menu-item-has-children.is-open > a::after {
        content: " −";
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
