/* ========================================
   CV Portfolio Builder - Styles
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #C62E2E;
    --secondary: #1e1e1e;
    --accent: #C1E172;
    --background: #f8f9fa;
    --text: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #a02424 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat strong {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tool Layout */
.main-tool {
    padding: 3rem 0;
}

.tool-layout {
    display: grid;
    grid-template-columns: 280px 1fr 450px;
    gap: 2rem;
}

/* Sidebar */
.tool-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 8px var(--shadow);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.sidebar-section h3 i {
    color: var(--primary);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.template-btn {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.template-btn:hover {
    border-color: var(--primary);
    background: #fff;
    transform: translateY(-2px);
}

.template-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.template-btn i {
    font-size: 1.25rem;
}

/* Import/Export Buttons */
.import-buttons,
.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.import-btn,
.export-btn {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text);
}

.import-btn:hover,
.export-btn:hover {
    border-color: var(--primary);
    background: var(--background);
    transform: translateX(4px);
}

.import-btn i,
.export-btn i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Image Upload */
.image-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-zone:hover {
    border-color: var(--primary);
    background: var(--background);
}

.image-upload-zone i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.image-upload-zone p {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.image-upload-zone small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-img {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Reset Button */
.reset-btn {
    width: 100%;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* CV Form */
.cv-form-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.form-section h2 i {
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Experience/Education Items */
.experience-item,
.education-item,
.certification-item {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.remove-item-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background: #a02424;
    transform: scale(1.1);
}

/* Add Button */
.add-btn {
    background: var(--accent);
    color: var(--secondary);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #b0d060;
    transform: translateY(-2px);
}

/* Skills List */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-tag {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tag button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 0.25rem;
}

/* Preview Container */
.preview-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--background);
    border-bottom: 2px solid var(--border);
}

.preview-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-btn {
    background: var(--white);
    border: 2px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

#zoomLevel {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.preview-wrapper {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    background: #f0f0f0;
}

/* CV Preview Styles */
.cv-preview {
    background: var(--white);
    padding: 2rem;
    min-height: 800px;
    box-shadow: 0 4px 16px var(--shadow-lg);
    transform-origin: top center;
    transition: transform 0.3s ease;
}

/* Template: Modern */
.template-modern .cv-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 2rem;
}

.template-modern .cv-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.template-modern .cv-title {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.template-modern .cv-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.template-modern .cv-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-modern .cv-section {
    margin-bottom: 2rem;
}

.template-modern .cv-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* Template: Classic */
.template-classic {
    font-family: Georgia, serif;
}

.template-classic .cv-header {
    background: var(--secondary);
    color: var(--white);
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
}

.template-classic .cv-name {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.template-classic .cv-title {
    font-size: 1.125rem;
    opacity: 0.9;
}

.template-classic .cv-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    opacity: 0.95;
}

.template-classic .cv-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-classic .cv-section {
    margin-bottom: 2rem;
}

.template-classic .cv-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary);
}

/* Template: Creative */
.template-creative {
    background: linear-gradient(to bottom, var(--accent) 0%, var(--white) 30%);
}

.template-creative .cv-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.template-creative .cv-name {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.template-creative .cv-title {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.template-creative .cv-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.template-creative .cv-section {
    margin-bottom: 2rem;
}

.template-creative .cv-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Template: Minimal */
.template-minimal .cv-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.template-minimal .cv-name {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.template-minimal .cv-title {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.template-minimal .cv-contact {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    color: var(--text-muted);
}

.template-minimal .cv-section {
    margin-bottom: 2.5rem;
}

.template-minimal .cv-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 1rem;
}

/* Template: Executive */
.template-executive .cv-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--secondary);
    margin-bottom: 2rem;
}

.template-executive .cv-name {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.template-executive .cv-title {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 600;
}

.template-executive .cv-contact {
    text-align: right;
    font-size: 0.9rem;
}

.template-executive .cv-contact-item {
    display: block;
    margin-bottom: 0.5rem;
}

.template-executive .cv-section {
    margin-bottom: 2rem;
}

.template-executive .cv-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Template: Designer */
.template-designer {
    background: var(--white);
}

.template-designer .cv-header {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    color: var(--white);
    padding: 3rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.template-designer .cv-name {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.template-designer .cv-title {
    font-size: 1.3rem;
    opacity: 0.95;
}

.template-designer .cv-contact {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.template-designer .cv-section {
    margin-bottom: 2rem;
}

.template-designer .cv-section-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.template-designer .cv-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--primary);
    border-radius: 5px;
}

/* Template: Developer */
.template-developer {
    font-family: 'Courier New', monospace;
    background: #1e1e1e;
    color: #d4d4d4;
}

.template-developer .cv-header {
    border-left: 4px solid #4ec9b0;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.template-developer .cv-name {
    font-size: 2.5rem;
    color: #4ec9b0;
    margin-bottom: 0.5rem;
}

.template-developer .cv-title {
    font-size: 1.1rem;
    color: #ce9178;
}

.template-developer .cv-contact {
    margin-top: 1rem;
    color: #9cdcfe;
    font-size: 0.9rem;
}

.template-developer .cv-contact-item {
    display: block;
    margin-bottom: 0.3rem;
}

.template-developer .cv-section {
    margin-bottom: 2rem;
}

.template-developer .cv-section-title {
    font-size: 1.3rem;
    color: #dcdcaa;
    margin-bottom: 1rem;
    font-weight: 700;
}

.template-developer .cv-section-title::before {
    content: '// ';
    color: #6a9955;
}

/* Template: Writer */
.template-writer {
    font-family: 'Palatino', 'Georgia', serif;
    line-height: 1.8;
}

.template-writer .cv-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.template-writer .cv-name {
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.template-writer .cv-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
}

.template-writer .cv-contact {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.template-writer .cv-section {
    margin-bottom: 2.5rem;
}

.template-writer .cv-section-title {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
    font-style: italic;
}

/* Template: Academic */
.template-academic {
    font-family: 'Times New Roman', Times, serif;
}

.template-academic .cv-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px double var(--text);
    margin-bottom: 2rem;
}

.template-academic .cv-name {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.template-academic .cv-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
}

.template-academic .cv-contact {
    margin-top: 1rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.template-academic .cv-section {
    margin-bottom: 2rem;
}

.template-academic .cv-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--text);
    padding-bottom: 0.3rem;
}

/* Template: Portfolio */
.template-portfolio {
    background: #fafafa;
}

.template-portfolio .cv-header {
    background: var(--white);
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-portfolio .cv-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.template-portfolio .cv-title {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.template-portfolio .cv-contact {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.template-portfolio .cv-section {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.template-portfolio .cv-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Template: Elegant */
.template-elegant {
    background: linear-gradient(to bottom right, #f8f9fa, #e9ecef);
}

.template-elegant .cv-header {
    text-align: center;
    padding: 2.5rem 0;
    position: relative;
}

.template-elegant .cv-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.template-elegant .cv-name {
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
}

.template-elegant .cv-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}

.template-elegant .cv-contact {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.template-elegant .cv-section {
    margin-bottom: 2.5rem;
}

.template-elegant .cv-section-title {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 2px;
}

/* Template: Bold */
.template-bold {
    font-weight: 600;
}

.template-bold .cv-header {
    background: var(--text);
    color: var(--white);
    padding: 2.5rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
}

.template-bold .cv-name {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.template-bold .cv-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.template-bold .cv-contact {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.template-bold .cv-section {
    margin-bottom: 2rem;
}

.template-bold .cv-section-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Template: Compact */
.template-compact {
    font-size: 0.9rem;
    line-height: 1.5;
}

.template-compact .cv-header {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1.5rem;
}

.template-compact .cv-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.template-compact .cv-title {
    font-size: 1rem;
    color: var(--text-muted);
}

.template-compact .cv-contact {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.template-compact .cv-section {
    margin-bottom: 1.5rem;
}

.template-compact .cv-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* Template: Colorful */
.template-colorful {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.template-colorful .cv-header {
    text-align: center;
    padding: 2.5rem 0;
}

.template-colorful .cv-name {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.template-colorful .cv-title {
    font-size: 1.3rem;
    opacity: 0.95;
}

.template-colorful .cv-contact {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.template-colorful .cv-section {
    margin-bottom: 2rem;
}

.template-colorful .cv-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

/* Template: Professional */
.template-professional {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    padding: 0;
}

.template-professional .cv-sidebar {
    background: var(--secondary);
    color: var(--white);
    padding: 2rem 1.5rem;
}

.template-professional .cv-main {
    padding: 2rem;
}

.template-professional .cv-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.template-professional .cv-title {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.template-professional .cv-contact {
    font-size: 0.85rem;
}

.template-professional .cv-contact-item {
    display: block;
    margin-bottom: 0.75rem;
}

.template-professional .cv-section {
    margin-bottom: 2rem;
}

.template-professional .cv-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.template-professional .cv-sidebar .cv-section-title {
    color: var(--white);
    border-left: 4px solid var(--accent);
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--background);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* How to Use */
.how-to-use {
    padding: 5rem 0;
    background: var(--background);
}

.how-to-use h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text);
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, #a02424 100%);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cta-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cta-btn.primary {
    background: var(--white);
    color: var(--primary);
}

.cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-btn.secondary:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-feature i {
    color: var(--accent);
    font-size: 1.25rem;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: var(--white);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    background: var(--background);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Content Section */
.content-section {
    padding: 5rem 0;
    background: var(--background);
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.seo-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--primary);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.footer-column a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0.25rem 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .tool-layout {
        grid-template-columns: 260px 1fr 400px;
    }
}

@media (max-width: 1200px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }
    
    .tool-sidebar,
    .preview-container {
        position: static;
    }
    
    .preview-container {
        max-height: 600px;
    }
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}