/*
Theme Name: Enigma Mysteries
Theme URI: https://example.com/enigma
Author: Grok AI
Author URI: https://x.ai
Description: Темна таємнича тема WordPress для сайтів про НЛО, прибульців, паранормальні явища, релігію, палеоконтакт та загадки історії. Атмосферний дизайн із зірками, стародавніми символами та загадковою атмосферою.
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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enigma-mysteries
Tags: dark, mysterious, ufo, paranormal, blog, custom-colors, custom-logo, custom-menu, featured-images, theme-options
*/

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --bg-dark: #0a0a14;
    --bg-card: #12121f;
    --bg-card-hover: #1a1a2e;
    --text-primary: #e8e6f0;
    --text-secondary: #a8a4b8;
    --accent-purple: #8b5cf6;
    --accent-gold: #d4af37;
    --accent-teal: #06b6d4;
    --border: #2a2a40;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --font-heading: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

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

a:hover {
    color: var(--accent-gold);
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

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

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    object-fit: cover;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin: 0;
}

.site-title a {
    color: var(--accent-gold);
}

.site-title a:hover {
    color: var(--accent-purple);
}

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

.main-navigation a {
    color: var(--text-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--accent-purple);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 70vh;
    background: url('assets/images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.4) 0%, rgba(10, 10, 20, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
    color: #fff;
}

/* ============================================
   Main Content
   ============================================ */
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.site-content.full-width {
    grid-template-columns: 1fr;
}

.content-area {
    min-width: 0;
}

/* ============================================
   Posts Grid
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow);
    background: var(--bg-card-hover);
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-dark);
}

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

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

.post-content {
    padding: 1.5rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.post-meta a {
    color: var(--accent-purple);
}

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

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

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

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-teal);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   Single Post
   ============================================ */
.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.single-post-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.single-post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-post-thumbnail {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-post-content {
    padding: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post-content p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 2rem;
    color: var(--accent-gold);
}

/* ============================================
   Sidebar
   ============================================ */
.widget-area {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.widget a {
    color: var(--text-secondary);
}

.widget a:hover {
    color: var(--accent-teal);
}

/* ============================================
   Categories Section
   ============================================ */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-3px);
}

.category-card h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #05050a;
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-widget h4 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
}

.pagination .current,
.pagination a:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #fff;
}

/* ============================================
   404 & Search
   ============================================ */
.error-404,
.search-results {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .site-content {
        grid-template-columns: 1fr;
    }
    
    .widget-area {
        position: static;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    .single-post-title { font-size: 1.75rem; }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
