/* ========================================
   Crimson Executive Professional Resume Template CSS
   Sophisticated Burgundy & Rose Gold Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Main Container
   ======================================== */
.resume-builder-container {
    max-width: 1400px;
    width: 95vw;
    height: 92vh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 3px solid #8b1538;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Georgia', serif;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #8b1538;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d4a5a5;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3e2723;
    margin-bottom: 7px;
    font-family: 'Arial', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Arial', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b1538;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Form Row (for side-by-side inputs) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Color Picker Styling */
.theme-color-section {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #d4a5a5;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 2px solid #8b1538;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-input:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.3);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #5d4037;
    font-weight: 500;
}

.reset-color-btn {
    padding: 8px 16px;
    background: #8b1538;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
}

.reset-color-btn:hover {
    background: #6d0e2a;
    transform: translateY(-1px);
}

/* Photo Upload Section */
.photo-upload-section {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%);
    padding: 16px;
    border-radius: 12px;
    border: 2px dashed #d4a5a5;
    margin-bottom: 20px;
}

.photo-upload-section label {
    color: #8b1538;
    font-weight: 700;
    margin-bottom: 10px;
}

.photo-upload-section small {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #795548;
    font-style: italic;
}

.photo-upload-section input[type="file"]::file-selector-button {
    padding: 10px 18px;
    background: linear-gradient(135deg, #8b1538 0%, #a91d4f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.2s;
}

.photo-upload-section input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #6d0e2a 0%, #8b1538 100%);
    transform: translateY(-1px);
}

/* ========================================
   Dynamic Item Sections (Experience, Education, Skills)
   ======================================== */
.experience-item,
.education-item,
.skill-item {
    background: #fafafa;
    padding: 18px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s;
}

.experience-item:hover,
.education-item:hover,
.skill-item:hover {
    border-color: #d4a5a5;
    box-shadow: 0 2px 8px rgba(139, 21, 56, 0.1);
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c62828;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #b71c1c;
    transform: scale(1.05);
}

/* ========================================
   Add & Action Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b1538 0%, #a91d4f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.3);
    font-family: 'Arial', sans-serif;
}

.add-btn:hover {
    background: linear-gradient(135deg, #6d0e2a 0%, #8b1538 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.4);
}

.action-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sample-data-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #996515 0%, #b8860b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e8e8e8;
}

.preview-header {
    background: white;
    padding: 20px 32px;
    border-bottom: 3px solid #8b1538;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #2c1810;
    margin: 0;
    font-family: 'Georgia', serif;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
}

.btn-header-secondary {
    background: #757575;
    color: white;
}

.btn-header-secondary:hover {
    background: #616161;
    transform: translateY(-1px);
}

.btn-header-success {
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.btn-header-success:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-1px);
}

.preview-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-container::-webkit-scrollbar {
    width: 10px;
}

.preview-container::-webkit-scrollbar-track {
    background: #e0e0e0;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

/* ========================================
   Resume Preview Area (A4 Paper Simulation)
   ======================================== */
.resume-preview {
    width: 595px;
    min-height: 842px;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

/* ========================================
   RESUME HEADER - Crimson with Rose Gold Accent
   ======================================== */
.resume-header {
    background: linear-gradient(135deg, #8b1538 0%, #a91d4f 100%);
    padding: 45px 50px;
    color: white;
    position: relative;
    border-left: 8px solid #b8860b;
}

.resume-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 35px;
    position: relative;
    z-index: 1;
}

/* Profile Photo - Elegant with Rose Gold Border */
.profile-photo-container {
    flex-shrink: 0;
}

.profile-photo {
    width: 130px;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    border: 5px solid #daa520;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 52px;
    opacity: 0.7;
}

/* Header Text - Name and Title */
.header-text {
    flex: 1;
}

.header-name {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 12px 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-title {
    font-size: 22px;
    font-weight: 400;
    color: #ffd700;
    margin: 0;
    font-style: italic;
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
}

/* ========================================
   RESUME BODY - Three Section Layout
   ======================================== */
.resume-body {
    display: flex;
    min-height: 700px;
}

/* ========================================
   LEFT SIDEBAR - Rose Tinted Background
   ======================================== */
.resume-sidebar {
    width: 200px;
    background: linear-gradient(180deg, #fff5f7 0%, #ffe8ed 100%);
    padding: 35px 25px;
    border-right: 3px solid #8b1538;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #8b1538;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 3px solid #daa520;
    font-family: 'Arial', sans-serif;
}

.sidebar-text {
    font-size: 12px;
    line-height: 1.7;
    color: #3e2723;
    margin: 0;
    font-family: 'Georgia', serif;
    text-align: justify;
}

/* Contact List in Sidebar */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: #3e2723;
    line-height: 1.5;
}

.contact-icon {
    font-size: 16px;
    color: #8b1538;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-text {
    font-weight: 500;
    word-break: break-word;
    font-family: 'Arial', sans-serif;
}

/* ========================================
   CENTER MAIN CONTENT - White Background
   ======================================== */
.resume-main {
    flex: 1;
    background: white;
    padding: 35px 35px;
}

.main-section {
    margin-bottom: 32px;
}

.main-title {
    font-size: 18px;
    font-weight: 700;
    color: #8b1538;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 3px solid #daa520;
    position: relative;
    font-family: 'Georgia', serif;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #8b1538;
}

/* Experience List */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.experience-entry {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #d4a5a5;
}

.experience-entry::before {
    content: '◆';
    position: absolute;
    left: -9px;
    top: 2px;
    color: #8b1538;
    font-size: 14px;
}

.exp-company {
    font-size: 15px;
    font-weight: 700;
    color: #2c1810;
    margin: 0 0 5px 0;
    font-family: 'Georgia', serif;
}

.exp-dates {
    font-size: 12px;
    color: #b8860b;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Arial', sans-serif;
}

.exp-roles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exp-roles li {
    font-size: 13px;
    color: #4e342e;
    margin-bottom: 5px;
    padding-left: 18px;
    position: relative;
    line-height: 1.6;
    font-family: 'Georgia', serif;
}

.exp-roles li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #8b1538;
    font-weight: bold;
    font-size: 16px;
}

/* Education List */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-entry {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #d4a5a5;
}

.education-entry::before {
    content: '◆';
    position: absolute;
    left: -9px;
    top: 2px;
    color: #8b1538;
    font-size: 14px;
}

.edu-institution {
    font-size: 15px;
    font-weight: 700;
    color: #2c1810;
    margin: 0 0 5px 0;
    font-family: 'Georgia', serif;
}

.edu-dates {
    font-size: 12px;
    color: #b8860b;
    font-weight: 600;
    margin: 0 0 6px 0;
    font-family: 'Arial', sans-serif;
}

.edu-degree {
    font-size: 13px;
    color: #4e342e;
    margin: 0;
    line-height: 1.6;
    font-family: 'Georgia', serif;
}

/* ========================================
   RIGHT SIDEBAR - Skills Section
   ======================================== */
.resume-right-sidebar {
    width: 180px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    padding: 35px 20px;
    border-left: 3px solid #8b1538;
}

.right-sidebar-section {
    margin-bottom: 32px;
}

.right-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #8b1538;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 3px solid #daa520;
    font-family: 'Arial', sans-serif;
}

/* Skills List */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skills-list li {
    font-size: 12px;
    color: #2c1810;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%);
    border-left: 4px solid #8b1538;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.skills-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(139, 21, 56, 0.2);
    background: linear-gradient(135deg, #ffe8ed 0%, #ffd7e0 100%);
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: 95vh;
    }
    
    .form-section {
        width: 400px;
    }
}

@media screen and (max-width: 992px) {
    body {
        padding: 10px;
    }
    
    .resume-builder-container {
        flex-direction: column;
        height: auto;
        max-height: none;
        width: 100%;
    }
    
    .form-section {
        width: 100%;
        max-height: 500px;
        border-right: none;
        border-bottom: 3px solid #8b1538;
    }
    
    .preview-section {
        min-height: 600px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .preview-actions {
        justify-content: space-between;
    }
}

@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;
    }

    .resume-preview {
        width: 100%;
        max-width: 500px;
    }
    
    .resume-header {
        padding: 30px 25px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        align-items: center;
    }
    
    .header-name {
        font-size: 34px;
    }
    
    .header-title {
        font-size: 18px;
    }
    
    .profile-photo {
        width: 110px;
        height: 110px;
    }
    
    .resume-body {
        flex-direction: column;
    }
    
    .resume-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid #8b1538;
    }
    
    .resume-right-sidebar {
        width: 100%;
        border-left: none;
        border-top: 3px solid #8b1538;
    }
    
    .resume-main {
        padding: 25px 25px;
    }
}

@media screen and (max-width: 576px) {
    body {
        padding: 5px;
    }
    
    .preview-container {
        padding: 16px;
    }
    
    .resume-preview {
        border-radius: 0;
    }
    
    .resume-header {
        padding: 20px 18px;
        border-left: 5px solid #b8860b;
    }
    
    .header-name {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .profile-photo {
        width: 90px;
        height: 90px;
        border: 4px solid #daa520;
    }
    
    .photo-placeholder {
        font-size: 40px;
    }
    
    .resume-sidebar,
    .resume-main,
    .resume-right-sidebar {
        padding: 20px 18px;
    }
    
    .sidebar-title,
    .main-title,
    .right-sidebar-title {
        font-size: 14px;
    }
    
    .form-section h2 {
        font-size: 22px;
    }
    
    .form-section-title {
        font-size: 13px;
    }
    
    .preview-header h2 {
        font-size: 18px;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
    }
    
    .form-section,
    .preview-header {
        display: none !important;
    }
    
    .preview-section {
        background: white;
    }
    
    .preview-container {
        padding: 0;
    }
    
    .resume-preview {
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        page-break-after: always;
    }
}
