/* ========================================
   Royal Indigo Executive Professional Resume Template CSS
   Sophisticated Navy/Indigo & Gold Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: #f8f9fa;
    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: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 4px solid #1a237e;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0d1b3e;
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: -0.5px;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a237e;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #7986cb;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Segoe UI', sans-serif;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 7px;
    font-family: 'Segoe UI', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #dce4ec;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: 'Segoe UI', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.12);
}

.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, #e8eaf6 0%, #c5cae9 100%);
    padding: 18px;
    border-radius: 14px;
    border: 2px solid #7986cb;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.color-input {
    width: 60px;
    height: 42px;
    border: 3px solid #1a237e;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(26, 35, 126, 0.35);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #37474f;
    font-weight: 600;
}

.reset-color-btn {
    padding: 9px 18px;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s;
}

.reset-color-btn:hover {
    background: #0d1642;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

/* Photo Upload Section */
.photo-upload-section {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    padding: 18px;
    border-radius: 14px;
    border: 2px dashed #7986cb;
    margin-bottom: 20px;
}

.photo-upload-section label {
    color: #1a237e;
    font-weight: 700;
    margin-bottom: 10px;
}

.photo-upload-section small {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #546e7a;
    font-style: italic;
}

.photo-upload-section input[type="file"]::file-selector-button {
    padding: 11px 20px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    margin-right: 10px;
    transition: all 0.3s;
}

.photo-upload-section input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #0d1642 0%, #1a237e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

/* ========================================
   Dynamic Item Sections (Experience, Education, Skills)
   ======================================== */
.experience-item,
.education-item,
.skill-item {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #e1e8f0;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s;
}

.experience-item:hover,
.education-item:hover,
.skill-item:hover {
    border-color: #7986cb;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.12);
    transform: translateY(-2px);
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #d32f2f;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #c62828;
    transform: scale(1.05);
}

/* ========================================
   Add & Action Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(26, 35, 126, 0.35);
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.add-btn:hover {
    background: linear-gradient(135deg, #0d1642 0%, #1a237e 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(26, 35, 126, 0.45);
}

.action-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sample-data-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(245, 124, 0, 0.35);
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(245, 124, 0, 0.45);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #eceff1;
}

.preview-header {
    background: white;
    padding: 22px 34px;
    border-bottom: 4px solid #1a237e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0d1b3e;
    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-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-container::-webkit-scrollbar {
    width: 12px;
}

.preview-container::-webkit-scrollbar-track {
    background: #cfd8dc;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #90a4ae;
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: #78909c;
}

/* ========================================
   Resume Preview Area (A4 Paper Simulation)
   ======================================== */
.resume-preview {
    width: 595px;
    min-height: 842px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

/* ========================================
   RESUME HEADER - Royal Indigo with Gold Accent
   ======================================== */
.resume-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    padding: 48px 50px;
    color: white;
    position: relative;
    border-top: 10px solid #ffd700;
    overflow: hidden;
}

.resume-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.resume-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #ffd700 0%, #ffeb3b 50%, #ffd700 100%);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 38px;
    position: relative;
    z-index: 1;
}

/* Profile Photo - Modern with Gold Border */
.profile-photo-container {
    flex-shrink: 0;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid #ffd700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 56px;
    opacity: 0.6;
}

/* Header Text - Name and Title */
.header-text {
    flex: 1;
}

.header-name {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 14px 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Segoe UI', sans-serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.header-title {
    font-size: 24px;
    font-weight: 400;
    color: #ffd700;
    margin: 0;
    font-style: normal;
    letter-spacing: 2px;
    font-family: 'Segoe UI', sans-serif;
    text-transform: uppercase;
}

/* ========================================
   RESUME BODY - Three Section Layout
   ======================================== */
.resume-body {
    display: flex;
    min-height: 700px;
}

/* ========================================
   LEFT SIDEBAR - Soft Blue Background
   ======================================== */
.resume-sidebar {
    width: 200px;
    background: linear-gradient(180deg, #e8eaf6 0%, #c5cae9 100%);
    padding: 38px 24px;
    border-right: 4px solid #1a237e;
}

.sidebar-section {
    margin-bottom: 34px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffd700;
    font-family: 'Segoe UI', sans-serif;
}

.sidebar-text {
    font-size: 12px;
    line-height: 1.8;
    color: #263238;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    text-align: justify;
}

/* Contact List in Sidebar */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 11px;
    color: #263238;
    line-height: 1.6;
}

.contact-icon {
    font-size: 16px;
    color: #1a237e;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.contact-text {
    font-weight: 600;
    word-break: break-word;
    font-family: 'Segoe UI', sans-serif;
}

/* ========================================
   CENTER MAIN CONTENT - Clean White Background
   ======================================== */
.resume-main {
    flex: 1;
    background: white;
    padding: 38px 36px;
}

.main-section {
    margin-bottom: 34px;
}

.main-title {
    font-size: 19px;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 12px;
    border-bottom: 4px solid #ffd700;
    position: relative;
    font-family: 'Segoe UI', sans-serif;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #1a237e;
}

/* Experience List */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.experience-entry {
    position: relative;
    padding-left: 24px;
    border-left: 4px solid #7986cb;
}

.experience-entry::before {
    content: '●';
    position: absolute;
    left: -11px;
    top: 0;
    color: #ffd700;
    font-size: 18px;
    background: #1a237e;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.exp-company {
    font-size: 16px;
    font-weight: 800;
    color: #0d1b3e;
    margin: 0 0 6px 0;
    font-family: 'Segoe UI', sans-serif;
}

.exp-dates {
    font-size: 12px;
    color: #ff9800;
    font-weight: 700;
    margin: 0 0 10px 0;
    font-family: 'Segoe UI', sans-serif;
}

.exp-roles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exp-roles li {
    font-size: 13px;
    color: #37474f;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
    line-height: 1.7;
    font-family: 'Segoe UI', sans-serif;
}

.exp-roles li::before {
    content: '▸';
    position: absolute;
    left: 4px;
    color: #1a237e;
    font-weight: bold;
    font-size: 16px;
}

/* Education List */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.education-entry {
    position: relative;
    padding-left: 24px;
    border-left: 4px solid #7986cb;
}

.education-entry::before {
    content: '●';
    position: absolute;
    left: -11px;
    top: 0;
    color: #ffd700;
    font-size: 18px;
    background: #1a237e;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.edu-institution {
    font-size: 16px;
    font-weight: 800;
    color: #0d1b3e;
    margin: 0 0 6px 0;
    font-family: 'Segoe UI', sans-serif;
}

.edu-dates {
    font-size: 12px;
    color: #ff9800;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Segoe UI', sans-serif;
}

.edu-degree {
    font-size: 13px;
    color: #37474f;
    margin: 0;
    line-height: 1.7;
    font-family: 'Segoe UI', sans-serif;
}

/* ========================================
   RIGHT SIDEBAR - Skills Section
   ======================================== */
.resume-right-sidebar {
    width: 180px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    padding: 38px 22px;
    border-left: 4px solid #1a237e;
}

.right-sidebar-section {
    margin-bottom: 34px;
}

.right-sidebar-title {
    font-size: 14px;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffd700;
    font-family: 'Segoe UI', sans-serif;
}

/* Skills List */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.skills-list li {
    font-size: 12px;
    color: #0d1b3e;
    padding: 11px 13px;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border-left: 5px solid #1a237e;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.3s;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.skills-list li:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
    background: linear-gradient(135deg, #c5cae9 0%, #9fa8da 100%);
    border-left-color: #ffd700;
}

/* ========================================
   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: 4px solid #1a237e;
    }
    
    .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: 32px 26px;
        border-top: 8px solid #ffd700;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        align-items: center;
    }
    
    .header-name {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .header-title {
        font-size: 19px;
        letter-spacing: 1.5px;
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
        border: 5px solid #ffd700;
    }
    
    .resume-body {
        flex-direction: column;
    }
    
    .resume-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 4px solid #1a237e;
    }
    
    .resume-right-sidebar {
        width: 100%;
        border-left: none;
        border-top: 4px solid #1a237e;
    }
    
    .resume-main {
        padding: 28px 26px;
    }
}

@media screen and (max-width: 576px) {
    body {
        padding: 5px;
    }
    
    .preview-container {
        padding: 16px;
    }
    
    .resume-preview {
        border-radius: 0;
    }
    
    .resume-header {
        padding: 24px 20px;
        border-top: 6px solid #ffd700;
    }
    
    .header-name {
        font-size: 30px;
        letter-spacing: 1.5px;
    }
    
    .header-title {
        font-size: 17px;
        letter-spacing: 1px;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
        border: 4px solid #ffd700;
    }
    
    .photo-placeholder {
        font-size: 44px;
    }
    
    .resume-sidebar,
    .resume-main,
    .resume-right-sidebar {
        padding: 22px 20px;
    }
    
    .sidebar-title,
    .main-title,
    .right-sidebar-title {
        font-size: 13px;
    }
    
    .form-section h2 {
        font-size: 24px;
    }
    
    .form-section-title {
        font-size: 13px;
    }
    
    .preview-header h2 {
        font-size: 20px;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        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;
    }
    
    .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;
    }
}
