/**
 * Theme Name: Nyumbani Hosting Theme
 * Theme URI: https://nyumbanihosting.com
 * Author: Nyumbani Solutions
 * Author URI: https://nyumbanihosting.com
 * Description: Modern SaaS Style - Mobile First. Companion theme for the Nyumbani Host Manager plugin.
 * Version: 2.6.0
 * Requires at least: 6.2
 * Requires PHP: 7.4
 * License: GPLv2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: nyumbani-hosting-theme
 */

:root {
    /* Base fallbacks. Overridden dynamically by functions.php */
    --nhm-accent: #f97316;
    --nhm-accent-rgb: 249, 115, 22;
    --nhm-card-bg: rgba(255,255,255,0.06);
    --nhm-card-border: rgba(255,255,255,0.12);
    --nhm-text: #f8fafc;
    --nhm-text-muted: #94a3b8;
    --nhm-success: #22c55e;
    --nhm-danger: #ef4444;
    
    /* Theme Constants */
    --nhm-radius: 16px;
    --nhm-shadow: 0 20px 40px -10px rgba(0,0,0,0.35);
    --nhm-transition: all 0.3s ease;
    --nhm-font: 'Inter', system-ui, sans-serif;
}

/* ========================================================
   1. Base & Reset
   ======================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #0a0f1c;
    color: var(--nhm-text);
    font-family: var(--nhm-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--nhm-transition); 
}

a:hover {
    color: var(--nhm-accent);
}

/* ========================================================
   2. Layout & Typography Utilities
   ======================================================== */
.page-container {
    width: 100%;
    padding: 1.5rem 1rem;
    margin: 0 auto;
}

.text-center { text-align: center; }
.text-muted { color: var(--nhm-text-muted); }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 3rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; }
.page-title { font-size: clamp(2rem, 8vw, 3.5rem); }

/* ========================================================
   3. UI Components
   ======================================================== */
.nhm-button-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--nhm-accent);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--nhm-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--nhm-transition);
    width: 100%;
}

.nhm-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--nhm-accent-rgb), 0.3);
    color: #fff;
}

.nhm-button-outline {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    border: 2px solid var(--nhm-accent);
    color: var(--nhm-text);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}
.nhm-button-outline:hover {
    background: var(--nhm-accent);
    color: #fff;
}

.content-card {
    background: var(--nhm-card-bg);
    border: 1px solid var(--nhm-card-border);
    border-radius: var(--nhm-radius);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    width: 100%;
}

.nhm-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}
.nhm-alert-danger { background: rgba(239,68,68,0.1); color: var(--nhm-danger); }
.nhm-alert-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }

.nhm-input {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--nhm-card-border);
    background: rgba(0,0,0,0.2);
    color: var(--nhm-text);
    margin-bottom: 1rem;
}

/* ========================================================
   4. Header & Navigation (Synced with theme.js)
   ======================================================== */
.site-header {
    background: rgba(10,15,28,0.8);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--nhm-card-border);
    transition: var(--nhm-transition);
}

/* Class added via theme.js */
.site-header.scrolled {
    background: rgba(10,15,28,0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0; /* Horizontal padding handled by page-container */
    position: relative; /* Anchors the absolute mobile menu */
}

.brand-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.brand-accent { color: var(--nhm-accent); }

/* Mobile Toggle Button */
.mobile-toggle { 
    display: block; 
    font-size: 1.8rem; 
    background: none; 
    border: none; 
    color: white; 
    cursor: pointer; 
    transition: var(--nhm-transition);
}

/* Mobile Dropdown Menu */
.nav-links { 
    display: none; /* Hidden by default */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10,15,28,0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--nhm-card-border);
    gap: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Triggered via theme.js toggle click */
.nav-links.active { 
    display: flex; 
}

/* Nav Button Utility */
.cta-nav-btn {
    padding: 0.75rem 1.5rem;
}

/* ========================================================
   5. Checkout Specific Layout
   ======================================================== */
.checkout-layout { display: flex; flex-direction: column; gap: 2rem; }

.sticky-pay-btn {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--nhm-card-bg);
    backdrop-filter: blur(20px);
    padding: 1.2rem;
    z-index: 999;
    border-top: 1px solid var(--nhm-card-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

/* ========================================================
   6. Desktop Breakpoint (min-width: 768px)
   ======================================================== */
@media (min-width: 768px) {
    .page-container { max-width: 1280px; padding: 2.5rem; }
    .content-card { padding: 3rem; }
    
    /* Reset Nav for Desktop */
    .mobile-toggle { display: none; }
    
    .nav-links { 
        display: flex; 
        position: static; 
        flex-direction: row; 
        width: auto;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        border: none;
        gap: 2rem; 
        align-items: center;
        box-shadow: none;
    }
    
    .nhm-button-primary { width: auto; display: inline-flex; }
    
    /* Reset Checkout for Desktop */
    .checkout-layout { flex-direction: row; align-items: flex-start; }
    .checkout-main { flex: 2; }
    .checkout-summary { flex: 1; position: sticky; top: 100px; }
    .sticky-pay-btn { display: none; }
}