/*
Theme Name: Adambindslev Custom Theme
Theme URI: https://adambindslev.dk
Author: Adambindslev (Antigravity Assistant)
Author URI: https://adambindslev.dk
Description: A custom built theme for adambindslev.dk with a cyberpunk/hipster aesthetic, built from the ground up for performance and precise control.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adambindslev-theme
*/

/* CSS Variables for unifying aesthetic */
:root {
    /* Colors */
    --bg-color: #0d0d0d;
    --text-color: #e0e0e0;
    --accent-color: #00ff41;
    /* Cyberpunk / Matrix green */
    --accent-hover: #00cc33;
    --secondary-bg: #1a1a1a;
    --border-color: #333333;

    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: 'Courier New', Courier, monospace;
    /* For that hacker feel */
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Layout */
    --container-width: 1200px;
}

/* CSS Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover,
a:focus {
    color: var(--accent-hover);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    line-height: 1.2;
}

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

/* Base Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 
 * KOPIER DETTE IND I: WordPress -> Udseende -> Tilpas (Customizer) -> Ekstra CSS
 * Det sætter cyber-looket for alt inden i dine HTML-blokke.
 */

/* Importér de nødvendige Google Fonts lægges i funktioner for at forhindre fejl i editor */

/* =========================================================
   GLOBALE THEME OVERRIDES FOR AT FJERNE HVIDE STREGER
   ========================================================= */
body {
    background-color: #050505 !important;
    /* Forhindrer hvid baggrund i at skinne igennem */
}

.wp-site-blocks {
    gap: 0 !important;
    /* Fjerner WordPress standard margin mellem custom HTML blokke */
}

/* Scope al vores styling til "cyber-block" klassen, så vi ikke ødelægger hele dit eksisterende theme uforsætligt */
.cyber-block {
    --bg-color: #050505;
    --text-main: #d3d3d3;
    --neon-yellow: #fcee0a;
    --neon-cyan: #00f3ff;
    --neon-pink: #ff003c;
    --grid-gap: 20px;

    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Courier Prime', monospace;
    line-height: 1.6;
    padding: 0;
    box-sizing: border-box;
}

.cyber-block *,
.cyber-block *::before,
.cyber-block *::after {
    box-sizing: inherit;
}

/* Neon Borders for blocks */
.cyber-block .neon-border {
    border: 1px solid #222;
    position: relative;
    padding: 30px;
    background: rgba(10, 10, 10, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--grid-gap);
}

.cyber-block .neon-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan);
}

/* Hero Sektion */
.cyber-block .hero-block {
    text-align: center;
    /* Mere padding i bunden for at "trække" hero'en ned så bilen kan ses */
    padding: 120px 20px 100px 20px;
    border-top: 5px solid var(--neon-yellow);
    margin-bottom: 0 !important;

    /* 
     * Baggrundsbillede konfiguration: 
     * Vi beholder scanlines og en "darkening" effekt over billedet for at sikre teksten kan læses.
     * Den ægte URL til bilen indsættes nu her, og gradienten gøres lidt svagere så vi kan se den.
     */
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 243, 255, 0.03) 2px, rgba(0, 243, 255, 0.03) 4px),
        linear-gradient(to bottom, rgba(5, 5, 5, 0.2), rgba(5, 5, 5, 0.8)),
        url('/wp-content/uploads/2026/02/heroimage.jpg');

    background-size: cover, cover, cover;
    /* Positioner bilen i bunden (center 80%) i stedet for center/center */
    background-position: center, center, center 80%;
    position: relative;
    overflow: hidden;
}

.cyber-block .hero-block::before {
    background: var(--neon-yellow);
    box-shadow: 0 0 10px var(--neon-yellow);
}

.cyber-block .sys-label {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    position: absolute;
    top: 15px;
    left: 15px;
    font-weight: bold;
}

.cyber-block h1.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 5rem);
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    font-weight: 900;
    text-shadow: 3px 3px 0px var(--neon-pink), -3px -3px 0px var(--neon-cyan);
    letter-spacing: -2px;
}

.cyber-block .subtitle {
    font-size: 1.1rem;
    letter-spacing: 6px;
    color: var(--neon-yellow);
    margin-top: 10px;
}

/* Typography in articles */
.cyber-block h2,
.cyber-block h3 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    text-transform: uppercase;
    margin-top: 10px;
}

.cyber-block h2 {
    font-size: clamp(1.5rem, 3vw, 3rem);
    line-height: 1.1;
    margin-bottom: 20px;
    word-break: break-word;
}

.cyber-block .article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    border-bottom: 1px dotted #555;
    padding-bottom: 10px;
}

.cyber-block .category {
    color: var(--neon-pink);
    font-weight: bold;
}

.cyber-block .timestamp {
    color: var(--neon-cyan);
}

/* Image Placeholder (Hvis du bruger et rigtigt billede, kan du bruge klassen "image-placeholder" på det, eller fjerne den) */
.cyber-block .image-placeholder {
    width: 100%;
    height: 350px;
    background: #111;
    border: 1px solid #333;
    margin: 20px 0;
    position: relative;
    background-image: linear-gradient(45deg, #111 25%, #0a0a0a 25%, #0a0a0a 50%, #111 50%, #111 75%, #0a0a0a 75%, #0a0a0a 100%);
    background-size: 20px 20px;
}

.cyber-block .image-placeholder::after {
    content: 'IMG_DATA // 404 NOT FOUND';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #444;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
}

.cyber-block .excerpt {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Buttons */
.cyber-block .btn.cyber-btn {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 20px;
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

.cyber-block .btn.cyber-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* Sidebar specifik */
.cyber-block .side-stories {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

.cyber-block .sub-story.neon-border::before {
    background: var(--neon-pink);
    box-shadow: 0 0 5px var(--neon-pink);
}

/* Terminal Widget */
.cyber-block .terminal-widget {
    background: #0a0a0a;
    border: 1px solid #222;
    border-left: 4px solid var(--neon-yellow);
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    color: #0f0;
    padding: 20px;
}

.cyber-block .terminal-header {
    background: #111;
    padding: 5px 10px;
    color: var(--neon-yellow);
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid #222;
}

.cyber-block .terminal-lines {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cyber-block .terminal-lines li {
    margin-bottom: 8px;
    color: #0f0;
}

.cyber-block .blinking-cursor {
    animation: cyber-blink 1s step-end infinite;
    display: inline-block;
    width: 10px;
    height: 15px;
    background-color: #0f0;
    vertical-align: bottom;
    margin-left: 5px;
}

@keyframes cyber-blink {
    50% {
        opacity: 0;
    }
}

/* ========================================================
   NYE GRID LAYOUT REGLER (Baseret på adambindslev.dk/grid/)
   ======================================================== */

.cyber-block .category-section {
    margin-bottom: 30px;
    padding-top: 15px;
}

/* En tynd streg med neon glød (I stedet for en hel boks, bruger vi en understregning som sektionsskiller) */
.cyber-block .neon-border-top {
    border-top: 2px solid var(--neon-cyan);
    box-shadow: 0 -3px 5px rgba(0, 243, 255, 0.2);
    position: relative;
    margin-bottom: 20px;
}

.cyber-block .neon-border-top::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 20%;
    height: 4px;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
}

.cyber-block .section-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 20px;
    display: inline-block;
    border-bottom: 1px dotted var(--text-main);
    padding-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
}

/* Fælles Grid Settings */
.cyber-block .article-grid {
    display: grid;
    gap: 20px;
}

/* 2-Kolonne Grid (f.eks. Produktivitet, Nettet) */
.cyber-block .grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 3-Kolonne Grid (f.eks. Fotografi, Computerspil) */
.cyber-block .grid-3col {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Grid Cards (Individuelle artikler i griddet) */
.cyber-block .grid-card {
    display: flex;
    flex-direction: column;
}

.cyber-block .image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Eller 3/2 hvis det passer bedre til dine billeder */
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #333;
    background: #111;
}

.cyber-block .cyber-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.2) grayscale(0.2);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.cyber-block .grid-card:hover .cyber-img {
    filter: brightness(1) contrast(1.1) grayscale(0);
    transform: scale(1.03);
}

/* Scanline effekt over billeder */
.cyber-block .scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2) 2px, transparent 2px, transparent 4px);
    pointer-events: none;
    /* Så det ikke blokerer klik på div'en */
}

.cyber-block .card-meta {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-bottom: 5px;
    font-weight: bold;
}

.cyber-block .grid-card h3 {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s;
    text-transform: none;
    /* Slå uppercase fra for almindelige overskrifter for læsbarhed */
}

.cyber-block .grid-card:hover h3 {
    color: var(--neon-pink);
}

/* Tekst-only Grid (f.eks. Håndskrevet) */
.cyber-block .grid-text {
    display: block;
    /* Overstyrer CSS grid, vi laver det som et terminal list view */
}

.cyber-block .terminal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cyber-block .terminal-list li {
    margin-bottom: 10px;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
}

.cyber-block .cyber-link {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    gap: 15px;
    width: 100%;
    transition: color 0.2s;
}

.cyber-block .cyber-link:hover {
    color: var(--neon-yellow);
}

.cyber-block .cyber-link:hover .timestamp {
    color: var(--neon-cyan);
}

.cyber-block .terminal-list .timestamp {
    color: #555;
    font-family: 'Courier Prime', monospace;
}

.cyber-block .terminal-list .title {
    font-family: 'Courier Prime', monospace;
}

/* =========================================================
   BENTO BOX GRID LAYOUT FOR DEN HELT NYE FORSIDE      
   ========================================================= */

.cyber-frontpage {
    display: grid;
    /* Opdeling af 3 asymmetriske kolonner */
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 60px;
}

@media (max-width: 1024px) {
    .cyber-frontpage {
        grid-template-columns: 1fr 1fr;
    }
}

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

.bento-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Afstand mellem sektioner internt i kolonnerne */
}

.cyber-frontpage .section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.bento-cell {
    display: flex;
    flex-direction: column;
}

/* Smal liste-visning i bento-grid */
.bento-list-card {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.bento-list-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bento-list-card .image-wrapper {
    flex: 0 0 100px;
    height: 100px;
    margin-bottom: 0;
}

.bento-list-card .text-content {
    flex: 1;
}

.bento-list-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    margin-top: 0;
}

/* Bento standard kort til mellemstore kasser */
.bento-grid-card {
    margin-bottom: 25px;
}

.bento-grid-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.bento-grid-card .image-wrapper {
    .bento-grid-card .image-wrapper {
        aspect-ratio: 16/9;
        margin-bottom: 15px;
    }

    /* =========================================================
   AUDIO PLAYER STYLING
   ========================================================= */

    /* Indpakning af selve lydblokken */
    .cyber-block .wp-block-audio {
        background: rgba(10, 10, 10, 0.8);
        border: 1px solid #222;
        border-left: 4px solid var(--neon-cyan);
        padding: 20px 20px 10px 20px;
        margin-bottom: var(--grid-gap);
        position: relative;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }

    /* System Audio Label Animation */
    .cyber-block .wp-block-audio::before {
        content: 'AUDIO STREAM [ACTIVE]';
        position: absolute;
        top: -10px;
        left: 15px;
        background: var(--bg-color);
        color: var(--neon-cyan);
        font-size: 0.75rem;
        font-weight: bold;
        padding: 0 5px;
        font-family: 'Orbitron', sans-serif;
        letter-spacing: 1px;
        animation: cyber-blink 2s step-end infinite;
    }

    /* Audio Player Element: CSS filtre for at give standard-afspilleren et cyberpunk neon-look (kan variere mildt pr. browser) */
    .cyber-block .wp-block-audio audio {
        width: 100%;
        margin-bottom: 15px;
        outline: none;
        /* Inverterer farver og skyder hue mode over i cyan blålige/grønlige toner */
        filter: invert(0.9) sepia(1) saturate(5) hue-rotate(130deg) brightness(0.9) contrast(1.2);
        border-radius: 0;
    }

    /* Billedtekst (Figcaption) under lyden */
    .cyber-block .wp-block-audio figcaption.wp-element-caption {
        font-family: 'Courier Prime', monospace;
        color: var(--neon-yellow);
        font-size: 0.9rem;
        text-align: left;
        margin: 0;
        padding: 10px 0 0 10px;
        border-top: 1px dashed #333;
        position: relative;
    }

    .cyber-block .wp-block-audio figcaption.wp-element-caption::before {
        content: '>> ';
        color: var(--neon-pink);
        animation: cyber-blink 1s step-end infinite;
    }
}

/* =========================================================
   AUDIO PLAYER STYLING
   ========================================================= */

/* Indpakning af selve lydblokken */
.wp-block-audio {
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid #222 !important;
    border-left: 4px solid var(--neon-cyan) !important;
    padding: 20px 20px 10px 20px !important;
    margin-bottom: var(--grid-gap) !important;
    position: relative !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
}

/* System Audio Label Animation */
.wp-block-audio::before {
    content: 'AUDIO STREAM [ACTIVE]';
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--bg-color, #050505);
    color: var(--neon-cyan, #00f3ff);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0 5px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    animation: cyber-blink 2s step-end infinite;
    z-index: 2;
}

/* Audio Player Element: CSS filtre for at give standard-afspilleren et cyberpunk neon-look (kan variere mildt pr. browser) */
.wp-block-audio audio {
    width: 100%;
    margin-bottom: 15px;
    outline: none;
    /* Inverterer farver og skyder hue mode over i cyan blålige/grønlige toner */
    filter: invert(0.9) sepia(1) saturate(5) hue-rotate(130deg) brightness(0.9) contrast(1.2);
    border-radius: 0;
}

/* Billedtekst (Figcaption) under lyden */
.wp-block-audio figcaption.wp-element-caption {
    font-family: 'Courier Prime', monospace !important;
    color: var(--neon-yellow, #fcee0a) !important;
    font-size: 0.9rem !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 10px 0 0 10px !important;
    border-top: 1px dashed #333 !important;
    position: relative !important;
    background: transparent !important;
}

.wp-block-audio figcaption.wp-element-caption::before {
    content: '>> ' !important;
    color: var(--neon-pink, #ff003c) !important;
    animation: cyber-blink 1s step-end infinite !important;
}

/* =========================================================
   UX/UI OPTIMERINGER (MOBILE & DESKTOP)
   ========================================================= */

/* 1. Typografi & Tekstombrydning på Mobil for lange ordbrydning */
.cyber-block h2,
h1.entry-title {
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

@media (max-width: 768px) {
    .cyber-block h2 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    h1.entry-title {
        font-size: 2rem !important;
    }
}

/* 2. UI-elementer Overlap (Sikrer Return-knap ikke rammer mobil-notch) */
.ab-cyber-return {
    margin-top: 15px !important;
    margin-left: 15px !important;
}

/* 3. Artikel-Titel Boksens Manglende Kontrast */
.entry-header {
    background-color: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid #222 !important;
    border-bottom: 2px solid var(--neon-cyan) !important;
    padding: 20px !important;
}

.entry-title {
    color: var(--neon-yellow) !important;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif !important;
}

/* 4. Skrifttype-spring (Brødtekst i artikler ændres til tech sans-serif) */
.entry-content,
.entry-content p {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif !important;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e0e0e0;
}

/* 5. Listerne På Forsiden - Afstand på Mobil */
@media (max-width: 768px) {
    .cyber-block .terminal-list li {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
}

/* 6. Scanlines på Billeder (Justerer gennemsigtigheden) */
.cyber-block .scanline::after {
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1) 2px, transparent 2px, transparent 4px) !important;
}