/*
Theme Name: WPM101 Custom
Description: Custom theme for WPM101 with enhanced security features and Bootstrap 5
Version: 1.0
Author: WPM101
*/

/* WPM101 Brand Colors and Bootstrap Override */
:root {
    /* WPM101 Brand Colors */
    --wpm101-primary: #0073aa;
    --wpm101-secondary: #005177;
    --wpm101-accent: #00a0d2;
    --wpm101-light: #f8f9fa;
    --wpm101-dark: #1a1a1a;
    
    /* Override Bootstrap variables */
    --bs-primary: var(--wpm101-primary);
    --bs-secondary: var(--wpm101-secondary);
    --bs-success: #198754;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: var(--wpm101-accent);
    --bs-light: var(--wpm101-light);
    --bs-dark: var(--wpm101-dark);
    
    /* Typography */
    --wpm101-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wpm101-heading-font: 'Segoe UI', system-ui, sans-serif;
}

/* Global Typography */
body, 
.form-control, 
.btn, 
.card, 
.navbar,
.footer {
    font-family: var(--wpm101-font-family) !important;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    font-family: var(--wpm101-heading-font) !important;
    font-weight: 600 !important;
}

/* General Styles with Bootstrap compatibility */
body {
    font-family: var(--wpm101-font-family);
    background-color: var(--wpm101-light);
    color: var(--wpm101-dark);
}

/* Uniform Header Styles */
.navbar {
    background-color: var(--wpm101-primary) !important;
    border-bottom: 3px solid var(--wpm101-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-family: var(--wpm101-heading-font) !important;
    font-weight: bold !important;
    font-size: 1.5rem !important;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: var(--wpm101-secondary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Uniform Button Styles */
.btn-primary {
    background-color: var(--wpm101-primary) !important;
    border-color: var(--wpm101-primary) !important;
    font-weight: 500 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--wpm101-secondary) !important;
    border-color: var(--wpm101-secondary) !important;
}

.btn-success {
    background-color: var(--wpm101-accent) !important;
    border-color: var(--wpm101-accent) !important;
    font-weight: 500 !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--wpm101-primary) !important;
    border-color: var(--wpm101-primary) !important;
}

/* Uniform Card Styles */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--wpm101-primary) !important;
    border-bottom: 2px solid var(--wpm101-secondary);
    color: white !important;
}

.card-header.bg-success {
    background-color: var(--wpm101-accent) !important;
    border-bottom: 2px solid var(--wpm101-primary);
}

/* Uniform Footer Styles */
.footer,
footer {
    background-color: var(--wpm101-dark) !important;
    color: white !important;
    font-family: var(--wpm101-font-family) !important;
}

.footer a,
footer a {
    color: var(--wpm101-accent) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover,
footer a:hover {
    color: white !important;
}

/* Form Consistency */
.form-control {
    font-family: var(--wpm101-font-family) !important;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--wpm101-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 115, 170, 0.25) !important;
}

.form-label {
    font-weight: 500 !important;
    color: var(--wpm101-dark) !important;
}

/* Alert Consistency */
.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

.alert-success {
    background-color: rgba(0, 160, 210, 0.1);
    border-color: var(--wpm101-accent);
    color: var(--wpm101-secondary);
}

/* Custom spacing for fixed navbar */
body {
    padding-top: 70px;
}

body.login-page,
body.register-page {
    padding-top: 0;
}

/* Auth Page Specific Overrides */
.login-page .navbar,
.register-page .navbar {
    position: relative !important;
    background-color: white !important;
    border-bottom: 1px solid #e1e5e9 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.login-page .navbar-brand,
.register-page .navbar-brand {
    color: var(--wpm101-primary) !important;
}

/* Ensure React components inherit theme colors */
.custom-form,
#react-login-form,
#react-register-form {
    font-family: var(--wpm101-font-family) !important;
}

/* Custom hero section */
.hero-section {
    min-height: 500px;
    background: linear-gradient(135deg, var(--wpm101-primary) 0%, var(--wpm101-secondary) 100%);
    color: white;
}

/* Link consistency */
a {
    color: var(--wpm101-primary);
    text-decoration: none;
}

a:hover {
    color: var(--wpm101-secondary);
    text-decoration: underline;
}

/* Footer styling */
.bg-dark a {
    color: #adb5bd !important;
    text-decoration: none;
}

.bg-dark a:hover {
    color: #fff !important;
}

/* Login page custom styles */
.login-page .card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Override any legacy styles */
.main-content {
    padding-top: 0;
}

.container-fluid {
    max-width: none;
}

/* Ensure proper spacing */
.mt-5 {
    margin-top: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.user-info {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav li {
    margin-left: 20px;
    margin-bottom: 5px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.main-nav a:hover {
    color: #3498db;
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Styles */
.site-footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-links {
    margin: 10px 0;
}

.social-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #3498db;
}

/* Form Styles */
.custom-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero-title {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    margin: 0 10px;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: #c0392b;
}

.features-section {
    padding: 60px 20px;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Session Timeout Warning */
.session-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 10000;
    text-align: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 10px;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: 5px 0;
    }
    
    .main-content {
        margin-top: 120px;
    }
    
    .hero-title {
        font-size: 2em;
    }
}
