/*
Theme Name: Flex News Pro
Theme URI: https://example.com/flex-news-pro
Author: Flex Market
Author URI: https://example.com
Description: A modern, fully customizable WordPress news theme built with Elementor. Features multiple layouts, custom widgets, and optimized performance for news and magazine websites.
Version: 1.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: flex-news
Tags: news, magazine, blog, elementor, responsive, custom-widgets, seo-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. CSS Reset & Base Styles
   2. Typography
   3. Layout & Grid
   4. Header Styles
   5. Navigation & Mega Menu
   6. Content Blocks
   7. Sidebar & Widgets
   8. Footer
   9. Post Styles
   10. Comments
   11. Responsive Design
   ========================================================================== */

/* ==========================================================================
   1. CSS Reset & Base Styles
   ========================================================================== */

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

:root {
    --primary-color: #222222;
    --secondary-color: #4A90E2;
    --accent-color: #FF6B6B;
    --text-color: #444444;
    --light-gray: #F5F5F5;
    --border-color: #EEEEEE;
    --white: #FFFFFF;
    --font-primary: 'Open Sans', sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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: 1.5rem;
}

/* ==========================================================================
   3. Layout & Grid
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    max-width: 100%;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* ==========================================================================
   4. Header Styles
   ========================================================================== */

.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-bar {
    background-color: var(--light-gray);
    padding: 10px 0;
    font-size: 0.875rem;
}

.site-branding {
    padding: 20px 0;
}

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

/* ==========================================================================
   5. Navigation & Mega Menu
   ========================================================================== */

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

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
}

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

/* ==========================================================================
   6. Content Blocks
   ========================================================================== */

.content-area {
    padding: 40px 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

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

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

.post-meta {
    font-size: 0.875rem;
    color: #999;
    margin-bottom: 15px;
}

.post-excerpt {
    color: var(--text-color);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==========================================================================
   7. Sidebar & Widgets
   ========================================================================== */

.sidebar {
    padding-left: 30px;
}

.widget {
    background: var(--white);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-color);
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================================================
   9. Post Styles
   ========================================================================== */

.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.single-post .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.single-post .entry-content img {
    border-radius: 8px;
    margin: 30px 0;
}

/* ==========================================================================
   10. Comments
   ========================================================================== */

.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

/* ==========================================================================
   11. Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .sidebar {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post .entry-title {
        font-size: 1.75rem;
    }
}
