/* General Styles */
body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f7f9fc;
    color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: #fff;
    color: #333;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header a {
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    list-style: none;
}

header li {
    display: inline;
    padding: 0 20px 0 20px;
}

header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

.nav-logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 5rem 1rem;
    background: #fff;
}

.hero-section h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.cta-button {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 12px 25px;
    margin-top: 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background: #2980b9;
}

/* Templates Section */
#templates {
    padding: 3rem 0;
    text-align: center;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    width: 90%;
    margin: auto;
    margin-top: 2rem;
}

.template-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.template-card-content {
    padding: 20px;
}

/* Builder Page */
.builder-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 350px;
    background: #fff;
    padding: 25px;
    overflow-y: auto;
    height: calc(100vh - 70px);
    border-right: 1px solid #e0e0e0;
}

.main-panel {
    flex: 1;
    padding: 25px;
    background: #f7f9fc;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.control-group {
    margin-bottom: 25px;
}

.control-group h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.control-group input[type="text"],
.control-group input[type="email"],
.control-group input[type="tel"],
.control-group textarea,
.control-group select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.control-group input:focus, .control-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.control-group button {
    background: #3498db;
    color: #fff;
    border: 0;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-top: 5px;
}

.control-group button:hover {
    background: #2980b9;
}

.dynamic-item-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.dynamic-item-wrapper input,
.dynamic-item-wrapper textarea {
    margin-bottom: 0;
    flex-grow: 1;
}

.remove-btn {
    background: #e74c3c !important;
    margin-left: 10px;
    padding: 5px 10px !important;
    font-size: 0.9rem !important;
}

.remove-btn:hover {
    background: #c0392b !important;
}

#cv-preview {
    background: #fff;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.profile-image-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 5px solid #3498db;
}

#preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Template Modal */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 20px;
    text-align: center;
    background: #fff;
}

.template-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.1);
    color: #3498db;
}