/*
Theme Name: The Forgotten Nightmare
Theme URI: 
Description: A retro Commodore 64-inspired WordPress theme with authentic green pixel aesthetics
Version: 1.0
Author: Your Name
Author URI: 
License: Custom License
License URI: 
Text Domain: the-forgotten-nightmare
Domain Path: /languages
*/

@font-face {
    font-family: 'Commodore Rounded';
    src: url('fonts/Commodore-64-v6.3.TTF') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fg: #56B414;
    --bg: #081808;
    --accent: #3D7A0A;
    --bright: #7FE818;
    --font-mono: 'Commodore Rounded', monospace;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
    font-weight: 700;
}

/* Scanline effect overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 999;
}

/* CRT glow effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(8, 24, 8, 0.3) 100%
    );
    z-index: 998;
}

header {
    background-color: var(--bg);
    border-bottom: 3px solid var(--fg);
    padding: 2rem;
    position: relative;
    box-shadow: 0 4px 0 var(--accent);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 var(--accent);
    animation: gentleGlitch 2s ease-in-out infinite;
}

.logo a {
    text-decoration: none;
    color: var(--fg);
}

.logo a:hover {
    color: var(--bright);
}

@keyframes gentleGlitch {
    0%, 100% {
        text-shadow: 1px 1px 0 var(--accent);
    }
    50% {
        text-shadow: -1px -1px 0 var(--bright);
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--fg);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid var(--fg);
    transition: all 0.2s;
    font-weight: bold;
    letter-spacing: 1px;
}

nav a:hover {
    background-color: var(--fg);
    color: var(--bg);
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--accent);
}

nav a:active {
    transform: translate(0, 0);
    box-shadow: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 var(--accent);
    border-top: 3px solid var(--fg);
    border-bottom: 3px solid var(--fg);
    padding: 1rem 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-left: 5px solid var(--fg);
    padding-left: 1rem;
    text-shadow: 1px 1px 0 var(--accent);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    color: var(--bright);
}

p {
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    line-height: 1.8;
    font-size: 1.05rem;
    font-weight: 700;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    border: 2px solid var(--fg);
}

th, td {
    border: 1px solid var(--fg);
    padding: 0.8rem;
    text-align: left;
}

th {
    background-color: rgba(8, 24, 8, 0.5);
    color: var(--bright);
    font-weight: bold;
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fg), transparent);
    margin: 2rem 0;
}

.hero {
    border: 3px solid var(--fg);
    padding: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(86, 180, 20, 0.05) 0%, rgba(8, 24, 8, 0.5) 100%);
    position: relative;
    box-shadow: inset 0 0 20px rgba(86, 180, 20, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 1px dashed var(--accent);
    pointer-events: none;
}

.hero p {
    font-size: 1.2rem;
    line-height: 2;
}

.crt-box {
    border: 3px solid var(--fg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: rgba(8, 24, 8, 0.5);
    box-shadow: inset 0 0 10px rgba(86, 180, 20, 0.1);
    position: relative;
}

.crt-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bright);
    opacity: 0.3;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    border: 2px solid var(--fg);
    padding: 1rem;
    background-color: rgba(8, 24, 8, 0.3);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(86, 180, 20, 0.2), transparent);
    transition: left 0.5s;
}

.gallery-item:hover::before {
    left: 100%;
}

.gallery-item:hover {
    border-color: var(--bright);
    box-shadow: 0 0 10px var(--fg), inset 0 0 10px rgba(86, 180, 20, 0.1);
    transform: translate(-2px, -2px);
    background-color: rgba(86, 180, 20, 0.1);
}

.placeholder-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(45deg, var(--accent), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    border: 1px dashed var(--fg);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: transparent;
    color: var(--fg);
    border: 2px solid var(--fg);
    font-family: var(--font-mono);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--fg);
    color: var(--bg);
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--accent);
}

.btn:active {
    transform: translate(0, 0);
    box-shadow: none;
}

.btn-bright {
    border-color: var(--bright);
    color: var(--bright);
}

.btn-bright:hover {
    background-color: var(--bright);
    color: var(--bg);
}

.news-item {
    border-left: 4px solid var(--fg);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--accent);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--bright);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.contact-form {
    border: 2px solid var(--fg);
    padding: 2rem;
    background-color: rgba(8, 24, 8, 0.3);
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--bg);
    color: var(--fg);
    border: 2px solid var(--fg);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--bright);
    box-shadow: 0 0 10px rgba(86, 180, 20, 0.3);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

footer {
    background-color: var(--bg);
    border-top: 3px solid var(--fg);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 -4px 0 var(--accent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.divider {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fg), transparent);
    margin: 2rem 0;
}

@media (max-width: 768px) {
    body {
        font-size: 0.8rem !important;
    }
	p {
        font-size: 0.8rem !important;
    }
    h1 {
        font-size: 1.4rem;
    }
    h2 {
        font-size: 1.2rem;
    }
	h3 {
		font-size: 1.0rem 
	}
    nav ul {
        flex-direction: row !important;
        gap: 0.3rem !important;
        row-gap: 0.2rem !important;
        flex-wrap: wrap !important;
    }
    nav a {
        padding: 0.3rem 0.4rem !important;
        font-size: 1.1rem !important;
        display: inline-block !important;
        white-space: nowrap !important;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .logo {
        font-size: 1.4rem !important;
        letter-spacing: 1px !important;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* WordPress-specific styles */
.wp-caption {
    border: 2px solid var(--fg);
    padding: 0.5rem;
    margin-bottom: 1rem;
    background-color: rgba(8, 24, 8, 0.3);
}

.wp-caption-text {
    color: var(--bright);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--fg);
    margin: 1rem 0;
}

a {
    color: var(--bright);
    text-decoration: underline;
}

a:hover {
    color: var(--fg);
}

blockquote {
    border-left: 4px solid var(--fg);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--bright);
}

code {
    background-color: rgba(8, 24, 8, 0.5);
    border: 1px solid var(--fg);
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
}

pre {
    background-color: rgba(8, 24, 8, 0.5);
    border: 2px solid var(--fg);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    border: none;
    padding: 0;
    background: none;
}

/* ==========================================================================
   ACCESSIBILITY STYLES
   ========================================================================== */

/* Skip to content link - hidden until focused */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg);
    color: var(--bright);
    padding: 1rem 2rem;
    border: 2px solid var(--bright);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: bold;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 10px;
    outline: none;
    box-shadow: 0 0 10px var(--bright);
}

/* Screen reader text - visually hidden but accessible */
.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;
}

.screen-reader-text:focus {
    background-color: var(--bg);
    clip: auto !important;
    clip-path: none;
    color: var(--bright);
    display: block;
    height: auto;
    left: 5px;
    padding: 1rem 2rem;
    top: 5px;
    width: auto;
    z-index: 10000;
}

/* Focus styles for better keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--bright);
    outline-offset: 2px;
}

/* Ensure images have visible alt text on load failure */
img {
    font-family: var(--font-mono);
    color: var(--fg);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   DOS-STYLE SUBMENU BAR
   Add this to the end of your style.css file
   ========================================================================== */

/* Parent items with children get an indicator */
.main-nav .has-children > a::after {
    content: ' ▼';
    font-size: 0.7em;
}

.main-nav .has-children.active > a::after {
    content: ' ▲';
}

/* Active state for parent items */
.main-nav .has-children.active > a {
    background-color: var(--fg);
    color: var(--bg);
}

/* Hide the default WordPress submenus */
.main-nav .sub-menu {
    display: none;
}

/* Submenu bar container */
.submenu-bar {
    background-color: rgba(8, 24, 8, 0.95);
    border-bottom: 2px solid var(--accent);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.submenu-bar.active {
    max-height: 200px;
    padding: 1rem 2rem;
}

/* Submenu content wrapper */
.submenu-bar .submenu-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Label showing which menu is open */
.submenu-bar .submenu-label {
    color: var(--bright);
    font-weight: bold;
    letter-spacing: 2px;
}

.submenu-bar .submenu-label::after {
    content: ' >';
}

/* Submenu items list */
.submenu-bar ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.submenu-bar li {
    margin: 0;
}

/* Submenu links */
.submenu-bar a {
    color: var(--fg);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent);
    display: block;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.submenu-bar a:hover,
.submenu-bar a:focus {
    border-color: var(--bright);
    color: var(--bright);
    background-color: rgba(86, 180, 20, 0.1);
    outline: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .submenu-bar.active {
        padding: 0.8rem 1rem;
    }
    
    .submenu-bar .submenu-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .submenu-bar .submenu-label {
        font-size: 0.9rem;
    }
    
    .submenu-bar ul {
        gap: 0.3rem;
    }
    
    .submenu-bar a {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
}