/*
Theme Name: Minvals Theme
Theme URI: http://example.com
Author: Antigravity
Author URI: http://example.com
Description: A custom WordPress theme for minvals.az modeled after JNews
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: minvals
*/

/* ==========================================================================
   CSS Variables & Theme Definitions
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #f2184f;
    --color-text-main: #333333;
    --color-text-muted: #888888;
    --color-bg-body: #ffffff;
    --color-bg-light: #f5f5f5;
    --color-bg-dark: #1a1a1a;
    --color-bg-darker: #111111;
    --color-border: #eaeaeb;
    
    /* Top bar */
    --topbar-bg: #222222;
    --topbar-text: #aaaaaa;
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

[data-theme="dark"] {
    --color-text-main: #dddddd;
    --color-text-muted: #999999;
    --color-bg-body: #1a1a1a;
    --color-bg-light: #222222;
    --color-bg-dark: #000000;
    --color-bg-darker: #0a0a0a;
    --color-border: #333333;
    
    --topbar-bg: #000000;
    --topbar-text: #888888;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin-top: 0;
    color: var(--color-text-main);
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.bg-light {
    background-color: var(--color-bg-light) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--color-border) !important;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
.top-bar {
    background-color: var(--topbar-bg);
    color: var(--topbar-text);
    font-size: 12px;
    padding: 8px 0;
}

.top-bar a {
    color: var(--topbar-text);
    margin-right: 15px;
}

.top-bar a:hover {
    color: #ffffff;
}

.main-header {
    padding: 30px 0;
    background-color: var(--color-bg-body);
}

.site-logo h1 {
    font-size: 48px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
}

.nav-bar-wrapper {
    background-color: var(--color-bg-body);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-bar-wrapper.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-navigation {
    flex-grow: 1;
    margin-right: 30px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li a {
    display: block;
    padding: 15px 0;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    font-family: var(--font-sans);
}

.btn-toggle-theme {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--color-text-main);
}

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }
[data-theme="light"] .icon-sun { display: inline; }
[data-theme="light"] .icon-moon { display: none; }

/* ==========================================================================
   Hero Section (Swiper)
   ========================================================================== */
.hero-post {
    position: relative;
    height: 425px;
    overflow: hidden;
    width: 100%;
}

.hero-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-post:hover img {
    transform: scale(1.05);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    z-index: 10;
}

.hero-title a {
    color: #ffffff !important;
}

.hero-content .post-meta,
.hero-content .post-meta span {
    color: #dddddd !important;
}

.post-category a {
    background-color: var(--color-primary);
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-block;
}

.hero-content .post-category a {
    background-color: #000;
}

.post-category a:hover {
    background-color: #333;
}

.swiper-button-next, .swiper-button-prev {
    color: #fff;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.section-title {
    font-size: 24px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-primary);
}

.post-card-large .post-thumb img,
.post-card-grid .post-thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.post-header-divider {
    border: 0;
    border-top: 2px solid var(--color-bg-darker);
    margin: 30px auto 0;
    width: 100%;
}

[data-theme="dark"] .post-header-divider {
    border-top-color: #444;
}

.post-item-small .post-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.post-item-list .post-thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 18px;
    background-color: var(--color-bg-dark);
    color: #fff;
    padding: 10px 15px;
    margin-bottom: 20px;
}

[data-theme="dark"] .widget-title {
    background-color: #333;
}

.post-item-numbered .post-number {
    font-family: var(--font-serif);
    color: var(--color-border);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-bg-darker);
    color: #aaa;
    padding-top: 50px;
    margin-top: 50px;
}

.footer-widget-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu li a {
    color: #aaa;
}

.footer-menu li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 20px 0;
    margin-top: 30px;
}
