/* ========================================
   Khaki Creative Resume Template CSS
   Professional Khaki Gold & Gray Design with Geometric Patterns
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #5c5346 0%, #3d3830 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, #f5f4f0 0%, #e8e6e0 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 3px solid #9a8a5f;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #3d3830;
    margin-bottom: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #3d3830;
    margin-top: 28px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #9a8a5f 0%, #b8a874 100%);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d3830;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 2px solid #d4d0c6;
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #9a8a5f;
    box-shadow: 0 0 0 4px rgba(154, 138, 95, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #7a7568;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* ========================================
   Color Theme Picker
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #3d3830 0%, #5c5346 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #9a8a5f;
    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 #9a8a5f;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input:hover {
    border-color: #b8a874;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(154, 138, 95, 0.5);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #e8e6e0;
    font-weight: 500;
}

.reset-color-btn {
    padding: 10px 18px;
    background: #9a8a5f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-color-btn:hover {
    background: #b8a874;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 138, 95, 0.4);
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    border: 2px dashed #9a8a5f;
}

.photo-upload-section input[type="file"]::file-selector-button {
    padding: 10px 18px;
    background: #3d3830;
    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: #9a8a5f;
}

/* ========================================
   Add/Remove Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #3d3830 0%, #5c5346 100%);
    color: white;
    border: 2px solid #9a8a5f;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
}

.add-btn:hover {
    background: linear-gradient(90deg, #9a8a5f 0%, #b8a874 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 138, 95, 0.3);
}

.remove-btn {
    padding: 8px 16px;
    background: #dc4a4a;
    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: #c43c3c;
    transform: translateY(-1px);
}

/* ========================================
   Dynamic Form Items
   ======================================== */
.experience-item,
.education-item,
.skill-item,
.certification-item {
    padding: 18px;
    background: white;
    border: 2px solid #9a8a5f;
    border-radius: 12px;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.experience-item:hover,
.education-item:hover,
.skill-item:hover,
.certification-item:hover {
    box-shadow: 0 6px 20px rgba(154, 138, 95, 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 #9a8a5f;
}

.sample-data-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #9a8a5f 0%, #b8a874 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(154, 138, 95, 0.4);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f0eeea;
    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, #3d3830 0%, #5c5346 100%);
    border-bottom: 3px solid #9a8a5f;
}

.preview-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.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: #7a7568;
    color: white;
}

.btn-header-secondary:hover {
    background: #5c5346;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #9a8a5f;
    color: white;
}

.btn-header-success:hover {
    background: #b8a874;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 138, 95, 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-width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ========================================
   Geometric Pattern Decorations
   ======================================== */
.geometric-pattern {
    position: absolute;
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 1;
}

.geometric-pattern-top-left {
    top: 0;
    left: 0;
    background: 
        radial-gradient(circle at 15px 15px, transparent 10px, #d9d5cc 10px, #d9d5cc 12px, transparent 12px),
        radial-gradient(circle at 40px 15px, transparent 6px, #d9d5cc 6px, #d9d5cc 8px, transparent 8px),
        radial-gradient(circle at 65px 25px, transparent 8px, #d9d5cc 8px, #d9d5cc 10px, transparent 10px),
        radial-gradient(circle at 25px 50px, transparent 5px, #d9d5cc 5px, #d9d5cc 7px, transparent 7px),
        radial-gradient(circle at 50px 45px, transparent 12px, #d9d5cc 12px, #d9d5cc 14px, transparent 14px),
        radial-gradient(circle at 85px 55px, transparent 7px, #d9d5cc 7px, #d9d5cc 9px, transparent 9px),
        radial-gradient(circle at 15px 80px, transparent 9px, #d9d5cc 9px, #d9d5cc 11px, transparent 11px),
        radial-gradient(circle at 70px 85px, transparent 6px, #d9d5cc 6px, #d9d5cc 8px, transparent 8px),
        linear-gradient(45deg, #ccc8be 0%, transparent 50%);
    background-color: transparent;
}

.geometric-pattern-top-right {
    top: 0;
    right: 0;
    background: 
        radial-gradient(circle at 105px 15px, transparent 10px, #d9d5cc 10px, #d9d5cc 12px, transparent 12px),
        radial-gradient(circle at 80px 15px, transparent 6px, #d9d5cc 6px, #d9d5cc 8px, transparent 8px),
        radial-gradient(circle at 55px 25px, transparent 8px, #d9d5cc 8px, #d9d5cc 10px, transparent 10px),
        radial-gradient(circle at 95px 50px, transparent 5px, #d9d5cc 5px, #d9d5cc 7px, transparent 7px),
        radial-gradient(circle at 70px 45px, transparent 12px, #d9d5cc 12px, #d9d5cc 14px, transparent 14px),
        radial-gradient(circle at 35px 55px, transparent 7px, #d9d5cc 7px, #d9d5cc 9px, transparent 9px),
        radial-gradient(circle at 105px 80px, transparent 9px, #d9d5cc 9px, #d9d5cc 11px, transparent 11px),
        radial-gradient(circle at 50px 85px, transparent 6px, #d9d5cc 6px, #d9d5cc 8px, transparent 8px),
        linear-gradient(-45deg, #ccc8be 0%, transparent 50%);
    background-color: transparent;
}

/* ========================================
   Resume Header with Photo
   ======================================== */
.resume-header-section {
    background: linear-gradient(180deg, #e8e6e0 0%, #d9d5cc 100%);
    padding: 40px 40px 50px 40px;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.profile-photo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.profile-photo {
    width: 150px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid #9a8a5f;
    box-shadow: 0 8px 25px rgba(154, 138, 95, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f4f0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 50px;
    color: #9a8a5f;
}

.header-name {
    font-size: 38px;
    font-weight: 700;
    color: #9a8a5f;
    letter-spacing: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

.header-title {
    font-size: 18px;
    font-weight: 500;
    color: #9a8a5f;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ========================================
   Two Column Layout
   ======================================== */
.resume-content {
    display: flex;
    flex: 1;
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    align-items: stretch;
}

/* ========================================
   Left Sidebar (Contact, Skills, Education)
   ======================================== */
.resume-sidebar {
    width: 38%;
    min-width: 38%;
    background: #e8e6e0;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    align-self: stretch;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #9a8a5f;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Contact Section */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    font-size: 13px;
    color: #3d3830;
    line-height: 1.5;
}

/* Skills Section */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-item-preview {
    font-size: 13px;
    color: #3d3830;
    line-height: 1.6;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.education-entry {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edu-degree {
    font-size: 13px;
    font-weight: 700;
    color: #3d3830;
}

.edu-institution {
    font-size: 12px;
    color: #5c5346;
}

.edu-year {
    font-size: 12px;
    color: #9a8a5f;
    font-weight: 600;
}

/* ========================================
   Right Main Content (Work Experience)
   ======================================== */
.resume-main {
    flex: 1;
    background: white;
    padding: 35px 40px;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    align-self: stretch;
}

.main-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #9a8a5f;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Work Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exp-title {
    font-size: 15px;
    font-weight: 700;
    color: #3d3830;
}

.exp-company {
    font-size: 13px;
    color: #9a8a5f;
    font-weight: 600;
}

.exp-description {
    font-size: 13px;
    color: #5c5346;
    line-height: 1.7;
    text-align: justify;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f1f0ec;
}

.form-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9a8a5f 0%, #b8a874 100%);
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #d4d0c6;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: #9a8a5f;
}

/* ========================================
   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 #9a8a5f;
        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;
        overflow-x: auto;
    }

    .resume-preview {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        width: 100%;
        min-width: 320px;
        min-height: auto;
        font-size: 11px;
    }

    .resume-content {
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
        padding: 25px 20px;
    }

    .resume-main {
        padding: 25px 20px;
    }

    .header-name {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .header-title {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .profile-photo {
        width: 120px;
        height: 150px;
    }

    .geometric-pattern {
        width: 80px;
        height: 80px;
    }
}

/* 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-header-section {
        padding: 30px 20px 35px 20px;
    }

    .profile-photo {
        width: 100px;
        height: 125px;
    }

    .photo-placeholder {
        font-size: 40px;
    }

    .header-name {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .header-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .resume-sidebar,
    .resume-main {
        padding: 20px 16px;
        gap: 20px;
    }

    .sidebar-title,
    .section-title {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .contact-item,
    .skill-item-preview,
    .edu-degree,
    .exp-description {
        font-size: 12px;
    }

    .exp-title {
        font-size: 14px;
    }

    .exp-company {
        font-size: 12px;
    }

    .edu-institution,
    .edu-year {
        font-size: 11px;
    }

    .geometric-pattern {
        width: 60px;
        height: 60px;
    }
}

/* 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: 16px 14px;
    }

    .header-name {
        font-size: 20px;
    }

    .profile-photo {
        width: 80px;
        height: 100px;
    }

    .geometric-pattern {
        width: 50px;
        height: 50px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
        overflow: visible;
    }

    .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;
    }
}
