/* --- 1. BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    /* Added overflow-x: hidden to prevent accidental horizontal scrolling on mobile */
    overflow-x: hidden;
}

/* --- 2. NAVIGATION & LOGO --- */
.nav-bar {
    background-color: #111111;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-area {
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #0070d1;
}

/* --- 3. SEARCH BAR --- */
.search-container {
    flex-grow: 1;
    max-width: 450px;
    margin: 0 40px;
}

#manualSearch {
    width: 100%;
    padding: 10px 15px;
    background-color: #1a1d21;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    outline: none;
    transition: 0.3s;
    /* Prevents iOS from zooming in on the input automatically */
    font-size: 16px; 
}

#manualSearch:focus {
    border-color: #0070d1;
    box-shadow: 0 0 10px rgba(0, 112, 209, 0.4);
}

/* --- 4. HERO SECTION --- */
.hero-box {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), 
                url('images/hero-bg.jpg'),
                linear-gradient(135deg, #001a33 0%, #000000 100%);
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #222;
}

.hero-box h1 {
    font-size: clamp(1.8rem, 5vw, 3rem); /* Dynamically sizes text based on screen width */
    font-weight: 900;
    margin-bottom: 15px;
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-box p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #0070d1;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- 5. GRID & HOME PAGE --- */
.content-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    /* minmax(280px...) ensures boxes don't get too skinny on tiny phones */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;
}

.section-title {
    grid-column: 1 / -1;
    border-left: 4px solid #0070d1;
    padding-left: 15px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.article-box {
    background-color: #111111;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.3s, border-color 0.3s;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.article-box:hover {
    transform: translateY(-5px);
    border-color: #0070d1;
}

.box-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.box-text {
    padding: 20px;
}

.box-text h3 {
    margin-bottom: 10px;
    color: #0070d1;
}

.box-text p {
    font-size: 0.9rem;
    color: #cccccc;
}

/* --- 6. ARTICLE PAGE LAYOUT --- */
.article-page {
    background-color: #050505;
}

.article-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 5% 20px; /* Uses percentage for better top/bottom spacing on mobile */
    background-color: #111111;
    border-radius: 12px;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.back-link, .next-article-link {
    color: #0070d1;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: 0.3s;
}

/* --- 7. THE FIXED IMAGE SIZING --- */
.img-container {
    width: 100%;
    max-width: 700px;
    margin: 30px auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* --- 8. BODY TEXT & INTERLINKING --- */
.body-text h2 {
    margin: 30px 0 15px;
    color: #0070d1;
}

.body-text p {
    margin-bottom: 20px;
    color: #dddddd;
}

.interlinking-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.interlinking-footer ul {
    list-style: none;
    padding: 0;
}

.interlinking-footer li {
    margin-bottom: 10px;
}

.interlinking-footer a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
}

/* --- 9. FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #222;
    margin-top: 60px;
}

/* --- 10. RESPONSIVE DESIGN (The Mobile Fixes) --- */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        padding: 1.5rem 20px;
        text-align: center;
    }
    
    .search-container {
        margin: 15px 0;
        width: 100%;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .nav-links a {
        margin-left: 0;
    }

    .hero-box {
        height: 250px;
    }

    .featured-image {
        height: 250px; /* Shrinks the article hero image for phone screens */
    }

    .article-header h1 {
        font-size: 1.7rem; /* Prevents long titles from breaking the layout */
    }
}

/* Added extra small screen fix for very small phones */
@media (max-width: 480px) {
    .article-nav {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* Contact Page Specific Styles */
.contact-form {
    max-width: 700px;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form label {
    color: #0070d1; /* PlayStation Blue */
    font-weight: bold;
    font-size: 0.9rem;
}

.contact-form input, 
.contact-form textarea {
    padding: 15px;
    background: #1a1a1a; /* Matches your table style */
    border: 1px solid #333;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: #0070d1;
    outline: none;
}

.contact-form .amazon-button {
    border: none;
    cursor: pointer;
    align-self: flex-start;
}


