/*
Theme Name: Dippity Blog
Theme URI: https://dippity.xyz
Author: Dippity
Author URI: https://dippity.xyz
Description: A mystical, premium WordPress theme for the Dippity blog. Dark-themed with gold accents, Playfair Display headings, and Inter body text.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dippity-blog
Tags: blog, dark, custom-menu, custom-logo, featured-images, theme-options, threaded-comments, translation-ready
*/

/* ═══════════════════════════════════════════════════════════════════════
   CSS Custom Properties
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --bg-dark: #0c0a09;
    --bg-dark-2: #1c1917;
    --bg-card: #292524;
    --bg-light: #faf6ec;
    --accent-gold: #a16207;
    --accent-gold-2: #c6862a;
    --accent-gold-light: #eab308;
    --accent-rose: #b86a6a;
    --text-main: #faf6ec;
    --text-muted: #a8a29e;
    --text-dim: #57534e;
    --border-alpha: rgba(161, 98, 7, 0.15);
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1100px;
    --content-width: 800px;
    --radius: 8px;
    --gradient-gold: radial-gradient(circle at 10% 20%, rgba(161, 98, 7, 0.15) 0%, transparent 50%);
    --gradient-rose: radial-gradient(circle at 90% 80%, rgba(184, 106, 106, 0.1) 0%, transparent 50%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body::before { background: var(--gradient-gold); }
body::after  { background: var(--gradient-rose); }

/* ═══════════════════════════════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════════════════════════════ */
a {
    color: var(--accent-gold-2);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

a:focus-visible {
    outline: 2px solid var(--accent-gold-light);
    outline-offset: 2px;
    border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.5rem; }

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

/* ═══════════════════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════════════════ */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════════════════ */
.site-header {
    padding: 1.25rem 0;
    background: rgba(12, 10, 9, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-alpha);
}

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

.site-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════════════════ */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 0;
}

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

.main-navigation a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

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

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--accent-gold-2);
}

.main-site-link {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-alpha);
}

.main-site-link a {
    color: var(--accent-gold-2);
    font-weight: 700;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   Blog Feed
   ═══════════════════════════════════════════════════════════════════════ */
.blog-feed {
    padding: 4rem 0;
    flex: 1 0 auto;
}

.post-card {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-alpha);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold-2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.post-card .entry-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.post-card .entry-title a {
    color: var(--text-main);
}

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

.post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.featured-image {
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.read-more {
    display: inline-block;
    color: var(--accent-gold-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--text-main);
}

/* ═══════════════════════════════════════════════════════════════════════
   Single Post
   ═══════════════════════════════════════════════════════════════════════ */
.single-post {
    padding: 5rem 0;
    flex: 1 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.85;
}

.post-content p {
    margin-bottom: 1.75rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 3px solid var(--accent-gold);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(161, 98, 7, 0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content .wp-block-image,
.post-content .wp-block-embed {
    margin: 2rem 0;
}

.post-content .aligncenter {
    text-align: center;
}

.post-content .wp-block-code {
    background: var(--bg-dark);
    border: 1px solid var(--border-alpha);
    border-radius: 4px;
    padding: 1rem;
    font-size: 0.9rem;
    overflow-x: auto;
}

.post-tags {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-tags a {
    color: var(--accent-gold-2);
}

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

.page-links {
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   Comments
   ═══════════════════════════════════════════════════════════════════════ */
.comments-area {
    max-width: var(--content-width);
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-alpha);
}

.comments-area h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-alpha);
}

.comment .comment-body {
    font-size: 0.95rem;
}

.comment .comment-author {
    font-weight: 600;
    color: var(--accent-gold-2);
}

.comment .comment-metadata {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.comment .comment-content p {
    margin-bottom: 0.75rem;
}

.comment-reply-link {
    font-size: 0.85rem;
    color: var(--accent-gold-2);
    font-weight: 600;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
}

.comment-respond h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-alpha);
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .submit {
    background: var(--accent-gold);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--accent-gold-2);
}

/* ═══════════════════════════════════════════════════════════════════════
   Pagination / Navigation
   ═══════════════════════════════════════════════════════════════════════ */
.navigation {
    margin: 3rem 0 1rem;
}

.navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.navigation .nav-links a {
    color: var(--accent-gold-2);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navigation .nav-links a:hover {
    color: var(--accent-gold-light);
}

/* Posts pagination (numeric) */
.pagination {
    margin: 3rem 0 1rem;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-alpha);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

.pagination .page-numbers:hover {
    border-color: var(--accent-gold-2);
    color: var(--accent-gold-2);
}

/* ═══════════════════════════════════════════════════════════════════════
   Search Form
   ═══════════════════════════════════════════════════════════════════════ */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

.search-form input[type="search"] {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-alpha);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.search-form input[type="submit"] {
    background: var(--accent-gold);
    color: #fff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.search-form input[type="submit"]:hover {
    background: var(--accent-gold-2);
}

/* ═══════════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════════ */
.site-footer {
    padding: 3rem 0;
    background: var(--bg-dark-2);
    border-top: 1px solid var(--border-alpha);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 28px;
    width: auto;
    opacity: 0.7;
}

/* Footer social icons */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    background: rgba(211, 168, 93, 0.08);
    border: 1px solid rgba(211, 168, 93, 0.18);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
    color: var(--accent-gold-2);
    background: rgba(211, 168, 93, 0.16);
    border-color: rgba(211, 168, 93, 0.35);
    transform: translateY(-2px);
}

.footer-social a svg {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   404 Page
   ═══════════════════════════════════════════════════════════════════════ */
.error-404 {
    text-align: center;
    padding: 8rem 0;
    flex: 1 0 auto;
}

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

.error-404 .page-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   Archive / Search Header
   ═══════════════════════════════════════════════════════════════════════ */
.archive-header,
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.archive-header h1,
.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

/* ═══════════════════════════════════════════════════════════════════════
   Image Gallery / Alignments
   ═══════════════════════════════════════════════════════════════════════ */
.wp-block-gallery {
    margin: 2rem 0;
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   Screen Reader Text
   ═══════════════════════════════════════════════════════════════════════ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }

    .post-header h1 { font-size: 2rem; }
    .post-card .entry-title { font-size: 1.375rem; }
    .post-content { font-size: 1rem; }

    .main-navigation ul {
        gap: 1rem;
    }

    .main-navigation a {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .main-site-link {
        margin-left: 0.75rem;
        padding-left: 0.75rem;
    }

    .site-logo-img {
        height: 28px;
    }

    .site-header {
        padding: 0.75rem 0;
    }

    .blog-feed { padding: 2rem 0; }
    .single-post { padding: 3rem 0; }

    .post-card {
        padding: 1.5rem;
    }

    .container {
        width: 92%;
    }
}

@media (max-width: 480px) {
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
    }
}
