/* ========================================
   Modern Bordered Resume Template CSS
   Based on Samira Hadid Design
   Clean, Bordered, Professional Look
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    background: #f0f2f5;
    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.1);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    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: #334155;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    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: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========================================
   Dynamic Items (Experience/Education)
   ======================================== */
.experience-item,
.education-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.add-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* ========================================
   Form Actions
   ======================================== */
.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-load-sample {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f8fafc;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.preview-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-header-secondary {
    background: #ef4444;
    color: white;
}

.btn-header-secondary:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-header-success {
    background: #10b981;
    color: white;
}

.btn-header-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ========================================
   Resume Preview Container
   ======================================== */
.resume-preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    height: fit-content;
}

/* ========================================
   Resume Template (Main Design)
   ======================================== */
.resume-template {
    width: 210mm;
    min-height: auto;
    height: fit-content;
    background: white;
    padding: 50px 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    border: 3px solid #1e293b;
    position: relative;
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
}

/* ========================================
   Header Section
   ======================================== */
.resume-header {
    text-align: center;
    margin-bottom: 45px;
    padding-bottom: 25px;
}

.header-name {
    font-size: 42px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.header-title {
    font-size: 18px;
    font-weight: 400;
    color: #64748b;
    margin-top: 8px;
}

/* ========================================
   Body Content
   ======================================== */
.resume-body {
    margin-bottom: 40px;
}

.resume-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.section-divider {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    margin-bottom: 20px;
}

/* ========================================
   Experience Section
   ======================================== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-item-preview {
    position: relative;
}

.experience-header {
    margin-bottom: 8px;
}

.experience-position {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.experience-company {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    font-style: italic;
}

.experience-year {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 10px;
}

.experience-description {
    font-size: 14px;
    line-height: 1.8;
    color: #475569;
}

.experience-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-description li {
    margin-bottom: 6px;
    padding-left: 0;
}

/* ========================================
   Skills Section - Pill Style
   ======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 5px;
}

.skill-pill {
    background: white;
    border: 2px solid #1e293b;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    text-align: center;
    transition: all 0.2s;
}

.skill-pill:hover {
    background: #1e293b;
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   Education Section
   ======================================== */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.education-item-preview {
    position: relative;
}

.education-degree {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.education-institution {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
}

/* ========================================
   Footer Section (Contact)
   ======================================== */
.resume-footer {
    position: absolute;
    bottom: 50px;
    left: 60px;
    right: 60px;
    border-top: 2px solid #e2e8f0;
}

.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    flex-wrap: wrap;
}

.footer-separator {
    color: #cbd5e1;
    font-weight: 300;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    
    .form-section,
    .preview-header {
        display: none !important;
    }
    
    .resume-builder-container {
        width: 100%;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    
    .preview-section {
        width: 100%;
        padding: 0;
        overflow: visible;
    }
    
    .resume-preview {
        padding: 0;
        width: 100%;
    }
    
    .resume-template {
        width: 100%;
        min-height: auto;
        box-shadow: none;
        border-radius: 0;
        border: 3px solid #1e293b;
        page-break-after: avoid;
        page-break-inside: avoid;
    }
}

/* ========================================
   Responsive Design - Tablets
   ======================================== */
@media (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: 95vh;
    }

    .form-section {
        width: 400px;
        padding: 24px 20px;
    }

    .resume-template {
        width: 190mm;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 968px) {
    body {
        padding: 10px;
        overflow: auto;
    }

    .resume-builder-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 8px;
    }

    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding: 24px 16px;
        max-height: none;
        overflow-y: visible;
    }

    .form-section h2 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-section {
        width: 100%;
    }

    .preview-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .preview-header h2 {
        font-size: 18px;
        width: 100%;
    }

    .preview-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }

    .resume-preview {
        padding: 16px;
    }

    .resume-template {
        width: 100%;
        min-height: auto;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        padding: 40px 35px;
        border-width: 2px;
    }

    .header-name {
        font-size: 32px;
    }

    .header-title {
        font-size: 18px;
    }

    .section-title {
        font-size: 16px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .skill-pill {
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px 12px;
    }

    .header-name {
        font-size: 26px;
    }

    .header-title {
        font-size: 16px;
    }

    .resume-template {
        padding: 30px 25px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .experience-position,
    .education-degree {
        font-size: 14px;
    }
    
    .experience-company,
    .education-institution,
    .experience-year {
        font-size: 12px;
    }
    
    .experience-description {
        font-size: 13px;
    }
    
    .footer-contact {
        font-size: 12px;
        gap: 10px;
    }
    
    .resume-footer {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 30px;
    }
}
