/* ========================================
   Photo Sidebar Arrow Resume Template CSS
   Inspired by Alfredo Torres Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-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, #ffffff 0%, #fafafa 100%);
    padding: 30px 26px;
    overflow-y: auto;
    border-right: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #555;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #888;
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.form-row {
    display: flex;
    gap: 12px;
}

/* Color Picker Section */
.theme-color-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 2px solid #dee2e6;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 3px solid #fff;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #555;
}

.reset-color-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.reset-color-btn:hover {
    background: #5a6268;
}

/* Photo Upload Section */
.photo-upload-section input[type="file"] {
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
}

/* ========================================
   Dynamic Form Items
   ======================================== */
.skill-item,
.language-item,
.education-item,
.experience-item {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
}

/* ========================================
   Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.sample-data-btn,
.download-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.sample-data-btn {
    background: #17a2b8;
    color: white;
}

.sample-data-btn:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.download-btn {
    background: #007bff;
    color: white;
}

.download-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f0f0f0;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 850px;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-header h2 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-header-primary,
.btn-header-secondary,
.btn-header-success {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-header-primary {
    background: #667eea;
    color: white;
}

.btn-header-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-header-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-header-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #48bb78;
    color: white;
}

.btn-header-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.preview-container {
    width: 100%;
    max-width: 850px;
    background: white;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    transition: box-shadow 0.3s ease;
    margin-bottom: 0;
    flex-shrink: 0;
    overflow: hidden;
    height: fit-content;
}

.preview-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.resume-preview {
    width: 100%;
    min-height: auto;
    height: fit-content;
    background: white;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* ========================================
   Resume Sidebar (Left)
   ======================================== */
.resume-sidebar {
    width: 370px;
    background: #d9d9d9;
    padding: 0;
    display: flex;
    flex-direction: column;
    color: #2c2c2c;
    transition: background 0.3s ease;
}

/* Profile Photo */
.profile-photo-container {
    padding: 45px 30px 35px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    border: 10px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    color: #ccc;
}

/* Sidebar Sections */
.sidebar-section {
    padding: 0 30px 30px 30px;
}

/* Arrow Header in Sidebar */
.arrow-header {
    position: relative;
    background: white;
    padding: 12px 20px;
    margin-bottom: 18px;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.arrow-header .section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    padding: 4px 0;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(3px);
}

.contact-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-text {
    color: #2c2c2c;
    word-break: break-word;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-bullet {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: #2c2c2c;
    line-height: 1.8;
    transition: transform 0.2s ease;
}

.skill-bullet:hover {
    transform: translateX(3px);
}

.skill-bullet::before {
    content: "•";
    position: absolute;
    left: 5px;
    font-size: 18px;
    color: #2c2c2c;
}

/* Languages List */
.languages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-bullet {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: #2c2c2c;
    line-height: 1.8;
    transition: transform 0.2s ease;
}

.language-bullet:hover {
    transform: translateX(3px);
}

.language-bullet::before {
    content: "•";
    position: absolute;
    left: 5px;
    font-size: 18px;
    color: #2c2c2c;
}

/* ========================================
   Resume Main Content (Right)
   ======================================== */
.resume-main-content {
    flex: 1;
    padding: 45px 40px 40px 40px;
    background: white;
    display: flex;
    flex-direction: column;
}

/* Header */
.resume-header {
    margin-bottom: 30px;
}

.resume-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: 3px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    line-height: 1.1;
}

.job-title-container {
    background: #e0e0e0;
    padding: 10px 24px;
    display: inline-block;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.job-title {
    font-size: 18px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 400;
    color: #2c2c2c;
    margin: 0;
    letter-spacing: 1px;
}

/* Content Sections */
.content-section {
    margin-bottom: 28px;
}

.profile-section {
    margin-bottom: 32px;
}

.profile-text {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

/* Arrow Header in Main Content */
.arrow-header-main {
    position: relative;
    background: #e0e0e0;
    padding: 10px 20px;
    margin-bottom: 20px;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.arrow-header-main .section-title-main {
    font-size: 16px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
}

/* Education List */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-entry {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-left: 3px solid transparent;
    padding-left: 16px;
    margin-left: -16px;
    transition: all 0.2s ease;
}

.education-entry:hover {
    border-left-color: #e0e0e0;
    background: rgba(224, 224, 224, 0.1);
}

.entry-years {
    font-size: 14px;
    font-weight: 700;
    color: #2c2c2c;
    min-width: 80px;
    flex-shrink: 0;
}

.entry-content {
    flex: 1;
}

.entry-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 4px;
}

.entry-institution {
    font-size: 14px;
    color: #555;
}

/* Experience List */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-entry {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-left: 3px solid transparent;
    padding-left: 16px;
    margin-left: -16px;
    transition: all 0.2s ease;
}

.experience-entry:hover {
    border-left-color: #e0e0e0;
    background: rgba(224, 224, 224, 0.1);
}

.entry-year {
    font-size: 14px;
    font-weight: 700;
    color: #2c2c2c;
    min-width: 80px;
    flex-shrink: 0;
}

.entry-company {
    font-size: 14px;
    color: #555;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.form-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .resume-builder-container {
        height: auto;
        min-height: 100vh;
    }
    
    .form-section {
        width: 420px;
    }
}

@media (max-width: 992px) {
    body {
        padding: 10px;
        overflow: auto;
    }
    
    .resume-builder-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
        max-height: none;
    }
    
    .preview-section {
        width: 100%;
        padding: 20px;
    }
    
    .preview-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .resume-preview {
        flex-direction: column;
        min-height: auto;
        align-items: stretch;
    }
    
    .resume-sidebar {
        width: 100%;
        padding-bottom: 30px;
    }
    
    .profile-photo-container {
        padding: 35px 20px 25px 20px;
    }
    
    .profile-photo {
        width: 180px;
        height: 180px;
    }
    
    .sidebar-section {
        padding: 0 25px 25px 25px;
    }
    
    .resume-main-content {
        padding: 30px 25px 30px 25px;
    }
    
    .resume-header h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }
    
    .job-title {
        font-size: 16px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .sample-data-btn,
    .download-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .form-section {
        padding: 20px 18px;
    }
    
    .form-section h2 {
        font-size: 22px;
    }
    
    .preview-section {
        padding: 15px;
    }
    
    .profile-photo {
        width: 150px;
        height: 150px;
    }
    
    .resume-header h1 {
        font-size: 26px;
        letter-spacing: 1.5px;
    }
    
    .resume-main-content {
        padding: 25px 20px 25px 20px;
    }
    
    .arrow-header,
    .arrow-header-main {
        padding: 8px 16px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .form-section {
        display: none;
    }
    
    .preview-section {
        padding: 0;
        background: white;
    }
    
    .preview-container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .resume-preview {
        page-break-inside: avoid;
    }
}
