/*
Theme Name: Hot Clip Portfolio
Theme URI: https://hotclipfolio.com
Author: HotClipFolio Team
Author URI: https://hotclipfolio.com
Description: Your Guide to US Stock Investment - A modern WordPress theme featuring stock picks with TradingView charts and clean category layouts for stock market analysis.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.4
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: hotclipfolio
Tags: blog, portfolio, finance, investment, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ========================================
   CSS Variables
======================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --green: #16a34a;
    --green-bg: #dcfce7;
    --red: #dc2626;
    --red-bg: #fee2e2;
    --youtube-red: #ff0000;
    --sidebar-width: 260px;
    --header-height: 50px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }

/* ========================================
   Header
======================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.menu-toggle-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.menu-toggle-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

.site-logo {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    width: 24px; height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ========================================
   Sidebar Overlay
======================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ========================================
   Sidebar
======================================== */
.site-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: 0;
    overflow-y: auto;
    z-index: 200;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}

.site-sidebar.open { left: 0; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
}

.sidebar-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.sidebar-content { padding: 12px 0; }
.sidebar-section { margin-bottom: 16px; }

.sidebar-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px;
    margin-bottom: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover { background: var(--bg-light); color: var(--primary); }

.sidebar-item.active {
    background: #dbeafe;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* Accordion */
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.accordion-header:hover { background: var(--bg-light); color: var(--primary); }

.accordion-header.active {
    background: #dbeafe;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.accordion-arrow {
    font-size: 0.55rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.accordion-header.active .accordion-arrow { color: var(--primary); }
.accordion-header.open .accordion-arrow { transform: rotate(180deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open { max-height: 500px; }

.accordion-sub-item {
    display: block;
    padding: 8px 16px 8px 32px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.accordion-sub-item:hover { color: var(--primary); background: var(--bg-light); }
.accordion-sub-item.active { color: var(--primary); font-weight: 500; }

/* ========================================
   Main Content
======================================== */
.site-main {
    margin-top: var(--header-height);
    padding: 16px;
    min-height: calc(100vh - var(--header-height));
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Stock Picks Section
======================================== */
.stock-picks-section {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Section Header - Blue gradient */
.stock-picks-section .section-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 14px 20px;
}

/* Header Row 1 */
.header-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-picks-section .section-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-picks-section .section-header h2 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.today-date {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 400;
}

.youtube-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--youtube-red);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0;
}

.youtube-banner:hover {
    background: #cc0000;
}

.youtube-banner svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Header Row 2: Tickers */
.header-row-2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-ticker-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
}

.header-ticker-symbol {
    font-weight: 700;
    color: #fff;
}

.header-ticker-name {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

.header-ticker-divider {
    color: rgba(255,255,255,0.3);
    margin: 0 4px;
}

/* Stock Cards Container - 3 columns */
.stock-cards-container {
    padding: 12px;
    background: var(--bg-light);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Stock Card */
.stock-card {
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Stock Info Block */
.stock-info-block {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
}

.stock-ticker {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stock-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stock-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.stock-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ytd-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.ytd-badge.positive {
    background: var(--green-bg);
    color: var(--green);
}

.ytd-badge.negative {
    background: var(--red-bg);
    color: var(--red);
}

/* Chart Block */
.chart-block {
    height: 200px;
    background: linear-gradient(180deg, #131722 0%, #1e222d 100%);
    border-radius: 0 0 7px 7px;
    overflow: hidden;
}

.chart-block iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Stock Disclaimer */
.stock-disclaimer {
    text-align: center;
    padding: 8px;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
}

/* ========================================
   Category Section
======================================== */
.category-section {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 16px;
}

.category-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.category-link {
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    transition: all 0.2s;
    white-space: nowrap;
}

.category-link:hover { 
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

.category-posts { padding: 0; }

.category-post-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.category-post-item:last-child { border-bottom: none; }
.category-post-item:hover { background: var(--bg-light); }

.post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 45px;
}

.post-title-link {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.post-summary {
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-posts {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Archive Page
======================================== */
.archive-header {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.archive-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.archive-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.archive-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.archive-posts {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}

/* ========================================
   Pagination
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 0 0 12px 12px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-white);
}

.pagination a:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-color: var(--primary);
}

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

.pagination .dots {
    border: none;
    background: none;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-links a { font-size: 0.8rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary); }

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Investment Disclaimer */
.investment-disclaimer {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.investment-disclaimer p:first-child {
    font-size: 0.85rem;
    color: #92400e;
    margin-bottom: 8px;
}

.investment-disclaimer p:last-child {
    font-size: 0.75rem;
    color: #a16207;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ========================================
   Single Post
======================================== */
.single-post-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 16px;
}

.single-post-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.single-post-category {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 12px;
    background: #dbeafe;
    color: var(--primary);
}

.single-post-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.single-post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.single-post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-post-content p { margin-bottom: 16px; }

.single-post-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 28px 0 16px;
    color: var(--text-primary);
}

.single-post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

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

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

.single-post-content ol li { list-style: decimal; }

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

/* Keywords */
.single-post-keywords {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.keyword-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 4px 4px 4px 0;
}

/* ========================================
   404 Error Page
======================================== */
.error-404-container {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.error-title {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.error-message {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.error-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.error-home-link {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.error-home-link:hover {
    background: var(--primary-dark);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 900px) {
    .stock-cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-row-1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-row-2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .header-ticker-divider {
        display: none;
    }

    /* Category header responsive */
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .category-link {
        align-self: flex-start;
    }

    .category-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .post-title-link {
        margin: 0;
        white-space: normal;
    }

    .post-summary {
        max-width: 100%;
    }

    .menu-toggle-btn span { display: none; }
    .single-post-title { font-size: 1.4rem; }
    .single-post-container { padding: 20px; }
    
    .pagination {
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}
