/* === FONT & BASE STYLES === */
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    /* bg-gray-900 */
}

/* === WIZARD & UI STYLES === */
.beatache-gradient-text {
    background: linear-gradient(90deg, #2dd4bf, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.beatache-button {
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
    transition: all 0.3s ease-in-out;
}

.beatache-button:hover {
    box-shadow: 0 0 20px #2dd4bf80, 0 0 20px #38bdf880;
    transform: translateY(-2px);
}

.form-step {
    display: none;
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}

.form-step.active {
    display: block;
    opacity: 1;
}

.progress-bar-fill {
    transition: width 0.5s ease-in-out;
}

.template-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.template-card.selected {
    border-color: #2dd4bf;
    box-shadow: 0 0 15px #2dd4bf80;
}

/* === RESUME PREVIEW BASE & PDF GENERATION === */
.resume-preview {
    background-color: white;
    color: #374151;
    /* text-gray-700 */
    width: 21cm;
    min-height: 29.7cm;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.break-inside-avoid {
    break-inside: avoid;
}

.break-after-avoid {
    break-after: avoid;
}

/* Styles to force A4 layout during PDF generation, overriding mobile styles */
body.pdf-generating {
    background-color: #4b5563;
    /* Cor de fundo para melhor visualização do processo */
}

body.pdf-generating .resume-preview {
    width: 21cm !important;
    min-height: 29.7cm !important;
    margin: 2rem auto !important;
    transform: scale(1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

body.pdf-generating .grid {
    display: grid !important;
}

body.pdf-generating .hidden {
    display: none !important;
}

body.pdf-generating .md\:col-span-1 {
    grid-column: span 1 / span 1 !important;
}

body.pdf-generating .md\:col-span-2 {
    grid-column: span 2 / span 2 !important;
}

body.pdf-generating .md\:col-span-3 {
    grid-column: span 3 / span 3 !important;
}

body.pdf-generating .md\:col-span-4 {
    grid-column: span 4 / span 4 !important;
}

body.pdf-generating .md\:col-span-8 {
    grid-column: span 8 / span 8 !important;
}

body.pdf-generating .md\:border-r {
    border-right-width: 1px !important;
    border-bottom-width: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Novo Modal de Visualização Fullscreen */
.modal-overlay.fullscreen {
    background-color: #111827;
    /* Fundo escuro para a visualização */
    padding: 0;
    /* Remove padding padrão do modal */
    overflow: hidden;
    /* Evita scroll desnecessário no overlay */
    display: flex;
    /* Para centralizar o conteúdo do currículo */
    flex-direction: column;
    /* Organiza conteúdo e ações verticalmente */
    justify-content: center;
    align-items: center;
}

.modal-content.fullscreen {
    background-color: #111827;
    /* Fundo do modal igual ao overlay */
    border: none;
    /* Remove borda do modal */
    box-shadow: none;
    /* Remove sombra do modal */
    width: 100%;
    height: 100%;
    max-width: 100vw;
    /* Garante que não ultrapasse a largura da viewport */
    max-height: 100vh;
    /* Garante que não ultrapasse a altura da viewport */
    padding: 0;
    /* Remove padding interno, o currículo terá seu próprio padding */
    display: flex;
    /* Para o layout interno */
    flex-direction: column;
    /* Coloca o currículo e os botões em coluna */
    overflow: hidden;
    animation: none;
    /* Remove animação de entrada do modal, se houver */
}

#resume-fullscreen-content {
    flex-grow: 1;
    /* Ocupa o espaço disponível */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Alinha o currículo ao topo do container */
    padding: 20px;
    /* Espaçamento em volta do currículo dentro do modal */
    overflow-y: auto;
    /* Permite scroll no conteúdo do currículo */
}

/* Garante que o conteúdo do currículo dentro do modal se adapte bem */
#resume-fullscreen-content .resume-preview {
    width: 21cm;
    /* Largura A4 padrão para consistência */
    min-height: 29.7cm;
    /* Altura A4 padrão */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    /* Sombra para destacar o currículo */
    transform: scale(0.8);
    /* Reduz o tamanho para caber melhor na tela, especialmente em mobile */
    transform-origin: top center;
    /* Centraliza a redução a partir do topo */
    transition: transform 0.3s ease;
    background-color: white;
    /* Garante fundo branco para o currículo */
    color: #374151;
    /* Cor de texto padrão para o currículo */
}

/* Ajuste o scale para telas menores */
@media (max-width: 768px) {
    #resume-fullscreen-content .resume-preview {
        transform: scale(0.6);
        /* Mais zoom out em telas menores para simular o PDF */
    }
}


/* --- MOBILE RESPONSIVENESS (only when NOT generating PDF) --- */
@media (max-width: 820px) {
    body:not(.pdf-generating) #resume-preview-container {
        padding: 1rem 0;
        background-color: transparent;
    }

    /* Removido ou comentado as regras que causam adaptação em vez de zoom para .resume-preview */
    /*
    body:not(.pdf-generating) .resume-preview {
        width: 100%;
        min-height: auto;
        padding: 1.5rem !important;
        box-shadow: none;
    }

    body:not(.pdf-generating) .resume-preview .grid {
        display: block;
    }

    body:not(.pdf-generating) .resume-preview .grid>div {
        margin-top: 2rem;
    }

    body:not(.pdf-generating) .resume-preview .grid>div:first-child {
        margin-top: 0;
    }

    body:not(.pdf-generating) .resume-preview .md\:border-r {
        border-right-width: 0 !important;
        padding-right: 0 !important;
        border-bottom-width: 2px !important;
        padding-bottom: 2rem !important;
        margin-bottom: 2rem !important;
    }
    */

    .modal-overlay.fullscreen {
        padding: 0;
    }

    .modal-content.fullscreen {
        padding: 0;
    }

    #resume-fullscreen-content {
        padding: 10px;
        /* Menos padding em telas menores */
    }

    /* As regras abaixo foram ajustadas para que o zoom (transform: scale) lide com o redimensionamento em mobile */
    /* #resume-fullscreen-content .resume-preview {
        width: 100%;
        min-height: auto;
        transform: scale(1);
        box-shadow: none;
    } */

    .fullscreen-actions {
        display: flex;
        justify-content: center;
        gap: 1rem;
        padding: 1rem;
        background-color: #1f2937;
        /* Fundo para os botões */
        width: 100%;
        /* Ocupa toda a largura do modal */
        flex-shrink: 0;
        /* Não permite que os botões encolham */
        z-index: 10;
        /* Garante que fiquem acima do currículo ao scrollar */
    }

}

/* === SHARED TEMPLATE STYLES (for new designs) === */
.resume-preview h1,
.resume-preview h2,
.resume-preview h3,
.resume-preview h4 {
    font-family: 'Inter', sans-serif;
    color: #111827;
    /* text-gray-900 */
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    /* text-gray-600 */
    text-decoration: none;
    transition: color 0.2s;
}

.social-link-item:hover {
    color: #0e7490;
    /* text-cyan-700 */
}

.social-link-item .icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.skills-category {
    margin-bottom: 1.25rem;
}

.skills-category-title {
    font-weight: 700;
    color: #0e7490;
    /* text-cyan-700 */
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: #e5e7eb;
    /* bg-gray-200 */
    color: #374151;
    /* text-gray-700 */
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}



.experience-item,
.education-item {
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

.experience-header,
.education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.experience-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.education-course {
    font-size: 1rem;
    font-weight: 700;
}

.experience-period,
.education-period {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    white-space: nowrap;
    padding-left: 1rem;
}

.experience-company {
    font-size: 1rem;
    font-weight: 500;
    color: #0891b2;
    /* text-cyan-600 */
    margin-bottom: 0.5rem;
}

.education-institution {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.experience-description {
    list-style-position: outside;
    margin-left: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.experience-description li {
    margin-bottom: 0.25rem;
    padding-left: 0.5rem;
}

.education-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6b7280;
}

.education-type {
    background-color: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.education-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.6rem;
    border-radius: 9999px;
    color: white;
}

.status-completed {
    background-color: #10b981;
}

/* emerald-500 */
.status-studying {
    background-color: #3b82f6;
}

/* blue-500 */

/* === TEMPLATE: MODERNO === */
.resume-preview.moderno {
    font-size: 15px;
}

.moderno .left-column {
    border-right: 1px solid #e5e7eb;
    padding-right: 2rem;
}

.moderno .section-title {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0e7490;
    border-bottom: 2px solid #0e7490;
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
}

.moderno .main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.moderno .main-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* === TEMPLATE: CRIATIVO === */
.resume-preview.criativo .header {
    background-color: #1f2937;
    color: white;
    text-align: center;
}

.criativo .header h1 {
    color: white;
}

.criativo .header .social-link-item {
    color: #d1d5db;
}

.criativo .header .social-link-item:hover {
    color: #22d3ee;
}

.criativo .main-content {
    padding-top: 2rem;
}

.criativo .section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0e7490;
}

.criativo .timeline {
    position: relative;
    border-left: 2px solid #d1d5db;
    padding-left: 2rem;
}

.criativo .experience-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    transform: translateX(-50%);
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: white;
    border: 3px solid #0e7490;
}

.criativo .sidebar .section-title {
    font-size: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

/* === TEMPLATE: MINIMALISTA === */
.resume-preview.minimalista {
    font-family: 'Inter', sans-serif;
    padding: 3rem;
}

.minimalista .header {
    text-align: center;
    margin-bottom: 2rem;
}

.minimalista .main-title {
    font-size: 3rem;
    letter-spacing: -0.05em;
}

.minimalista .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1rem;
    color: #6b7280;
}

.minimalista .contact-info .separator {
    color: #d1d5db;
}

.minimalista .social-links-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.minimalista .social-links-container .social-link-item .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.minimalista .social-links-container .social-link-item span {
    display: none;
}

.minimalista .section-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: #6b7280;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

/* Modal & Other UI styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background-color: #1f2937;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #374151;
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.4s ease-out;
    margin: auto;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
.modal-overlay.hidden {
    display: none;
}