/* ========================================
   Golden Amber Executive Resume Template CSS
   Elegant Sidebar Layout with Rich Gold Accents
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   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: visible;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 460px;
    background: linear-gradient(180deg, #fdf8f3 0%, #f9f3eb 100%);
    padding: 35px 30px;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 3px solid #e8dcc8;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 50%, #B8860B 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, #B8860B 0%, #DAA520 100%);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3d3d3d;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e8dcc8;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #B8860B;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

.form-group small {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    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, #fdf6e3 0%, #fef9e7 100%);
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #f4d03f;
    margin-bottom: 20px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 60px;
    height: 45px;
    border: 3px solid #B8860B;
    border-radius: 10px;
    cursor: pointer;
    padding: 3px;
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #B8860B;
    font-weight: 600;
}

.reset-color-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.reset-color-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.4);
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #B8860B;
    background: #fdf6e3;
    cursor: pointer;
}

.photo-upload-section input[type="file"]:hover {
    border-color: #DAA520;
    background: #fef9e7;
}

/* ========================================
   Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 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 5px 20px rgba(184, 134, 11, 0.35);
}

.sample-data-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 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(52, 73, 94, 0.4);
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 3px solid #e8dcc8;
}

/* ========================================
   Experience, Education, Competency Items
   ======================================== */
.experience-item,
.education-item,
.competency-item,
.certification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    margin-bottom: 15px;
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #B8860B;
}

.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: #e74c3c;
    color: white;
}

.btn-header-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-header-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-header-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
}

/* ========================================
   Preview Container
   ======================================== */
.preview-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

/* ========================================
   Resume Layout - Sidebar Design
   ======================================== */
.resume-layout {
    display: flex;
    min-height: 297mm;
}

/* ========================================
   Resume Sidebar (Left)
   ======================================== */
.resume-sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile Photo */
.sidebar-photo-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #B8860B;
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.4), 0 0 0 8px rgba(184, 134, 11, 0.1);
    background: white;
    margin-bottom: 20px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
}

.profile-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
}

/* Background image approach for PDF compatibility */
.profile-photo .photo-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
}

.photo-placeholder {
    font-size: 50px;
    color: #95a5a6;
}

/* Sidebar Divider */
.sidebar-divider {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.divider-diamond {
    color: #B8860B;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
}

/* Sidebar Sections */
.sidebar-section {
    width: 100%;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Clickable Sidebar Sections - Hover Effect */
.sidebar-section[data-section] {
    cursor: pointer;
}

.sidebar-section[data-section]:hover {
    background: rgba(184, 134, 11, 0.15);
    transform: scale(1.02);
}

.sidebar-section[data-section]:active {
    transform: scale(0.98);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 800;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(184, 134, 11, 0.3);
    text-align: center;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #ecf0f1;
    font-size: 11px;
    line-height: 1.5;
}

.contact-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-text {
    word-break: break-word;
}

/* Expertise Tags */
.expertise-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.expertise-tag {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    color: #1a1a2e;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Certifications List */
.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cert-item {
    color: #ecf0f1;
    font-size: 11px;
    padding-left: 15px;
    position: relative;
    line-height: 1.5;
}

.cert-item::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: #B8860B;
    font-size: 8px;
}

/* ========================================
   Resume Main Content (Right)
   ======================================== */
.resume-main {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Main Header */
.main-header {
    background: linear-gradient(135deg, #fdf6e3 0%, #fff 50%, #fdf6e3 100%);
    padding: 40px 35px 30px;
    position: relative;
    border-bottom: 3px solid #B8860B;
}

.header-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #B8860B 0%, #DAA520 50%, #B8860B 100%);
}

.header-name {
    font-size: 38px;
    font-weight: 900;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #B8860B;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.header-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #B8860B 0%, #DAA520 100%);
    margin-top: 15px;
    border-radius: 2px;
}

/* Main Sections */
.main-section {
    padding: 25px 35px;
    border-bottom: 1px solid #e8dcc8;
}

.main-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.section-icon {
    font-size: 18px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

.section-content {
    padding-left: 5px;
}

/* Summary */
.summary-text {
    font-size: 13px;
    line-height: 1.8;
    color: #34495e;
    text-align: justify;
}

/* Experience Section */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-card {
    display: flex;
    gap: 15px;
}

.exp-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(180deg, #B8860B 0%, rgba(184, 134, 11, 0.2) 100%);
    margin-top: 5px;
    min-height: 30px;
}

.exp-content {
    flex: 1;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.exp-info {
    flex: 1;
}

.exp-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.exp-company {
    font-size: 13px;
    font-weight: 600;
    color: #B8860B;
    margin: 0;
    font-style: italic;
}

.exp-dates {
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 15px;
    white-space: nowrap;
}

.exp-achievements {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.exp-achievements li {
    font-size: 12px;
    line-height: 1.7;
    color: #34495e;
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
}

.exp-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #B8860B;
    font-weight: bold;
    font-size: 14px;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.education-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #fdf6e3 0%, #fff 100%);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #B8860B;
}

.edu-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.edu-content {
    flex: 1;
}

.edu-degree {
    font-size: 14px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 5px 0;
}

.edu-institution {
    font-size: 13px;
    font-weight: 600;
    color: #B8860B;
    margin: 0 0 4px 0;
}

.edu-details {
    font-size: 11px;
    color: #7f8c8d;
    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: #f1f1f1;
}

.form-section::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #B8860B 0%, #DAA520 100%);
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #DAA520 0%, #B8860B 100%);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

/* Tablets and Below (1200px) */
@media screen and (max-width: 1200px) {
    body {
        height: auto;
        min-height: 100vh;
        padding: 10px;
        align-items: flex-start;
    }

    .resume-builder-container {
        width: 98vw;
        height: auto;
        min-height: auto;
        flex-direction: column;
        overflow: visible;
    }

    .form-section {
        width: 100%;
        max-height: none;
        min-height: auto;
        overflow-y: visible;
        border-right: none;
        border-bottom: 3px solid #e8dcc8;
        flex-shrink: 0;
    }

    .preview-section {
        width: 100%;
        min-height: auto;
        overflow: visible;
    }

    .preview-container {
        overflow-y: visible;
        min-height: auto;
    }

    .resume-preview {
        width: 100%;
        min-height: auto;
    }

    .preview-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .preview-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .resume-layout {
        flex-direction: column;
        min-height: auto;
    }

    .resume-sidebar {
        width: 100%;
        padding: 25px 20px;
    }

    .sidebar-photo-wrapper {
        width: 120px;
        height: 120px;
    }
}

/* Mobile Devices (768px) */
@media screen and (max-width: 768px) {
    body {
        padding: 5px;
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
    }

    .resume-builder-container {
        border-radius: 12px;
        width: 100%;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .form-section {
        padding: 20px 18px;
        overflow-y: visible;
        max-height: none;
    }

    .form-section h2 {
        font-size: 22px;
    }

    .form-section-title {
        font-size: 12px;
        padding: 8px 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-section {
        overflow: visible;
    }

    .preview-container {
        padding: 15px;
        overflow-y: visible;
    }

    .resume-sidebar {
        padding: 20px 15px;
    }

    .sidebar-photo-wrapper {
        width: 100px;
        height: 100px;
    }

    .sidebar-title {
        font-size: 12px;
    }

    .contact-item {
        font-size: 10px;
    }

    .expertise-tag {
        font-size: 9px;
        padding: 5px 10px;
    }

    .main-header {
        padding: 30px 20px 20px;
    }

    .header-name {
        font-size: 28px;
        word-break: break-word;
    }

    .header-title {
        font-size: 14px;
        letter-spacing: 2px;
        word-break: break-word;
    }

    .main-section {
        padding: 20px;
    }

    .section-title {
        font-size: 14px;
    }

    .exp-header {
        flex-direction: column;
        gap: 8px;
    }

    .exp-dates {
        align-self: flex-start;
    }

    .preview-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }
}

/* Small Mobile (480px) */
@media screen and (max-width: 480px) {
    body {
        padding: 0;
    }

    .resume-builder-container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .form-section {
        padding: 15px 12px;
    }

    .form-section h2 {
        font-size: 20px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .header-name {
        font-size: 22px;
        word-break: break-word;
    }

    .header-title {
        font-size: 11px;
        letter-spacing: 1px;
        word-break: break-word;
    }

    .sidebar-photo-wrapper {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .photo-placeholder {
        font-size: 35px;
    }

    .main-header {
        padding: 20px 15px 15px;
    }

    .main-section {
        padding: 15px 12px;
    }

    .section-title {
        font-size: 13px;
    }

    .summary-text {
        font-size: 12px;
        text-align: left;
    }

    .exp-title {
        font-size: 13px;
    }

    .exp-company {
        font-size: 12px;
    }

    .exp-achievements li {
        font-size: 11px;
    }

    .education-card {
        padding: 12px;
        flex-direction: column;
        gap: 10px;
    }

    .edu-degree {
        font-size: 13px;
    }

    .edu-institution {
        font-size: 12px;
    }

    .expertise-list {
        gap: 6px;
    }

    .expertise-tag {
        font-size: 8px;
        padding: 4px 8px;
    }

    .contact-item {
        font-size: 10px;
        word-break: break-word;
    }

    .add-btn,
    .sample-data-btn {
        padding: 14px;
        font-size: 14px;
    }

    .preview-header {
        padding: 15px;
    }

    .preview-header h2 {
        font-size: 18px;
    }

    .btn-header-secondary,
    .btn-header-success {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 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;
    }

    .resume-layout {
        min-height: auto;
    }

    /* Profile Photo Fix for PDF */
    .profile-photo img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }

    .profile-photo .photo-bg {
        width: 100% !important;
        height: 100% !important;
        background-size: cover !important;
        background-position: center !important;
        border-radius: 50% !important;
    }
}
