/* ========================================
   Amethyst Executive Premium Resume Template CSS
   Modern Deep Purple Gradient Design with Sidebar Layout
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #581c87 0%, #6b21a8 50%, #7c3aed 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 25px 80px rgba(88, 28, 135, 0.5);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 460px;
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 35px 30px;
    overflow-y: auto;
    border-right: 4px solid #e9d5ff;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #6b21a8 0%, #a855f7 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;
    margin-top: 32px;
    margin-bottom: 18px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    color: white;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.3);
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #581c87;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e9d5ff;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
}

.form-group small {
    display: block;
    font-size: 11px;
    color: #7c3aed;
    margin-top: 5px;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========================================
   Color Theme Picker
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #d8b4fe;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 45px;
    border: 3px solid #6b21a8;
    border-radius: 10px;
    cursor: pointer;
    padding: 3px;
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #581c87;
    font-weight: 600;
}

.reset-color-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.reset-color-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    transform: translateY(-2px);
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 12px;
    border: 2px dashed #a855f7;
    background: #faf5ff;
    cursor: pointer;
    border-radius: 10px;
}

.photo-upload-section input[type="file"]:hover {
    border-color: #6b21a8;
    background: #f3e8ff;
}

/* ========================================
   Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(107, 33, 168, 0.35);
}

.sample-data-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 3px solid #e9d5ff;
}

/* ========================================
   Experience, Education, Competency Items
   ======================================== */
.experience-item,
.education-item,
.competency-item,
.certification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9d5ff;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(107, 33, 168, 0.08);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #a855f7;
}

.preview-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    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;
}

.btn-header-secondary {
    background: #ef4444;
    color: white;
}

.btn-header-secondary:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #10b981;
    color: white;
}

.btn-header-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* ========================================
   Preview Container
   ======================================== */
.preview-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 15px 50px rgba(107, 33, 168, 0.25);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

/* ========================================
   Resume Sidebar Section - Purple Theme
   ======================================== */
.resume-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #581c87 0%, #6b21a8 50%, #7c3aed 100%);
    padding: 35px 25px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Profile Photo in Sidebar */
.sidebar-photo-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(88, 28, 135, 0.4);
    background: white;
}

.sidebar-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-photo-placeholder {
    font-size: 70px;
    color: #c4b5fd;
}

/* Sidebar Name & Title */
.sidebar-name {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(88, 28, 135, 0.3);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #d8b4fe;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 10px 0 0 0;
}

/* Sidebar Sections */
.sidebar-section {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.sidebar-section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d8b4fe;
}

.sidebar-icon {
    font-size: 16px;
}

/* Contact Info in Sidebar */
.sidebar-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #f3e8ff;
    word-break: break-word;
}

.contact-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Competencies in Sidebar */
.sidebar-competencies {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-competency-tag {
    display: block;
    padding: 10px 14px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    border-left: 4px solid #a855f7;
    transition: all 0.3s;
    box-sizing: border-box;
}

/* Certifications in Sidebar */
.sidebar-certifications {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-cert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #f3e8ff;
    line-height: 1.5;
}

.cert-bullet {
    color: #a855f7;
    font-weight: bold;
    font-size: 14px;
}

/* ========================================
   Resume Main Content Section
   ======================================== */
.resume-main {
    flex: 1;
    padding: 40px 35px;
    background: white;
}

/* Section Styling */
.main-section {
    margin-bottom: 30px;
}

.main-section-title {
    font-size: 20px;
    font-weight: 800;
    color: #6b21a8;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #6b21a8;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-icon {
    font-size: 22px;
}

/* Summary Section */
.summary-content {
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
    text-align: justify;
    padding: 18px;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border-radius: 12px;
    border-left: 5px solid #6b21a8;
}

/* Experience Section */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-card {
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    padding: 22px;
    border-radius: 14px;
    border: 2px solid #e9d5ff;
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.08);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #6b21a8 0%, #a855f7 100%);
}

.exp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.exp-card-left {
    flex: 1;
}

.exp-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.exp-card-company {
    font-size: 15px;
    font-weight: 600;
    color: #6b21a8;
    margin: 0;
    font-style: italic;
}

.exp-card-right {
    text-align: right;
}

.exp-card-dates {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    padding: 6px 14px;
    border-radius: 20px;
    margin: 0;
}

.exp-card-achievements {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.exp-card-achievements li {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
}

.exp-card-achievements li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: #a855f7;
    font-size: 10px;
    font-weight: bold;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.education-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #6b21a8;
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.1);
}

.edu-card-degree {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.edu-card-institution {
    font-size: 14px;
    font-weight: 600;
    color: #6b21a8;
    margin: 0 0 6px 0;
}

.edu-card-details {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f5f3ff;
}

.form-section::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6b21a8 0%, #a855f7 100%);
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

/* Large Tablets and Below (1200px) */
@media screen and (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: auto;
        min-height: 95vh;
        flex-direction: column;
    }

    .form-section {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 4px solid #e9d5ff;
    }

    .preview-section {
        width: 100%;
    }

    .resume-preview {
        width: 100%;
        min-height: auto;
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
        padding: 30px;
    }

    .preview-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .preview-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Tablets (768px) */
@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 18px;
        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: 12px;
        padding: 10px 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-container {
        padding: 15px;
    }

    .resume-sidebar {
        padding: 25px 20px;
    }

    .sidebar-photo-wrapper {
        width: 140px;
        height: 140px;
    }

    .sidebar-name {
        font-size: 24px;
    }

    .sidebar-title {
        font-size: 12px;
    }

    .resume-main {
        padding: 25px 20px;
    }

    .main-section-title {
        font-size: 17px;
    }

    .exp-card-header {
        flex-direction: column;
        gap: 10px;
    }

    .exp-card-right {
        text-align: left;
    }

    .preview-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }
}

/* Small Mobile (480px) */
@media screen and (max-width: 480px) {
    .form-section h2 {
        font-size: 20px;
    }

    .sidebar-photo-wrapper {
        width: 120px;
        height: 120px;
    }

    .sidebar-name {
        font-size: 22px;
    }

    .sidebar-title {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .resume-sidebar {
        padding: 20px 15px;
    }

    .resume-main {
        padding: 20px 15px;
    }

    .main-section-title {
        font-size: 15px;
    }

    .sidebar-contact-item {
        font-size: 12px;
    }

    .sidebar-competency-tag {
        font-size: 12px;
        padding: 8px 12px;
    }

    .experience-card {
        padding: 18px;
    }

    .exp-card-title {
        font-size: 15px;
    }

    .exp-card-company {
        font-size: 14px;
    }

    .summary-content {
        font-size: 14px;
        padding: 15px;
    }
}

/* 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 {
        width: 100%;
    }

    .preview-container {
        padding: 0;
    }

    .resume-preview {
        box-shadow: none;
        border-radius: 0;
        flex-direction: row;
    }
}
