/* Cyber Resilience Map - Hub201 Inspired Design */

@import url('https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Hub201 Palette */
    --primary-red: #F24534;
    --primary-dark: #222222;
    --primary-white: #ffffff;
    --text-dark: #222222;
    --text-light: #666666;
    --text-muted: #9D9D9D;
    
    /* Background Colors */
    --bg-light: #F8F8F8;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    
    /* Border & Dividers */
    --border-color: #E5E5E5;
    --border-light: #F0F0F0;
    
    /* Status Colors */
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Darker Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #e8e8e8;
    min-height: 100vh;
    font-size: 18px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER SECTION ===== */
.header {
    background: #2d2d2d;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 50px;
    margin: 20px auto;
    max-width: 1400px;
}

.header__holder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    gap: 40px;
}

.header__logo {
    flex-shrink: 0;
}

.header__logo img {
    height: 35px;
    width: auto;
    display: block;
}

.header__content {
    flex: 1;
    padding: 0 30px;
    text-align: center;
}

.header__content h1 {
    font-size: 23px;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.header__content p {
    color: #b0b0b0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.header__content p strong {
    color: var(--bg-white);
    font-weight: 700;
}

/* ===== SURVEY FORM SECTION ===== */
.survey-form {
    background: var(--bg-white);
    padding: 60px 40px;
    margin: 40px auto;
    max-width: 900px;
    border-radius: 0;
    box-shadow: var(--shadow-md);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    margin-bottom: 50px;
    overflow: hidden;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-red);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SECTION STYLING ===== */
.section {
    margin-bottom: 60px;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-light);
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.section-title strong {
    color: var(--primary-red);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: 800;
    font-size: 18px;
}

/* ===== QUESTION STYLING ===== */
.question-group {
    margin-bottom: 35px;
}

.question-label {
    display: block;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 19px;
    line-height: 1.4;
}

.question-number {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
    font-weight: 700;
}

/* ===== INPUT ELEMENTS ===== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    font-weight: 500;
}

.radio-option:hover {
    border-color: var(--primary-red);
    background: var(--bg-white);
}

.radio-option input[type="radio"] {
    margin-right: 15px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

.radio-option.selected {
    background: var(--bg-white);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-sm);
}

select {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    font-size: 17px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Darker Grotesque', sans-serif;
    font-weight: 500;
    color: var(--text-dark);
}

select:hover {
    border-color: var(--primary-red);
}

select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(242, 69, 52, 0.1);
}

/* ===== BUTTONS ===== */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 50px;
}

.btn {
    padding: 16px 50px;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Darker Grotesque', sans-serif;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: #d63d2d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 69, 52, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-dark);
}

/* ===== RESULTS PAGE ===== */
.results-container {
    background: var(--bg-white);
    padding: 60px 40px;
    margin: 40px auto;
    max-width: 1000px;
    box-shadow: var(--shadow-md);
}

.results-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-light);
}

.results-header h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.results-header h1::before {
    content: "✓ ";
    color: var(--primary-red);
}

.results-header p {
    color: var(--text-light);
    font-size: 19px;
    font-weight: 500;
}

/* ===== INDEX CARDS ===== */
.index-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.index-card:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.index-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.index-card h3::before {
    content: "";
    width: 4px;
    height: 24px;
    background: var(--primary-red);
    display: inline-block;
}

.index-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.score-value {
    font-size: 56px;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: -2px;
}

.score-category {
    font-size: 20px;
    font-weight: 700;
    background: var(--bg-light);
    padding: 10px 24px;
    border-radius: 30px;
    color: var(--text-dark);
}

.index-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-light);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-weight: 500;
}

.index-description strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-light);
}

.score-bar {
    height: 50px;
    background: var(--border-light);
    position: relative;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--primary-red);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    color: white;
    font-weight: 800;
    font-size: 18px;
}

/* ===== INFO BOXES ===== */
.interpretation {
    background: #f0fdf4;
    border-left: 4px solid var(--success-color);
    padding: 30px;
    margin: 30px 0;
}

.interpretation h4 {
    color: var(--success-color);
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 800;
}

.interpretation p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 500;
}

.recommendation {
    background: #fffbeb;
    border-left: 4px solid var(--warning-color);
    padding: 30px;
    margin: 30px 0;
}

.recommendation h4 {
    color: var(--warning-color);
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 800;
}

.recommendation ul {
    margin-left: 20px;
    margin-top: 15px;
}

.recommendation li {
    margin: 12px 0;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-dark);
}

.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-red);
    padding: 30px;
    margin: 30px 0;
}

.info-box h4 {
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 800;
}

.info-box p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 500;
}

/* ===== ERROR MESSAGES ===== */
.error-message {
    background: #fef2f2;
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
    padding: 25px;
    margin-bottom: 30px;
    font-weight: 600;
}

.error-list {
    list-style: none;
    margin-top: 15px;
}

.error-list li {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 500;
}

.error-list li::before {
    content: "• ";
    font-weight: bold;
    margin-right: 8px;
}

/* ===== ADMIN PANEL ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.stat-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary-red);
    margin: 15px 0;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--bg-white);
    overflow: hidden;
}

th, td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
}

th {
    background: var(--bg-dark);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

tr:hover {
    background: var(--bg-light);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* ===== ADMIN HEADER ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-light);
}

.admin-header h1 {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px 0;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .header {
        margin: 10px;
        border-radius: 30px;
    }
    
    .header__holder {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        text-align: center;
    }
    
    .header__content {
        padding: 0;
        text-align: center;
    }
    
    .header__content h1 {
        font-size: 20px;
    }
    
    .header__content p {
        font-size: 13px;
    }
    
    .survey-form,
    .results-container {
        padding: 30px 20px;
        margin: 20px 10px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .question-label {
        font-size: 17px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .index-score {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .score-value {
        font-size: 42px;
    }
    
    .results-header h1 {
        font-size: 32px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 12px 10px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
    }
    
    .btn,
    .button-group,
    .header {
        display: none;
    }
    
    .index-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    .results-container {
        box-shadow: none;
        padding: 20px;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(242, 69, 52, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-red);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: var(--bg-dark);
    color: white;
    text-align: center;
    border-radius: 0;
    padding: 15px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 15px;
    font-weight: 500;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== FOCUS STATES ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(242, 69, 52, 0.1);
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-red {
    color: var(--primary-red);
}

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

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
}

::-webkit-scrollbar-thumb:hover {
    background: #d63d2d;
}
