/*
Theme Name: Netmatters Challenge Theme
Theme URI: https://example.com
Author: Alexander Brown
Author URI: https://example.com
Description: A modern, high-performance custom WordPress theme built for the Netmatters developer challenge.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://gnu.org
Text Domain: netmatters-challenge
*/

/* Base Fallback Styles */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure the Elementor template takes up full browser width */
.page-template-template-elementor-full-width .elementor-custom-template-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure Elementor sections stretch edges cleanly without unexpected margins */
.page-template-template-elementor-full-width .site-main {
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Header & Navigation Layout
   ========================================================================== */

.site-header {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem; /* Creates safe visual space between logo and navigation to prevent overlapping */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.site-branding {
    text-align: center;
}

.site-branding h1.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.site-branding h1.site-title a {
    text-decoration: none;
    color: #1a202c;
}

/* Main Navigation Box Outline & Spacing */
.main-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1; /* Clean outline around the navigation bar */
    border-radius: 6px;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
}

#primary-menu-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem; /* Ample spacing between individual nav links */
}

#primary-menu-list li {
    position: relative;
}

#primary-menu-list a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    padding: 0.25rem 0;
    display: inline-block;
    transition: color 0.2s ease-in-out;
}

#primary-menu-list a:hover,
#primary-menu-list .current-menu-item > a,
#primary-menu-list .current_page_item > a {
    color: #0073aa;
}

/* ==========================================================================
   Single Project Styling
   ========================================================================== */

.single-project-page {
    background-color: #f8fafc;
    padding-bottom: 60px;
}

.single-project-hero {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 50px 20px 40px;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.project-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 15px;
    transition: background-color 0.2s;
}
.project-category-badge:hover {
    background-color: #bae6fd;
}

.single-project-title {
    font-size: 2.5rem;
    color: #0f172a;
    margin: 0 0 10px 0;
    font-weight: 800;
}

.single-project-client {
    font-size: 1rem;
    color: #475569;
    margin: 0;
}

.single-featured-image-wrap {
    max-width: 1100px;
    margin: -30px auto 40px;
    padding: 0 20px;
}

.hero-image-container img.project-hero-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.single-project-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .single-project-container {
        grid-template-columns: 1fr;
    }
}

.project-main-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.project-main-content h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.back-to-archive {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.back-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.back-link:hover {
    text-decoration: underline;
}

.project-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 30px;
}

.project-sidebar-card h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.action-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.live-site-btn {
    background-color: #0073aa;
    color: #ffffff;
}
.live-site-btn:hover {
    background-color: #005177;
}

.github-btn {
    background-color: #1e293b;
    color: #ffffff;
}
.github-btn:hover {
    background-color: #0f172a;
}

.sidebar-meta-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.meta-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 700;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag-item {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.sidebar-tag-item:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   Footer Styling (Matched to 1100px Container Width)
   ========================================================================== */

.site-footer {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 2.5rem 0;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    box-sizing: border-box;
}

#footer-menu-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

#footer-menu-list a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.95rem;
}

#footer-menu-list a:hover {
    color: #0073aa;
}

.site-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}