/* ========================================
   Cobalt Executive Premium Resume Template CSS
   Modern Deep Blue 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, #1a365d 0%, #2a4365 50%, #1e3a5f 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(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 460px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 35px 30px;
    overflow-y: auto;
    border-right: 4px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a5f 0%, #3182ce 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, #1e3a5f 0%, #2c5282 100%);
    color: white;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.15);
}

.form-group small {
    display: block;
    font-size: 11px;
    color: #64748b;
    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, #ebf8ff 0%, #dbeafe 100%);
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #bfdbfe;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 45px;
    border: 3px solid #1e3a5f;
    border-radius: 10px;
    cursor: pointer;
    padding: 3px;
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #1e3a5f;
    font-weight: 600;
}

.reset-color-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 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, #2c5282 0%, #3182ce 100%);
    transform: translateY(-2px);
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 12px;
    border: 2px dashed #3182ce;
    background: #ebf8ff;
    cursor: pointer;
    border-radius: 10px;
}

.photo-upload-section input[type="file"]:hover {
    border-color: #1e3a5f;
    background: #dbeafe;
}

/* ========================================
   Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 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(30, 58, 95, 0.35);
}

.sample-data-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 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(13, 148, 136, 0.4);
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 3px solid #e2e8f0;
}

/* ========================================
   Experience, Education, Competency Items
   ======================================== */
.experience-item,
.education-item,
.competency-item,
.certification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #3182ce;
}

.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(0, 0, 0, 0.2);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

/* ========================================
   Resume Sidebar Section (NEW DESIGN)
   ======================================== */
.resume-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 50%, #1e3a5f 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.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: white;
}

.sidebar-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-photo-placeholder {
    font-size: 70px;
    color: #94a3b8;
}

/* 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(0, 0, 0, 0.2);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #93c5fd;
    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: #93c5fd;
}

.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: #e2e8f0;
    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: #2a4a6b;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    border-left: 4px solid #3182ce;
    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: #e2e8f0;
    line-height: 1.5;
}

.cert-bullet {
    color: #3182ce;
    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: #1e3a5f;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1e3a5f;
    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: #334155;
    text-align: justify;
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 5px solid #1e3a5f;
}

/* Experience Section */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 22px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #1e3a5f 0%, #3182ce 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: #1e293b;
    margin: 0 0 6px 0;
}

.exp-card-company {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
    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, #1e3a5f 0%, #2c5282 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: #475569;
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
}

.exp-card-achievements li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #3182ce;
    font-size: 12px;
    font-weight: bold;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.education-card {
    background: linear-gradient(135deg, #ebf8ff 0%, #dbeafe 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #1e3a5f;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.1);
}

.edu-card-degree {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.edu-card-institution {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 6px 0;
}

.edu-card-details {
    font-size: 13px;
    color: #64748b;
    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: #f1f5f9;
}

.form-section::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e3a5f 0%, #3182ce 100%);
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 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 #e2e8f0;
    }

    .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;
    }
}
