/* ========================================
   Platinum Executive Resume Template CSS
   Professional Charcoal, Silver & Gold Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Garamond', 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 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: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 3px solid #d4af37;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-top: 28px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    border-radius: 8px;
    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: #2d3748;
    margin-bottom: 7px;
    font-family: 'Arial', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #718096;
    font-family: 'Arial', sans-serif;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* ========================================
   Color Theme Picker
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #d4af37;
    margin-bottom: 24px;
}

.theme-color-section label {
    color: white !important;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.color-input {
    width: 60px;
    height: 42px;
    border: 3px solid #d4af37;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input:hover {
    border-color: #f4d03f;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #e2e8f0;
    font-weight: 500;
}

.reset-color-btn {
    padding: 10px 18px;
    background: #d4af37;
    color: #2d3748;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.reset-color-btn:hover {
    background: #f4d03f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    border: 2px dashed #d4af37;
}

.photo-upload-section input[type="file"]::file-selector-button {
    padding: 10px 18px;
    background: #2d3748;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 12px;
    transition: all 0.3s;
}

.photo-upload-section input[type="file"]::file-selector-button:hover {
    background: #d4af37;
    color: #2d3748;
}

/* ========================================
   Add/Remove Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #2d3748 0%, #4a5568 100%);
    color: white;
    border: 2px solid #d4af37;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.add-btn:hover {
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    color: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.remove-btn {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* ========================================
   Dynamic Form Items
   ======================================== */
.experience-item,
.education-item,
.competency-item,
.certification-item {
    padding: 18px;
    background: white;
    border: 2px solid #d4af37;
    border-radius: 12px;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.experience-item:hover,
.education-item:hover,
.competency-item:hover,
.certification-item:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #d4af37;
}

.sample-data-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #2d3748;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f7fafc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: linear-gradient(90deg, #2d3748 0%, #4a5568 100%);
    border-bottom: 3px solid #d4af37;
}

.preview-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    font-family: 'Arial', sans-serif;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.btn-header-secondary {
    background: #718096;
    color: white;
}

.btn-header-secondary:hover {
    background: #4a5568;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #d4af37;
    color: #2d3748;
}

.btn-header-success:hover {
    background: #f4d03f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* ========================================
   Preview Container
   ======================================== */
.preview-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.resume-preview {
    width: 210mm;
    min-height: auto;
    height: fit-content;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}

/* Full-height sidebar background - extends to cover entire resume height */
.resume-preview::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 35%;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    z-index: 0;
}

/* ========================================
   Resume Sidebar (Left - Photo & Contact)
   ======================================== */
.resume-sidebar {
    width: 35%;
    background: transparent;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 3px solid #d4af37;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    border: 4px solid #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4a5568;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    color: #d4af37;
}

/* ========================================
   Sidebar Sections
   ======================================== */
.sidebar-section {
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 24px;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 16px;
    letter-spacing: 2px;
    font-family: 'Arial', sans-serif;
}

/* 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: 16px;
    min-width: 24px;
    color: #d4af37;
}

.contact-text {
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.6;
    word-break: break-word;
    font-family: 'Arial', sans-serif;
}

/* Core Competencies */
.competencies-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.competency-badge {
    background: rgba(212, 175, 55, 0.2);
    border-left: 4px solid #d4af37;
    padding: 10px 14px;
    font-size: 11px;
    color: #e2e8f0;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.competency-badge:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

/* Certifications */
.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.certification-entry {
    font-size: 11px;
    color: #cbd5e0;
    line-height: 1.6;
    padding-left: 12px;
    border-left: 2px solid #d4af37;
    font-family: 'Arial', sans-serif;
}

/* ========================================
   Resume Main Content (Right Side)
   ======================================== */
.resume-main {
    flex: 1;
    padding: 40px 40px 45px 50px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header Section */
.resume-header {
    border-bottom: 4px solid #2d3748;
    padding-bottom: 24px;
}

.header-name {
    font-size: 42px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: 3px;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    margin: 12px 0;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #718096;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
}

/* Main Sections */
.main-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 8px;
    font-family: 'Arial', sans-serif;
}

/* Professional Summary */
.summary-text {
    font-size: 13px;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}

/* Executive Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.experience-entry {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.exp-title-company {
    flex: 1;
}

.exp-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
    font-family: 'Arial', sans-serif;
}

.exp-company {
    font-size: 13px;
    color: #718096;
    font-style: italic;
}

.exp-dates {
    font-size: 12px;
    color: #a0aec0;
    white-space: nowrap;
    font-family: 'Arial', sans-serif;
}

.exp-achievements {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.exp-achievements li {
    font-size: 12px;
    line-height: 1.7;
    color: #4a5568;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.exp-achievements li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: 700;
    font-size: 14px;
}

/* Education */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.education-entry {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edu-degree {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    font-family: 'Arial', sans-serif;
}

.edu-institution {
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

.edu-year {
    font-size: 11px;
    color: #a0aec0;
    font-family: 'Arial', sans-serif;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.form-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37 0%, #f4d03f 100%);
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Tablets and below (1024px) */
@media screen and (max-width: 1024px) {
    .resume-builder-container {
        flex-direction: column;
        height: auto;
        max-height: none;
        width: 100%;
    }

    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid #d4af37;
        max-height: 500px;
    }

    .preview-section {
        width: 100%;
        height: auto;
    }

    .preview-container {
        padding: 20px;
    }

    .resume-preview {
        width: 100%;
        min-height: auto;
    }
}

/* Mobile devices (768px and below) */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
        overflow: visible !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }

    .resume-builder-container {
        border-radius: 12px;
        width: 100%;
        height: auto !important;
        max-height: none !important;
        min-height: auto;
    }

    .form-section {
        padding: 20px 16px;
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .preview-section {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .form-section h2 {
        font-size: 22px;
    }

    .form-section-title {
        font-size: 13px;
        padding: 8px 12px;
    }

    .preview-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .preview-header h2 {
        font-size: 18px;
    }

    .preview-actions {
        width: 100%;
        justify-content: stretch;
    }

    .btn-header-secondary,
    .btn-header-success {
        flex: 1;
        padding: 10px 12px;
        font-size: 12px;
    }

    .preview-container {
        padding: 16px;
    }

    .resume-preview {
        flex-direction: column;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        align-items: stretch;
    }

    /* On mobile, sidebar is at top so disable the sidebar background pseudo-element */
    .resume-preview::before {
        display: none;
    }

    .resume-sidebar {
        width: 100%;
        padding: 30px 24px;
        background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }

    .resume-main {
        padding: 30px 24px 35px 24px;
    }

    .header-name {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .header-title {
        font-size: 16px;
    }

    .section-title {
        font-size: 14px;
    }

    .exp-header {
        flex-direction: column;
        gap: 8px;
    }

    .exp-dates {
        white-space: normal;
    }
}

/* Small mobile devices (480px and below) */
@media screen and (max-width: 480px) {
    .form-section {
        padding: 16px 12px;
    }

    .form-section h2 {
        font-size: 20px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .add-btn,
    .sample-data-btn {
        padding: 10px;
        font-size: 13px;
    }

    .preview-header {
        padding: 12px 16px;
    }

    .preview-header h2 {
        font-size: 16px;
    }

    .btn-header-secondary,
    .btn-header-success {
        padding: 8px 10px;
        font-size: 11px;
    }

    .resume-sidebar {
        padding: 24px 20px;
        gap: 24px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .sidebar-title {
        font-size: 13px;
    }

    .contact-text {
        font-size: 11px;
    }

    .competency-badge {
        font-size: 10px;
        padding: 8px 12px;
    }

    .resume-main {
        padding: 24px 20px 30px 20px;
        gap: 24px;
    }

    .header-name {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .title-divider {
        width: 60px;
        height: 3px;
    }

    .header-title {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .section-title {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .summary-text {
        font-size: 12px;
    }

    .exp-title {
        font-size: 13px;
    }

    .exp-company {
        font-size: 12px;
    }

    .exp-achievements li {
        font-size: 11px;
    }

    .edu-degree {
        font-size: 12px;
    }

    .edu-institution,
    .edu-year {
        font-size: 11px;
    }
}

/* Extra small devices (360px and below) */
@media screen and (max-width: 360px) {
    body {
        padding: 5px;
    }

    .resume-builder-container {
        border-radius: 8px;
    }

    .form-section {
        padding: 12px 10px;
    }

    .resume-sidebar,
    .resume-main {
        padding: 20px 16px;
    }

    .header-name {
        font-size: 24px;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
        max-width: 100%;
    }

    .form-section,
    .preview-header {
        display: none !important;
    }

    .preview-section {
        width: 100%;
        height: auto;
    }

    .preview-container {
        padding: 0;
    }

    .resume-preview {
        box-shadow: none;
        width: 210mm;
        min-height: 297mm;
        page-break-after: always;
        overflow: visible;
    }

    /* Ensure sidebar background extends full height on all pages */
    .resume-preview::before {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 35%;
        background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .resume-sidebar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
