/* Títulos y cajas auxiliares (migrados de estilos inline) */
.page-title {
    margin: 0 0 18px 0;
    font-size: 1.6em;
    color: #1b5cff;
    font-weight: 700;
    text-align: center;
}
.helper-box {
    background: #f0f6ff;
    border-left: 4px solid #2563eb;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 0;
}
/* GREMIO – Estilo profesional y moderno, coherente con el resto */

:root {
    --bg-page: #f3f4f6;
    --card-bg: #fff;
    --text-main: #1a2233;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1748c7;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.10);
    --shadow-chip: 0 3px 8px rgba(15, 23, 42, 0.12);
    --transition-fast: 0.15s ease;
}


body {
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
}



/* HEADER IGUAL A TRABAJOS */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    color: #1f2937;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
}
.logo {
    margin: 0;
    color: #2563eb;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}


/* Unificación con Perfil/Trabajos */
.profile-page {
    min-height: 100vh;
    padding: 90px 16px 32px 16px; /* padding-top para header fijo */
    display: flex;
    justify-content: center;
/* NOTA: Hay CSS no usado (.container, .linea-separacion, .imagen-container) que se puede limpiar luego. */
}
.profile-container {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px 26px 30px;
}
.profile-section {
    margin-top: 22px;
    padding-top: 6px;
    border-top: 1px solid var(--border-soft);
}
.profile-section:first-of-type {
    border-top: none;
    padding-top: 0;
}
.profile-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.field-group label {
    font-size: 13px;
    color: var(--text-muted);
}
.field-group input,
.field-group select,
.field-group textarea {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    font-family: inherit;
}
.field-group textarea {
    resize: vertical;
    min-height: 72px;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(27, 92, 255, 0.25);
    background-color: #f9fafb;
}

.custom-category-filter {
    position: relative;
}

.custom-category-filter__native {
    position: absolute;
    inset: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-category-filter__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    color: #0f172a;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.custom-category-filter__trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.custom-category-filter.is-open .custom-category-filter__trigger,
.custom-category-filter__trigger:focus-visible {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 14px 28px rgba(37, 99, 235, 0.12);
}

.custom-category-filter.is-disabled .custom-category-filter__trigger,
.custom-category-filter__trigger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.custom-category-filter__trigger-text.is-placeholder {
    color: #64748b;
}

.custom-category-filter__trigger i,
.custom-category-filter__chevron {
    color: #2563eb;
    transition: transform 0.16s ease;
    font-style: normal;
    line-height: 1;
}

.custom-category-filter.is-open .custom-category-filter__trigger i,
.custom-category-filter.is-open .custom-category-filter__chevron {
    transform: rotate(180deg);
}

.custom-category-filter__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 45;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.98) 100%);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.custom-category-filter__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.custom-category-filter__option {
    width: 100%;
    display: block;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 14px;
    padding: 9px 14px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.custom-category-filter__option:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
    background: rgba(239, 246, 255, 0.9);
}

.custom-category-filter__option.is-active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.20);
}

.custom-category-filter__option--clear {
    background: #eef2ff;
    color: #334155;
}

@media (max-width: 640px) {
    .custom-category-filter__list {
        grid-template-columns: 1fr;
    }
}
.save-section {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.save-section button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 10px 22px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(27, 92, 255, 0.35);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.save-section button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(27, 92, 255, 0.4);
}
.save-section button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(27, 92, 255, 0.3);
}

/* Botón secundario (coherente con GREMIO) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 16px;
    border: 1px solid #dbeafe;
    background: #f4f8ff;
    color: #1b5cff;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-secondary:hover {
    background: #e8f1ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(31, 107, 255, 0.12);
}
.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Imagen de la oferta (preview) */
.job-image-preview {
    margin-top: 10px;
    border: none;
    border-radius: 14px;
    background: transparent;
    padding: 0;
}

.job-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

@media (max-width: 640px) {
    .job-image-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.job-image-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.job-image-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.92);
    color: #1b5cff;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.job-image-preview-remove:hover {
    background: #eef5ff;
}

.job-image-preview-img {
    max-width: 100%;
    max-height: clamp(200px, 35vh, 320px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: block;
    margin: 0 auto;
}

/* En grilla: forzar un alto parejo por tarjeta */
.job-image-preview-grid .job-image-preview-img {
    width: 100%;
    height: 180px;
    max-height: none;
    object-fit: contain;
    margin: 0;
}

@media (max-width: 520px) {
    .job-image-preview-grid .job-image-preview-img {
        height: 150px;
    }
}

.job-image-preview-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}
/* Contador de caracteres */
#contador-descripcion {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    text-align: right;
}
@media (max-width: 768px) {
    .profile-container {
        padding: 18px 8px 22px;
        border-radius: 12px;
    }
    .profile-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.45);
    padding-top: 60px;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 24px 20px;
    border: 1px solid var(--border-soft);
    width: 80%;
    text-align: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Styles */


/* === CSS NO USADO, pendiente de limpieza ===
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        padding: 14px 2vw 18px;
        gap: 0;
    }
    .linea-separacion {
        display: none;
    }
    .imagen-container {
        padding: 0;
        margin-top: 18px;
    }
}
*/


#contador-descripcion {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}


.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #e0f2fe;
    color: var(--primary);
    padding: 22px 28px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    z-index: 2100;
    display: none;
}

/* Botón móvil (no usar mismo id) */
.btn-movil {
    display: none;
}

/* Mostrar botón móvil en pantallas pequeñas */
@media (max-width: 768px) {
    .btn-movil {
        display: block;
        width: 100%;
        margin-top: 10px;
    }
}

/* Estilo del botón de publicar en móvil (clase publicar-movil) */
.publicar-movil {
    background: linear-gradient(to right, #4facfe, #00c6fb);
    border: none;
    color: white;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s;
}

/* Accesibilidad: foco visible */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 3px solid rgba(0,114,255,0.2);
    outline-offset: 2px;
}

/* Arreglo: evitar que .linea-separacion ocupe todo en móviles */
/* .linea-separacion { ... }  // NO USADO, pendiente de limpieza */
/* .container, .imagen-container { ... }  // NO USADO, pendiente de limpieza */


/* === FOOTER GREMIO RECOMENDADO (igual a Trabajos) === */
.gremio-footer {
    margin-top: 60px;
    padding: 20px 16px;
    border-top: 1px solid #e5e7eb;
    background-color: #fafafa;
    color: #555;
    line-height: 1.4;
}

.gremio-footer p {
    margin: 0;
}

.gremio-footer strong {
    font-weight: 700;
}

.gremio-footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.gremio-footer-text {
    font-size: 14px;
    color: #555;
}

.gremio-footer-links {
    font-size: 13px;
    color: #777;
}

.gremio-footer-links span {
    color: #777;
}

.gremio-footer-links a {
    color: #1b5cff;
    text-decoration: none;
}

.gremio-footer-links a:hover {
    text-decoration: underline;
}

/* Estilos para modal abierto (error) */

.modal.open {
    display: block;
}

/* Distinción visual para modal de error */

.modal-content.error {
    border: 2px solid #ff5757;
    background: #fff6f6;
    color: #8a1f1f;
}

/* Clase para campos que parpadean al estar vacíos (más lenta y duración mayor) */

.campo-error {
    animation: campoParpadeo 0.8s ease-in-out 0s 4;
    border: 2px solid #ffcc00 !important;
    box-shadow: 0 0 10px rgba(255,204,0,0.95);
}

/* Keyframes parpadeo (más suave y menos rápido) */

@keyframes campoParpadeo {
    0%   { background-color: transparent; }
    20%  { background-color: rgba(255, 204, 0, 0.12); }
    50%  { background-color: rgba(255, 0, 0, 0.06); }
    80%  { background-color: rgba(255, 204, 0, 0.12); }
    100% { background-color: transparent; }
}

/* Asegurar el z-index del modal de error */

#errorModal {
    z-index: 2100;
}
