/*
 Theme Name: GeneratePress 662nm Child
 Theme URI: https://662nm.org
 Description: Child theme for 662nm.org (custom splash page and styles)
 Author: David Arnow (with more than a bit of help from ChatGPT!)
 Template: generatepress
 Version: 1.0
*/

/* ===== Global layout tweaks for 662nm ===== */

html, body {
    margin: 0;
    padding: 0;
}


/* Reset body – no flex here */
body {
    min-height: 90vh;   /* optional, harmless */
}

/* Sticky footer layout using #page as the flex container */
#page {
    min-height: 80vh;      /* full viewport height */
    display: flex;
    flex-direction: column; /* header, content, footer in a column */
    margin: 0;
    padding: 0;
}

/* Make the main content area grow to fill space between header and footer */
#content {
    flex: 1 0 auto;
    margin-bottom: 0;
}

.site-content {
    margin: 0;
    padding-bottom: 0;
}


.site-main {
    margin-bottom: 0;
}


/* Footer stays at the bottom when content is short */
.site-footer {
    margin-top: 0;
    flex-shrink: 0;
}

.site-header {
    margin-top: 0;
}


/* Hide big titles on PAGES (keep titles on blog posts) */
.page .entry-title {
    display: none;
}

/* Hide big titles on PAGES (keep titles on blog posts) */
.page .entry-title {
    display: none;
}

/* Remove extra space below the site header */
.site-header {
    background-color: #aa0000; /* cc0000 */
    margin-bottom: 0;
    padding-bottom: 0;
}

.site-header .inside-header {
    padding-top: 0.00rem;
    padding-bottom: 0.00rem;
}
/*======================================================================*/
/* === Site title + subtitle in header === */
/* === Site title + subtitle in header (simpler selectors) === */

/* Make sure the main title is on its own line */
.main-title a {
    display: block;
    font-size: 1.6rem;      /* slightly smaller than default big title */
    font-weight: 700;
}

/* Style the tagline as a second line under the title */
.site-description {
    display: block;
    margin-top: 0.1rem;
    font-size: 1.10rem;     /* similar to menu item size */
    font-weight: 400;
    color: #ff6600;         /* charcoal gray 333333 */
    text-transform: none;
}

/* Add parentheses around the tagline text */
.site-description::before {
    content: '(';
}

.site-description::after {
    content: ')';
}
/****/
/* Main title line */
.main-title a {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    white-space: nowrap;   /* keep '662 Nanometers' on one line */
}

/* Subtitle line */
.site-description {
    display: block;
    margin-top: 0.1rem;
    font-size: 1.10rem;
    font-weight: 600;
    color: #ff5522;
    text-transform: none;
    white-space: nowrap;   /* keep subtitle on one line */
}

@media (max-width: 480px) {
    .main-title a,
    .site-description {
        white-space: normal;  /* allow wrapping on very small screens */
    }
}



/*======================================================================*/

/* === Primary navigation layout === */

.main-navigation {
    /*background-color: #000000; /* black header bar */
    background-color: transparent; /* black header bar */
    margin-bottom: 0;
}

/* Make inside-navigation a flex container */
.main-navigation .inside-navigation {
    display: flex;
    flex-wrap: wrap;          /* allow tagline to go on its own line */
    align-items: center;

    max-width: 1100px;         /* or whatever your site content width is */
    width: 100%;              /* stretch to available width */
    margin: 0 auto;           /* center within the header */

    padding-top: 0.05rem;   
    padding-bottom: 0.05rem;

}

/* Branding (site title/logo) on the left, first */
.main-navigation .navigation-branding {
    order: 1;
}
/* Don't let the branding (title area) shrink too early */
.main-navigation .navigation-branding {
    flex: 0 0 auto;  /* size to content, don't flex-shrink */
    min-width: 0;
}


/* Main menu on the right, same row as branding */
.main-navigation .main-nav {
    order: 2;
    margin-left: auto;         /* pushes menu to the right */
}

/* Basic menu item styling */
.main-navigation .main-nav ul li a {
    color: #ffd84a;            /* yellow-gold text */
    letter-spacing: 0.08em;
    font-size: 0.95rem;
}

/* Hover state */
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .main-nav ul li:focus > a {
    color: #ffffff !important;
}

/* Active item (current page) */
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current_page_item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
    color: #ffffff;
    /* border-bottom: 2px solid #ffd84a; */
}

/* Make ancestor menu items (when viewing a post) match the active tab */
.main-navigation .main-nav ul li.current-post-ancestor > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a,
.main-navigation .main-nav ul li.current-post-parent > a {
    color: #ffffff !important;
}


/* === Tagline inside nav, on its own row under the menu === */

/* Full-width row below branding + menu */
.main-navigation .nav-tagline {
    order: 3;
    flex-basis: 100%;          /* force new row */
    text-align: right;
    padding: 0.10rem 0 0.10rem; /* controls vertical spacing */
}

/* Tagline text */
.main-navigation .nav-tagline span {
    font-style: italic;
    font-size: 0.95rem;
    color: #ffffff;            /* match active tab */
}
/* === Tighten header height + move tagline up === */

/* Reduce vertical padding of the whole nav block */
.main-navigation .inside-navigation {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    row-gap: 0 !important;          /* kill extra flex row spacing */
}

/* Pull the tagline row upward and reduce its own height */
.main-navigation .nav-tagline {
    padding-top: 0 !important;
    padding-bottom: 0.45rem !important;
    margin-top: -0.85rem !important;  /* move up about one text line */
    line-height: 1.1;
}


/* Footer message style */
.footer-message {
    font-size: 0.75rem;        /* smaller than tagline */
    line-height: 1.3;
    text-align: center;
    color: #bb1100;            /* softer than pure white */
    padding: 0.75rem 1rem 1.25rem;
}

/* ===== Laser splash overlay ===== */

#splash-overlay {
    position: fixed;
    inset: 0;
    background-color: #000000;      /* start black */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;           /* content below not clickable during splash */
}

/* Container for beams */
.splash-beams {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Individual laser beams */
.laser-beam {
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 0;
    background-color: #ff2222;
    opacity: 0.9;
    transform-origin: bottom center;
    animation-name: laser-beam-shoot;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

/* Beam animation: grow from bottom to beyond top */
@keyframes laser-beam-shoot {
    0% {
        height: 0;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        height: 130vh;  /* overshoot top of viewport */
        opacity: 1;
    }
}

/* Flash red phase */
#splash-overlay.splash-flash-red {
    background-color: #cc0000;
    transition: background-color 0.15s ease-out;
}

/* Curtain up: slide the entire overlay up to reveal the page */
#splash-overlay.splash-curtain-up {
    transition: transform 0.5s ease-in;
    transform: translateY(-100%);
}


/*======================================================================*/

/* === Compact archive listing for category pages === */

/* Remove big default spacing if any */
.nm-archive-listing .archive-description {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ===== Compact archive/blog heading ===== */

.nm-archive-listing .page-header {
    background: #ffffff;       /* same as your content background */
    padding: 0.5rem 0;         /* MUCH smaller than default */
    margin-bottom: 0.5rem;     /* small gap before the list */
    border-bottom: 1px solid #dddddd;  /* optional subtle separator */
}

.nm-archive-listing .page-title {
    font-size: 1.2rem;         /* small, readable */
    font-weight: 700;          /* bold, as you want */
    margin: 5px;                 /* remove WP default spacing */
    padding: 0;                /* remove WP default spacing */
}

/* The list itself */
.nm-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Each entry as a single compact row */
.nm-archive-entry {
    position: relative;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #440000;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: baseline;
}

/* === Portal-style entries (Events / Docs) === */

/* =========================================================
   NM Archive / Listing Layout (Events, Docs, Blog, Tags)
   Consolidated block — replace any existing nm-entry* rules
   ========================================================= */

/* The <li> itself is now a 2-row container (not a flex row). */
.nm-archive-entry {
    position: relative;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #440000;
    display: block;
}

/* ---------------- Top row: date | title ........ tags-right ---------------- */
.nm-entry-top {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    width: 100%;               /* ensure flex row spans full width */
}

.nm-entry-date {
    flex: 0 0 5rem;            /* fixed date column width */
    font-size: 0.9rem;
    opacity: 0.85;
}

.nm-entry-title {
    flex: 1 1 auto;            /* title uses remaining space */
    min-width: 0;              /* IMPORTANT so tags stay hard-right */
    text-decoration: none;
}

/* Inline category badge on tag/search/mixed archives */
.nm-entry-cat {
    margin-left: 0.35rem;
    font-size: 0.72rem;   /* clearly smaller than title */
    opacity: 0.7;         /* muted without a new color */
    white-space: nowrap;
    letter-spacing: 0.02em;
}


.nm-entry-title:hover {
    text-decoration: underline;
}

/* Tags live on top row, shoved to far right. */
.nm-entry-tags {
    margin-left: auto;         /* hard-right */
    flex: 0 0 auto;
    text-align: right;
    font-size: 0.75rem;
    color: #994422;
    white-space: nowrap;
}

.nm-entry-tags a {
    color: inherit;
    text-decoration: underline;
}

/* ---------------- Bottom row: notes under date | excerpt ---------------- */
/* Only appears on Events/Docs archives (per PHP). */
.nm-entry-bottom {
    display: grid;
    grid-template-columns: 5rem 1fr;  /* align with date column */
    column-gap: 0.75rem;
    margin-top: 0.025rem;            /* halved whitespace ABOVE excerpt row */
    align-items: start;
}

/* Notes link sits under date, left column. */
.nm-entry-notes,
.nm-entry-notes-placeholder {
    grid-column: 1;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.1;
}

.nm-entry-notes {
    text-decoration: underline;
}

/* Excerpt container, right column. */
.nm-inline-summary {
    grid-column: 2;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.18;
    opacity: 0.95;
}

/* Box-model fix: GP adds big <p> margins; we control them here.
   Top margin halved; bottom margin doubled. */
.nm-inline-summary p {
    margin-top: 0.045rem;      /* halved whitespace ABOVE excerpt text */
    margin-bottom: 0.70rem;    /* doubled whitespace BELOW excerpt text */
}

/* ---------------- Hover summaries (non-portal archives) ---------------- */
/* Your older tooltip/hover excerpts should still work for blog/tag/category
   because the PHP only emits nm-hover-summary there. */
.nm-hover-summary {
    position: absolute;
    left: 5.5rem;              /* aligns with text after date */
    top: 1.6rem;
    background: #220000;
    border: 1px solid #550000;
    padding: 0.4rem 0.5rem;
    width: min(36rem, 80vw);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease-in-out;
    font-size: 0.95rem;
    line-height: 1.25;
    /*color: #f5f0f0;*/
    color: #dd2211;
    pointer-events: none;   /* gets overridden on hover */
}

.nm-hover-wrapper {
    position: relative;
    display: inline-block;
}

.nm-hover-wrapper:hover .nm-hover-summary {
    opacity: 1;
    pointer-events: auto;
}

/* Show tooltip on hover for non-portal entries */
.nm-archive-entry:hover .nm-hover-summary {
    opacity: 1;
    /* color: inherit; */
}

/* Never show hover tooltip for portal entries (events/docs) */
.nm-portal-entry .nm-hover-summary {
    display: none;
}


/* ===== Single post layout ===== */

/* Remove excess top space above the meta+title section */
.entry-header {
    margin-top: 0.1rem !important;   /* reduce from GP’s ~2rem */
    padding-top: 0 !important;
}

.nm-single-header {
    margin: 0.2rem 0 0.0rem 0.1rem;
    padding-bottom: 0.1rem;
    /*border-bottom: 1px solid #dddddd; */
}

/* Title smaller + thicker, less vertical bulk */

.nm-single-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 1rem;   /* add space ABOVE title */
    margin-bottom: 0.1rem;
}


/* Meta line */
.nm-single-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    color: #444444;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #dddddd; 
}

.nm-meta-left span {
    margin-right: 0.6rem;
}

.nm-meta-tags a {
    color: #555555;
    text-decoration: none;
}

.nm-meta-tags a:hover {
    text-decoration: underline;
    color: #111111;
}

/* Content spacing tighter than default */
.nm-single-content {
    margin-top: 0.75rem;
}

.nm-single-content p {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}


/* ===== Kill mystery top-gap above single-post meta ===== */

/* GP sometimes pads the article itself */
.single-post .inside-article {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* GP sometimes pads the main content containers */
.single-post #primary,
.single-post #content,
.single-post .content-area,
.single-post .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* If margin-collapse is the culprit, prevent it */
.single-post .nm-single-header {
    padding-top: 0.01px;  /* tiny padding breaks margin collapsing */
}


/* Ensure classic WP image alignment wraps text */
.alignleft {
    float: left;
    margin: 0.3rem 1rem 0.3rem 0;
    max-width: 40%;
}

.alignright {
    float: right;
    margin: 0.3rem 0 0.3rem 1rem;
    max-width: 40%;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/* === Lyrics display (Songs posts) === */
.nm-lyrics-box {
    background: #2a0000;          /* dark red-black, not pure black */
    color: #f5f0f0;               /* light text */
    border-left: 4px solid #990000;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;

    padding: 1rem 1.2rem;
    margin: 1rem 0;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.45;

    white-space: pre-wrap;        /* preserve line breaks */
}

/* If you used <pre> inside the box, neutralize GP's pre styling */
.nm-lyrics-box pre {
    margin: 0;
    padding: 0;
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre-wrap;
}

/* Just in case GP styles paragraphs inside */
.nm-lyrics-box p {
    margin: 0.4rem 0;
    color: inherit;
}

/* Audio player theme */
.wp-audio-shortcode {
    width: 100% !important;
    max-width: 100%;
    margin: 0.75rem 0;          /* gives breathing space */
}


/* **************************************************************************************** */


.nm-lyrics-box,
.wp-audio-shortcode {
    margin-left: 1rem;
    margin-right: 1rem;
}

@media (max-width: 600px) {
    .nm-lyrics-box,
    .wp-audio-shortcode {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
}
/* **************************************************************************************** */

/* =========================================================
   NM Custom Audio Player (Option A: big red play)
   ========================================================= */

.nm-audio-player {
    margin: 0.75rem 1rem 1rem 1rem;
    padding: 0.75rem 1rem;
    background: #170000;
    border: 5px solid #990000;      /* bright thin red border */
    border-radius: 10px;
    color: #f5f0f0;
    max-width: 48rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}

.nm-audio-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.nm-audio-vol {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    margin-left: auto;   /* <<< ADD THIS: shoves volume to the right */
}


.nm-audio-title {
    font-size: 1.05rem;
    opacity: 0.95;
}

.nm-audio-vol {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.nm-audio-vol-label {
    font-size: 0.8rem;
    opacity: 0.85;
}

.nm-audio-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Play button body */
.nm-audio-play {
    width: 3.0rem;
    height: 3.0rem;
    border-radius: 999px;
    border: 2px solid #cc0000;
    background: #990000;
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
}

/* Remove text rendering entirely */
.nm-audio-play { color: transparent; font-size: 0; line-height: 0; }

/* Play triangle */
.nm-audio-play::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 14px solid #fff;
}

/* Pause bars when playing */
.nm-audio-play[data-state="pause"]::before,
.nm-audio-play[data-state="pause"]::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 5px;
    height: 16px;
    background: #fff;
    transform: translateY(-50%);
    border-radius: 1px;
}

.nm-audio-play[data-state="pause"]::before {
    left: 42%;
    border: none;
}

.nm-audio-play[data-state="pause"]::after {
    left: 56%;
}

.nm-audio-progress {
    flex: 1 1 auto;
    height: 6px;
    accent-color: #cc0000;
}

.nm-audio-time {
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: nowrap;
}

.nm-audio-volume {
    width: 8rem;
    accent-color: #cc0000;
}

/* ---------- Range styling for Safari/WebKit ---------- */
.nm-audio-progress,
.nm-audio-volume {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

/* Track */
.nm-audio-progress::-webkit-slider-runnable-track,
.nm-audio-volume::-webkit-slider-runnable-track {
    height: 6px;
    background: #440000;
    border-radius: 999px;
}

/* Thumb */
.nm-audio-progress::-webkit-slider-thumb,
.nm-audio-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #cc0000;
    border: 2px solid #fff;
    border-radius: 50%;
    margin-top: -4px;
    cursor: pointer;
}

/* Firefox equivalents */
.nm-audio-progress::-moz-range-track,
.nm-audio-volume::-moz-range-track {
    height: 6px;
    background: #440000;
    border-radius: 999px;
}

.nm-audio-progress::-moz-range-thumb,
.nm-audio-volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #cc0000;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Phones */
@media (max-width: 600px) {
    .nm-audio-player {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding: 0.7rem 0.8rem;
    }
    .nm-audio-volume { width: 6rem; }
}

