/*
Theme Name: Dark Bark Premium
Theme URI: https://petcuejournal.com
Author: PetCue Journal
Description: Fully dynamic, polished, and cinematic. Final Version.
Version: 6.0
Text Domain: dark-bark
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --bg-deep: #0e0e10;
    --bg-surface: #18181b;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Manrope', sans-serif;
    /* Customizer variables set in functions.php */
}

/* --- ANIMATIONS --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESET & LAYOUT --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; } /* Smooth scrolling */

body {
    margin: 0;
    padding-top: var(--body-padding-top, 90px); 
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Noise Texture */
body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    z-index: 9999;
}

a { color: inherit; text-decoration: none; transition: 0.3s ease; }
a:hover { color: var(--accent); } /* Global hover for all links */
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* --- HEADER (DYNAMIC) --- */
.site-header {
    background: rgba(14, 14, 16, 0.98);
    backdrop-filter: blur(10px);
    position: var(--header-position, fixed);
    top: 0; left: 0; right: 0;
    z-index: 99999;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-top: var(--header-padding, 15px);
    padding-bottom: var(--header-padding, 15px);
    transition: padding 0.3s ease, background 0.3s ease;
}

.header-inner { display: flex; justify-content: space-between; align-items: center; }

.site-branding { flex-shrink: 0; }
.site-branding img { 
    height: var(--logo-height, 60px); 
    width: auto; 
    object-fit: contain;
    transition: height 0.3s ease;
}

.main-navigation ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.main-navigation a { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); position: relative; }
.main-navigation a:hover { color: #fff; }

.main-navigation .current-menu-item > a { color: var(--accent); } /* Active menu item accent */
.main-navigation .current-menu-item > a::after {
    content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* --- CARDS & GRID --- */
.site-main { padding: 40px 0; min-height: 60vh; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.post-card {
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0; 
    animation: fadeUp 0.8s ease-out forwards;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }
.post-card:nth-child(7) { animation-delay: 0.7s; }
.post-card:nth-child(8) { animation-delay: 0.8s; }
.post-card:nth-child(9) { animation-delay: 0.9s; }


.post-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-image-wrapper { aspect-ratio: 16/10; overflow: hidden; display: block; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .card-image-wrapper img { transform: scale(1.08); }

.card-content { padding: 24px; }
.card-title { font-family: var(--font-heading); font-size: 1.5rem; margin: 0 0 12px; line-height: 1.2; }
.card-content a:hover { color: var(--accent); } /* Specific hover for card titles */

/* --- COMPATIBILITY FIXES (Plugins, Forms, Tables) --- */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    background-color: #222 !important; border: 1px solid #444 !important; color: #fff !important; 
    padding: 12px; border-radius: 4px; width: 100%; font-family: inherit; margin-bottom: 10px;
}
input:focus, textarea:focus { border-color: var(--accent) !important; outline: none; box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.5); }

button, input[type="submit"] { 
    background: var(--text-main); color: #000; padding: 10px 24px; border: none; 
    font-weight: 700; cursor: pointer; border-radius: 4px; transition: background 0.3s ease;
}
button:hover, input[type="submit"]:hover { background: var(--accent); color: #fff; }

table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: transparent !important; }
th, td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); color: var(--text-main) !important; }
th { text-align: left; color: var(--accent) !important; font-weight: 700; }

.cookie-box, .cc-window, .gdpr-container { background-color: var(--bg-surface) !important; color: #fff !important; }

/* --- PAGE CONTENT --- */
.page-content-area { padding: 20px; } /* Removed background, let customizer options be visible */
.page-content-area h1, .page-content-area h2, .page-content-area h3 {
    font-family: var(--font-heading); color: #fff; margin-top: 1.5em; line-height: 1.2;
}
.page-content-area p, .page-content-area li {
    color: #d1d5db; margin-bottom: 1em; font-size: 1.05rem;
}

/* --- FOOTER (FIXED) --- */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #000; /* Pure black for strong contrast with body */
    padding: 40px 0;
    margin-top: auto;
}
.footer-inner { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 25px; /* Spacing between menu and copyright */
    text-align: center;
}
.footer-menu ul { 
    display: flex; justify-content: center; gap: 20px; 
    list-style: none; padding: 0; margin: 0; 
}
.footer-menu a { color: var(--text-muted); font-size: 0.9rem; }
.footer-menu a:hover { color: #fff; }

.site-info { 
    font-size: 0.85rem; 
    color: var(--text-muted); /* Ensure visibility */
    opacity: 0.8;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .menu-toggle { display: block; z-index: 100001; position: relative; }
    .main-navigation {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: #0e0e10; padding-top: 100px; transition: right 0.3s ease;
        z-index: 100000; text-align: center;
    }
    .main-navigation.toggled { right: 0; }
    .main-navigation ul { flex-direction: column; gap: 30px; font-size: 1.5rem; }
    .post-grid { grid-template-columns: 1fr; }
    .site-branding img { max-height: 50px; } /* Smaller logo on mobile */
}