/* Enhanced Resume Template Styles - Complete CSS for all templates */

/* Base Resume Document */
.resume-document {
    width: 8.5in;
    min-height: 11in;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
    position: relative;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.4;
    color: #333;
    overflow: hidden;
}

.template-container {
    display: none;
    padding: 0.75in;
    height: 100%;
    box-sizing: border-box;
}

.template-container.active {
    display: block;
}

/* =============================================================================
   CLASSIC PROFESSIONAL TEMPLATE
============================================================================= */
.template-classic {
    font-family: 'Calibri', Arial, sans-serif;
    color: #2c3e50;
}

.template-classic .resume-header {
    border-bottom: 3px solid var(--primary-color, #2563eb);
    padding-bottom: 20px;
    margin-bottom: 25px;
    background: white;
}

.template-classic .full-name {
    font-size: 28pt;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.template-classic .contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 12px;
}

.template-classic .contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10pt;
    color: #5a6c7d;
}

.template-classic .contact-item i {
    width: 14px;
    color: var(--primary-color, #2563eb);
    font-size: 12px;
}

.template-classic .section-title {
    font-size: 14pt;
    font-weight: 600;
    color: var(--primary-color, #2563eb);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-color, #2563eb);
    padding-bottom: 6px;
    margin-bottom: 16px;
    margin-top: 25px;
}

.template-classic .experience-entry,
.template-classic .education-entry {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 2px solid #e2e8f0;
    position: relative;
}

.template-classic .experience-entry::before,
.template-classic .education-entry::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--primary-color, #2563eb);
    border-radius: 50%;
}

.template-classic .job-title,
.template-classic .degree {
    font-size: 13pt;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.template-classic .company-name,
.template-classic .institution {
    font-size: 11pt;
    font-weight: 500;
    color: var(--primary-color, #2563eb);
    margin-bottom: 6px;
}

.template-classic .date-range {
    font-size: 10pt;
    color: #64748b;
    font-weight: 500;
    font-style: italic;
}

.template-classic .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.template-classic .skill-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 10pt;
    text-align: center;
    border-left: 4px solid var(--primary-color, #2563eb);
    font-weight: 500;
    color: #2c3e50;
}

/* =============================================================================
   MODERN CLEAN TEMPLATE - FIXED CONTRAST ISSUES
============================================================================= */
.template-modern {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3748;
}

.template-modern .resume-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: -0.75in -0.75in 30px -0.75in;
    padding: 40px 0.75in 30px 0.75in;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #667eea;
}

.template-modern .resume-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.template-modern .full-name {
    font-size: 32pt;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.template-modern .professional-title {
    font-size: 14pt;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 15px;
}

.template-modern .title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    margin: 10px 0 20px 0;
}

.template-modern .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.template-modern .contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10pt;
    color: #2d3748;
    font-weight: 500;
}

.template-modern .contact-item i {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8pt;
}

.template-modern .content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.template-modern .section-title {
    font-size: 16pt;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.template-modern .section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.template-modern .modern-experience-entry {
    margin-bottom: 25px;
    position: relative;
    padding-left: 30px;
}

.template-modern .timeline-marker {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
}

.template-modern .timeline-marker::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 12px;
    width: 2px;
    height: 50px;
    background: #e2e8f0;
}

.template-modern .job-title {
    font-size: 13pt;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 6px 0;
}

.template-modern .company-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.template-modern .company {
    font-size: 11pt;
    color: #667eea;
    font-weight: 500;
}

.template-modern .date-range {
    font-size: 9pt;
    color: #4a5568;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.template-modern .sidebar-column .section-title {
    font-size: 14pt;
    color: #2d3748;
}

.template-modern .skills-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-modern .skill-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 10pt;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* =============================================================================
   EXECUTIVE TEMPLATE - ENHANCED CONTRAST
============================================================================= */
.template-executive {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f8f9fa;
}

.template-executive .resume-header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    margin: -0.75in -0.75in 30px -0.75in;
    padding: 50px 0.75in;
    position: relative;
}

.template-executive .resume-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(180deg, rgba(26, 32, 44, 0.1) 0%, transparent 100%);
}

.template-executive .header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.template-executive .full-name {
    font-size: 36pt;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.template-executive .professional-title {
    font-size: 14pt;
    color: #e2e8f0;
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 300;
}

.template-executive .contact-block {
    text-align: right;
}

.template-executive .contact-item {
    display: block;
    color: #f7fafc;
    font-size: 11pt;
    margin-bottom: 8px;
    font-family: 'Arial', sans-serif;
    font-weight: 400;
}

.template-executive .executive-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-executive .section-title {
    font-size: 16pt;
    font-weight: 600;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px solid #2d3748;
    padding-bottom: 8px;
    margin-bottom: 25px;
    margin-top: 30px;
}

.template-executive .executive-experience-entry {
    margin-bottom: 30px;
    border-left: 4px solid #2d3748;
    padding-left: 25px;
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
}

.template-executive .executive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.template-executive .executive-title {
    font-size: 14pt;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 6px 0;
}

.template-executive .executive-company {
    font-size: 12pt;
    color: #4a5568;
    font-weight: 500;
}

.template-executive .executive-dates {
    font-size: 11pt;
    color: #2d3748;
    font-weight: 600;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.template-executive .competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.template-executive .skill-item {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 10pt;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 8px rgba(26, 32, 44, 0.3);
}

.template-executive .two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* =============================================================================
   CREATIVE TEMPLATE - IMPROVED READABILITY
============================================================================= */
.template-creative {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3748;
}

.template-creative .resume-header {
    background: rgba(255, 255, 255, 0.98);
    margin: -0.75in -0.75in 25px -0.75in;
    padding: 40px 0.75in;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #667eea;
}

.template-creative .header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: skewY(-3deg);
    transform-origin: top left;
    opacity: 0.1;
}

.template-creative .header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 30px;
}

.template-creative .avatar-section {
    flex-shrink: 0;
}

.template-creative .avatar-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36pt;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border: 4px solid white;
}

.template-creative .name-section {
    flex: 1;
}

.template-creative .full-name {
    font-size: 28pt;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.template-creative .tagline {
    font-size: 14pt;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 15px;
}

.template-creative .contact-row {
    display: flex;
    gap: 15px;
    font-size: 10pt;
    color: #2d3748;
    font-weight: 500;
}

.template-creative .separator {
    color: #9ca3af;
}

.template-creative .creative-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.template-creative .section-title {
    font-size: 18pt;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
}

.template-creative .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.template-creative .creative-experience-entry {
    margin-bottom: 25px;
    position: relative;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.template-creative .creative-experience-entry::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 2px 2px 0;
}

.template-creative .creative-header {
    margin-bottom: 12px;
}

.template-creative .job-title {
    font-size: 14pt;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 8px 0;
}

#creativeEmail, #creativePhone, #creativeLocation {
    color: #fff;
}

.template-creative .company-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-creative .company {
    font-size: 11pt;
    color: #667eea;
    font-weight: 500;
}

.template-creative .date-range {
    font-size: 9pt;
    color: #4a5568;
    background: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.template-creative .creative-skills {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-creative .skill-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 10pt;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s ease;
}

.template-creative .skill-item:hover {
    transform: translateY(-2px);
}

/* =============================================================================
   MINIMALIST TEMPLATE - ENHANCED
============================================================================= */
.template-minimalist {
    font-family: 'Arial', sans-serif;
    background: white;
    color: #1a202c;
}

.template-minimalist .resume-header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 30px;
}

.template-minimalist .full-name {
    font-size: 32pt;
    font-weight: 300;
    color: #1a202c;
    margin: 0 0 10px 0;
    letter-spacing: 3px;
}

.template-minimalist .professional-title {
    font-size: 12pt;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 400;
}

.template-minimalist .contact-line {
    font-size: 11pt;
    color: #2d3748;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-weight: 400;
}

.template-minimalist .divider {
    color: #cbd5e0;
}

.template-minimalist .section-title {
    font-size: 12pt;
    font-weight: 600;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    margin-top: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.template-minimalist .minimalist-experience-entry {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.template-minimalist .minimalist-header {
    font-size: 11pt;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #2d3748;
}

.template-minimalist .minimalist-header strong {
    color: #1a202c;
    font-weight: 600;
}

.template-minimalist .minimalist-description {
    font-size: 10pt;
    color: #4a5568;
    line-height: 1.5;
    margin-left: 0;
}

.template-minimalist .minimal-skills {
    font-size: 11pt;
    color: #2d3748;
    line-height: 1.6;
}

.template-minimalist .minimalist-custom-section {
    margin-bottom: 15px;
    font-size: 11pt;
}

.template-minimalist .minimalist-custom-section strong {
    color: #1a202c;
    font-weight: 600;
}

/* =============================================================================
   MOBILE PREVIEW OPTIMIZATIONS
============================================================================= */

/* Mobile Preview Base */
.mobile-preview {
    width: 375px !important;
    max-width: 375px !important;
    margin: 0 auto !important;
    padding: 16px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    box-shadow: 0 0 0 8px #333, 0 0 20px rgba(0,0,0,0.3) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: white !important;
    transform-origin: top center !important;
}

/* Mobile Header Optimizations */
.mobile-preview .full-name {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
    text-align: center !important;
}

.mobile-preview .contact-info,
.mobile-preview .contact-grid,
.mobile-preview .contact-line,
.mobile-preview .contact-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 12px 0 !important;
}

.mobile-preview .contact-item {
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    color: #2d3748 !important;
}

.mobile-preview .contact-item i {
    font-size: 11px !important;
    width: 14px !important;
}

/* Mobile Section Titles */
.mobile-preview .section-title {
    font-size: 16px !important;
    margin: 20px 0 12px 0 !important;
    padding-bottom: 4px !important;
    text-align: center !important;
}

/* Mobile Content Spacing */
.mobile-preview .resume-section {
    margin-bottom: 20px !important;
    padding: 0 8px !important;
}

.mobile-preview .section-content {
    padding: 0 !important;
}

/* Mobile Experience Entries */
.mobile-preview .experience-entry,
.mobile-preview .education-entry,
.mobile-preview .modern-experience-entry,
.mobile-preview .executive-experience-entry,
.mobile-preview .creative-experience-entry,
.mobile-preview .minimalist-experience-entry {
    margin-bottom: 16px !important;
    padding: 12px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    border-left: 3px solid #2563eb !important;
}

.mobile-preview .entry-header {
    display: block !important;
    margin-bottom: 8px !important;
}

.mobile-preview .job-title,
.mobile-preview .degree,
.mobile-preview .executive-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
}

.mobile-preview .company-name,
.mobile-preview .institution,
.mobile-preview .company,
.mobile-preview .executive-company {
    font-size: 13px !important;
    color: #666 !important;
    margin-bottom: 6px !important;
}

.mobile-preview .date-range {
    font-size: 11px !important;
    color: #888 !important;
    font-style: italic !important;
    margin-bottom: 8px !important;
    background: transparent !important;
    padding: 0 !important;
}

.mobile-preview .location {
    font-size: 11px !important;
    color: #666 !important;
}

.mobile-preview .job-description,
.mobile-preview .field-of-study,
.mobile-preview .creative-description,
.mobile-preview .executive-achievements,
.mobile-preview .minimalist-description {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-top: 8px !important;
}

/* Mobile Skills */
.mobile-preview .skills-grid,
.mobile-preview .skills-list,
.mobile-preview .creative-skills,
.mobile-preview .competencies-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
    margin: 12px 0 !important;
}

.mobile-preview .skill-item {
    font-size: 11px !important;
    padding: 4px 8px !important;
    background: #2563eb !important;
    color: white !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    border: none !important;
}

/* Mobile Summary */
.mobile-preview #summaryContent p,
.mobile-preview .section-content p {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin: 0 0 8px 0 !important;
    text-align: left !important;
}

/* Mobile Lists */
.mobile-preview ul {
    padding-left: 16px !important;
    margin: 8px 0 !important;
}

.mobile-preview li {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
}

/* Mobile Template-Specific Fixes */

/* Modern Template Mobile */
.mobile-preview.template-modern .content-grid {
    display: block !important;
    grid-template-columns: none !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

.mobile-preview.template-modern .sidebar-column {
    margin-top: 20px !important;
}

.mobile-preview.template-modern .timeline-marker {
    display: none !important;
}

.mobile-preview.template-modern .modern-experience-entry {
    padding-left: 12px !important;
}

/* Executive Template Mobile */
.mobile-preview.template-executive .header-wrapper {
    display: block !important;
    text-align: center !important;
}

.mobile-preview.template-executive .contact-block {
    text-align: center !important;
    margin-top: 12px !important;
}

.mobile-preview.template-executive .two-column-section {
    display: block !important;
    grid-template-columns: none !important;
}

.mobile-preview.template-executive .executive-content {
    padding: 20px !important;
    border-radius: 8px !important;
}

/* Creative Template Mobile */
.mobile-preview.template-creative .creative-grid {
    display: block !important;
    grid-template-columns: none !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

.mobile-preview.template-creative .header-content {
    flex-direction: column !important;
    text-align: center !important;
}

.mobile-preview.template-creative .avatar-placeholder {
    width: 60px !important;
    height: 60px !important;
    font-size: 24px !important;
    margin: 0 auto 12px auto !important;
}

.mobile-preview.template-creative .name-section {
    text-align: center !important;
}

/* Minimalist Template Mobile */
.mobile-preview.template-minimalist .contact-line {
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
}

.mobile-preview.template-minimalist .divider {
    display: none !important;
}

/* Mobile Print Overrides */
.mobile-preview.print-preview {
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 375px !important;
    border: 1px solid #ddd !important;
}

/* Ensure mobile content doesn't overflow */
.mobile-preview * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
}

/* Hide desktop-only elements in mobile */
.mobile-preview .desktop-only {
    display: none !important;
}

/* Show mobile-only elements */
.mobile-preview .mobile-only {
    display: block !important;
}

/* Mobile Preview Button States */
#mobilePreview.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4) !important;
}

#desktopPreview.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

#printPreview.active {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4) !important;
}

/* =============================================================================
   PRINT OPTIMIZATIONS
============================================================================= */
@media print {
    .resume-document {
        box-shadow: none;
        margin: 0;
        width: 100%;
        background: white !important;
    }
    
    .template-container {
        padding: 0.5in;
    }
    
    .template-modern,
    .template-creative {
        background: white !important;
    }
    
    .template-modern .resume-header,
    .template-creative .resume-header {
        background: white !important;
        color: #2d3748 !important;
    }
    
    .template-modern .full-name,
    .template-creative .full-name {
        color: #2d3748 !important;
        text-shadow: none !important;
    }
    
    .template-executive .full-name {
        color: #1a202c !important;
        text-shadow: none !important;
    }
    
    .template-executive .resume-header {
        background: #1a202c !important;
        color: white !important;
    }
    
    .resume-section {
        page-break-inside: avoid;
    }
    
    .experience-entry,
    .education-entry {
        page-break-inside: avoid;
    }
    
    /* Hide mobile preview styling in print */
    .mobile-preview {
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
============================================================================= */
@media screen and (max-width: 768px) {
    .template-modern .content-grid,
    .template-creative .creative-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .template-executive .header-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .template-executive .contact-block {
        text-align: left;
    }
    
    .template-creative .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Ensure mobile preview works on actual mobile devices */
    .mobile-preview {
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}