/* assets/css/style.css */

/* ------------------------- */
/* VARIABLES & RESET         */
/* ------------------------- */
:root {
    --font-family-sans: 'Inter', sans-serif;
    --color-background: #f0f2f5;
    --color-text: #333;
    --color-text-light: #f8f9fa;
    --color-card-background: #ffffff;
    --color-border: #dee2e6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.07);
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

/* ------------------------- */
/* LAYOUT & TYPOGRAPHY       */
/* ------------------------- */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.main-header {
    background-color: var(--color-card-background);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}

.main-header h1 a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.5rem;
}

.main-footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 1rem;
    text-align: center;
}

/* ------------------------- */
/* CARD COMPONENT            */
/* ------------------------- */
.card {
    background-color: var(--color-card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

/* Gradient cards */
.card.text-white {
    color: var(--color-text-light);
}

.card-purple-blue {
    background: linear-gradient(45deg, #6D80FE 0%, #23D2FD 100%);
    box-shadow: 0 5px 20px rgba(35, 210, 253, 0.3);
}

.card-blue-green {
    background: linear-gradient(45deg, #09AFE8 0%, #29F499 100%);
    box-shadow: 0 5px 20px rgba(41, 244, 153, 0.3);
}

/* ------------------------- */
/* SPECIFIC COMPONENTS       */
/* ------------------------- */

/* Questionnaire List */
.questionnaire-list.card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-light);
}
.questionnaire-list h3 {
    margin: 0;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.kpi-grid.card-body {
    text-align: center;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.kpi-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Analysis Card */
.analysis-card {
    margin-bottom: 2rem;
}

.vote-count {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Chart Styling */
.chart-bar,.chart-pie {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.chart-label {
    font-size: 12px;
    fill: #6c757d;
}

.chart-value {
    font-size: 14px;
    font-weight: 600;
    fill: #333;
}

.pie-chart-wrapper.legend {
    margin-top: 1rem;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.legend-label {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
   .chart-container {
        grid-template-columns: 1fr;
    }
   .pie-chart-wrapper {
        margin-top: 2rem;
    }
}