/* ========================================
   Midnight Professional Executive Resume Template CSS
   Dark Elegant Theme with Vertical Sidebar Layout
   Navy Blue with Gold Accents
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 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: 1600px;
    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(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 460px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f0f1f3 100%);
    padding: 35px 30px;
    overflow-y: auto;
    border-right: 3px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #1a2332 0%, #d4af37 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: 800;
    color: white;
    margin-top: 32px;
    margin-bottom: 18px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a2332;
    box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #6c757d;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Color Picker Section */
.theme-color-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-input:hover {
    transform: scale(1.05);
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #495057;
}

.reset-color-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #1a2332;
    background: #f8f9fa;
    border: 2px solid #1a2332;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-color-btn:hover {
    background: #1a2332;
    color: white;
}

/* Photo Upload Section */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #1a2332;
    background: #f8f9fa;
    cursor: pointer;
}

/* Buttons */
.add-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 50, 0.3);
}

.action-buttons {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #dee2e6;
}

.sample-data-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Experience, Education, Skill, Certification Items */
.experience-item,
.education-item,
.skill-item,
.certification-item {
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    padding: 25px 35px;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #d4af37;
}

.preview-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-header-secondary {
    background: #e74c3c;
    color: white;
}

.btn-header-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #d4af37;
    color: #1a2332;
}

.btn-header-success:hover {
    background: #f4d03f;
    transform: translateY(-2px);
}

/* Preview Container */
.preview-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #ecf0f1;
}

.resume-preview {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    max-width: 900px;
    min-height: 1100px;
    border-radius: 0;
}

/* ========================================
   Resume Layout - Vertical Sidebar Design
   ======================================== */
.resume-wrapper {
    display: flex;
    min-height: 1100px;
}

/* Left Sidebar - Dark Theme */
.resume-sidebar {
    width: 300px;
    background: linear-gradient(180deg, #1a2332 0%, #2c3e50 100%);
    padding: 40px 30px;
    color: white;
}

/* Profile Photo in Sidebar */
.sidebar-photo-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 5px solid #d4af37;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    color: #d4af37;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 35px;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 800;
    color: #d4af37;
    letter-spacing: 2px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4af37;
    text-transform: uppercase;
}

/* Contact Section in Sidebar */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.contact-icon {
    font-size: 16px;
    flex-shrink: 0;
    color: #d4af37;
}

.contact-text {
    color: #ecf0f1;
    word-break: break-word;
}

/* Skills in Sidebar */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-tag {
    padding: 10px 15px;
    background: rgba(212, 175, 55, 0.15);
    border-left: 3px solid #d4af37;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #ecf0f1;
}

/* Education in Sidebar */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-entry h4 {
    font-size: 14px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 5px;
}

.edu-field,
.edu-institution,
.edu-details {
    font-size: 12px;
    color: #bdc3c7;
    margin: 3px 0;
}

/* Certifications in Sidebar */
.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-item {
    padding: 10px 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #ecf0f1;
    border-left: 3px solid #d4af37;
}

/* ========================================
   Right Main Content Area
   ======================================== */
.resume-main-content {
    flex: 1;
    padding: 50px 45px;
    background: white;
}

/* Header - Name & Title */
.resume-header {
    margin-bottom: 35px;
}

.header-name {
    font-size: 42px;
    font-weight: 900;
    color: #1a2332;
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    border-radius: 2px;
}

/* Main Content Sections */
.main-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a2332;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d4af37;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.title-icon {
    font-size: 20px;
}

.section-content {
    padding-left: 10px;
}

/* Professional Summary */
.summary-text {
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
}

/* Professional Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.experience-entry {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #d4af37;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.exp-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 4px;
}

.exp-company {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.exp-dates {
    font-size: 12px;
    font-weight: 600;
    color: #95a5a6;
    background: #ecf0f1;
    padding: 5px 12px;
    border-radius: 15px;
    white-space: nowrap;
}

.exp-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exp-achievements li {
    font-size: 13px;
    line-height: 1.7;
    color: #34495e;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.exp-achievements li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: bold;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.form-section::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1a2332 0%, #2c3e50 100%);
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: #1a2332;
}

/* ========================================
   Mobile Responsive Design
   ======================================== */
@media screen and (max-width: 1400px) {
    .resume-builder-container {
        width: 98vw;
    }
    
    .form-section {
        width: 420px;
        padding: 30px 25px;
    }
}

@media screen and (max-width: 1200px) {
    .resume-builder-container {
        flex-direction: column;
        height: auto;
        max-height: 94vh;
    }
    
    .form-section {
        width: 100%;
        max-height: 400px;
        border-right: none;
        border-bottom: 3px solid #e0e0e0;
    }
    
    .preview-section {
        flex: 1;
    }
}

@media screen and (max-width: 968px) {
    body {
        padding: 10px;
    }
    
    .resume-builder-container {
        width: 100%;
        border-radius: 10px;
    }
    
    .form-section {
        padding: 25px 20px;
    }
    
    .form-section h2 {
        font-size: 24px;
    }
    
    .preview-header {
        padding: 20px 25px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .preview-actions {
        justify-content: center;
    }
    
    .preview-container {
        padding: 20px;
    }
    
    .resume-wrapper {
        flex-direction: column;
    }
    
    .resume-sidebar {
        width: 100%;
        padding: 30px 25px;
    }
    
    .sidebar-photo {
        width: 150px;
        height: 150px;
    }
    
    .resume-main-content {
        padding: 35px 30px;
    }
    
    .header-name {
        font-size: 36px;
    }
    
    .header-title {
        font-size: 18px;
    }
}

@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 {
        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;
    }
    
    .preview-header h2 {
        font-size: 20px;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        flex: 1;
        text-align: center;
    }
    
    .resume-preview {
        max-width: 100%;
    }
    
    .sidebar-photo {
        width: 130px;
        height: 130px;
    }
    
    .resume-main-content {
        padding: 30px 25px;
    }
    
    .header-name {
        font-size: 32px;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 14px;
    }
    
    .exp-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .exp-dates {
        align-self: flex-start;
    }
}

@media screen and (max-width: 576px) {
    body {
        padding: 5px;
    }
    
    .resume-builder-container {
        border-radius: 5px;
    }
    
    .form-section {
        padding: 20px 15px;
        max-height: 300px;
    }
    
    .preview-container {
        padding: 15px 10px;
    }
    
    .resume-sidebar {
        padding: 25px 20px;
    }
    
    .sidebar-photo {
        width: 120px;
        height: 120px;
    }
    
    .resume-main-content {
        padding: 25px 20px;
    }
    
    .header-name {
        font-size: 28px;
    }
    
    .header-title {
        font-size: 14px;
    }
    
    .contact-item {
        font-size: 11px;
    }
    
    .skill-tag,
    .cert-item {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    .form-section h2 {
        font-size: 18px;
    }
    
    .form-section-title {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .add-btn,
    .sample-data-btn {
        font-size: 13px;
        padding: 10px;
    }
    
    .preview-header {
        padding: 15px 20px;
    }
    
    .preview-header h2 {
        font-size: 18px;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .resume-sidebar {
        padding: 20px 15px;
    }
    
    .sidebar-photo {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .sidebar-title {
        font-size: 12px;
    }
    
    .resume-main-content {
        padding: 20px 15px;
    }
    
    .header-name {
        font-size: 24px;
    }
    
    .header-title {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 13px;
    }
    
    .summary-text {
        font-size: 13px;
    }
    
    .exp-title {
        font-size: 14px;
    }
    
    .exp-company {
        font-size: 13px;
    }
    
    .exp-dates {
        font-size: 11px;
    }
    
    .exp-achievements li {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
    }
    
    .form-section,
    .preview-header {
        display: none;
    }
    
    .preview-section {
        background: white;
    }
    
    .preview-container {
        padding: 0;
        overflow: visible;
    }
    
    .resume-preview {
        box-shadow: none;
        max-width: 100%;
    }
    
    .resume-wrapper {
        page-break-inside: avoid;
    }
}
