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

/* Base Container Styles */
body {
    font-family: 'Inter', sans-serif;
    color: #000;
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Added subtle shadow for depth */
}

/* Split Screen Layout */
.split-screen {
    display: flex;
    flex: 1;
    padding-top: 80px; /* Adjusted to account for fixed header */
}

#form-container,
#cv-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    height: calc(100vh - 80px); /* Ensures containers fill the viewport height */
}

#form-container {
    background-color: #f0f0f0;
    border-right: 1px solid #e0e0e0;
}

#cv-container {
    background-color: #fff;
    position: relative; /* To contain absolutely positioned elements */
}

/* Consent Box */
#iubenda-cs-banner {
    display: none;
}

/* Profile Section */
.cv-container {
    position: relative; /* For positioning the profile picture */
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 15px;
    font-size: 12px;
    line-height: 1.5;
}

/* CV Header */
.cv-header {
    position: relative;
    margin-bottom: 20px;
}

/* Header Content */
.cv-header .header-content {
    padding-right: 100px; /* Add sufficient padding to prevent text overlap with image */
    margin-bottom: 10px;
}

/* Profile Picture Container */
#profile-pic-container { /* Updated to target the new ID */
    position: absolute; /* Fixed position within .cv-header */
    top: 0;
    right: 0;
    width: 80px; /* Fixed width for the image */
    height: 80px; /* Fixed height for the image */
    overflow: hidden;
    border-radius: 50%; /* Circular image */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Add some shadow for depth */
}

#profile-pic { /* Target the image directly */
    width: 100%; /* Ensure the image covers the entire container */
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio without distortion */
}

/* Name Styling */
.cv-header h1 {
    font-size: 1.5rem; /* Responsive font size */
    margin-bottom: 5px;
    font-weight: bold;
}

/* Subtitle Styling */
.cv-header p.subtitle {
    font-size: 1.2rem; /* Also set to rem for responsiveness */
    color: #333;
}

/* Contact Information */
.contact-info {
    font-size: 12px;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 3px;
}

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

.contact-info a:hover {
    text-decoration: underline;
}

/* Section Headings */
.section {
    margin-bottom: 15px;
}

.section h2 {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
    border-bottom: 1px solid #000;
    padding-bottom: 3px;
}

/* Entries within Sections */
.entry {
    margin-bottom: 17px;
}

.entry h3 {
    font-size: 13px;
    margin-bottom: 3px;
    font-weight: bold;
}

.entry .entry-details {
    font-size: 12px;
    color: #555;
    margin-bottom: 5px;
    /* Removed margin-left to left-align the text */
    margin-left: 0;
}

.entry p {
    font-size: 12px;
    margin-bottom: 5px;
    /* Removed margin-left to left-align the text */
    margin-left: 0;
}

.entry ul {
    margin-left: 30px; /* Keeps bullets indented */
    list-style-type: disc;
}

.entry ul li {
    font-size: 12px;
    margin-bottom: 3px;
}

/* Form Styles */
.form-header {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow for separation */
}

.form-header h1 {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: bold;
}

#export-button-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Export Button Specific Styles */
#export-cv-btn {
    width: 100%; /* Full width for prominence */
    padding: 12px 20px; /* Increased padding for better click area */
    font-size: 16px; /* Larger font for emphasis */
    border: none; /* Remove default border */
    border-radius: 30px; /* More rounded corners for modern look */
    background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%); /* Gradient background */
    color: #fff; /* White text for contrast */
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center text and icon */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

#export-cv-btn:hover {
    background: linear-gradient(135deg, #000DFF 0%, #6B73FF 100%); /* Reverse gradient on hover */
    transform: translateY(-2px); /* Slight upward movement */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

#export-cv-btn svg {
    margin-right: 8px; /* Space between icon and text */
    width: 20px; /* Larger icon size */
    height: 20px;
    fill: #fff; /* White icon */
    transition: fill 0.3s ease;
}

#export-cv-btn:hover svg {
    fill: #e0e0e0; /* Light gray icon on hover */
}

.form-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow for separation */
}

.form-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    color: #000;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #000;
    outline: none;
}

.error-message {
    color: #e74c3c;
    font-size: 11px;
    margin-top: 3px;
}

/* Buttons */

/* General Button Styles */
button {
    padding: 10px 15px;
    font-size: 14px; /* Slightly larger for better readability */
    border: 1px solid #000; /* Black border */
    border-radius: 5px; /* Slightly more rounded for a cleaner look */
    cursor: pointer;
    background-color: #fff; /* White background */
    color: #000; /* Black text */
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center text and icon */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

button:hover {
    background-color: #000; /* Black background on hover */
    color: #fff; /* White text on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

button svg {
    margin-right: 5px;
    width: 16px;
    height: 16px;
    fill: currentColor; /* Icon inherits text color */
    transition: fill 0.3s ease;
}

/* Add Button Styles */
.add-button {
    background-color: #fff; /* White background */
    border: 1px solid #000; /* Black border */
    color: #000; /* Black text */
    box-shadow: none; /* Remove shadow for cleaner look */
}

.add-button:hover {
    background-color: #f0f0f0; /* Light gray on hover */
    color: #000; /* Maintain black text */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
}

/* Remove Button Styles */
.remove-button {
    background-color: #fff; /* White background */
    border: 1px solid #e74c3c; /* Red border to indicate delete */
    color: #e74c3c; /* Red text for delete action */
    box-shadow: none; /* Remove shadow for cleaner look */
}

.remove-button:hover {
    background-color: #e74c3c; /* Red background on hover */
    color: #fff; /* White text on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
}

.remove-button svg {
    fill: #e74c3c; /* Red icon */
}

.remove-button:hover svg {
    fill: #fff; /* White icon on hover */
}

#export-button-container {
    text-align: center;
}

/* Icon Styles */
button svg {
    width: 16px;
    height: 16px;
    fill: currentColor; /* Ensure icons inherit text color */
    transition: fill 0.3s ease; /* Smooth transition for icon color */
}

/* Focus States for Accessibility */
button:focus {
    outline: 3px dashed #6B73FF; /* Blue outline for focus */
    outline-offset: 2px;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .split-screen {
        flex-direction: column;
        padding-top: 70px;
    }

    #form-container {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

@media screen and (max-width: 768px) {
    .cv-container {
        padding: 15px;
    }

    /* Stack the header content and image vertically */
    .cv-header {
        flex-direction: column;
        align-items: flex-start; /* Align text and image to the left */
    }

    .cv-header h1 {
        font-size: 16px; /* Adjusted for smaller screens */
    }

    .cv-header p.subtitle {
        font-size: 12px; /* Smaller font for subtitles */
    }

    /* Profile Picture Container */
    #profile-pic-container { /* Updated for smaller screens */
        width: 60px; /* Adjust image size for smaller screens */
        height: 60px;
        margin-bottom: 10px; /* Add space between image and text */
    }

    #profile-pic { /* Ensure image adjusts accordingly */
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Remove padding-right since the image is now stacked above the text */
    .cv-header .header-content {
        padding-right: 0;
    }

    /* Section Headings */
    .section h2 {
        font-size: 13px; /* Slightly smaller for small screens */
    }

    /* Entry Titles */
    .entry h3 {
        font-size: 12px; /* Adjusted font size */
    }

    /* Paragraphs and Lists */
    .entry p,
    .entry ul li {
        font-size: 11px; /* Further reduced for smaller screens */
    }

    /* Form Header */
    .form-header h1 {
        font-size: 18px; /* Adjusted font size for form header */
    }

    /* Form Section Headings */
    .form-section h2 {
        font-size: 16px;
    }

    /* Form Group Labels */
    .form-group label {
        font-size: 13px;
    }

    /* Form Inputs and Textareas */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 12px;
    }

    /* Buttons */
    button {
        width: 100%;
        justify-content: center; /* Center-align button content */
    }

    #export-cv-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Print Styles */
/* Updated print styles */
@media print {
    body * {
        visibility: hidden;
    }

    #cv-container,
    #cv-container * {
        visibility: visible;
    }

    #cv-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .cv-container {
        padding: 15px 20px;
        max-width: none;
        color: #000;
    }

    /* Hide unwanted elements */
    #form-container,
    header,
    footer,
    nav,
    #iubenda-cs-banner,
    #iubenda-cs-root,
    #iubenda-cs-preferences-link,
    .iubenda-banner,
    .iubenda-cs-container,
    .iubenda-cs-accept-btn-wrapper,
    .iubenda-cs-preferences-link,
    [id^="iubenda"],
    [class*="iubenda"],
    div[aria-label="cookie consent"] {
        display: none !important;
    }
}

