/* Reset and Base Styles */
:root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --text: #162e42;
    --muted: #6b7280;
    --accent: #2676a7;
    --accent-hover: #1a3a50;
    --gold: #be9e52;
    --navy-dark: #162e42;
    --navy-light: #1a3a50;
    --blue: #2676a7;
    --border: #e6e9ef;
    --maxw: 1100px;
    --success: #16a34a;
    --warning: #ea580c;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 32px 16px;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    padding: 40px;
    border: 1px solid var(--border);
}

/* Headings use Montserrat */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Logo and Branding */
.logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 24px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.brand-text h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--navy-dark);
    font-family: 'Montserrat', sans-serif;
}

.brand-text p {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 14px;
}

.contact-info {
    text-align: right;
    color: var(--navy-dark);
    font-size: 14px;
    line-height: 1.8;
}

.contact-info strong {
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.contact-info a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: var(--gold);
}

/* Typography */
header > h1 {
    margin: 0 0 16px 0;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--navy-dark);
}

header p.lead {
    margin: 0 0 24px 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

h2 {
    font-size: 28px;
    margin: 32px 0 16px 0;
    font-weight: 600;
    color: var(--text);
}

h3 {
    font-size: 20px;
    margin: 20px 0 12px 0;
    font-weight: 600;
}

h4 {
    font-size: 16px;
    margin: 16px 0 8px 0;
    color: var(--accent);
    font-weight: 600;
}

p {
    margin: 12px 0;
    color: var(--text);
}

.intro-text {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 24px;
}

.small {
    font-size: 13px;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

/* Lists */
ul {
    margin: 12px 0 20px 20px;
    padding: 0;
}

li {
    margin: 8px 0;
}

li strong {
    color: var(--accent);
}

/* Sections */
.grid {
    display: grid;
    gap: 32px;
}

.section-block {
    padding: 28px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Personality Grid */
.personality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.personality-card {
    background: linear-gradient(135deg, #2676a7 0%, #162e42 100%);
    border: none;
    border-radius: 12px;
    padding: 32px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(38, 118, 167, 0.2);
}

.personality-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(190, 158, 82, 0.4);
    background: linear-gradient(135deg, #2676a7 0%, #1a3a50 100%);
}

.personality-card h3 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.personality-card .subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.95);
}

/* Plan Cards */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.plan-card {
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.plan-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(190, 158, 82, 0.2);
}

.plan-card h3 {
    margin: 0 0 8px 0;
    color: var(--accent);
    font-size: 20px;
}

.plan-card p {
    margin: 8px 0;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #2676a7 0%, #1a3a50 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(38, 118, 167, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #be9e52 0%, #2676a7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(190, 158, 82, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.close {
    color: var(--muted);
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: var(--text);
}

#personality-detail h2 {
    color: var(--accent);
    margin-top: 0;
}

#personality-detail h3 {
    color: var(--text);
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    margin-top: 24px;
}

#personality-detail ul {
    margin-left: 20px;
}

#personality-detail li {
    margin: 10px 0;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: 14px;
}

table thead th {
    text-align: left;
    font-weight: 600;
    padding: 16px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    color: var(--text);
}

table tbody td {
    padding: 16px;
    border-bottom: 1px dashed var(--border);
    vertical-align: top;
}

table tbody tr:last-child td {
    border-bottom: 0;
}

table tbody tr:hover {
    background: #f9fafb;
}

table strong {
    color: var(--accent);
    font-weight: 600;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 24px;
    }

    header > h1 {
        font-size: 28px;
    }

    header p.lead {
        font-size: 16px;
    }

    h2 {
        font-size: 24px;
    }

    .personality-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .personality-card {
        padding: 24px 16px;
    }

    .personality-card h3 {
        font-size: 24px;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

    table {
        font-size: 13px;
    }

    table thead th,
    table tbody td {
        padding: 12px;
    }

    .logo-header {
        flex-direction: column;
        text-align: center;
    }

    .logo-section {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        text-align: center;
    }

    .logo-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px 8px;
    }

    .container {
        padding: 16px;
    }

    header > h1 {
        font-size: 24px;
    }

    .personality-grid {
        grid-template-columns: 1fr 1fr;
    }

    .logo-image {
        width: 80px;
        height: 80px;
    }

    .brand-text h1 {
        font-size: 24px;
    }
}

/* Assessment-specific styles */
.assessment-intro {
    background-color: #f0f8ff;
    border: 2px solid var(--blue);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.start-assessment-btn {
    background: linear-gradient(135deg, #be9e52 0%, #2676a7 100%);
    color: white;
    padding: 20px 50px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 30px auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(38, 118, 167, 0.3);
    font-family: 'Montserrat', sans-serif;
}

.start-assessment-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(190, 158, 82, 0.4);
    background: linear-gradient(135deg, #2676a7 0%, #162e42 100%);
}

.question-item {
    background-color: #f8fafc;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--gold);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.question-item.answered {
    background-color: #e8f4f8;
    border-left-color: var(--blue);
    opacity: 0.7;
}

.question-item.current {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(38, 118, 167, 0.2);
    border-left-color: var(--gold);
    transform: scale(1.02);
}

.question-text {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 16px;
}

.question-radio {
    margin: 10px 0;
}

.question-radio label {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background-color: #ffffff;
    border: 2px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-radio label:hover {
    background-color: #dbeafe;
    border-color: var(--accent);
}

.question-radio input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.question-radio label:has(input:checked) {
    background-color: #f0f8ff;
    border-color: var(--gold);
}

.question-radio input[type="radio"]:checked + span {
    font-weight: bold;
    color: var(--accent);
}

.progress-indicator {
    background-color: var(--border);
    height: 8px;
    border-radius: 4px;
    margin: 20px 0;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--muted);
    margin-top: 5px;
    font-size: 14px;
}

.submit-btn {
    background-color: var(--accent);
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
    font-family: inherit;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.submit-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    background-color: #f1f5f9;
    padding: 30px;
    margin: 30px 0;
    border: 3px solid var(--gold);
    border-radius: 10px;
    display: none;
}

.results-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.personality-result {
    background: linear-gradient(135deg, #162e42 0%, #2676a7 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.personality-result h2 {
    color: white;
    border: none;
    margin: 10px 0;
    font-size: 32px;
}

.personality-result h3 {
    color: var(--gold);
    margin: 10px 0;
    font-size: 24px;
}

.dichotomy-scores {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.score-bar {
    background-color: #e5e7eb;
    height: 30px;
    border-radius: 15px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.next-steps-box {
    background-color: #f0f8ff;
    border: 2px solid var(--gold);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.next-steps-box h3 {
    color: var(--navy-dark);
    margin-top: 0;
}

#assessmentForm {
    display: none;
}

#assessmentForm.active {
    display: block;
}

/* K3 Program Offer Styles */
.k3-program-offer {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    border: 3px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(190, 158, 82, 0.15);
}

.k3-header {
    text-align: center;
    margin-bottom: 30px;
}

.k3-header h2 {
    color: var(--navy-dark);
    font-size: 28px;
    margin: 0 0 15px 0;
}

.k3-header h3 {
    color: var(--gold);
    font-size: 32px;
    margin: 10px 0;
    font-weight: 800;
}

.k3-description {
    max-width: 900px;
    margin: 0 auto;
}

.k3-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(38, 118, 167, 0.15);
}

.feature-box h5 {
    color: var(--navy-dark);
    font-size: 18px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.feature-box ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.feature-box ul li {
    position: relative;
    padding-left: 24px;
    margin: 8px 0;
    line-height: 1.6;
}

.feature-box ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
    font-size: 16px;
}

.feature-box p {
    margin: 12px 0 0 0;
    line-height: 1.6;
    color: var(--text);
}

.k3-philosophy {
    margin: 40px 0;
}

.k3-pricing {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-k3 {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, #d4ae6a 100%);
    color: white;
    padding: 18px 48px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(190, 158, 82, 0.3);
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.btn-k3:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(190, 158, 82, 0.4);
    background: linear-gradient(135deg, #d4ae6a 0%, var(--gold) 100%);
}

.btn-k3:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .k3-program-offer {
        padding: 24px;
        margin-top: 30px;
    }
    
    .k3-header h2 {
        font-size: 22px;
    }
    
    .k3-header h3 {
        font-size: 26px;
    }
    
    .k3-features {
        grid-template-columns: 1fr;
    }
    
    .btn-k3 {
        padding: 15px 32px;
        font-size: 18px;
        width: 100%;
    }
    
    .k3-pricing {
        padding: 20px;
    }
}
