/* 
 * Safari Team Assessment Platform - Bush Villa Collection Brand
 * Complete CSS with ALL Functionality Preserved
 * Based on official Bush Villa Collection brand kit
 */

/* Import Brand Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');

/* Brand Color Variables - Bush Villa Collection */
:root {
    /* Primary Colors */
    --charcoal: #1a1a1a;
    --dark-grey: #333333;
    --medium-grey: #666666;
    --light-grey: #999999;
    
    /* Accent Colors */
    --safari-bronze: #8b7355;
    --bronze-light: #a08968;
    --safari-gold: #d4a574;
    --bush-green: #2d5016;
    
    /* Background Colors */
    --white: #ffffff;
    --off-white: #fafafa;
    --warm-cream: #f7f5f2;
    --light-sand: #f5f0e8;
    
    /* Utility Colors */
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-large: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.12);
    --overlay: rgba(0,0,0,0.6);
    
    /* Safari Spectrum Colors (True Colors) */
    --blue: #3B82F6;
    --gold: #EAB308;
    --green: #10B981;
    --orange: #F97316;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body - Montserrat for body text */
body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    background: var(--warm-cream);
    color: var(--dark-grey);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Headers - Cormorant Garamond */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    line-height: 1.2;
}

h1 { font-size: 3rem; font-weight: 600; }
h2 { font-size: 2.5rem; font-weight: 500; }
h3 { font-size: 2rem; font-weight: 500; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

/* Main Header with Shadow */
.main-header {
    text-align: center;
    padding: 40px;
    background: var(--white);
    box-shadow: var(--shadow-large);
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

/* Logo Styling */
.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 30px;
}

/* If logo image fails, show text logo */
.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.logo-safari {
    color: var(--safari-bronze);
    font-weight: 300;
}

.tagline {
    color: var(--medium-grey);
    font-size: 1.1em;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards with Enhanced Shadow */
.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--safari-bronze);
}

.card-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--safari-bronze);
}

.card h2 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--charcoal);
    margin-bottom: 15px;
}

.card p {
    color: var(--medium-grey);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Buttons - Bush Villa Style (Centered & Wider) */
.btn {
    display: inline-block;
    width: 80%;
    max-width: 300px;
    margin: 10px auto;
    padding: 15px 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid;
}

/* Primary Button - Charcoal */
.btn-primary {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}

.btn-primary:hover {
    background: var(--charcoal);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 26, 26, 0.2);
}

/* Secondary Button - Safari Bronze */
.btn-secondary {
    background: transparent;
    color: var(--safari-bronze);
    border-color: var(--safari-bronze);
}

.btn-secondary:hover {
    background: var(--safari-bronze);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 115, 85, 0.2);
}

/* Success Button */
.btn-success {
    background: var(--bush-green);
    color: var(--white);
    border-color: var(--bush-green);
}

.btn-success:hover {
    background: #1e3410;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 80, 22, 0.3);
}

/* Small Button */
.btn-small {
    width: auto;
    padding: 8px 20px;
    font-size: 0.75rem;
}

/* Assessment Form with Shadow */
.assessment-form {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-large);
    margin-bottom: 40px;
    border: 1px solid var(--border-light);
}

/* Form Groups */
.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--charcoal);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--safari-bronze);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* Progress Bar */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 35px;
    background: var(--border-light);
    border-radius: 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--charcoal), var(--safari-bronze));
    transition: width 0.5s ease;
    position: relative;
}

.progress-text {
    display: inline-block;
    margin-top: 12px;
    font-weight: 500;
    color: var(--charcoal);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Question Options */
#optionsContainer {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.option-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    text-align: left;
    font-size: 0.95rem;
}

.option-card:hover {
    border-color: var(--safari-bronze);
    background: var(--light-sand);
    transform: translateX(5px);
}

.option-card.selected {
    border-color: var(--charcoal);
    background: var(--charcoal);
    color: var(--white);
}

/* Section Headers */
.section-header {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--safari-bronze);
}

.section-header h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--charcoal);
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--medium-grey);
    font-size: 0.95rem;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
    gap: 15px;
}

.navigation-buttons .btn {
    width: auto;
    min-width: 150px;
    margin: 0;
}

/* Admin Styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-light);
}

.stat-card h3 {
    color: var(--medium-grey);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 300;
    color: var(--charcoal);
    font-family: 'Cormorant Garamond', serif;
}

/* Tables */
.table-container {
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 30px;
    border: 1px solid var(--border-light);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--charcoal);
    color: var(--white);
    padding: 14px;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--dark-grey);
}

.data-table tr:hover {
    background: var(--light-sand);
}

/* Safari Type Colors */
.type-connector { color: var(--blue); font-weight: 500; }
.type-organizer { color: var(--gold); font-weight: 500; }
.type-innovator { color: var(--green); font-weight: 500; }
.type-executor { color: var(--orange); font-weight: 500; }

/* Tabs */
.tabs, .admin-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--medium-grey);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--safari-bronze);
}

.tab-btn.active {
    color: var(--charcoal);
    border-bottom-color: var(--safari-bronze);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 50px 0;
    border-top: 2px solid var(--safari-bronze);
    margin-top: 80px;
    background: var(--white);
}

.main-footer p {
    color: var(--medium-grey);
    margin: 8px 0;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.main-footer a {
    color: var(--safari-bronze);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--charcoal);
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 18px 20px;
    border-radius: 0;
    margin-bottom: 25px;
    border-left: 4px solid;
    font-size: 0.95rem;
}

.alert-error {
    background: #fff5f5;
    color: #9b4d4d;
    border-color: #9b4d4d;
}

.alert-success {
    background: #f0f8f0;
    color: var(--bush-green);
    border-color: var(--bush-green);
}

.alert-warning {
    background: #fffaf0;
    color: var(--safari-bronze);
    border-color: var(--safari-bronze);
}

/* Login Form */
.login-form {
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-large);
    border: 1px solid var(--border-light);
}

/* Results Display */
#resultsDisplay {
    background: var(--light-sand);
    padding: 30px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid var(--safari-bronze);
}

#resultsDisplay h3 {
    color: var(--charcoal);
    margin-bottom: 20px;
}

#resultsDisplay p {
    margin: 10px 0;
    font-size: 1rem;
}

/* Mini Charts */
.mini-chart {
    width: 200px;
    height: 100px;
    margin: 10px 0;
}

.progress-bar-mini {
    width: 120px;
    height: 12px;
    background: var(--border-light);
    border-radius: 0;
    overflow: hidden;
    display: inline-block;
    margin-right: 10px;
}

.progress-fill-mini {
    height: 100%;
    background: var(--safari-bronze);
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 50px;
    color: var(--light-grey);
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation-buttons .btn {
        width: 100%;
        max-width: none;
    }
    
    .tabs, .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .assessment-form {
        padding: 30px 20px;
    }
    
    .btn {
        width: 100%;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .main-header,
    .card,
    .assessment-form,
    .stat-card,
    .table-container {
        box-shadow: none;
        border: 1px solid var(--border);
    }
    
    .btn {
        display: none;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--safari-bronze);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--charcoal);
    color: var(--white);
    text-align: center;
    border-radius: 4px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Focus States for Accessibility */
*:focus {
    outline: 2px solid var(--safari-bronze);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--safari-bronze);
    outline-offset: 4px;
}

/* Selection Colors */
::selection {
    background: var(--safari-bronze);
    color: var(--white);
}

::-moz-selection {
    background: var(--safari-bronze);
    color: var(--white);
}

/* 
 * Safari Web Online - White Logo CSS Update
 * Add this to your existing assets/css/style.css file
 * Or save as assets/css/logo-update.css and include it
 */

/* ===== HEADER UPDATES FOR WHITE LOGO ===== */

/* Main Header - Dark Gradient Background */
.main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
    color: white !important;
    text-align: center;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 40px;
    border-radius: 8px;
    border: none;
}

/* All header text should be white */
.main-header h1,
.main-header h2,
.main-header h3,
.main-header h4,
.main-header h5,
.main-header h6,
.main-header p,
.main-header .tagline,
.main-header .progress-text {
    color: white !important;
}

/* Logo Styling for White Version */
.logo {
    max-width: 250px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    /* Add drop shadow to make white logo pop on dark background */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

/* Ensure logo is always visible */
.main-header .logo {
    opacity: 1;
}

/* Progress Bar on Dark Background */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #8b7355, #d4a574);
}

.main-header .progress-text {
    color: white !important;
    font-weight: 500;
}

/* Admin Dashboard Header */
.admin-header,
.admin .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: white !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
}

.admin-header .btn,
.main-header .btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

.admin-header .btn:hover,
.main-header .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Login Page Specific */
.login-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
    margin-bottom: 30px;
}

/* Assessment Page Header */
.assessment-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
}

/* Professional Report Header */
.report-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: white !important;
    padding: 60px 40px;
    text-align: center;
}

.report-header h1,
.report-header h2,
.report-header p {
    color: white !important;
}

/* Employee Info Box on Dark Background */
.employee-info {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2);
    color: white !important;
}

.employee-info p {
    color: white !important;
}

/* ===== MAINTAIN LIGHT BACKGROUNDS FOR CONTENT ===== */

/* Keep cards light */
.card,
.assessment-form,
.stat-card,
.table-container {
    background: white;
    color: #333;
}

/* Keep dashboard grid cards white */
.dashboard-grid .card {
    background: white;
    color: #333;
}

.dashboard-grid .card h2 {
    color: #1a1a1a;
}

.dashboard-grid .card p {
    color: #666;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    .main-header {
        padding: 30px 20px;
    }
    
    .logo {
        max-width: 180px;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    .main-header {
        background: white !important;
        color: black !important;
        border: 1px solid #ddd;
    }
    
    .main-header h1,
    .main-header h2,
    .main-header h3,
    .main-header p {
        color: black !important;
    }
    
    .logo {
        /* Invert logo for printing */
        filter: invert(1);
    }
}

/* ===== SPECIFIC PAGE OVERRIDES ===== */

/* Index Page */
body.index-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
}

/* Admin Page */
body.admin-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

/* Assessment Page */
body.assessment-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
}

/* Login Page */
body.login-page .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
}

/* ===== ANIMATION FOR LOGO ===== */

.logo {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ENSURE CONTRAST ===== */

/* Make sure any text on dark headers is readable */
.main-header a:not(.btn) {
    color: #8b7355;
}

.main-header a:not(.btn):hover {
    color: #d4a574;
}

/* Style nav links if present */
.main-header .nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.main-header .nav-links a:hover {
    color: white;
}