/* ========================================
   THEME: Soft Sage & Cream
   Kompetence Platform - Rybners
   FULL-WIDTH VERSION
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #f7f9f7;
    --bg-secondary: #ffffff;
    --bg-accent: #e8ede8;
    --text-primary: #2c3e2c;
    --text-secondary: #6b7e6b;
    --accent-primary: #7d9a7d;
    --accent-secondary: #a3bca3;
    --accent-highlight: #d4a574;
    --border-color: #dce5dc;
    --shadow-sm: 0 2px 8px rgba(125, 154, 125, 0.08);
    --shadow-md: 0 4px 16px rgba(125, 154, 125, 0.1);
    --shadow-lg: 0 8px 32px rgba(125, 154, 125, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s ease;
    
    /* Layout */
    --container-padding: 5%;
    --max-content-width: 1600px;
}

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600&display=swap');

/* ========================================
   BASE STYLES
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #f0f4f0 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* ========================================
   FULL-WIDTH CONTAINER OVERRIDE
   ======================================== */
.container,
.container-fluid,
.custom-wrapper {
    width: 100% !important;
    max-width: var(--max-content-width) !important;
    margin: 0 auto !important;
    padding-left: var(--container-padding) !important;
    padding-right: var(--container-padding) !important;
}

/* Remove Bootstrap's fixed widths */
@media (min-width: 768px) {
    .container { width: 100% !important; }
}
@media (min-width: 992px) {
    .container { width: 100% !important; }
}
@media (min-width: 1200px) {
    .container { width: 100% !important; }
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar-custom {
    background: var(--bg-secondary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 0;
    padding: 8px 0;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.navbar-custom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.navbar-brand::before {
    content: '';
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Pill Navigation Style */
.nav-pills-custom {
    display: flex;
    gap: 4px;
    background: var(--bg-accent);
    padding: 4px;
    border-radius: 10px;
    margin: 0;
    list-style: none;
}

.nav-pills-custom li a {
    display: block;
    padding: 10px 18px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-pills-custom li a:hover {
    color: var(--text-primary);
    background: transparent;
}

.nav-pills-custom li.active a,
.nav-pills-custom li a:focus {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========================================
   HERO / JUMBOTRON
   ======================================== */
.jumbotron {
    background: transparent !important;
    text-align: center;
    padding: 50px 20px 40px;
    margin-bottom: 0;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: var(--bg-accent);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.jumbotron h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.jumbotron p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-bottom: 0;
}

/* ========================================
   PROGRESS SECTION
   ======================================== */
.progress-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: clamp(20px, 3vw, 35px);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-percent {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.progress-labels-main {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-labels {
    font-size: clamp(0.55rem, 1.2vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    flex: 1;
}

/* Progress Bar */
.progress {
    height: 12px;
    background: var(--bg-accent);
    border-radius: 12px;
    overflow: visible;
    box-shadow: none;
    border: none;
    margin-bottom: 0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    position: relative;
    box-shadow: none;
    min-width: 20px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ========================================
   INFO / ALERT BOX
   ======================================== */
.alert-info-custom,
.alert-success {
    background: linear-gradient(135deg, #faf7f2 0%, #f5efe6 100%);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 30px);
    margin-bottom: 40px;
    border: 1px solid #ebe4d8;
    border-left: 4px solid var(--accent-highlight);
    color: var(--text-primary);
}

.alert-info-custom h3,
.alert-success strong {
    font-size: 1rem;
    color: var(--accent-highlight);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-info-custom p,
.alert-success p {
    font-size: 0.9rem;
    color: #8a7a68;
    line-height: 1.7;
    margin-bottom: 10px;
}

.alert-success .close {
    color: var(--accent-highlight);
    opacity: 0.6;
    text-shadow: none;
}

.alert-success .close:hover {
    opacity: 1;
}

/* ========================================
   CARDS GRID - FULL WIDTH RESPONSIVE
   ======================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.three-boxes {
    padding: 0 15px;
    margin-bottom: 10px;
}

/* Responsive grid */
@media (min-width: 1200px) {
    .col-md-4.three-boxes {
        width: 33.333%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-md-4.three-boxes {
        width: 33.333%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .col-md-4.three-boxes {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .col-md-4.three-boxes {
        width: 100%;
    }
}

/* Theme Card */
.l-part {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3vw, 35px) clamp(20px, 2vw, 30px);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    margin-bottom: 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.l-part::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.l-part:hover::before {
    opacity: 1;
}

.l-part:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(125, 154, 125, 0.2);
}

/* Theme Button */
.btn-primary,
.l-part .btn-primary,
button.btn-primary,
.btn-lg.btn-primary {
    display: inline-block;
    background: var(--accent-primary) !important;
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none;
    margin-bottom: 20px;
    transition: var(--transition);
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    max-width: none;
    position: relative;
    margin-top: 0;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary:hover,
.l-part .btn-primary:hover,
button.btn-primary:hover,
.btn-lg.btn-primary:hover {
    background: var(--text-primary) !important;
    color: white !important;
    transform: translateY(-2px);
}

.btn-primary:focus,
.btn-primary:active {
    background: var(--text-primary) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ========================================
   PIE CHARTS (EasyPieChart)
   ======================================== */
.parent-chart {
    width: 100%;
    float: none;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.parent-chart.no_pro_user {
    width: 100%;
    text-align: center;
}

.pie-chart,
.span2.pie-chart {
    margin: 0 auto;
    float: none;
}

/* EasyPieChart container - VIGTIGT for at diagrammet vises */
.easyPieChart {
    position: relative !important;
    display: inline-block !important;
    width: 85px !important;
    height: 85px !important;
    line-height: 85px !important;
    text-align: center;
    margin: 0 auto;
    border-radius: 50%;
    background-color: var(--bg-accent);
}

/* Canvas elementet der tegner cirklen */
.easyPieChart canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 85px !important;
    height: 85px !important;
}

/* Percentage text inside pie chart */
.easyPieChart > span,
.easyPieChart > div,
[id^="easy-pie-chart-"] {
    display: block;
    position: relative;
    z-index: 2;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 85px;
    width: 100%;
    text-align: center;
}

/* Specifik styling for pie chart ID'er */
div[id^="easy-pie-chart-"] {
    position: relative !important;
    display: inline-block !important;
    width: 85px !important;
    height: 85px !important;
    line-height: 85px !important;
    text-align: center !important;
    border-radius: 50%;
    background-color: var(--bg-accent);
}

/* ========================================
   PRINT BUTTON
   ======================================== */
.print-section {
    text-align: center;
    padding: 40px 0 60px;
}

.btn-print {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 16px 36px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.btn-print:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 25px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    width: 100%;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 991px) {
    :root {
        --container-padding: 4%;
    }
    
    .nav-pills-custom {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    :root {
        --container-padding: 5%;
    }
    
    .navbar-custom .container {
        flex-direction: column;
        gap: 15px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .nav-pills-custom {
        width: 100%;
        justify-content: center;
    }
    
    .nav-pills-custom li a {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .progress-section {
        padding: 20px 15px;
    }
    
    .progress-labels-main {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .progress-labels {
        text-align: center;
    }
    
    .l-part {
        min-height: 160px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 4%;
    }
    
    .nav-pills-custom li a {
        padding: 8px 10px;
        font-size: 0.7rem;
    }
    
    .jumbotron {
        padding: 30px 10px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    :root {
        --container-padding: 6%;
    }
    
    .l-part {
        padding: 35px;
        min-height: 200px;
    }
    
    .btn-primary,
    .l-part .btn-primary {
        padding: 14px 32px !important;
        font-size: 0.95rem !important;
    }
}

@media (min-width: 1800px) {
    :root {
        --container-padding: 8%;
        --max-content-width: 1800px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .noPrint {
        display: none !important;
    }
    
    body {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .container,
    .custom-wrapper {
        max-width: 100% !important;
        padding: 20px !important;
    }
    
    .navbar-custom {
        box-shadow: none;
    }
    
    .l-part {
        box-shadow: none;
        border: 1px solid var(--border-color);
        break-inside: avoid;
    }
    
    .l-part:hover {
        transform: none;
    }
    
    .btn-primary {
        background: var(--accent-primary) !important;
        color: white !important;
    }
}

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

.mb-0 {
    margin-bottom: 0 !important;
}

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

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

.full-width {
    width: 100%;
    text-align: center;
}

.light-gray-bg {
    background: var(--bg-primary);
}

/* Override old styles */
.overfolw-content {
    overflow: visible;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100% !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 16px 18px !important;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    transition: var(--transition);
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Override gamle style.css fixed width */
input.form-control,
textarea.form-control,
select.form-control,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.form-control::placeholder {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.form-control:focus {
    outline: none !important;
    border-color: var(--accent-primary) !important;
    background: var(--bg-secondary) !important;
    box-shadow: 0 0 0 3px rgba(125, 154, 125, 0.15) !important;
}

.form-control:disabled,
.form-control[disabled] {
    background: var(--bg-accent) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

/* Select dropdown arrow */
select.form-control {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7e6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form card styling */
.profile-card .l-part {
    text-align: left;
}

.profile-card .l-part:hover {
    transform: none;
}
