/* ========================================
   Amber Professional Executive Resume Template CSS
   Modern Gradient Design with Amber/Gold Theme
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 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: 1500px;
    width: 96vw;
    height: 94vh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.2), 0 0 0 1px rgba(245, 158, 11, 0.1);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 460px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    padding: 36px 30px;
    overflow-y: auto;
    border-right: 3px solid #fbbf24;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    text-align: center;
    letter-spacing: -0.5px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-top: 32px;
    margin-bottom: 18px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #fbbf24;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
    color: #292524;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #a16207;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ========================================
   Color Picker Section
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 45px;
    border: 3px solid #f59e0b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

.reset-color-btn {
    padding: 8px 14px;
    background: white;
    color: #d97706;
    border: 2px solid #fbbf24;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-color-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #fbbf24;
    background: #fffbeb;
    cursor: pointer;
}

.photo-upload-section input[type="file"]:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

/* ========================================
   Dynamic Items (Experience, Education, etc.)
   ======================================== */
.experience-item,
.education-item,
.skill-item,
.competency-item {
    background: white;
    border: 2px solid #fde68a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s;
}

.experience-item:hover,
.education-item:hover,
.skill-item:hover,
.competency-item:hover {
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

/* ========================================
   Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.action-buttons {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 3px solid #fde68a;
}

.sample-data-btn {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #d97706;
    border: 3px solid #fbbf24;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    transform: translateY(-2px);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fafaf9;
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 20px 32px;
    border-bottom: 3px solid #fbbf24;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #292524;
}

.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;
}

.btn-header-secondary {
    background: #ef4444;
    color: white;
}

.btn-header-secondary:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-header-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-header-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
}

.preview-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ========================================
   Resume Preview Card
   ======================================== */
.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* ========================================
   Resume Header with Gradient Banner
   ======================================== */
.resume-header {
    position: relative;
    background: white;
    padding: 0;
}

.gradient-banner {
    height: 120px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    position: relative;
}

.gradient-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 100%);
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 0 48px 32px 48px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

/* Profile Photo with Border */
.profile-section {
    flex-shrink: 0;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    border: 6px solid white;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 56px;
    color: #f59e0b;
}

/* Header Info */
.header-info {
    flex: 1;
    padding-top: 70px;
}

.name-display {
    font-size: 42px;
    font-weight: 800;
    color: #292524;
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.title-display {
    font-size: 20px;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.header-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.contact-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #78350f;
    border: 1px solid #fde68a;
}

.contact-badge .icon {
    font-size: 16px;
}

/* ========================================
   Resume Body
   ======================================== */
.resume-body {
    padding: 40px 48px;
}

/* Section Styling */
.section {
    margin-bottom: 36px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #292524;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #fbbf24;
}

.title-icon {
    font-size: 24px;
}

/* Summary Section */
.summary-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 5px solid #f59e0b;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.summary-box p {
    font-size: 15px;
    line-height: 1.7;
    color: #44403c;
    font-weight: 400;
}

/* Core Competencies Grid */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.competency-tag {
    background: white;
    border: 2px solid #fde68a;
    border-radius: 8px;
    padding: 10px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    transition: all 0.3s;
}

.competency-tag:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
    transform: translateY(-2px);
}

/* Experience Timeline */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.experience-card {
    background: white;
    border: 2px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.experience-card:hover {
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.exp-title-group {
    flex: 1;
}

.exp-title {
    font-size: 18px;
    font-weight: 700;
    color: #292524;
    margin-bottom: 6px;
}

.exp-company {
    font-size: 15px;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 0;
}

.exp-date {
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
    background: #fef3c7;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.exp-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exp-achievements li {
    font-size: 14px;
    line-height: 1.6;
    color: #57534e;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.exp-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
    font-size: 16px;
}

/* Two Column Section - Education & Skills Side by Side */
.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
}

.resume-preview .two-column-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
}

/* Education Cards */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-card {
    background: white;
    border: 2px solid #fde68a;
    border-radius: 10px;
    padding: 18px;
}

.edu-degree {
    font-size: 16px;
    font-weight: 700;
    color: #292524;
    margin-bottom: 8px;
}

.edu-institution {
    font-size: 14px;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 10px;
}

.edu-details {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.edu-year {
    color: #78350f;
    font-weight: 600;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: 5px;
}

.edu-honors {
    color: #92400e;
    font-weight: 500;
    font-style: italic;
}

/* Skills with Progress Bars */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-bar {
    background: white;
    border: 2px solid #fde68a;
    border-radius: 10px;
    padding: 14px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 14px;
    font-weight: 600;
    color: #292524;
}

.skill-level {
    font-size: 12px;
    font-weight: 600;
    color: #d97706;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: 5px;
}

.skill-progress {
    height: 8px;
    background: #fef3c7;
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track {
    background: #fef3c7;
}

.form-section::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

.preview-container::-webkit-scrollbar-track {
    background: #f5f5f4;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 5px;
}

/* ========================================
   Mobile Responsive Design
   ======================================== */
@media screen and (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: 96vh;
    }

    .form-section {
        width: 400px;
    }

    .resume-preview {
        width: 190mm;
    }

    .header-content {
        padding: 0 36px 28px 36px;
    }

    .resume-body {
        padding: 32px 36px;
    }
}

@media screen and (max-width: 1024px) {
    body {
        padding: 10px;
    }

    .resume-builder-container {
        flex-direction: column;
        height: auto;
        max-height: none;
        border-radius: 12px;
    }

    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid #fbbf24;
        max-height: 50vh;
        padding: 24px 20px;
    }

    .form-section h2 {
        font-size: 24px;
    }

    .preview-section {
        height: auto;
        min-height: 50vh;
    }

    .preview-container {
        padding: 20px;
    }

    .resume-preview {
        width: 100%;
        max-width: 700px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding: 0 24px 24px 24px;
    }

    .header-info {
        padding-top: 0;
    }

    .name-display {
        font-size: 32px;
    }

    .title-display {
        font-size: 18px;
    }

    .header-contact {
        justify-content: center;
    }

    .resume-body {
        padding: 28px 24px;
    }

    /* Keep two-column layout for Education & Skills */
    .two-column-section {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .competencies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@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 {
        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-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .preview-header {
        padding: 16px 20px;
    }

    .preview-header h2 {
        font-size: 20px;
    }

    .preview-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-header-secondary,
    .btn-header-success {
        padding: 8px 16px;
        font-size: 12px;
    }

    .resume-preview {
        border-radius: 0;
    }

    .gradient-banner {
        height: 80px;
    }

    .header-content {
        margin-top: -40px;
        padding: 0 20px 20px 20px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
        border: 4px solid white;
    }

    .photo-placeholder {
        font-size: 48px;
    }

    .name-display {
        font-size: 26px;
    }

    .title-display {
        font-size: 16px;
    }

    .header-contact {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .contact-badge {
        width: 100%;
        justify-content: center;
    }

    .resume-body {
        padding: 24px 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .competencies-grid {
        grid-template-columns: 1fr;
    }

    .exp-header {
        flex-direction: column;
        gap: 12px;
    }

    .exp-date {
        align-self: flex-start;
    }

    /* Keep two-column layout for Education & Skills in preview/PDF */
    .resume-preview .two-column-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
        background: white;
    }

    .resume-builder-container {
        border-radius: 0;
        box-shadow: none;
    }

    .form-section {
        padding: 16px 12px;
    }

    .form-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-section-title {
        font-size: 13px;
        padding: 8px 12px;
        margin-top: 24px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 13px;
    }

    .add-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .preview-header {
        padding: 12px 16px;
    }

    .preview-header h2 {
        font-size: 18px;
    }

    .resume-body {
        padding: 20px 16px;
    }

    .section {
        margin-bottom: 28px;
    }

    .section-title {
        font-size: 16px;
        gap: 8px;
    }

    .title-icon {
        font-size: 20px;
    }

    .name-display {
        font-size: 22px;
    }

    .title-display {
        font-size: 14px;
    }

    .experience-card,
    .education-card,
    .skill-bar {
        padding: 14px;
    }

    .exp-title {
        font-size: 16px;
    }

    .exp-company {
        font-size: 14px;
    }

    .exp-achievements li {
        font-size: 13px;
    }

    /* Keep two-column layout for Education & Skills in preview/PDF */
    .resume-preview .two-column-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
    }

    .form-section {
        display: none;
    }

    .preview-header {
        display: none;
    }

    .preview-container {
        padding: 0;
    }

    .resume-preview {
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    /* Ensure two-column layout in PDF */
    .two-column-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }

    .education-section,
    .skills-section {
        break-inside: avoid;
    }
}
