/* ========================================
   EMERALD ELITE EXECUTIVE RESUME BUILDER
   Modern Sidebar Layout with Emerald Green Theme
   ======================================== */

/* ========================================
   GLOBAL VARIABLES & RESET
   ======================================== */
:root {
    --primary-color: #059669; /* Emerald Green */
    --primary-dark: #047857;
    --primary-light: #10b981;
    --primary-ultra-light: #d1fae5;
    --secondary-color: #064e3b;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --background-white: #ffffff;
    --background-gray: #f9fafb;
    --border-color: #e5e7eb;
    --accent-gold: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========================================
   MAIN CONTAINER LAYOUT
   ======================================== */
.resume-builder-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 0;
    min-height: 100vh;
}

/* ========================================
   LEFT SIDE: FORM SECTION
   ======================================== */
.form-section {
    background: var(--background-white);
    padding: 40px 30px;
    overflow-y: auto;
    max-height: 100vh;
    border-right: 3px solid var(--primary-color);
    box-shadow: 4px 0 15px rgba(5, 150, 105, 0.1);
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(5, 150, 105, 0.1);
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--primary-light);
    background: linear-gradient(90deg, var(--primary-ultra-light) 0%, transparent 100%);
    padding-left: 15px;
    border-radius: 4px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-ultra-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 5px;
}

/* Form Row (2 columns) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Color Theme Picker */
.theme-color-section {
    background: linear-gradient(135deg, var(--primary-ultra-light) 0%, var(--background-white) 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--primary-light);
    margin-bottom: 25px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-input:hover {
    transform: scale(1.1);
}

.color-label {
    font-size: 14px;
    color: var(--text-medium);
    flex: 1;
}

.reset-color-btn {
    padding: 8px 16px;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-color-btn:hover {
    background: var(--text-medium);
    transform: translateY(-2px);
}

/* Photo Upload Section */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    background: var(--primary-ultra-light);
    cursor: pointer;
    font-size: 14px;
}

/* Add Buttons */
.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.2);
}

.add-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(5, 150, 105, 0.3);
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sample-data-btn {
    flex: 1;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}

/* ========================================
   RIGHT SIDE: PREVIEW SECTION
   ======================================== */
.preview-section {
    background: var(--background-gray);
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-header h2 {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

.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 ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-header-secondary {
    background: #ef4444;
    color: white;
}

.btn-header-secondary:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-header-success {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-header-success:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

/* Preview Container */
.preview-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* ========================================
   RESUME PREVIEW - SIDEBAR LAYOUT
   ======================================== */
.resume-preview {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 1056px; /* A4 height */
    background: white;
}

/* Left Sidebar */
.resume-sidebar {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 25px;
}

/* Profile Photo in Sidebar */
.sidebar-photo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.sidebar-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    opacity: 0.7;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-light);
    color: white;
}

.sidebar-content {
    font-size: 13px;
    line-height: 1.8;
}

/* Contact Items */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    word-break: break-word;
}

.contact-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Education in Sidebar */
.education-entry {
    margin-bottom: 20px;
}

.edu-degree {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.edu-institution {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--primary-ultra-light);
}

.edu-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    border-left: 3px solid var(--primary-light);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.resume-main {
    padding: 40px 35px;
    background: white;
}

/* Main Header */
.main-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 4px solid var(--primary-color);
}

.main-name {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.main-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Main Sections */
.main-section {
    margin-bottom: 25px;
}

.main-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-decorator {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary-ultra-light);
}

/* Professional Summary */
.summary-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
    padding: 15px;
    background: var(--background-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Experience List */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-entry {
    padding: 15px;
    background: var(--background-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.exp-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.exp-company {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.exp-dates {
    font-size: 14px;
    color: var(--text-medium);
    font-weight: 600;
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    border: 2px solid var(--primary-light);
}

.exp-achievements {
    list-style: none;
    padding-left: 0;
}

.exp-achievements li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
}

.exp-achievements li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

/* Achievements List */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-item {
    font-size: 14px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--primary-ultra-light) 0%, white 100%);
    border-radius: 8px;
    border-left: 4px solid var(--accent-gold);
    color: var(--text-dark);
    font-weight: 600;
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Tablet View (1200px and below) */
@media (max-width: 1200px) {
    .resume-builder-container {
        grid-template-columns: 450px 1fr;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .resume-preview {
        grid-template-columns: 250px 1fr;
    }
}

/* Small Tablet View (900px and below) */
@media (max-width: 900px) {
    .resume-builder-container {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        max-height: none;
        border-right: none;
        border-bottom: 3px solid var(--primary-color);
    }
    
    .preview-section {
        max-height: none;
    }
    
    .resume-preview {
        grid-template-columns: 240px 1fr;
    }
    
    .main-name {
        font-size: 36px;
    }
    
    .main-title {
        font-size: 18px;
    }
}

/* Mobile View (600px and below) */
@media (max-width: 600px) {
    .form-section {
        padding: 20px 15px;
    }
    
    .form-section h2 {
        font-size: 26px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        padding: 15px;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .preview-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }
    
    .resume-preview {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .resume-sidebar {
        padding: 30px 20px;
    }
    
    .sidebar-photo {
        width: 120px;
        height: 120px;
    }
    
    .resume-main {
        padding: 30px 20px;
    }
    
    .main-name {
        font-size: 28px;
    }
    
    .main-title {
        font-size: 16px;
    }
    
    .exp-header {
        flex-direction: column;
    }
    
    .exp-dates {
        align-self: flex-start;
    }
}

/* Extra Small Mobile View (400px and below) */
@media (max-width: 400px) {
    .form-section {
        padding: 15px 10px;
    }
    
    .form-section h2 {
        font-size: 22px;
    }
    
    .sidebar-photo {
        width: 100px;
        height: 100px;
    }
    
    .main-name {
        font-size: 24px;
    }
    
    .main-title {
        font-size: 14px;
    }
    
    .main-section-title {
        font-size: 18px;
    }
}

/* ========================================
   PRINT STYLES (for PDF export)
   ======================================== */
@media print {
    body {
        background: white;
    }
    
    .resume-builder-container {
        display: block;
    }
    
    .form-section {
        display: none;
    }
    
    .preview-section {
        padding: 0;
        max-height: none;
    }
    
    .preview-header {
        display: none;
    }
    
    .preview-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .resume-preview {
        min-height: auto;
        page-break-inside: avoid;
    }
}
