/* ========================================
   Diamond Elite Resume Template CSS
   Professional Blue, White & Silver Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Main Container
   ======================================== */
.resume-builder-container {
    max-width: 1450px;
    width: 95vw;
    height: 92vh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #f0f4f8 0%, #d9e2ec 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 4px solid #1e5a8e;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 28px;
    margin-bottom: 16px;
    padding: 12px 18px;
    background: linear-gradient(90deg, #1e5a8e 0%, #2563eb 100%);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 12px rgba(30, 90, 142, 0.3);
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 7px;
    font-family: 'Segoe UI', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 2px solid #94a3b8;
    border-radius: 10px;
    font-family: 'Segoe UI', sans-serif;
    background: white;
    color: #1e293b;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e5a8e;
    box-shadow: 0 0 0 4px rgba(30, 90, 142, 0.1);
    background: #f8fafc;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.form-group small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
}

/* Color Picker Section */
.theme-color-section {
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 45px;
    border: 3px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-input:hover {
    border-color: #1e5a8e;
    transform: scale(1.05);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.reset-color-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-color-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-1px);
}

/* Photo Upload Section */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    cursor: pointer;
    border-radius: 10px;
}

.photo-upload-section input[type="file"]:hover {
    border-color: #1e5a8e;
    background: white;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========================================
   Buttons
   ======================================== */
.add-more-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1e5a8e 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 12px rgba(30, 90, 142, 0.2);
}

.add-more-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e5a8e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 90, 142, 0.3);
}

.remove-item-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

.remove-item-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
}

/* Experience, Education, Certification Items */
.experience-item,
.education-item,
.certification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Form Actions
   ======================================== */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid #cbd5e1;
}

.btn-load-sample {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e5a8e 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 12px rgba(30, 90, 142, 0.3);
}

.btn-load-sample:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e5a8e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 90, 142, 0.4);
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e5a8e 0%, #2563eb 100%);
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1e5a8e 100%);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Preview Header */
.preview-header {
    background: white;
    padding: 22px 34px;
    border-bottom: 4px solid #1e5a8e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1e3c72;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: -0.5px;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
}

.btn-header-secondary {
    background: #78909c;
    color: white;
}

.btn-header-secondary:hover {
    background: #607d8b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
}

.btn-header-success {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(46, 125, 50, 0.35);
}

.btn-header-success:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(46, 125, 50, 0.45);
}

/* Preview Wrapper */
.preview-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-wrapper::-webkit-scrollbar {
    width: 12px;
}

.preview-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.preview-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e5a8e 0%, #2563eb 100%);
    border-radius: 10px;
}

/* ========================================
   Resume Preview
   ======================================== */
.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    transform-origin: top center;
    transition: transform 0.3s ease;
}

/* ========================================
   Resume Sidebar
   ======================================== */
.resume-sidebar {
    width: 38%;
    background: linear-gradient(180deg, #1e5a8e 0%, #1e3c72 100%);
    padding: 40px 28px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Profile Photo */
.photo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.photo-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.photo-icon {
    font-size: 60px;
    margin-bottom: 8px;
}

.photo-text {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

#profilePhotoPreview {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Sidebar Sections */
.sidebar-section {
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa 0%, #93c5fd 100%);
    border-radius: 2px;
}

/* Contact Section */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.contact-text {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    word-break: break-word;
}

/* Core Competencies */
.competencies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.competency-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Certifications */
.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certification-entry {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    padding-left: 18px;
    position: relative;
}

.certification-entry::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-size: 14px;
}

/* ========================================
   Resume Main Content
   ======================================== */
.resume-main {
    flex: 1;
    padding: 45px 40px;
    background: white;
}

/* Resume Header */
.resume-header {
    margin-bottom: 35px;
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 3px solid #e2e8f0;
}

.header-name {
    font-size: 42px;
    font-weight: 800;
    color: #1e3c72;
    letter-spacing: 3px;
    margin-bottom: 12px;
    font-family: 'Segoe UI', sans-serif;
}

.title-accent {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #1e5a8e 0%, #2563eb 100%);
    margin: 0 auto 12px;
    border-radius: 2px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e5a8e;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
}

/* Main Sections */
.main-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #1e5a8e 0%, #2563eb 100%);
    margin-bottom: 18px;
    border-radius: 2px;
}

/* Professional Summary */
.summary-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    border-radius: 12px;
    border-left: 5px solid #1e5a8e;
}

.summary-text {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    font-family: 'Segoe UI', sans-serif;
    text-align: justify;
}

/* Experience List */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.experience-entry {
    padding-bottom: 22px;
    border-bottom: 2px solid #e2e8f0;
}

.experience-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 20px;
}

.exp-title-company {
    flex: 1;
}

.exp-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 4px;
    font-family: 'Segoe UI', sans-serif;
}

.exp-company {
    font-size: 14px;
    font-weight: 600;
    color: #1e5a8e;
    font-style: italic;
    font-family: 'Segoe UI', sans-serif;
}

.exp-dates {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
}

.exp-achievements {
    list-style: none;
    padding-left: 0;
}

.exp-achievements li {
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 8px;
    padding-left: 22px;
    position: relative;
    font-family: 'Segoe UI', sans-serif;
}

.exp-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #1e5a8e;
    font-weight: 700;
    font-size: 16px;
}

/* Education List */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-entry {
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border-left: 4px solid #1e5a8e;
}

.edu-degree {
    font-size: 15px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 6px;
    font-family: 'Segoe UI', sans-serif;
}

.edu-institution {
    font-size: 14px;
    font-weight: 600;
    color: #1e5a8e;
    margin-bottom: 4px;
    font-family: 'Segoe UI', sans-serif;
}

.edu-year {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media screen and (max-width: 1200px) {
    .resume-builder-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        border-radius: 0;
    }

    .form-section {
        width: 100%;
        max-height: 60vh;
        border-right: none;
        border-bottom: 3px solid #1e5a8e;
    }

    .preview-section {
        min-height: 80vh;
    }
}

@media screen and (max-width: 900px) {
    body {
        padding: 10px;
    }

    .resume-preview {
        width: 100%;
        min-height: auto;
        flex-direction: column;
    }

    .form-section {
        padding: 24px 20px;
    }

    .form-section h2 {
        font-size: 24px;
    }

    .resume-sidebar {
        width: 100%;
        padding: 30px 20px;
    }

    .resume-main {
        width: 100%;
        padding: 30px 20px;
    }

    .header-name {
        font-size: 32px;
    }

    .header-title {
        font-size: 16px;
    }
    
    .preview-header {
        padding: 18px 24px;
    }
    
    .preview-header h2 {
        font-size: 20px;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Mobile devices (768px) */
@media screen and (max-width: 768px) {
    body {
        overflow: visible !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }

    .resume-builder-container {
        height: auto !important;
        max-height: none !important;
        min-height: auto;
    }

    .form-section {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .preview-section {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .preview-wrapper {
        overflow-x: auto;
    }

    .resume-preview {
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
    }

    .resume-main {
        width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .preview-wrapper {
        padding: 15px;
        overflow-x: auto;
    }

    .resume-preview {
        width: 100%;
        min-width: 300px;
        font-size: 11px;
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
        padding: 25px 20px;
    }

    .resume-main {
        width: 100%;
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 20px 15px;
    }

    .photo-placeholder,
    #profilePhotoPreview {
        width: 120px;
        height: 120px;
    }

    .header-name {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .header-title {
        font-size: 14px;
    }

    .section-title {
        font-size: 14px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    
    .preview-header h2 {
        font-size: 18px;
    }
    
    .preview-actions {
        width: 100%;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        flex: 1;
        padding: 9px 16px;
        font-size: 12px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
        display: block;
    }

    .form-section,
    .preview-header {
        display: none !important;
    }

    .preview-section {
        background: white;
    }

    .preview-wrapper {
        padding: 0;
    }

    .resume-preview {
        box-shadow: none;
        transform: none !important;
        width: 100%;
        min-height: auto;
    }
}
