/*
Theme Name: Portfolio Atlas
Theme URI: https://portfolioatlas.com
Author: Portfolio Atlas Team
Author URI: https://portfolioatlas.com
Description: A clean and professional WordPress theme for investment and financial blogs. Features include responsive design, multilingual support, and optimized performance for financial content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfolio-atlas
Tags: blog, finance, two-columns, right-sidebar, custom-menu, translation-ready, responsive-layout
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5490;
    --secondary-color: #2c7bc7;
    --accent-color: #f39c12;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Georgia', serif;
    --max-width: 1200px;
    --spacing: 1rem;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

.site-title a {
    color: inherit;
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Dropdown Menu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    border-radius: 4px;
    z-index: 999;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
}

.main-navigation ul ul a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        width: 100%;
    }
    
    .main-navigation.toggled ul {
        display: flex;
        flex-direction: column;
    }
    
    .main-navigation:not(.toggled) ul {
        display: none;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    .main-navigation li:hover > ul {
        display: flex;
    }
}

/* ==========================================================================
   Posts & Content
   ========================================================================== */

.site-main article {
    background: var(--white);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.entry-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: var(--text-color);
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.entry-meta a {
    color: var(--text-light);
}

.entry-meta a:hover {
    color: var(--primary-color);
}

.cat-links,
.posted-on {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-content {
    margin-bottom: 1.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.more-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
}

.more-link:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* Single Post */
.single .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
}

.widget a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-widget a {
    color: rgba(255,255,255,0.9);
}

.footer-widget a:hover {
    color: var(--white);
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: var(--bg-light);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: var(--primary-color);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.clear::after {
    content: "";
    display: table;
    clear: both;
}
