/*
Theme Name: REITsGuide Pro
Theme URI: https://reitsguide.com
Description: High-performance WordPress theme optimized for REIT content monetization with ACF integration
Version: 1.0.0
Author: REITsGuide Team
License: GPL v2 or later
Text Domain: reitsguide
*/

/* Critical CSS for above-the-fold content */
:root {
    --primary-color: #1a5490;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --ad-bg: #f0f0f0;
    --border-color: #e1e5e9;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo img {
    max-height: 50px;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

/* Content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Ad Slots Styling */
.ad-slot {
    background: var(--ad-bg);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    border-radius: 4px;
    position: relative;
}

.ad-slot::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.ad-slot.ad-above-title {
    margin: 0 0 20px 0;
    min-height: 90px;
}

.ad-slot.ad-below-title {
    margin: 20px 0;
    min-height: 60px;
}

.ad-slot.ad-sidebar-sticky {
    position: sticky;
    top: 20px;
    min-height: 600px;
}

.in-content-ad {
    margin: 40px 0;
    text-align: center;
}

/* Email Capture Forms */
.email-capture {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
    margin: 40px 0;
    text-align: center;
}

.email-capture h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.email-capture p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.capture-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.capture-form input[type="email"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.capture-form button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.capture-form button:hover {
    background: #27ae60;
}

@media (max-width: 600px) {
    .capture-form {
        flex-direction: column;
    }
}

/* Content Upgrade */
.content-upgrade-wrapper {
    background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
    color: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin: 50px 0;
    box-shadow: var(--shadow-medium);
}

/* REIT/Stock Cards */
.reit-card, .stock-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
}

.reit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reit-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.reit-ticker {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.reit-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.metric {
    text-align: center;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 6px;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pricing Tables */
.pricing-table {
    margin: 30px 0;
    overflow-x: auto;
}

.pricing-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.pricing-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    font-weight: 600;
    text-align: left;
}

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

.pricing-table tr:hover {
    background: #f8f9fa;
}

.cta-button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background: #27ae60;
    color: var(--white);
}

/* Sidebar */
.sidebar {
    background: var(--white);
    border-radius: 8px;
    padding: 0;
    height: fit-content;
}

.sidebar-widget {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

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

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-medium);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .email-capture {
        padding: 25px 20px;
    }
    
    .reit-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* WordPress Core Compatibility */
.alignwide {
    margin-left: -5%;
    margin-right: -5%;
    max-width: none;
    width: auto;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    width: auto;
}

.wp-block-image {
    margin-bottom: 1.5rem;
}

.wp-block-quote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
}