/*
Theme Name: Salpix Theme
Theme URI: https://github.com/liborsalva/salpix
Author: Libor Salva
Author URI: https://github.com/liborsalva
Description: Custom WordPress theme for Salpix.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salpix-theme
*/

/* ==========================================================================
   Base Reset
   ========================================================================== */

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

:root {
    --color-primary: #1a1a2e;
    --color-accent:  #e94560;
    --color-bg:      #f5f5f5;
    --color-text:    #333333;
    --color-muted:   #777777;
    --font-base:     'Segoe UI', system-ui, sans-serif;
    --max-width:     1200px;
    --radius:        6px;
    --transition:    0.2s ease;
}

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

body {
    font-family: var(--font-base);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

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

a:hover { opacity: 0.8; }

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

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-main {
    padding: 2rem 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-title a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-title a:hover { opacity: 0.9; }

.site-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-navigation a {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #fff;
    border-bottom-color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   Posts & Pages
   ========================================================================== */

.post, .page {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.entry-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.entry-title a { color: inherit; }
.entry-title a:hover { color: var(--color-accent); opacity: 1; }

.entry-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 1.25rem;
}

.entry-content { line-height: 1.8; }
.entry-content > * + * { margin-top: 1rem; }
.entry-content h2, .entry-content h3 { color: var(--color-primary); margin-top: 1.5rem; }

/* ==========================================================================
   Sidebar
   ========================================================================== */

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .content-area { grid-template-columns: 1fr; }
}

.widget-area { position: sticky; top: 5rem; }

.widget {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.875rem;
    margin-top: 3rem;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn, button, input[type="submit"] {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--transition);
}

.btn:hover, button:hover, input[type="submit"]:hover {
    filter: brightness(1.1);
    color: #fff;
    opacity: 1;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a, .pagination span {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

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

/* ==========================================================================
   404
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 .error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
}
