/*
Theme Name: Nyumbani Theme
Author: Nyumbani Systems
Description: A premium, mobile-first cinema theme designed for the Nyumbani Movie Press plugin.
Version: 1.0.2
*/

:root {
    --primary: #f90403;
    --secondary: #fc9707;
    --dark: #000000;
    --light: #ffffff;
    --gray: #1a1a1a;
    --text: #333333;
    --font-heading: 'Helvetica Neue', sans-serif;
    --font-body: 'Arial', sans-serif;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--text); line-height: 1.6; background: #f4f4f4; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; margin-bottom: 1rem; }
a { text-decoration: none; color: var(--primary); transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* Layout Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   HEADER & LOGO (Added for Layout Control)
   ========================================= */

.site-header {
    background-color: var(--dark);
    height: 100px; /* 1. Max Height Enforced */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

/* Flex Container to align Logo (Left) and Menu (Right) */
.nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.site-branding {
    flex-shrink: 0;
    margin-right: 40px;
    z-index: 1001;
    display: flex;
    align-items: center;
}

/* 2. Logo Scaling */
.site-branding img,
.custom-logo-link img {
    max-height: 50px !important; /* Force max height */
    width: auto !important;      /* Maintain aspect ratio */
    display: block;
}

/* Text Logo Fallback */
.site-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    text-decoration: none;
}

/* =========================================
   CINEMATIC PAGE TEMPLATE STYLES
   ========================================= */

/* 1. The Hero Header */
.nmp-page-header {
    position: relative;
    height: 400px; /* Tall, immersive header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--dark); /* Fallback */
    background-size: cover;
    background-position: center;
    color: #fff;
    margin-bottom: 60px;
    overflow: hidden;
}

/* Fallback for pages with no image */
.nmp-page-header.no-bg-img {
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    height: 300px; /* Slightly shorter if no image */
}

/* 2. The Dark Overlay (Crucial for text readability) */
.nmp-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}

/* 3. Typography */
.nmp-header-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary); /* Red Accent */
    margin-bottom: 10px;
    font-weight: 700;
    opacity: 0;
    animation: nmpFadeInUp 0.8s ease forwards;
}

.nmp-page-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    animation: nmpFadeInUp 0.8s 0.2s ease forwards;
}

.nmp-header-line {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 20px auto 0;
    border-radius: 2px;
    opacity: 0;
    animation: nmpWidthGrow 0.8s 0.5s ease forwards;
}

/* 4. Content Area */
.nmp-page-main {
    padding-bottom: 80px;
}

.nmp-content-wrapper {
    background: #fff;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05); /* Subtle lift */
    max-width: 900px; /* Optimal reading width */
    margin: 0 auto;
    position: relative;
    top: -40px; /* Slight overlap with header for modern look */
    z-index: 10;
}

.nmp-entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Entry content typography fix */
.nmp-entry-content h2 { margin-top: 1.5em; color: var(--dark); font-size: 2rem; }
.nmp-entry-content h3 { margin-top: 1.5em; color: var(--dark); font-size: 1.5rem; }
.nmp-entry-content p { margin-bottom: 1.5em; }

/* 5. Animations */
@keyframes nmpFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes nmpWidthGrow {
    from { width: 0; opacity: 0; }
    to { width: 80px; opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nmp-page-header { height: 250px; }
    .nmp-page-title { font-size: 2.2rem; }
    .nmp-content-wrapper { padding: 30px 20px; top: -20px; }
}