/* Europass CV Styles */

:root {
    /* Europass Blue varies, but standardizing on official EU blues */
    --ep-blue-dark: #0e4194;
    /* Official EU Blue */
    --ep-blue-light: #3e6d9c;
    --ep-text-main: #333333;
    --ep-text-light: #666666;
    --ep-bg: #ffffff;
    --ep-border: #cccccc;
    --ep-timeline-border: #0e4194;

    /* Spacing */
    --ep-col-left-width: 180px;
    /* Fixed width for dates/labels often looks cleaner than % */
    --ep-gap: 20px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    /* Standard safe fonts */
    background-color: #f0f0f0;
    /* Light gray background for web preview */
    color: var(--ep-text-main);
    line-height: 1.5;
    margin: 0;
    padding: 20px 0;
}

/* Container simulating A4 paper */
.ep-container {
    max-width: 210mm;
    /* A4 width */
    min-height: 297mm;
    margin: 0 auto;
    background: white;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--ep-blue-dark);
    margin-top: 0;
}

a {
    color: var(--ep-blue-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.ep-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--ep-blue-dark);
    padding-bottom: 20px;
}

.ep-name {
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ep-role {
    font-size: 18px;
    color: var(--ep-text-light);
    font-weight: normal;
}

/* Layout Columns */
.ep-section {
    display: flex;
    margin-bottom: 25px;
}

.ep-col-left {
    width: var(--ep-col-left-width);
    flex-shrink: 0;
    padding-right: 20px;
    text-align: left;
    color: var(--ep-blue-dark);
    font-size: 14px;
}

.ep-col-right {
    flex-grow: 1;
    border-left: 1px solid #e0e0e0;
    /* Subtle separator line */
    padding-left: 20px;
}

/* Section Titles */
.ep-section-title {
    font-size: 16px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 0;
    /* Ensure title aligns nicely with content */
    border-bottom: 1px solid transparent;
}

/* Personal Info / Contact */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 20px;
    text-align: center;
    color: var(--ep-blue-light);
}

.relocation-badge-sm {
    background-color: #dcfce7;
    color: #166534;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: bold;
}

/* Summary */
.ep-summary {
    text-align: justify;
    font-size: 14px;
    margin: 0;
}

/* Items (Experience, Education) */
.ep-item {
    display: flex;
    /* Sub-timeline within section */
    margin-bottom: 20px;
}

.ep-item-date {
    width: 140px;
    /* Fixed width for dates */
    flex-shrink: 0;
    font-size: 13px;
    color: var(--ep-blue-dark);
    font-weight: bold;
    padding-right: 15px;
}

.ep-item-content {
    flex-grow: 1;
}

.ep-job-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--ep-text-main);
}

.ep-employer {
    font-size: 14px;
    color: var(--ep-text-light);
    margin-bottom: 8px;
    font-style: italic;
}

.ep-job-intro {
    font-size: 14px;
    margin-bottom: 10px;
}

.ep-list {
    padding-left: 18px;
    margin: 0;
    font-size: 14px;
}

.ep-list li {
    margin-bottom: 5px;
    text-align: justify;
}

/* Skills */
.ep-skill-block {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ep-skill-block:last-child {
    border-bottom: none;
}

.ep-skill-label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    color: var(--ep-text-light);
    margin-bottom: 5px;
    text-decoration: underline;
}

.ep-skill-value {
    font-size: 14px;
}

/* Language Table */
.ep-lang-table {
    display: table;
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-top: 5px;
}

.ep-lang-row {
    display: table-row;
}

.ep-lang-col {
    display: table-cell;
    border: 1px solid #ccc;
    padding: 5px 10px;
}

.ep-lang-row.header .ep-lang-col {
    background-color: #f5f5f5;
    font-weight: bold;
    color: var(--ep-blue-dark);
}

/* Tags */
.ep-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-tag {
    background-color: #eef3f7;
    color: var(--ep-blue-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #dce4ec;
}

/* Certifications List */
.ep-list-simple {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.ep-list-simple li {
    padding-left: 15px;
    position: relative;
    margin-bottom: 4px;
}

.ep-list-simple li::before {
    content: "•";
    color: var(--ep-blue-dark);
    position: absolute;
    left: 0;
}

/* Footer */
.ep-footer {
    border-top: 1px solid var(--ep-blue-dark);
    margin-top: 40px;
    padding-top: 10px;
    text-align: center;
    font-size: 12px;
    color: var(--ep-text-light);
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.lang-option {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    opacity: 0.5;
}

.lang-option.active {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .ep-container {
        padding: 20px;
        width: 100%;
        box-shadow: none;
    }

    .ep-section {
        flex-direction: column;
    }

    .ep-col-left {
        width: 100%;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        /* detailed separator for mobile */
        padding-bottom: 5px;
    }

    .ep-col-right {
        border-left: none;
        padding-left: 0;
    }

    .ep-item {
        flex-direction: column;
    }

    .ep-item-date {
        width: 100%;
        margin-bottom: 5px;
    }

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

    .lang-switcher {
        position: relative;
        justify-content: center;
        margin-bottom: 20px;
        top: 0;
        right: 0;
    }
}

/* Print Optimization */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .ep-container {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
        width: 100%;
        min-height: auto;
        padding: 20px 40px;
        /* Standard print margin */
    }

    .lang-switcher {
        display: none !important;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    .page-break-inside-avoid {
        page-break-inside: avoid;
    }

    /* Make sure links show href if useful? No, usually looks messy. */
}