/* Resume Maker Specific Styles */

/* Active navigation link */
nav ul li a.active {
    color: #4361ee;
    font-weight: 600;
}

/* Resume Hero Section */
.resume-hero {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.resume-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.resume-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.coming-soon-badge {
    display: inline-block;
    background-color: #f43f5e;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 63, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
    }
}

/* Features Section */
.features {
    padding: 80px 0;
    text-align: center;
    background-color: #f8f9fa;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: #4361ee;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Signup Section */
.signup {
    padding: 80px 0;
    background-color: #eef2ff;
}

.signup-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.signup-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.signup-content p {
    margin-bottom: 30px;
    color: #4b5563;
}

.signup-content form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.signup-content input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.signup-content .btn {
    padding: 15px 30px;
    border-radius: 0 5px 5px 0;
}

.disclaimer {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

/* Preview Section */
.preview {
    padding: 80px 0;
    background-color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #1e293b;
}

.section-header p {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.preview-image {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.preview-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: blur(3px);
}

.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(67, 97, 238, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.coming-soon-text {
    background-color: #f43f5e;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.5rem;
    font-weight: 600;
    transform: rotate(-5deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .resume-hero h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .signup-content form {
        flex-direction: column;
    }
    
    .signup-content input {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .signup-content .btn {
        border-radius: 5px;
        width: 100%;
    }
    
    .coming-soon-text {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
}

/* Enhanced Mobile Responsiveness */

@media (max-width: 991px) {
    .resume-hero {
        padding: 40px 0;
    }
    
    .features h2 {
        font-size: 2rem;
    }
    
    .feature-card i {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .resume-hero h1 {
        font-size: 2.2rem;
    }
    
    .resume-hero p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .coming-soon-badge {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .features-grid {
        gap: 20px;
    }
    
    .signup-content form {
        flex-direction: column;
        gap: 10px;
    }
    
    .signup-content input,
    .signup-content .btn {
        width: 100%;
        border-radius: 5px;
    }
    
    .coming-soon-text {
        font-size: 1.2rem;
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .signup-content h2 {
        font-size: 1.8rem;
    }
    
    .preview-image {
        border-radius: 8px;
    }
}

/* Resume Maker Styles */

/* Template Selection */
.template-selection {
    padding: 60px 0;
    background-color: #f9f9fb;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.template-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.template-preview {
    height: 300px;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-card:hover .template-preview img {
    transform: scale(1.05);
}

.template-card h3 {
    padding: 15px;
    margin: 0;
    text-align: center;
    font-weight: 600;
}

.template-card .btn {
    display: block;
    margin: 0 15px 15px;
    width: calc(100% - 30px);
}

/* Template Badge */
.template-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(67, 97, 238, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Resume Editor */
.editor-container {
    max-width: 1400px;
    padding: 0;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.editor-controls {
    display: flex;
    gap: 10px;
}

.editor-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* Editor Panel */
.editor-panel {
    background-color: #f9f9fb;
    border-right: 1px solid #eee;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.tab-btn {
    padding: 15px 20px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    padding: 20px;
    display: none;
    overflow-y: auto;
    flex-grow: 1;
}

.tab-content.active {
    display: block;
}

/* Accordion Styles */
.accordion-item {
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.accordion-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.accordion-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.accordion-content {
    padding: 20px;
    display: none;
}

.accordion-item.open .accordion-content {
    display: block;
}

.accordion-item.open .accordion-header i {
    transform: rotate(180deg);
}

.accordion-header i {
    transition: transform 0.3s ease;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 10px 20px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-remove {
    margin-top: 5px;
    color: #f44336;
    border-color: #f44336;
}

.btn-remove:hover {
    background-color: #f44336;
    color: white;
}

/* Experience and Education Items */
.experience-item, .education-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fafafa;
}

/* Add Section */
.add-section {
    position: relative;
    margin-top: 20px;
}

.section-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.section-option {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.section-option:last-child {
    border-bottom: none;
}

.section-option:hover {
    background-color: #f5f5f5;
}

/* Design Tab */
.design-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.design-group {
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.design-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.option-row label {
    margin-bottom: 0;
}

.option-row .form-control {
    width: 150px;
}

.color-picker {
    padding: 0;
    height: 30px;
    width: 50px;
    border: none;
    cursor: pointer;
}

/* Preview Panel */
.preview-panel {
    background-color: #f0f0f0;
    position: relative;
    overflow: auto;
}

.preview-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.preview-controls button {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.preview-controls span {
    margin: 0 10px;
    font-size: 14px;
}

.resume-preview {
    padding: 40px 0;
    display: flex;
    justify-content: center;
    min-height: 100%;
}

.resume-page {
    width: 8.5in;
    height: 11in;
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5in;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Resume Styles */
.resume-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.resume-name {
    margin: 0 0 5px;
    font-size: 28px;
    color: var(--primary-color);
}

.resume-title {
    margin: 0 0 15px;
    font-size: 16px;
    color: #666;
}

.resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

.resume-contact span {
    display: flex;
    align-items: center;
}

.resume-contact i {
    margin-right: 5px;
    color: var(--primary-color);
}

.resume-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    color: var(--primary-color);
}

.section-content {
    font-size: 14px;
}

.experience-entry, .education-entry {
    margin-bottom: 15px;
}

.entry-header {
    margin-bottom: 8px;
}

.entry-title {
    margin: 0 0 5px;
    font-size: 16px;
}

.entry-company, .entry-institution {
    margin: 0 0 2px;
    font-weight: 500;
}

.entry-duration {
    margin: 0;
    font-size: 13px;
    color: #777;
}

.entry-description ul {
    margin: 0;
    padding-left: 20px;
}

.entry-description li {
    margin-bottom: 5px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    padding: 5px 12px;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .editor-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: auto;
    }
    
    .preview-panel {
        border-top: 1px solid #eee;
        border-right: none;
    }
    
    .resume-page {
        width: 100%;
        height: auto;
        min-height: 11in;
    }
}

@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .option-row .form-control {
        width: 100%;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .editor-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Resume Template Specific Styles */

/* Define template variables */
:root {
    --primary-color: #4361ee;
    --accent-color: #3a0ca3;
}

/* Modern Template */
.template-modern .resume-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

.template-modern .resume-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.template-modern .resume-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-color);
}

.template-modern .resume-contact {
    margin-top: 10px;
    gap: 20px;
}

.template-modern .section-title {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
}

.template-modern .skill-item {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(67, 97, 238, 0.3);
}

/* Classic Template */
.template-classic .resume-header {
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.template-classic .resume-name {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
}

.template-classic .resume-title {
    font-size: 16px;
    font-style: italic;
    color: #555;
}

.template-classic .resume-contact {
    justify-content: center;
    margin-top: 10px;
}

.template-classic .section-title {
    font-weight: 600;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    color: #333;
}

.template-classic .entry-title {
    font-weight: 600;
}

.template-classic .entry-company, 
.template-classic .entry-institution {
    font-style: italic;
}

.template-classic .skill-item {
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    color: #333;
}

/* Creative Template */
.template-creative .resume-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    margin: -0.5in -0.5in 20px;
    border-radius: 0;
}

.template-creative .resume-name {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.template-creative .resume-title {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.template-creative .resume-contact {
    margin-top: 10px;
}

.template-creative .resume-contact i {
    color: white;
}

.template-creative .section-title {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    display: inline-block;
    margin-bottom: 15px;
}

.template-creative .skill-item {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.template-creative .entry-title {
    color: var(--primary-color);
}

/* Professional Template */
.template-professional .resume-header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

.template-professional .resume-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
}

.template-professional .resume-title {
    font-size: 16px;
    font-weight: 500;
    color: #444;
}

.template-professional .resume-contact {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.template-professional .section-title {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    font-size: 16px;
    text-transform: uppercase;
}

.template-professional .entry-title {
    font-weight: 600;
    color: #333;
}

.template-professional .entry-company,
.template-professional .entry-institution {
    color: var(--primary-color);
}

.template-professional .skill-item {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 3px 3px 0;
}

/* Loading overlay for PDF generation */
.loading-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Editable content in preview */
.resume-page [contenteditable="true"] {
    outline: none;
    padding: 2px;
    border: 1px dashed transparent;
}

.resume-page [contenteditable="true"]:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.resume-page [contenteditable="true"]:focus {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

/* Drag-and-drop for sections */
.resume-section.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-color);
}

.resume-section .drag-handle {
    cursor: grab;
    color: #ccc;
    margin-right: 10px;
    display: none;
}

.resume-section:hover .drag-handle {
    display: inline-block;
}

/* Add to existing responsive styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .resume-page, .resume-page * {
        visibility: visible;
    }
    
    .resume-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0.5in;
        box-shadow: none;
    }
    
    .preview-controls, 
    .resume-page [contenteditable="true"]:hover,
    .resume-page [contenteditable="true"]:focus {
        display: none;
        border-color: transparent;
        background-color: transparent;
    }
}

/* Additional Templates with Image Support */

/* Visual Template - with profile image */
.template-visual .resume-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

.template-visual .profile-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.template-visual .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-visual .resume-name {
    font-size: 28px;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.template-visual .resume-title {
    font-size: 16px;
    margin: 5px 0 10px;
    color: #555;
}

.template-visual .resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template-visual .section-title {
    position: relative;
    color: white;
    background-color: var(--primary-color);
    padding: 8px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 16px;
}

.template-visual .skill-item {
    background-color: #f0f4ff;
    color: var(--primary-color);
    border-radius: 4px;
}

/* Portfolio Template - with multiple images */
.template-portfolio .resume-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    margin: -0.5in -0.5in 20px;
    position: relative;
    overflow: hidden;
}

.template-portfolio .resume-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.template-portfolio .header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

.template-portfolio .profile-image-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    flex-shrink: 0;
}

.template-portfolio .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-portfolio .resume-name {
    font-size: 28px;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.template-portfolio .resume-title {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.template-portfolio .resume-contact {
    margin-top: 10px;
    color: white;
}

.template-portfolio .resume-contact i {
    color: rgba(255, 255, 255, 0.8);
}

.template-portfolio .section-title {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 15px;
}

.template-portfolio .portfolio-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.template-portfolio .portfolio-image-container {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.template-portfolio .portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-portfolio .portfolio-image:hover {
    transform: scale(1.05);
}

.template-portfolio .skill-item {
    background-color: #f0f4ff;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}

/* Photo CV Template - with sidebar image */
.template-photo {
    display: grid;
    grid-template-columns: 2.5in 1fr;
    height: 100%;
    padding: 0 !important;
}

.template-photo .sidebar {
    background-color: var(--primary-color);
    color: white;
    height: 100%;
    padding: 0.5in;
    display: flex;
    flex-direction: column;
}

.template-photo .profile-image-container {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 5px;
}

.template-photo .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-photo .resume-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px;
    color: white;
}

.template-photo .resume-title {
    font-size: 16px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
}

.template-photo .resume-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.template-photo .resume-contact i {
    color: rgba(255, 255, 255, 0.8);
}

.template-photo .sidebar-section {
    margin-top: 25px;
}

.template-photo .sidebar-title {
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.template-photo .sidebar-content {
    font-size: 14px;
}

.template-photo .skill-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.template-photo .skill-item-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-photo .skill-name {
    flex: 1;
}

.template-photo .skill-level {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    width: 100px;
    border-radius: 4px;
    position: relative;
}

.template-photo .skill-level-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: white;
    border-radius: 4px;
}

.template-photo .main-content {
    padding: 0.5in;
}

.template-photo .section-title {
    color: var(--primary-color);
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Executive Template - with subtle header image */
.template-executive .resume-header {
    position: relative;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.template-executive .header-background {
    position: absolute;
    top: -0.5in;
    left: -0.5in;
    right: -0.5in;
    height: 1.5in;
    background-color: var(--primary-color);
    opacity: 0.1;
    z-index: -1;
}

.template-executive .profile-image-container {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.template-executive .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-executive .name-title {
    flex: 1;
}

.template-executive .resume-name {
    font-size: 26px;
    color: #333;
    margin: 0 0 5px;
    font-weight: 700;
}

.template-executive .resume-title {
    font-size: 16px;
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
}

.template-executive .resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.template-executive .resume-contact i {
    color: var(--primary-color);
}

.template-executive .section-title {
    color: #333;
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.template-executive .skill-item {
    background-color: #f9f9f9;
    color: #333;
    border: 1px solid #ddd;
}

/* Image upload and preview controls */
.image-upload-container {
    margin-bottom: 15px;
}

.image-preview {
    width: 100%;
    max-width: 150px;
    height: 150px;
    border: 1px dashed #ddd;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview-empty {
    color: #999;
    font-size: 12px;
    text-align: center;
}

.portfolio-image-upload {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.portfolio-image-item {
    position: relative;
}

.portfolio-image-preview {
    aspect-ratio: 16/9;
    border: 1px dashed #ddd;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.portfolio-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #f44336;
    font-size: 12px;
    border: 1px solid #f44336;
}

/* Template for printing */
@media print {
    .template-photo {
        width: 210mm;
        height: 297mm;
    }
    
    .template-photo .sidebar {
        padding: 15mm;
    }
    
    .template-photo .main-content {
        padding: 15mm;
    }
}

/* PDF Export Specific Styles */
.pdf-container {
    width: 8.5in;
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Fix template styles for PDF export */
.for-pdf-export {
    width: 8.5in !important;
    height: 11in !important;
    overflow: visible !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0.5in !important;
}

/* Ensure template-photo displays correctly in PDF */
.for-pdf-export.template-photo {
    display: grid !important;
    grid-template-columns: 2.5in 1fr !important;
    padding: 0 !important;
}

.for-pdf-export.template-photo .sidebar {
    padding: 0.3in !important;
}

.for-pdf-export.template-photo .main-content {
    padding: 0.5in !important;
    overflow: visible !important;
}

/* Fix portfolio template for PDF export */
.for-pdf-export.template-portfolio .resume-header {
    margin: -0.5in -0.5in 0.3in !important;
}

/* Fix creative template for PDF export */
.for-pdf-export.template-creative .resume-header {
    margin: -0.5in -0.5in 0.3in !important;
}

/* Visual template PDF fixes */
.for-pdf-export.template-visual .resume-header {
    grid-template-columns: auto 1fr !important;
    gap: 15px !important;
}

/* Executive template PDF fixes */
.for-pdf-export.template-executive .header-background {
    top: -0.5in !important;
    left: -0.5in !important;
    right: -0.5in !important;
}

/* Ensure proper sizing for content */
.for-pdf-export .resume-section {
    page-break-inside: avoid !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.for-pdf-export .entry-title,
.for-pdf-export .entry-company,
.for-pdf-export .entry-institution,
.for-pdf-export .entry-duration,
.for-pdf-export .entry-description {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

/* Improve print styles */
@media print {
    @page {
        size: letter portrait;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    .resume-page, .resume-page * {
        visibility: visible;
    }
    
    .resume-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 8.5in !important;
        height: 11in !important;
        margin: 0 !important;
        padding: 0.5in !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    
    /* Template-specific print styles */
    .template-photo {
        display: grid !important;
        grid-template-columns: 2.5in 1fr !important;
        padding: 0 !important;
    }
    
    .template-photo .sidebar {
        height: 11in !important;
        padding: 0.3in !important;
    }
    
    .template-photo .main-content {
        padding: 0.3in !important;
    }
    
    /* Prevent content overflow */
    .resume-section {
        page-break-inside: avoid !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    .preview-controls, 
    .resume-page [contenteditable="true"]:hover,
    .resume-page [contenteditable="true"]:focus {
        display: none !important;
        border-color: transparent !important;
        background-color: transparent !important;
    }
}

/* Apply button and success message styles */
.apply-image-btn {
    display: block;
    margin-top: 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.apply-image-btn:hover {
    background-color: #45a049;
}

.apply-success {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    animation: fadeOut 2s forwards;
    animation-delay: 1.5s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Print specific styles */
@media print {
    @page {
        size: letter portrait;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    .resume-page, .resume-page * {
        visibility: visible;
    }
    
    .resume-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 8.5in !important;
        height: 11in !important;
        margin: 0 !important;
        padding: 0.5in !important;
        box-shadow: none !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ensure template-specific elements print correctly */
    .template-photo {
        display: grid !important;
        grid-template-columns: 2.5in 1fr !important;
        padding: 0 !important;
    }
    
    .template-photo .sidebar {
        color: white !important;
        background-color: var(--primary-color) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .template-photo .sidebar * {
        color: white !important;
    }
    
    .template-creative .resume-header {
        background-color: var(--primary-color) !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .template-portfolio .resume-header {
        background-color: var(--primary-color) !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Fix print styles to ensure one-page printing */
@media print {
    @page {
        size: letter;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    #resumePreview, #resumePreview * {
        visibility: visible;
    }
    
    #resumePreview {
        position: absolute;
        left: 0;
        top: 0;
        width: 8.5in !important;
        height: 11in !important;
        max-height: 11in !important;
        padding: 0.5in !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .resume-section {
        page-break-inside: avoid !important;
        font-size: 95% !important; /* Slightly reduce font size to fit more content */
    }
    
    /* Adjust spacing for printing */
    .resume-header {
        margin-bottom: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .resume-section {
        margin-bottom: 15px !important;
    }
    
    .section-title {
        margin-bottom: 8px !important;
        padding-bottom: 5px !important;
    }
    
    .experience-entry, .education-entry {
        margin-bottom: 10px !important;
    }
    
    /* Fix special template layouts for printing */
    .template-photo {
        grid-template-columns: 2in 1fr !important; /* Make sidebar narrower */
    }
    
    .template-photo .sidebar {
        padding: 0.3in !important;
    }
    
    .template-photo .main-content {
        padding: 0.3in !important;
    }
    
    .template-creative .resume-header,
    .template-portfolio .resume-header {
        margin: -0.5in -0.5in 15px !important;
        padding: 15px !important;
    }
}

/* Fix the printing class specifically applied during print */
.printing {
    transform: scale(1) !important;
    height: 11in !important;
    width: 8.5in !important;
    overflow: hidden !important;
}

/* Make sure profile image display is correct */
.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Fix template-specific layouts for content density */
.template-photo .sidebar-section {
    margin-top: 15px;
}

.skill-item {
    padding: 3px 8px;
    margin: 2px;
}
