/*
Theme Name: Dahlia Gloam MP Dark
Description: Dark cinematic Pinterest-first blog, etc…
Author: Brittany Minor
Version: 1.0
*/

/* ============================
   GLOBAL RESET / BASE
============================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #f5f2f7;
    background-color: #050308;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #f3d7a5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Generic utility container */
.dg-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site wrapper makes footer stick to bottom */
.dg-site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Prevent horizontal scroll weirdness */
html, body {
    overflow-x: hidden;
}

/* ============================
   TYPOGRAPHY
============================ */

h1, h2, h3, h4, h5, h6 {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin: 0 0 12px;
    color: #ffffff;
}

p {
    margin: 0 0 1.2em;
}

/* Small uppercase meta text */
.dg-meta,
.dg-featured-card-category,
.dg-post-list-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ============================
   HEADER / NAV — DESKTOP
============================ */

.dg-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #050308;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 14px 0;
}

.dg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.dg-site-title a {
    font-family: "Cormorant Garamond", serif;
    font-size: 22px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.dg-site-title a:hover {
    text-decoration: none;
}

/* Desktop nav base */
.dg-nav {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.dg-nav-menu {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.dg-nav-menu li a {
    color: #e8e3cf;
    letter-spacing: 0.18em;
    font-size: 12px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color .2s ease;
}

/* Underline animation (Malena-style) */
.dg-nav-menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: #f8ddac;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.dg-nav-menu li:hover a::after,
.dg-nav-menu .current-menu-item > a::after,
.dg-nav-menu .current_page_item > a::after,
.dg-nav-menu .current-category-ancestor > a::after {
    transform: scaleX(1);
}

.dg-nav-menu li a:hover {
    color: #f8ddac;
}

/* ============================
   NAV TOGGLE (checkbox hamburger)
============================ */

/* hidden checkbox */
.dg-nav-toggle-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* hamburger label (hidden on desktop by default) */
.dg-nav-toggle {
    display: none;
    cursor: pointer;
}

/* hamburger bars */
.dg-nav-toggle .dg-bar {
    display: block;
    width: 26px;
    height: 3px;
    margin: 4px 0;
    background: #f1eefc;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Desktop layout */
@media (min-width: 769px) {
    .dg-nav {
        display: block;
        position: static;
    }

    .dg-nav-toggle {
        display: none;
    }

    .dg-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .dg-nav-menu li {
        display: inline-block;
        margin-left: 24px;
    }
}

/* ============================
   MOBILE HEADER + MENU OVERLAY
============================ */

@media (max-width: 768px) {

    /* Keep everything inside viewport */
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .dg-header-inner {
        position: relative;
        align-items: center;
        justify-content: flex-start;
        padding: 0 12px;
        height: 60px;
    }

    /* Title shrinks and can wrap slightly */
    .dg-site-title {
        max-width: 75%;
    }

    .dg-site-title a {
        font-size: 17px;
        letter-spacing: 0.18em;
        white-space: normal;
        line-height: 1.1;
        display: inline-block;
    }

    /* Show hamburger, pinned in top-right */
    .dg-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        padding: 6px;
        z-index: 9999;
        background: transparent;
        border: none;
    }

    .dg-nav-toggle .dg-bar {
        width: 22px;
        height: 3px;
    }

    /* Fullscreen nav overlay */
    .dg-nav {
        display: none;
        position: fixed;
        inset: 0; /* top/right/bottom/left */
        background: #050308;
        padding: 96px 24px 40px; /* space for header */
        z-index: 9998;
        overflow-y: auto;
    }

    .dg-nav-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 18px;
    }

    .dg-nav-menu li a {
        font-size: 18px;
    }

    /* When checkbox is checked → show nav */
    .dg-nav-toggle-checkbox:checked ~ .dg-nav {
        display: block;
    }

    /* Animate hamburger into X */
    .dg-nav-toggle-checkbox:checked + .dg-nav-toggle .dg-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .dg-nav-toggle-checkbox:checked + .dg-nav-toggle .dg-bar:nth-child(2) {
        opacity: 0;
    }

    .dg-nav-toggle-checkbox:checked + .dg-nav-toggle .dg-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Give content a bit more top padding so it doesn't feel cramped under header */
    .dg-main .dg-container {
        padding-top: 64px;
    }
}

/* ============================
   MAIN LAYOUT
============================ */

.dg-main {
    flex: 1 0 auto;
}

.dg-main .dg-container {
    padding-top: 48px;
    padding-bottom: 72px;
}

/* Single posts – narrower */
.single-post .dg-main .dg-container {
    max-width: 900px;
}

/* Generic page title (e.g. page templates) */
.page .entry-title,
.single .entry-title {
    margin-bottom: 16px;
}

/* ============================
   FEATURED 4-POST GRID (HOME)
============================ */

.dg-featured-grid {
    margin-bottom: 60px;
}

.dg-featured-grid-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.dg-featured-card {
    background: #08060c;
    border-radius: 4px;
    padding: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dg-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.dg-featured-card-thumb-link {
    display: block;
    margin-bottom: 14px;
}

.dg-featured-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

.dg-featured-card-content {
    padding-top: 4px;
}

.dg-featured-card-category {
    color: #cfa9f6;
    margin-bottom: 6px;
}

.dg-featured-card-title {
    font-size: 16px;
    line-height: 1.3;
}

.dg-featured-card-title a {
    color: #ffffff;
    text-decoration: none;
}

.dg-featured-card-title a:hover {
    text-decoration: underline;
}

/* Featured grid responsive */
@media (max-width: 1200px) {
    .dg-featured-grid-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .dg-featured-grid-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dg-featured-grid-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================
   POST LIST BELOW GRID
============================ */

.dg-post-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.dg-post-list-item {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: flex-start;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dg-post-list-thumb-link {
    display: block;
}

/* Blog list thumbnails — tall vertical rectangle */
.dg-post-list-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

.dg-post-list-meta {
    color: #8b8891;
    margin-bottom: 6px;
}

.dg-post-list-category {
    color: #cfa9f6;
}

.dg-post-list-date {
    margin-left: 10px;
}

.dg-post-list-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.dg-post-list-title a {
    color: #ffffff;
    text-decoration: none;
}

.dg-post-list-title a:hover {
    text-decoration: underline;
}

.dg-post-list-excerpt {
    color: #cfcad9;
    font-size: 14px;
    line-height: 1.7;
}

/* Stack image and text on mobile */
@media (max-width: 900px) {
    .dg-post-list-item {
        grid-template-columns: 1fr;
    }
}

/* ============================
   SINGLE POST CONTENT
============================ */

.single-post .dg-main .dg-container {
    padding-top: 40px;
    padding-bottom: 72px;
}

.single-post .entry-header {
    margin-bottom: 24px;
}

.single-post .entry-title {
    font-size: 30px;
    line-height: 1.25;
}

.single-post .entry-meta {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8b8891;
    margin-bottom: 16px;
}

.single-post .entry-content {
    font-size: 15px;
    line-height: 1.8;
    color: #e1dde9;
}

/* Base images in content */
.single-post .entry-content img {
    margin: 26px auto;
    border-radius: 3px;
}

/* FULL-HEIGHT HERO IMAGE ON SINGLE POSTS */
.single-post .entry-content img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    margin: 0 calc(50% - 50vw);
    display: block;
}

/* Headings inside posts */
.single-post .entry-content h2 {
    font-size: 24px;
    margin-top: 32px;
    margin-bottom: 10px;
}

.single-post .entry-content h3 {
    font-size: 19px;
    margin-top: 26px;
}

/* Lists */
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 0 0 1.4em 1.6em;
}

/* Blockquote */
.single-post .entry-content blockquote {
    border-left: 2px solid #cfa9f6;
    padding-left: 18px;
    margin: 24px 0;
    font-style: italic;
    color: #f5f2ff;
}

/* ============================
   PAGINATION
============================ */

.dg-pagination,
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    font-size: 13px;
}

.dg-pagination a,
.nav-links a,
.page-numbers {
    padding: 6px 10px;
    border-radius: 2px;
    background: #08060c;
    color: #f5f2f7;
    text-decoration: none;
}

.dg-pagination a:hover,
.nav-links a:hover,
.page-numbers.current {
    background: #cfa9f6;
    color: #050308;
}

/* ============================
   FOOTER
============================ */

.dg-footer,
.site-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 0 20px;
    background-color: #050308;
    color: #9b96a5;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.dg-footer .dg-container,
.site-footer .site-info {
    text-align: center;
}

/* ============================
   WORDPRESS DEFAULT ELEMENTS
============================ */

/* Alignment helpers */
.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

.alignright {
    float: right;
    margin: 0 0 1em 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1em;
}

.wp-caption-text {
    font-size: 12px;
    color: #9b96a5;
    margin-top: 6px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    background: #08060c;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f5f2f7;
    padding: 8px 10px;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
}

button,
input[type="submit"] {
    background: #cfa9f6;
    color: #050308;
    border: none;
    padding: 9px 20px;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
}

button:hover,
input[type="submit"]:hover {
    background: #e3c2ff;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}
